Skip to content

Commit

Permalink
Merge pull request #426 from acesnik/master
Browse files Browse the repository at this point in the history
Quantification changes
  • Loading branch information
Anthony authored Aug 1, 2017
2 parents 08bfa0e + 3d41fd5 commit ac5d757
Show file tree
Hide file tree
Showing 62 changed files with 3,987 additions and 2,147 deletions.
Binary file added Examples/benjihoch.xlsx
Binary file not shown.
Binary file not shown.
Binary file added Examples/full_log2FC_quant_test_table.xlsx
Binary file not shown.
Binary file modified Examples/proteoform_quantification_minimal_test.xlsx
Binary file not shown.
42 changes: 29 additions & 13 deletions ProteoformSuiteGUI/DisplayObjects/DisplayInputFile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public bool ContaminantDB


// For quantification files
public int biological_replicate
public string biological_replicate
{
get
{
Expand All @@ -72,17 +72,31 @@ public int biological_replicate
}
}

//public int Fraction
//{
// get
// {
// return file.fraction;
// }
// set
// {
// file.fraction = value;
// }
//}
public string Fraction
{
get
{
return file.fraction;
}
set
{
Sweet.change_file(file, file.biological_replicate, nameof(file.fraction), file.fraction.ToString(), value.ToString());
file.fraction = value;
}
}

public string TechnicalReplicate
{
get
{
return file.technical_replicate;
}
set
{
Sweet.change_file(file, file.biological_replicate, nameof(file.technical_replicate), file.technical_replicate.ToString(), value.ToString());
file.technical_replicate = value;
}
}

public string lt_condition
{
Expand Down Expand Up @@ -161,6 +175,7 @@ public static void FormatInputFileTable(DataGridView dgv, IEnumerable<Purpose> d
dgv.Columns[nameof(complete_path)].HeaderText = "File Path";
dgv.Columns[nameof(matchingCalibrationFile)].HeaderText = "Matching Calibration File";
dgv.Columns[nameof(biological_replicate)].HeaderText = "Biological Replicate";
dgv.Columns[nameof(TechnicalReplicate)].HeaderText = "Technical Replicate";
dgv.Columns[nameof(lt_condition)].HeaderText = Sweet.lollipop.neucode_labeled ? "NeuCode Light Condition" : "Condition";
dgv.Columns[nameof(hv_condition)].HeaderText = "NeuCode Heavy Condition";
dgv.Columns[nameof(ContaminantDB)].HeaderText = "Contaminant Database";
Expand All @@ -177,7 +192,8 @@ public static void FormatInputFileTable(DataGridView dgv, IEnumerable<Purpose> d
dgv.Columns[nameof(matchingCalibrationFile)].Visible = dgv_purposes.Contains(Purpose.Calibration) || dgv_purposes.Contains(Purpose.Identification) || dgv_purposes.Contains(Purpose.Quantification);
dgv.Columns[nameof(Labeling)].Visible = dgv_purposes.Contains(Purpose.Identification) || dgv_purposes.Contains(Purpose.Quantification);
dgv.Columns[nameof(biological_replicate)].Visible = dgv_purposes.Contains(Purpose.Quantification);
//dgv.Columns[nameof(Fraction)].Visible = dgv_purposes.Contains(Purpose.Quantification);
dgv.Columns[nameof(Fraction)].Visible = dgv_purposes.Contains(Purpose.Quantification);
dgv.Columns[nameof(TechnicalReplicate)].Visible = dgv_purposes.Contains(Purpose.Quantification);
dgv.Columns[nameof(lt_condition)].Visible = dgv_purposes.Contains(Purpose.Quantification);
dgv.Columns[nameof(hv_condition)].Visible = Sweet.lollipop.neucode_labeled && dgv_purposes.Contains(Purpose.Quantification);
dgv.Columns[nameof(ContaminantDB)].Visible = dgv_purposes.Contains(Purpose.ProteinDatabase);
Expand Down
16 changes: 8 additions & 8 deletions ProteoformSuiteGUI/DisplayObjects/DisplayQuantitativeValues.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@ public string GeneName

public decimal NumeratorIntensitySum
{
get { return qval.numeratorIntensitySum; }
get { return qval.TusherValues1.numeratorIntensitySum; }
}

public decimal DenominatorIntensitySum
{
get { return qval.denominatorIntensitySum; }
get { return qval.TusherValues1.denominatorIntensitySum; }
}

public decimal IntensitySum
Expand All @@ -63,27 +63,27 @@ public decimal LogFoldChange

public decimal Scatter_linear
{
get { return qval.scatter; }
get { return qval.TusherValues1.scatter; }
}

public decimal pValue
public double pValue
{
get { return qval.pValue; }
get { return qval.Log2FoldChangeValues.pValue_uncorrected; }
}

public bool Significant
{
get { return qval.significant; }
get { return qval.TusherValues1.significant; }
}

public decimal TestStatistic_linear
{
get { return qval.relative_difference; }
get { return qval.TusherValues1.relative_difference; }
}

public decimal AvgPermutedTestStatistic
{
get { return qval.correspondingAvgSortedRelDiff; }
get { return qval.TusherValues1.correspondingAvgSortedRelDiff; }
}

public string manual_validation_quant
Expand Down
4 changes: 4 additions & 0 deletions ProteoformSuiteGUI/ExperimentTheoreticalComparison.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ public void RunTheGamut()
Sweet.lollipop.et_relations = Sweet.lollipop.target_proteoform_community.relate(Sweet.lollipop.target_proteoform_community.experimental_proteoforms, Sweet.lollipop.target_proteoform_community.theoretical_proteoforms, ProteoformComparison.ExperimentalTheoretical, true, Environment.CurrentDirectory, true);
Sweet.lollipop.relate_ed();
Sweet.lollipop.et_peaks = Sweet.lollipop.target_proteoform_community.accept_deltaMass_peaks(Sweet.lollipop.et_relations, Sweet.lollipop.ed_relations);
if (Sweet.lollipop.et_peaks.Any(x => x.mass_shifter != "0"))
{
shift_masses(); // always shift before forming relations; shifts might be entered from preset; if none are entered, no shifting occurs
}
FillTablesAndCharts();
}

Expand Down
2 changes: 2 additions & 0 deletions ProteoformSuiteGUI/LoadDeconvolutionResults.cs
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,7 @@ private void add_files(ComboBox cmb, DataGridView dgv)
DisplayUtility.FillDataGridView(dgv, Sweet.lollipop.get_files(Sweet.lollipop.input_files, Lollipop.file_types[cmb.SelectedIndex]).Select(f => new DisplayInputFile(f)));
DisplayInputFile.FormatInputFileTable(dgv, Lollipop.file_types[cmb.SelectedIndex]);
}

#endregion ADD BUTTONS Private Methods

#region CLEAR BUTTONS Private Methods
Expand Down Expand Up @@ -508,5 +509,6 @@ private void validate(DataGridView dgv, DataGridViewCellValidatingEventArgs e)
}

#endregion Cell Validation Methods

}
}
1 change: 1 addition & 0 deletions ProteoformSuiteGUI/ProteoformFamilies.Designer.cs

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

4 changes: 2 additions & 2 deletions ProteoformSuiteGUI/ProteoformFamilies.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using Chemistry;
using ProteoformSuiteInternal;
using ProteoformSuiteInternal;
using System;
using System.Collections.Generic;
using System.Data;
Expand Down Expand Up @@ -396,5 +395,6 @@ private void tb_likelyCleavages_TextChanged(object sender, EventArgs e)
private void cmbx_empty_TextChanged(object sender, EventArgs e) { }

#endregion Private Methods

}
}
58 changes: 32 additions & 26 deletions ProteoformSuiteGUI/ProteoformSuiteGUI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,11 @@
</StartupObject>
</PropertyGroup>
<ItemGroup>
<Reference Include="Chemistry, Version=1.0.193.0, Culture=neutral, processorArchitecture=AMD64">
<HintPath>..\packages\mzLib.1.0.193\lib\Chemistry.dll</HintPath>
<Reference Include="Chemistry, Version=1.0.206.0, Culture=neutral, processorArchitecture=AMD64">
<HintPath>..\packages\mzLib.1.0.206\lib\Chemistry.dll</HintPath>
</Reference>
<Reference Include="ClosedXML, Version=0.87.0.0, Culture=neutral, PublicKeyToken=fd1eb21b62ae805b, processorArchitecture=MSIL">
<HintPath>..\packages\ClosedXML.0.87.1\lib\net40\ClosedXML.dll</HintPath>
<Reference Include="ClosedXML, Version=0.88.0.0, Culture=neutral, PublicKeyToken=fd1eb21b62ae805b, processorArchitecture=MSIL">
<HintPath>..\packages\ClosedXML.0.88.0\lib\net452\ClosedXML.dll</HintPath>
</Reference>
<Reference Include="DocumentFormat.OpenXml, Version=2.7.2.0, Culture=neutral, PublicKeyToken=8fb06cb64d019a17, processorArchitecture=MSIL">
<HintPath>..\packages\DocumentFormat.OpenXml.2.7.2\lib\net40\DocumentFormat.OpenXml.dll</HintPath>
Expand All @@ -81,32 +81,38 @@
<HintPath>..\packages\EntityFramework.6.1.3\lib\net45\EntityFramework.SqlServer.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="ManagedThermoHelperLayer, Version=1.0.193.0, Culture=neutral, processorArchitecture=AMD64">
<HintPath>..\packages\mzLib.1.0.193\lib\ManagedThermoHelperLayer.dll</HintPath>
<Reference Include="FastMember.Signed, Version=1.0.0.9, Culture=neutral, PublicKeyToken=9e8f22703bef9a29, processorArchitecture=MSIL">
<HintPath>..\packages\FastMember.Signed.1.1.0\lib\net40\FastMember.Signed.dll</HintPath>
</Reference>
<Reference Include="MassSpectrometry, Version=1.0.193.0, Culture=neutral, processorArchitecture=AMD64">
<HintPath>..\packages\mzLib.1.0.193\lib\MassSpectrometry.dll</HintPath>
<Reference Include="ManagedThermoHelperLayer, Version=1.0.206.0, Culture=neutral, processorArchitecture=AMD64">
<HintPath>..\packages\mzLib.1.0.206\lib\ManagedThermoHelperLayer.dll</HintPath>
</Reference>
<Reference Include="MathNet.Numerics, Version=3.19.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MathNet.Numerics.3.19.0\lib\net40\MathNet.Numerics.dll</HintPath>
<Reference Include="MassSpectrometry, Version=1.0.206.0, Culture=neutral, processorArchitecture=AMD64">
<HintPath>..\packages\mzLib.1.0.206\lib\MassSpectrometry.dll</HintPath>
</Reference>
<Reference Include="MathNet.Numerics, Version=3.20.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MathNet.Numerics.3.20.0\lib\net40\MathNet.Numerics.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Office.Interop.Excel, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c, processorArchitecture=MSIL">
<EmbedInteropTypes>True</EmbedInteropTypes>
</Reference>
<Reference Include="mzIdentML, Version=1.0.193.0, Culture=neutral, processorArchitecture=AMD64">
<HintPath>..\packages\mzLib.1.0.193\lib\mzIdentML.dll</HintPath>
<Reference Include="mzIdentML, Version=1.0.206.0, Culture=neutral, processorArchitecture=AMD64">
<HintPath>..\packages\mzLib.1.0.206\lib\mzIdentML.dll</HintPath>
</Reference>
<Reference Include="MzLibUtil, Version=1.0.206.0, Culture=neutral, processorArchitecture=AMD64">
<HintPath>..\packages\mzLib.1.0.206\lib\MzLibUtil.dll</HintPath>
</Reference>
<Reference Include="MzLibUtil, Version=1.0.193.0, Culture=neutral, processorArchitecture=AMD64">
<HintPath>..\packages\mzLib.1.0.193\lib\MzLibUtil.dll</HintPath>
<Reference Include="MzML, Version=1.0.206.0, Culture=neutral, processorArchitecture=AMD64">
<HintPath>..\packages\mzLib.1.0.206\lib\MzML.dll</HintPath>
</Reference>
<Reference Include="MzML, Version=1.0.193.0, Culture=neutral, processorArchitecture=AMD64">
<HintPath>..\packages\mzLib.1.0.193\lib\MzML.dll</HintPath>
<Reference Include="pepXML, Version=1.0.206.0, Culture=neutral, processorArchitecture=AMD64">
<HintPath>..\packages\mzLib.1.0.206\lib\pepXML.dll</HintPath>
</Reference>
<Reference Include="Proteomics, Version=1.0.193.0, Culture=neutral, processorArchitecture=AMD64">
<HintPath>..\packages\mzLib.1.0.193\lib\Proteomics.dll</HintPath>
<Reference Include="Proteomics, Version=1.0.206.0, Culture=neutral, processorArchitecture=AMD64">
<HintPath>..\packages\mzLib.1.0.206\lib\Proteomics.dll</HintPath>
</Reference>
<Reference Include="Spectra, Version=1.0.193.0, Culture=neutral, processorArchitecture=AMD64">
<HintPath>..\packages\mzLib.1.0.193\lib\Spectra.dll</HintPath>
<Reference Include="Spectra, Version=1.0.206.0, Culture=neutral, processorArchitecture=AMD64">
<HintPath>..\packages\mzLib.1.0.206\lib\Spectra.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.ComponentModel.DataAnnotations" />
Expand All @@ -123,11 +129,11 @@
<Reference Include="System.Xml">
<Private>True</Private>
</Reference>
<Reference Include="Thermo, Version=1.0.193.0, Culture=neutral, processorArchitecture=AMD64">
<HintPath>..\packages\mzLib.1.0.193\lib\Thermo.dll</HintPath>
<Reference Include="Thermo, Version=1.0.206.0, Culture=neutral, processorArchitecture=AMD64">
<HintPath>..\packages\mzLib.1.0.206\lib\Thermo.dll</HintPath>
</Reference>
<Reference Include="UsefulProteomicsDatabases, Version=1.0.193.0, Culture=neutral, processorArchitecture=AMD64">
<HintPath>..\packages\mzLib.1.0.193\lib\UsefulProteomicsDatabases.dll</HintPath>
<Reference Include="UsefulProteomicsDatabases, Version=1.0.206.0, Culture=neutral, processorArchitecture=AMD64">
<HintPath>..\packages\mzLib.1.0.206\lib\UsefulProteomicsDatabases.dll</HintPath>
</Reference>
<Reference Include="WindowsBase" />
<Reference Include="Zlib.Portable, Version=1.11.0.0, Culture=neutral, processorArchitecture=MSIL">
Expand Down Expand Up @@ -292,12 +298,12 @@
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="..\packages\mzLib.1.0.193\build\mzLib.targets" Condition="Exists('..\packages\mzLib.1.0.193\build\mzLib.targets')" />
<Import Project="..\packages\mzLib.1.0.206\build\mzLib.targets" Condition="Exists('..\packages\mzLib.1.0.206\build\mzLib.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\mzLib.1.0.193\build\mzLib.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\mzLib.1.0.193\build\mzLib.targets'))" />
<Error Condition="!Exists('..\packages\mzLib.1.0.206\build\mzLib.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\mzLib.1.0.206\build\mzLib.targets'))" />
</Target>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
Expand Down
8 changes: 7 additions & 1 deletion ProteoformSuiteGUI/ProteoformSweet.cs
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,9 @@ private bool load_method()
DialogResult d4 = MessageBox.Show("Add files at the listed paths if they still exist?", "Full Run", MessageBoxButtons.YesNoCancel);
if (d4 == DialogResult.Cancel) return false;
Sweet.open_method(File.ReadAllLines(method_filename), d4 == DialogResult.Yes);
loadDeconvolutionResults.InitializeParameterSet(); // updates the textbox
if (loadDeconvolutionResults.ReadyToRunTheGamut())
loadDeconvolutionResults.RunTheGamut(); // updates the dgvs
return true;
}
return false;
Expand Down Expand Up @@ -308,11 +311,14 @@ public bool full_run()
}

// Save the results
resultsSummary.InitializeParameterSet();
if (Sweet.lollipop.results_folder != "")
{
string timestamp = Sweet.time_stamp();
ResultsSummaryGenerator.save_all(Sweet.lollipop.results_folder, timestamp);
ResultsSummaryGenerator.save_all(Sweet.lollipop.results_folder, timestamp, resultsSummary.get_go_analysis(), resultsSummary.get_tusher_analysis());
save_all_plots(Sweet.lollipop.results_folder, timestamp);
using (StreamWriter file = new StreamWriter(Path.Combine(Sweet.lollipop.results_folder, "presets_" + timestamp + ".xml")))
file.WriteLine(Sweet.save_method());
}

//Program ran successfully
Expand Down
Loading

0 comments on commit ac5d757

Please sign in to comment.