Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
vdemichev committed Jun 13, 2019
1 parent dd9f86a commit 9b2bdda
Show file tree
Hide file tree
Showing 15 changed files with 115 additions and 94 deletions.
Binary file modified DIA-NN GUI manual.pdf
Binary file not shown.
Binary file modified DIA-NN-Setup.msi
Binary file not shown.
Binary file modified DIA-NN.Wiff.dll
Binary file not shown.
Binary file modified DIA-NN.exe
Binary file not shown.
Binary file modified DiaNN.exe
Binary file not shown.
2 changes: 1 addition & 1 deletion GUI/GUI/DIA-NN GUI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<OutputType>WinExe</OutputType>
<RootNamespace>GUI</RootNamespace>
<AssemblyName>DIA-NN</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<TargetFrameworkVersion>4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<IsWebBootstrapper>false</IsWebBootstrapper>
Expand Down
44 changes: 22 additions & 22 deletions GUI/GUI/Form1.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 16 additions & 11 deletions GUI/GUI/Form1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ namespace GUI
public struct Settings
{
public string name;
public string files_s, lib_s, out_s, out_gene_s, fasta_s, diann_s, learn_lib_s, out_lib_s, add_s;
public string files_s, lib_s, out_s, temp_folder_s, fasta_s, diann_s, learn_lib_s, out_lib_s, add_s;
public decimal threads_i, log_i, missed_i, varmod_i, scan_i, pep_min_i, pep_max_i,
pr_min_i, pr_max_i, fr_min_i, fr_max_i;
public int grouping_i, protease_i;
Expand Down Expand Up @@ -60,7 +60,7 @@ private void SaveSettings(ref Settings S)
S.threads_i = ThreadsUpDown.Value;
S.log_i = VerboseUpDown.Value;
S.out_s = OutputText.Text;
S.out_gene_s = GeneRepBox.Text;
S.temp_folder_s = TempFolderBox.Text;
S.prec_fdr_d = FDRUpDown.Value;
S.prot_fdr_d = ProteinFDRUpDown.Value;
S.fasta_s = FastaText.Text;
Expand Down Expand Up @@ -103,7 +103,7 @@ private void LoadSettings(Settings S)
ThreadsUpDown.Value = S.threads_i;
VerboseUpDown.Value = S.log_i;
OutputText.Text = S.out_s;
GeneRepBox.Text = S.out_gene_s;
TempFolderBox.Text = S.temp_folder_s;
FDRUpDown.Value = S.prec_fdr_d;
ProteinFDRUpDown.Value = S.prot_fdr_d;
FastaText.Text = S.fasta_s;
Expand Down Expand Up @@ -136,6 +136,8 @@ private void LoadSettings(Settings S)
InterferenceBox.Checked = S.ifr_b;
PGBox.SelectedIndex = S.grouping_i;
OptionsText.Text = S.add_s;

if (!System.IO.Directory.Exists(S.temp_folder_s)) TempFolderBox.Text = S.temp_folder_s = "";
}

private void RawDataButton_Click(object sender, EventArgs e)
Expand Down Expand Up @@ -249,10 +251,15 @@ private void RunProcess(bool convert, Settings S)
process.StartInfo.Arguments += " --threads " + S.threads_i.ToString();
process.StartInfo.Arguments += " --verbose " + S.log_i.ToString();
process.StartInfo.Arguments += " --out \"" + S.out_s + "\"";
process.StartInfo.Arguments += " --out-gene \"" + S.out_gene_s + "\"";
process.StartInfo.Arguments += " --out-gene \""
+ System.IO.Path.Combine(System.IO.Path.GetDirectoryName(S.out_s), System.IO.Path.GetFileNameWithoutExtension(S.out_s))
+ ".genes.tsv\"";
process.StartInfo.Arguments += " --qvalue " + Convert.ToString(0.01 * (double)S.prec_fdr_d);
process.StartInfo.Arguments += " --protein-qvalue " + Convert.ToString(0.01 * (double)S.prot_fdr_d);

if (!System.IO.Directory.Exists(S.temp_folder_s)) TempFolderBox.Text = S.temp_folder_s = "";
else process.StartInfo.Arguments += " --temp \"" + S.temp_folder_s + "\"";

if (S.fasta_s != "")
{
List<string> fastaFiles = new List<string>(S.fasta_s.Split(new[] { '\n' }));
Expand Down Expand Up @@ -322,12 +329,13 @@ private void RunProcess(bool convert, Settings S)
"A config file will therefore be created and referenced with a --cfg command. " +
"Alternatively, one can use --dir command to include all files in a directory." + Environment.NewLine;
String fname = Directory.GetCurrentDirectory() + "\\DIA-NN-launch-cfg.txt";
if (S.temp_folder_s.Length >= 1) if (System.IO.Directory.Exists(S.temp_folder_s)) fname = S.temp_folder_s + "\\DIA-NN-launch-cfg.txt";
try
{
File.WriteAllText(fname, process.StartInfo.Arguments);
process.StartInfo.Arguments = " --cfg \"" + fname + "\"";
}
catch (Exception ex) { LogText.Text += "ERROR: cannot create a config file, check if the folder with DIA-NN GUI is write-protected." + Environment.NewLine; }
catch (Exception ex) { LogText.Text += "ERROR: cannot create the config file " + fname + ": check if the location is write protected. Error message: " + Environment.NewLine + ex.ToString() + Environment.NewLine; }
}

if (save_cfg) return;
Expand Down Expand Up @@ -536,14 +544,11 @@ private void OxidationBox_CheckedChanged(object sender, EventArgs e)
VarModsUpDown.Value = 1;
}

private void GeneRepButton_Click(object sender, EventArgs e)
private void TempFolderButton_Click(object sender, EventArgs e)
{
SaveFileDialog outDialog = new SaveFileDialog();
outDialog.Filter = "Tab-separated files (*.tsv)|*.tsv|All files (*.*)|*.*";
outDialog.FilterIndex = 0;
outDialog.RestoreDirectory = true;
var outDialog = new FolderBrowserDialog();
if (outDialog.ShowDialog() == DialogResult.OK)
GeneRepBox.Text = outDialog.FileName;
TempFolderBox.Text = outDialog.SelectedPath;
}

private void PipAdd_Click(object sender, EventArgs e)
Expand Down
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,14 @@ For a full list of supported commands see the arguments() function in /src/diann
### Building

**Windows**: A Visual C++ solution file is provided with the source code. Changing the SDK to a Windows 10 one in the project settings might be required. Tested on Windows 7 and 10.
**Linux**: type "bash linux-build-old-gcc" or "bash linux-build-gcc-7" and wait a couple of minutes. GCC version should not be too old (C++14 support required). Using GCC 7 or later enables some extra commands, e.g. "--dir". It's unknown, whether binaries built on Linux would produce exactly the same analysis results when run on different machines. On Linux, only .dia format is supported, Windows version of DIA-NN can be used to convert vendor and .mzML files to .dia. Tested on Ubuntu 16.04 and Linux Mint 19.1.

**Linux** (GCC 7 or late required):
```
git clone https://www.github.com/vdemichev/diann
cd diann/mstoolkit
make
```
Bash scripts for building without .mzML support (for this, uncomment "//#undef MSTOOLKIT" after "#ifdef LINUX") are also provided in the root directory.

### Tutorial

This is a simple tutorial which covers the generation of a spectral library from DIA data and its use to analyse other DIA runs (using DIA-NN 1.6.0).
Expand Down
2 changes: 2 additions & 0 deletions WiffReader/WiffReader.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>false</SDLCheck>
<ConformanceMode>true</ConformanceMode>
<AdditionalOptions>/Zc:twoPhase- %(AdditionalOptions)</AdditionalOptions>
</ClCompile>
<Link>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
Expand All @@ -105,6 +106,7 @@
<Optimization>Disabled</Optimization>
<SDLCheck>true</SDLCheck>
<ConformanceMode>true</ConformanceMode>
<AdditionalOptions>/Zc:twoPhase- %(AdditionalOptions)</AdditionalOptions>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
Expand Down
3 changes: 0 additions & 3 deletions cranium/src/.vs/ProjectSettings.json

This file was deleted.

7 changes: 0 additions & 7 deletions cranium/src/.vs/VSWorkspaceState.json

This file was deleted.

Binary file removed cranium/src/.vs/slnx.sqlite
Binary file not shown.
Binary file removed diann/x64/Debug/vc141.idb
Binary file not shown.
Loading

0 comments on commit 9b2bdda

Please sign in to comment.