Skip to content

Commit

Permalink
Notame function (#439)
Browse files Browse the repository at this point in the history
* Button that generates and displays a graph and saves as a image.

* Notame.cs

* 様々な方法で試してみましたが、まだどこかでバインドされていなさそうですが、こまめにコミットということでコミットさせていただきます。

* 色々試して、これしかないと思ったが、動けない。

* Naming update

* Naming update

* Add license of the R.NET package

* Improve Notame class

* Update LcmsMethodModel

* Move NotameViewModel class

* Update LcmsMethodViewModel

* Update MainWindowVM

* Update MsidalProcessingTab

* Create notame.png

* Update MsdialGuiApp.csproj

* Update MsdialProcessingTab.xaml

* Add R script runner (as comment)

* Notame saves parameter as .json

* Updated Notame and added pipe.

* Binded Notame C# to Notame Rscript

* Added NotameView files.

* Updated Notame.cs

* Updated NotameViewModel.

* Updated NotameView.

* Updated Notame.

* Updated NotameViewModel and LcmsViewModel.

* Changed Notame Ribbon Control.

* Changed Notame commands

* Updated NotameView.xaml

* Added NotameViewModel to MainWindow.xaml.cs

* Changed NotameView (folder browse only)

* Added export command and deleted unnecessary strings.

* Deleted save parameter as json file command

* Changed new Notame script (Direct read of alignment result file)

* Changed R script that read ion mode just as pos or neg.

* Deleted unnecessary parts of R script.

* Deleted groupingName string which is constant on MSDIAL.

* Changed command name.

* Deleted export command.

* Changed buttons

* IonMode direct binding

* Corrected binding.

* Changed window size

* Changed NotameView (able to select alignment result file and parameters)

* Changed NotameViewModel (able to choose alignment result file and parameters)

* Added notame property

* Added Export command of alignment result file to Notame.

* Direct binding of file name.

* Ion mode conversion.

* Cleaned code and added path slash to the R script.

* Update Notame class

* Update NotameView

* Update LcmsMethodModel for notame

* Update Notame task progress

* Remove DataExportBaseParameter from Notame

* Update

* Sort usings

* Direct file name binding

* Export directory slash change

* Added extention to file name for Rscript

* Cleaned overall space

* Changed into new R script

* Added messsage box to notify when R script done running.

* Made ViewModel window small

* Integrated 2 commands into one.

* Added message box before notame starts.

* Made "await" RunNotame command

* Changed naming

* Added file name with the extention

* Added IonMode to Notame

* Added ConfigureAwait to RunNotame command

* Separated Notame Rscript.

* Added NotameXmlReader file.

* Changed Notame.cs due to separation of R script.

* Added backslash to folder path

* Added Notame.R as a resource code

* Added Notame Rscript reader

* Changed Notame.cs (xml to r)

* Deleted files related to Notame xml

* Add InsertAlignmentMetadataAccessorDecorator

* Add IdentityAlignmentMetadataAccessorFactory

* Update multi class support for Notame

* Updated Notame.R source code

* Added MUVR.R to make visualizations (second half of Notame)

* Added R reader for MUVR.R

* Added MUVR to Notam

* Set symbol of MUVR sent from Notame.cs

* Cleaned space

* Made MUVR into another void (separated from RunNotame)

* Edited path setting

* Updated Notame.cs

* Added R directory browse command

* Added progress bar

* Added Notame information and hyperlink

* Updated notame information

* Add RHome setting variable

* Set and save r home value

* Remove redundant loaders of r script

* Updated Notame and MUVR script.

* Change app.config

* Fix usings ordering

* Fix warnings

* Update settings

* Fix progress bar for notame

* Check required libraries are installed.

* Update requried libraries

* Omitted R engine disposal.

* Changed version number

* Updated version number

* Updated MUVR.R

* Install packages automatically and show error if occured

* Updated package installation of Notame

* Updated package installation of Notame

* Report export selection added

* Updated R scripts

* Added R directory saving

* Minor naming change

* Changed Notame button label

* Changed directory setting of NotameMinor change of Notame

* Fixed typos

* Updated Notame.R

* Changed Notame button position

* Updated R script button of package installation

* Updated R script of reporting

* Notame KeyTip changed

* Deleted Resources.resx

* Deleted Designer.cs

* Deletes RRunner.cs

* Changed Notame KeyTip

* Revert "Deleted Designer.cs"

This reverts commit 1283d1e.

* Revert "Deleted Resources.resx"

This reverts commit fd07d11.

---------

Co-authored-by: Bujinlkham BUYANTOGTOKH <[email protected]>
Co-authored-by: Yuki Matsuzawa <[email protected]>
Co-authored-by: Kozo Nishida <[email protected]>
  • Loading branch information
4 people authored Nov 12, 2024
1 parent 71a129d commit f470e47
Show file tree
Hide file tree
Showing 49 changed files with 1,867 additions and 55 deletions.
33 changes: 33 additions & 0 deletions THIRD-PARTY-LICENSE-README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1602,3 +1602,36 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

======================================

R.NET (https://github.com/rdotnet/rdotnet)

The MIT License (MIT)

Copyright (c) 2014-2020 Jean-Michel Perraud
Copyright (c) 2019-2020 Luke Rasmussen
Copyright (c) 2018 David Pendray
Copyright (c) 2017 Guillaume Jamet
Copyright (c) 2016 Tomas Petricek, Wei Lu
Copyright (c) 2015 Nigel Delaney, Yuanhe Huang
Copyright (c) 2014 skuyguy94, David Charbonneau
Copyright (c) 2013 Kosei ABE, evolvedmicrobe

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
4 changes: 2 additions & 2 deletions src/MSDIAL4/LipidomicsRtManageProgram/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public DelegateCommand SelectRLocationFolder {
private void ShowRLocationSelectDialog(object obj) {
System.Windows.Forms.FolderBrowserDialog fbd = new System.Windows.Forms.FolderBrowserDialog();
fbd.RootFolder = Environment.SpecialFolder.Desktop;
fbd.Description = "Chose a folder where to save the exported files.";
fbd.Description = "Choose a folder where to save the exported files.";
fbd.SelectedPath = Environment.GetFolderPath(Environment.SpecialFolder.Desktop);

if (fbd.ShowDialog() == System.Windows.Forms.DialogResult.OK) {
Expand All @@ -133,7 +133,7 @@ public DelegateCommand SelectOutputFolder {
private void ShowOutputFolderSelectDialog(object obj) {
System.Windows.Forms.FolderBrowserDialog fbd = new System.Windows.Forms.FolderBrowserDialog();
fbd.RootFolder = Environment.SpecialFolder.Desktop;
fbd.Description = "Chose a folder where to save the exported files.";
fbd.Description = "Choose a folder where to save the exported files.";
fbd.SelectedPath = Environment.GetFolderPath(Environment.SpecialFolder.Desktop);

if (fbd.ShowDialog() == System.Windows.Forms.DialogResult.OK) {
Expand Down
2 changes: 1 addition & 1 deletion src/MSDIAL4/MsDial/Export/AlignmentResultExportVM.cs
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ private void copyExportParametersToProjectProperty() {
}

#region properties
[Required(ErrorMessage = "Chose a folder path.")]
[Required(ErrorMessage = "Choose a folder path.")]
public string ExportFolderPath
{
get { return exportFolderPath; }
Expand Down
2 changes: 1 addition & 1 deletion src/MSDIAL4/MsDial/Export/AlignmentResultExportWin.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ private void Button_ExportFolderPath_Click(object sender, RoutedEventArgs e)

System.Windows.Forms.FolderBrowserDialog fbd = new System.Windows.Forms.FolderBrowserDialog();
fbd.RootFolder = Environment.SpecialFolder.Desktop;
fbd.Description = "Chose a project folder.";
fbd.Description = "Choose a project folder.";
fbd.SelectedPath = System.Environment.GetFolderPath(Environment.SpecialFolder.Desktop);

if (fbd.ShowDialog() == System.Windows.Forms.DialogResult.OK)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public class LipoqualityDatabaseFormatExportVM : ViewModelBase
private ObservableCollection<AlignmentFileBean> alignmentFiles;

#region
[Required(ErrorMessage = "Chose a folder for the exported file.")]
[Required(ErrorMessage = "Choose a folder for the exported file.")]
public string ExportFolderPath
{
get { return exportFolderPath; }
Expand Down Expand Up @@ -83,7 +83,7 @@ private void ShowFolderSelectionDialog(object obj)
{
System.Windows.Forms.FolderBrowserDialog fbd = new System.Windows.Forms.FolderBrowserDialog();
fbd.RootFolder = Environment.SpecialFolder.Desktop;
fbd.Description = "Chose a folder where to save the exported files.";
fbd.Description = "Choose a folder where to save the exported files.";
fbd.SelectedPath = Environment.GetFolderPath(Environment.SpecialFolder.Desktop);

if (fbd.ShowDialog() == System.Windows.Forms.DialogResult.OK) {
Expand Down
2 changes: 1 addition & 1 deletion src/MSDIAL4/MsDial/Export/MS2ExporterAsUserDefinedStyle.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public static void particular_settings_tada(object target, MainWindow mainWindow
//var export_dir = mainWindow.ProjectProperty.ProjectFolderPath + "\\" + "Exported_Figures";
System.Windows.Forms.FolderBrowserDialog fbd = new System.Windows.Forms.FolderBrowserDialog();
fbd.RootFolder = Environment.SpecialFolder.Desktop;
fbd.Description = "Chose a save folder.";
fbd.Description = "Choose a save folder.";
fbd.SelectedPath = System.Environment.GetFolderPath(Environment.SpecialFolder.Desktop);
var export_dir = string.Empty;
if (fbd.ShowDialog() == System.Windows.Forms.DialogResult.OK) {
Expand Down
4 changes: 2 additions & 2 deletions src/MSDIAL4/MsDial/Export/MrmprobsExportVM.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public MrmprobsExportVM(bool isAlignmentView)
/// <summary>
/// Folder where the export function will export Mrmprobs library
/// </summary>
[Required(ErrorMessage = "Chose a folder for the exported file.")]
[Required(ErrorMessage = "Choose a folder for the exported file.")]
public string ExportFolderPath
{
get { return exportFolderPath; }
Expand Down Expand Up @@ -266,7 +266,7 @@ private void ShowFolderSelectionDialog(object obj)
{
System.Windows.Forms.FolderBrowserDialog fbd = new System.Windows.Forms.FolderBrowserDialog();
fbd.RootFolder = Environment.SpecialFolder.Desktop;
fbd.Description = "Chose a folder where to save the exported files.";
fbd.Description = "Choose a folder where to save the exported files.";
fbd.SelectedPath = Environment.GetFolderPath(Environment.SpecialFolder.Desktop);

if (fbd.ShowDialog() == System.Windows.Forms.DialogResult.OK) {
Expand Down
4 changes: 2 additions & 2 deletions src/MSDIAL4/MsDial/Export/PeaklistExportVM.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public class PeaklistExportVM : ViewModelBase
/// <summary>
/// Folder where the export function will save the selected files
/// </summary>
[Required(ErrorMessage = "Chose a folder for the exported files.")]
[Required(ErrorMessage = "Choose a folder for the exported files.")]
public string ExportFolderPath
{
get { return exportFolderPath; }
Expand Down Expand Up @@ -203,7 +203,7 @@ private void ShowFolderSelectionDialog(object obj)
{
System.Windows.Forms.FolderBrowserDialog fbd = new System.Windows.Forms.FolderBrowserDialog();
fbd.RootFolder = Environment.SpecialFolder.Desktop;
fbd.Description = "Chose a folder where to save the exported files.";
fbd.Description = "Choose a folder where to save the exported files.";
fbd.SelectedPath = Environment.GetFolderPath(Environment.SpecialFolder.Desktop);

if (fbd.ShowDialog() == System.Windows.Forms.DialogResult.OK)
Expand Down
4 changes: 2 additions & 2 deletions src/MSDIAL4/MsDial/Export/StoreMsAnnotationTagsWin.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ private void Click_ExportFolderPathSelect(object sender, RoutedEventArgs e)
{
System.Windows.Forms.FolderBrowserDialog fbd = new System.Windows.Forms.FolderBrowserDialog();
fbd.RootFolder = Environment.SpecialFolder.Desktop;
fbd.Description = "Chose an export folder.";
fbd.Description = "Choose an export folder.";
fbd.SelectedPath = System.Environment.GetFolderPath(Environment.SpecialFolder.Desktop);

if (fbd.ShowDialog() == System.Windows.Forms.DialogResult.OK)
Expand Down Expand Up @@ -137,7 +137,7 @@ private void ComboBox_MassSpecType_SelectionChanged(object sender, SelectionChan
{
if (mainWindow.ProjectProperty.MethodType == MethodType.ddMSMS && ((ComboBox)sender).SelectedIndex == 2)
{
MessageBox.Show("In data depeondent mode, you cannot chose the deconvoluton output.", "Attention", MessageBoxButton.OK, MessageBoxImage.Information);
MessageBox.Show("In data depeondent mode, you cannot choose the deconvoluton output.", "Attention", MessageBoxButton.OK, MessageBoxImage.Information);
return;
}
this.exportMsType = (ExportspectraType)((ComboBox)sender).SelectedIndex;
Expand Down
2 changes: 1 addition & 1 deletion src/MSDIAL4/MsDial/ForAIF/AifViewerControl.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1095,7 +1095,7 @@ private void message_exist(string txt) {
}

private void message_requestAlignment() {
MessageBox.Show("Chose an alignment file from the file navigator.", "Error", MessageBoxButton.OK, MessageBoxImage.Error);
MessageBox.Show("Choose an alignment file from the file navigator.", "Error", MessageBoxButton.OK, MessageBoxImage.Error);
}

private void message_willBeAvailable() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public ParticularAlignmentSpotExporterWindow(MainWindow mainWindow) {
private void Click_ExportFilePathSelect(object sender, RoutedEventArgs e) {
System.Windows.Forms.FolderBrowserDialog fbd = new System.Windows.Forms.FolderBrowserDialog();
fbd.RootFolder = Environment.SpecialFolder.Desktop;
fbd.Description = "Chose a project folder.";
fbd.Description = "Choose a project folder.";
fbd.SelectedPath = System.Environment.GetFolderPath(Environment.SpecialFolder.Desktop);

if (fbd.ShowDialog() == System.Windows.Forms.DialogResult.OK) {
Expand Down
Loading

0 comments on commit f470e47

Please sign in to comment.