Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
151 commits
Select commit Hold shift + click to select a range
aa69671
Created bassic control
nbollis Mar 15, 2025
987d225
Got toggle to work
nbollis Mar 15, 2025
683f282
Toggle on the run page
nbollis Mar 15, 2025
62c7df1
Added switch to many tabs
nbollis Mar 15, 2025
7a261b7
Added custom toggle for RNA mode
nbollis Mar 15, 2025
ac5fe65
Styled Toggle
nbollis Mar 15, 2025
ea7ed67
Merge branch 'master' into RnaGUISwitch
nbollis Mar 21, 2025
955aaa4
Switched to image toggle
nbollis Mar 21, 2025
78add36
Merge branch 'RnaGUISwitch' of https://github.com/nbollis/MetaMorpheu…
nbollis Mar 21, 2025
cd76196
removed adduct mass diff acceptor
nbollis Mar 21, 2025
3b35e81
Cleanup
nbollis Mar 21, 2025
cde40d6
Cleanup Part 2
nbollis Mar 21, 2025
bad666a
Merge branch 'master' into RnaGUISwitch
nbollis Apr 30, 2025
9c08caf
Merge branch 'master' into RnaGUISwitch
trishorts May 7, 2025
b1078b1
Merge branch 'master' into RnaGUISwitch
nbollis Jul 15, 2025
be9e292
gptmd engine
nbollis Jul 15, 2025
7d2d620
polish parsimony
nbollis Jul 15, 2025
50e83a2
Generalized GPTMD Task
nbollis Jul 15, 2025
a7e39e0
Tested GPTMD Engine
nbollis Jul 15, 2025
a42596f
Polish
nbollis Jul 15, 2025
4620cd6
First pass at testing task
nbollis Jul 15, 2025
dbea9be
Merge branch 'master' into RnaGUISwitch
nbollis Jul 18, 2025
ba5bf68
Intitialize Averatide
nbollis Jul 18, 2025
3517a59
Added it in
nbollis Jul 18, 2025
49e396c
Added teset
nbollis Jul 18, 2025
d816811
Merge branch 'master' into NegativeModeInGui
nbollis Jul 18, 2025
e155535
Merge branch 'NegativeModeInGui' into RnaTaskAndGUI
nbollis Jul 18, 2025
176a4aa
Base task work
nbollis Jul 18, 2025
cbdb61f
parsimony generalization
nbollis Jul 18, 2025
e44c632
Make search run
nbollis Jul 18, 2025
6feb7f0
Basic testing of search
nbollis Jul 18, 2025
f1873e9
Fix PSM Writing
nbollis Jul 18, 2025
96df110
Base task work
nbollis Jul 18, 2025
6f88fe8
parsimony generalization
nbollis Jul 18, 2025
8661ce1
Make search run
nbollis Jul 18, 2025
e33fd35
Basic testing of search
nbollis Jul 18, 2025
615a2a9
Fix PSM Writing
nbollis Jul 18, 2025
6ba09e3
PR Cleanup
nbollis Jul 19, 2025
7cacac9
Fix bad tests
nbollis Jul 19, 2025
213d316
merge in search task PR
nbollis Jul 19, 2025
767f413
Added GUI mode to window title
nbollis Jul 19, 2025
60472aa
Search task window xaml component
nbollis Jul 19, 2025
5d81dee
Search task populates correctly
nbollis Jul 19, 2025
0677ff9
fixed custom reset
nbollis Jul 19, 2025
b34d8f8
Merge branch 'RnaInSearchTask' into RnaTaskAndGUI
nbollis Jul 19, 2025
8a64d14
Default separate for RNA mode
nbollis Jul 19, 2025
ed5bdcf
populate from task bugfix
nbollis Jul 19, 2025
db8eeb4
rna specific protease switches
nbollis Jul 19, 2025
58bdee4
Generalize GPTMD Window
nbollis Jul 19, 2025
3a7dbe0
Generalized Calibration GUI
nbollis Jul 19, 2025
0c95cd0
Add adducts to GUI
nbollis Jul 21, 2025
5c5b7b5
MetaDraw runs without crash
nbollis Jul 21, 2025
2b33ba6
Rna Custom Modificaitons
nbollis Jul 21, 2025
ff8da21
SearchTaskWindow: Update pruned db text
nbollis Jul 22, 2025
05b8521
MetaDraw: Fix seuqnece annotation crash on C-Terminal mod
nbollis Jul 22, 2025
5a28592
Custom mzlib
nbollis Jul 22, 2025
7672021
merged in gptmd branch
nbollis Jul 22, 2025
fdfc690
Get test to pass
nbollis Jul 22, 2025
1ca8f1a
polish
nbollis Jul 22, 2025
7ef3a0e
Merge branch 'RnaInGptmd' into RnaTaskAndGUI
nbollis Jul 22, 2025
8c42780
Metadraw: Plot Model Stat
nbollis Jul 22, 2025
a54127c
Calibration: Allowed negative mode spectra.
nbollis Jul 22, 2025
03c7f75
Calibration: undo single thread for debugging
nbollis Jul 22, 2025
533386d
Custom Mzlib
nbollis Jul 22, 2025
1df3d2e
MOD: Changed common artificial and removed fluro from base
nbollis Jul 22, 2025
5a493ff
MetaDraw: Removed hydrophobicity plots and stopped a few peptide assu…
nbollis Jul 22, 2025
9a78539
MetaDraw: File name in data grid
nbollis Jul 22, 2025
a532dd3
Merge branch 'master' into RnaInGptmd
nbollis Jul 23, 2025
61bebd7
Merge branch 'master' into RnaInGptmd
nbollis Jul 23, 2025
ba5f1ed
Merge branch 'master' into RnaInGptmd
nbollis Jul 24, 2025
14bec5a
Merged in master
nbollis Jul 25, 2025
fe0883c
MetaDraw: Fragment reanalysis no break
nbollis Jul 25, 2025
c200b05
Search: Added in PEP
nbollis Jul 25, 2025
de08cbe
Search: Fix PEP Crashes
nbollis Jul 26, 2025
626adcd
Created ViewModel
nbollis Jul 26, 2025
1792d10
View model save if different onclosing
nbollis Jul 26, 2025
d745407
Refactor GUI settings management and event handling
nbollis Jul 26, 2025
84912da
Renamed GlobalGuiSettings to TaskValidator
nbollis Jul 26, 2025
0f6844a
Bult it into the gui
nbollis Jul 26, 2025
9b8abe2
merged in gui settiings update
nbollis Jul 26, 2025
7a0499c
Updated My custom branch to use new gui param structure
nbollis Jul 26, 2025
3ec9bc1
Base functionality adjustments
nbollis Jul 29, 2025
0c0ae62
Merge branch 'master' into RnaInGptmd
nbollis Jul 29, 2025
93692f2
Update MetaMorpheus/Test/Transcriptomics/GptmdTests.cs
nbollis Jul 29, 2025
e41039f
Fix test
nbollis Jul 29, 2025
a706755
Merge branch 'RnaInGptmd' of https://github.com/nbollis/MetaMorpheus …
nbollis Jul 29, 2025
dbf82b8
PR Cleanup
nbollis Jul 29, 2025
c369d89
merged in gptmd pr
nbollis Aug 1, 2025
d920fec
Updated MzlibExtensions
nbollis Aug 1, 2025
846e442
Try catch in chimera analysis tab
nbollis Aug 1, 2025
bb155c9
Added new plots
nbollis Aug 1, 2025
9db2ed4
Added in data visuzlaition settings.
nbollis Aug 2, 2025
c662e65
Data visualization settings in settings window AND added more propert…
nbollis Aug 2, 2025
14a018b
Added customizable colors to data visualiazation tab
nbollis Aug 2, 2025
8c87cf3
PR Cleanup
nbollis Aug 2, 2025
806bf25
namespace cleanup and expanded testing
nbollis Aug 2, 2025
09dec03
merged in plot model stat branch
nbollis Aug 2, 2025
78f8dd5
Merge branch 'master' into PlotModelStatUpdates
trishorts Aug 7, 2025
c6dae6b
Expanded test coverage
nbollis Aug 13, 2025
8510691
Merge branch 'master' into PlotModelStatUpdates
nbollis Aug 13, 2025
c487fa3
Added Test Coverage
nbollis Aug 14, 2025
539318d
Merge branch 'master' into PlotModelStatUpdates
nbollis Aug 14, 2025
239168d
More tests?
nbollis Aug 14, 2025
f1146ba
Merge branch 'PlotModelStatUpdates' of https://github.com/nbollis/Met…
nbollis Aug 14, 2025
9204d27
Merge branch 'master' into PlotModelStatUpdates
nbollis Aug 14, 2025
6851961
More tests
nbollis Aug 18, 2025
ddc0d11
Merge branch 'PlotModelStatUpdates' of https://github.com/nbollis/Met…
nbollis Aug 18, 2025
d674fad
ugh
nbollis Aug 18, 2025
82ac5fb
Merge branch 'master' into PlotModelStatUpdates
trishorts Aug 19, 2025
62204e6
Apply suggestion from @Copilot
nbollis Aug 22, 2025
3feacec
Fixed drag drop behavior
nbollis Aug 25, 2025
f4c7a38
Merge branch 'master' into RnaTaskAndGUI
nbollis Aug 25, 2025
fef3e17
Merge branch 'PlotModelStatUpdates' into RnaTaskAndGUI
nbollis Aug 25, 2025
395bc44
Revert to release of mzlib
nbollis Aug 25, 2025
8e01562
Small crash tweaks
nbollis Aug 25, 2025
902637f
Change label on PEP result.txt
nbollis Aug 26, 2025
56e452d
Merged in 114
nbollis Oct 15, 2025
2c44fa3
remove is rna hidden from global params
nbollis Oct 15, 2025
34c6c8d
PR Cleanup
nbollis Oct 15, 2025
ef820af
almost fixed the tests.
nbollis Oct 16, 2025
4c9a2d3
Look mom, I did it!!!!
nbollis Oct 16, 2025
8e20717
Fix all unit tests and refragmentation
nbollis Oct 17, 2025
9f0edf1
More test coverage please
nbollis Oct 17, 2025
410d69e
please send help...
nbollis Oct 17, 2025
35e0ab9
More text cov and change db description dynamically
nbollis Oct 17, 2025
5c81b69
Did string switching on MetaDraw
nbollis Oct 18, 2025
b2b0505
Merge branch 'master' into RnaTaskAndGUI
nbollis Oct 21, 2025
bea2a52
Copilot Suggestions
nbollis Oct 22, 2025
99b038d
Merge branch 'master' into RnaTaskAndGUI
nbollis Oct 22, 2025
53d3002
Merge branch 'RnaTaskAndGUI' of https://github.com/nbollis/MetaMorphe…
nbollis Oct 22, 2025
866d6d2
Merge branch 'master' into RnaTaskAndGUI
nbollis Oct 22, 2025
4661c8a
Merged in master
nbollis Oct 23, 2025
d882649
Moved gui global params to guifunctions
nbollis Oct 24, 2025
deb5347
Fix biopol database loading as proteins
nbollis Oct 24, 2025
d55e762
Calibration adds string for gui updating
nbollis Oct 24, 2025
9fb5e09
fix mod bug
nbollis Oct 24, 2025
58d2708
Fix mod parsing on annotation
nbollis Oct 24, 2025
0b742ed
Fix clear base sequence for clarity
nbollis Oct 24, 2025
44587cd
Drawn sequence terminal annotaitons redone
nbollis Oct 24, 2025
6415922
MetaDraw updates GuiGlobal IsRnaMode
nbollis Oct 24, 2025
d3c3a73
stop the popup
nbollis Oct 24, 2025
3ebbda9
Fix refragment
nbollis Oct 27, 2025
06c4b84
Fixed all bugs?
nbollis Oct 27, 2025
ee03af0
Update MetaMorpheus/GUI/MainWindow.xaml.cs
nbollis Oct 27, 2025
e902bab
Update MetaMorpheus/GuiFunctions/MetaDraw/MetaDrawSettings.cs
nbollis Oct 27, 2025
4d2b908
Update MetaMorpheus/GuiFunctions/GuiGlobalParams.cs
nbollis Oct 27, 2025
af010c4
Merge branch 'master' into RnaTaskAndGUI
nbollis Oct 27, 2025
3acb068
Global params test coverage
nbollis Oct 27, 2025
15d05c5
Merge branch 'master' into RnaTaskAndGUI
nbollis Oct 31, 2025
baa124c
LABEL STATUS: Ensure we have a nested ID before updating label.
nbollis Nov 5, 2025
3a9fe1e
Merge branch 'RnaTaskAndGUI' of https://github.com/nbollis/MetaMorphe…
nbollis Nov 5, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
string taskId,
DecoyType decoyType,
bool generateTargets = true,
List<string> localizableMods = null,

Check warning on line 26 in MetaMorpheus/EngineLayer/DatabaseLoading/DatabaseLoadingEngine.cs

View workflow job for this annotation

GitHub Actions / macos-latest

Cannot convert null literal to non-nullable reference type.

Check warning on line 26 in MetaMorpheus/EngineLayer/DatabaseLoading/DatabaseLoadingEngine.cs

View workflow job for this annotation

GitHub Actions / ubuntu-latest

Cannot convert null literal to non-nullable reference type.

Check warning on line 26 in MetaMorpheus/EngineLayer/DatabaseLoading/DatabaseLoadingEngine.cs

View workflow job for this annotation

GitHub Actions / windows-latest

Cannot convert null literal to non-nullable reference type.

Check warning on line 26 in MetaMorpheus/EngineLayer/DatabaseLoading/DatabaseLoadingEngine.cs

View workflow job for this annotation

GitHub Actions / Search with Built

Cannot convert null literal to non-nullable reference type.

Check warning on line 26 in MetaMorpheus/EngineLayer/DatabaseLoading/DatabaseLoadingEngine.cs

View workflow job for this annotation

GitHub Actions / Create Installer Artifact

Cannot convert null literal to non-nullable reference type.

Check warning on line 26 in MetaMorpheus/EngineLayer/DatabaseLoading/DatabaseLoadingEngine.cs

View workflow job for this annotation

GitHub Actions / Create Installer Artifact

Cannot convert null literal to non-nullable reference type.

Check warning on line 26 in MetaMorpheus/EngineLayer/DatabaseLoading/DatabaseLoadingEngine.cs

View workflow job for this annotation

GitHub Actions / Validate Installer Contents

Cannot convert null literal to non-nullable reference type.

Check warning on line 26 in MetaMorpheus/EngineLayer/DatabaseLoading/DatabaseLoadingEngine.cs

View workflow job for this annotation

GitHub Actions / Test on Windows

Cannot convert null literal to non-nullable reference type.
TargetContaminantAmbiguity tcAmbiguity = TargetContaminantAmbiguity.RemoveContaminant)
: MetaMorpheusEngine(commonParameters, fileSpecificParameters, nestedIds)
{
Expand Down Expand Up @@ -120,11 +120,12 @@

if (theExtension.Equals(".fasta") || theExtension.Equals(".fa"))
{
unknownMods = null;

Check warning on line 123 in MetaMorpheus/EngineLayer/DatabaseLoading/DatabaseLoadingEngine.cs

View workflow job for this annotation

GitHub Actions / macos-latest

Cannot convert null literal to non-nullable reference type.

Check warning on line 123 in MetaMorpheus/EngineLayer/DatabaseLoading/DatabaseLoadingEngine.cs

View workflow job for this annotation

GitHub Actions / ubuntu-latest

Cannot convert null literal to non-nullable reference type.

Check warning on line 123 in MetaMorpheus/EngineLayer/DatabaseLoading/DatabaseLoadingEngine.cs

View workflow job for this annotation

GitHub Actions / windows-latest

Cannot convert null literal to non-nullable reference type.

Check warning on line 123 in MetaMorpheus/EngineLayer/DatabaseLoading/DatabaseLoadingEngine.cs

View workflow job for this annotation

GitHub Actions / Search with Built

Cannot convert null literal to non-nullable reference type.

Check warning on line 123 in MetaMorpheus/EngineLayer/DatabaseLoading/DatabaseLoadingEngine.cs

View workflow job for this annotation

GitHub Actions / Create Installer Artifact

Cannot convert null literal to non-nullable reference type.

Check warning on line 123 in MetaMorpheus/EngineLayer/DatabaseLoading/DatabaseLoadingEngine.cs

View workflow job for this annotation

GitHub Actions / Create Installer Artifact

Cannot convert null literal to non-nullable reference type.

Check warning on line 123 in MetaMorpheus/EngineLayer/DatabaseLoading/DatabaseLoadingEngine.cs

View workflow job for this annotation

GitHub Actions / Validate Installer Contents

Cannot convert null literal to non-nullable reference type.

Check warning on line 123 in MetaMorpheus/EngineLayer/DatabaseLoading/DatabaseLoadingEngine.cs

View workflow job for this annotation

GitHub Actions / Test on Windows

Cannot convert null literal to non-nullable reference type.
rnaList = RnaDbLoader.LoadRnaFasta(fileName, generateTargets, decoyType, isContaminant, out var dbErrors);
}
else
{
GlobalVariables.AddMods(ProteinDbLoader.GetPtmListFromProteinXml(fileName), true, true);
// TODO: Add in variant params when fixed in MzLib.
List<string> modTypesToExclude = GlobalVariables.AllRnaModTypesKnown.Where(b => !localizeableModificationTypes.Contains(b)).ToList();
rnaList = RnaDbLoader.LoadRnaXML(fileName, generateTargets, decoyType, isContaminant, GlobalVariables.AllRnaModsKnown, modTypesToExclude, out unknownMods, commonParameters.MaxThreadsToUsePerFile, decoyIdentifier: decoyIdentifier);
Expand All @@ -146,7 +147,7 @@

if (theExtension.Equals(".fasta") || theExtension.Equals(".fa"))
{
um = null;

Check warning on line 150 in MetaMorpheus/EngineLayer/DatabaseLoading/DatabaseLoadingEngine.cs

View workflow job for this annotation

GitHub Actions / macos-latest

Cannot convert null literal to non-nullable reference type.

Check warning on line 150 in MetaMorpheus/EngineLayer/DatabaseLoading/DatabaseLoadingEngine.cs

View workflow job for this annotation

GitHub Actions / ubuntu-latest

Cannot convert null literal to non-nullable reference type.

Check warning on line 150 in MetaMorpheus/EngineLayer/DatabaseLoading/DatabaseLoadingEngine.cs

View workflow job for this annotation

GitHub Actions / windows-latest

Cannot convert null literal to non-nullable reference type.

Check warning on line 150 in MetaMorpheus/EngineLayer/DatabaseLoading/DatabaseLoadingEngine.cs

View workflow job for this annotation

GitHub Actions / Search with Built

Cannot convert null literal to non-nullable reference type.

Check warning on line 150 in MetaMorpheus/EngineLayer/DatabaseLoading/DatabaseLoadingEngine.cs

View workflow job for this annotation

GitHub Actions / Create Installer Artifact

Cannot convert null literal to non-nullable reference type.

Check warning on line 150 in MetaMorpheus/EngineLayer/DatabaseLoading/DatabaseLoadingEngine.cs

View workflow job for this annotation

GitHub Actions / Create Installer Artifact

Cannot convert null literal to non-nullable reference type.

Check warning on line 150 in MetaMorpheus/EngineLayer/DatabaseLoading/DatabaseLoadingEngine.cs

View workflow job for this annotation

GitHub Actions / Validate Installer Contents

Cannot convert null literal to non-nullable reference type.

Check warning on line 150 in MetaMorpheus/EngineLayer/DatabaseLoading/DatabaseLoadingEngine.cs

View workflow job for this annotation

GitHub Actions / Test on Windows

Cannot convert null literal to non-nullable reference type.
proteinList = ProteinDbLoader.LoadProteinFasta(fileName, generateTargets, decoyType, isContaminant, out var dbErrors,
ProteinDbLoader.UniprotAccessionRegex, ProteinDbLoader.UniprotFullNameRegex, ProteinDbLoader.UniprotFullNameRegex, ProteinDbLoader.UniprotGeneNameRegex,
ProteinDbLoader.UniprotOrganismRegex, commonParameters.MaxThreadsToUsePerFile, addTruncations: commonParameters.AddTruncations);
Expand All @@ -154,10 +155,10 @@
else
{
List<string> modTypesToExclude = GlobalVariables.AllModTypesKnown.Where(b => !localizeableModificationTypes.Contains(b)).ToList();
GlobalVariables.AddMods(ProteinDbLoader.GetPtmListFromProteinXml(fileName), true, false);
//proteinList = ProteinDbLoader.LoadProteinXML(fileName, generateTargets, decoyType, GlobalVariables.AllModsKnown, isContaminant, modTypesToExclude, out um, commonParameters.MaxThreadsToUsePerFile, commonParameters.MaxHeterozygousVariants, commonParameters.MinVariantDepth, addTruncations: commonParameters.AddTruncations, decoyIdentifier: decoyIdentifier);
proteinList = ProteinDbLoader.LoadProteinXML(fileName, generateTargets, decoyType, GlobalVariables.AllModsKnown, isContaminant, modTypesToExclude, out um, commonParameters.MaxThreadsToUsePerFile, 0, commonParameters.MinVariantDepth, addTruncations: commonParameters.AddTruncations, decoyIdentifier: decoyIdentifier);
}

emptyEntriesCount = proteinList.Count(p => p.BaseSequence.Length == 0);
return proteinList.Where(p => p.BaseSequence.Length > 0);
}
Expand Down Expand Up @@ -286,7 +287,7 @@
continue;

// Use a pooled list to avoid repeated allocations in tight loops
List<string> peptidesToReplace = null;

Check warning on line 290 in MetaMorpheus/EngineLayer/DatabaseLoading/DatabaseLoadingEngine.cs

View workflow job for this annotation

GitHub Actions / macos-latest

Converting null literal or possible null value to non-nullable type.

Check warning on line 290 in MetaMorpheus/EngineLayer/DatabaseLoading/DatabaseLoadingEngine.cs

View workflow job for this annotation

GitHub Actions / ubuntu-latest

Converting null literal or possible null value to non-nullable type.

Check warning on line 290 in MetaMorpheus/EngineLayer/DatabaseLoading/DatabaseLoadingEngine.cs

View workflow job for this annotation

GitHub Actions / windows-latest

Converting null literal or possible null value to non-nullable type.

Check warning on line 290 in MetaMorpheus/EngineLayer/DatabaseLoading/DatabaseLoadingEngine.cs

View workflow job for this annotation

GitHub Actions / Search with Built

Converting null literal or possible null value to non-nullable type.

Check warning on line 290 in MetaMorpheus/EngineLayer/DatabaseLoading/DatabaseLoadingEngine.cs

View workflow job for this annotation

GitHub Actions / Create Installer Artifact

Converting null literal or possible null value to non-nullable type.

Check warning on line 290 in MetaMorpheus/EngineLayer/DatabaseLoading/DatabaseLoadingEngine.cs

View workflow job for this annotation

GitHub Actions / Create Installer Artifact

Converting null literal or possible null value to non-nullable type.

Check warning on line 290 in MetaMorpheus/EngineLayer/DatabaseLoading/DatabaseLoadingEngine.cs

View workflow job for this annotation

GitHub Actions / Validate Installer Contents

Converting null literal or possible null value to non-nullable type.

Check warning on line 290 in MetaMorpheus/EngineLayer/DatabaseLoading/DatabaseLoadingEngine.cs

View workflow job for this annotation

GitHub Actions / Test on Windows

Converting null literal or possible null value to non-nullable type.
foreach (var peptide in bioPolymer.Digest(digestionParams, variable, fixedM))
{
if (targetPeptideSequences.Contains(peptide.BaseSequence))
Expand Down
24 changes: 10 additions & 14 deletions MetaMorpheus/EngineLayer/FdrAnalysis/FdrAnalysisEngine.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
using EngineLayer.CrosslinkSearch;
using EngineLayer.SpectrumMatch;
using Proteomics.ProteolyticDigestion;
using System;
using System.Collections.Generic;
using System.Linq;
using Transcriptomics.Digestion;

namespace EngineLayer.FdrAnalysis
{
Expand Down Expand Up @@ -386,25 +388,19 @@ public static void PepQValueInverted(List<SpectralMatch> psms, bool peptideLevel

public static void Compute_PEPValue(FdrAnalysisResults myAnalysisResults, List<SpectralMatch> psms, List<(string fileName, CommonParameters fileSpecificParameters)> fileSpecificParameters, string outputFolder)
{
string searchType;
// Currently, searches of mixed data (bottom-up + top-down) are not supported
// PEP will be calculated based on the search type of the first file/PSM in the list, which isn't ideal
// This will be addressed in a future release
switch(psms[0].DigestionParams.DigestionAgent.Name)
{
case "top-down":
searchType = "top-down";
break;
default:
searchType = "standard";
break;
}
if (psms[0] is CrosslinkSpectralMatch)

string searchType = psms[0] switch
{
searchType = "crosslink";
}
myAnalysisResults.BinarySearchTreeMetrics = new PepAnalysisEngine(psms, searchType, fileSpecificParameters, outputFolder).ComputePEPValuesForAllPSMs();
OligoSpectralMatch => "RNA",
PeptideSpectralMatch psm when psm.DigestionParams.DigestionAgent is Protease { Name: "top-down" } => "top-down",
CrosslinkSpectralMatch => "crosslink",
_ => "standard"
};

myAnalysisResults.BinarySearchTreeMetrics = new PepAnalysisEngine(psms, searchType, fileSpecificParameters, outputFolder).ComputePEPValuesForAllPSMs();
}

/// <summary>
Expand Down
47 changes: 24 additions & 23 deletions MetaMorpheus/EngineLayer/FdrAnalysis/PEPAnalysisEngine.cs
Original file line number Diff line number Diff line change
Expand Up @@ -367,20 +367,20 @@ public static string AggregateMetricsForOutput(List<CalibratedBinaryClassificati
s.AppendLine("************************************************************");
s.AppendLine("* Metrics for Determination of PEP Using Binary Classification ");
s.AppendLine("*-----------------------------------------------------------");
s.AppendLine("* Accuracy: " + accuracy.Average().ToString());
s.AppendLine("* Area Under Curve: " + areaUnderRocCurve.Average().ToString());
s.AppendLine("* Area under Precision recall Curve: " + areaUnderPrecisionRecallCurve.Average().ToString());
s.AppendLine("* F1Score: " + F1Score.Average().ToString());
s.AppendLine("* LogLoss: " + logLossAverage.ToString());
s.AppendLine("* LogLossReduction: " + logLossReductionAverage.ToString());
s.AppendLine("* PositivePrecision: " + positivePrecision.Average().ToString());
s.AppendLine("* PositiveRecall: " + positiveRecall.Average().ToString());
s.AppendLine("* NegativePrecision: " + negativePrecision.Average().ToString());
s.AppendLine("* NegativeRecall: " + negativeRecall.Average().ToString());
s.AppendLine("* Count of Ambiguous Peptides Removed: " + sumOfAllAmbiguousPeptidesResolved.ToString());
s.AppendLine("* Accuracy: " + accuracy.Average());
s.AppendLine("* Area Under Curve: " + areaUnderRocCurve.Average());
s.AppendLine("* Area under Precision recall Curve: " + areaUnderPrecisionRecallCurve.Average());
s.AppendLine("* F1Score: " + F1Score.Average());
s.AppendLine("* LogLoss: " + logLossAverage);
s.AppendLine("* LogLossReduction: " + logLossReductionAverage);
s.AppendLine("* PositivePrecision: " + positivePrecision.Average());
s.AppendLine("* PositiveRecall: " + positiveRecall.Average());
s.AppendLine("* NegativePrecision: " + negativePrecision.Average());
s.AppendLine("* NegativeRecall: " + negativeRecall.Average());
s.AppendLine($"* Count of Ambiguous {char.ToUpper(GlobalVariables.AnalyteType.GetUniqueFormLabel()[0]) + GlobalVariables.AnalyteType.GetUniqueFormLabel()[1..]}s Removed: " + sumOfAllAmbiguousPeptidesResolved);
s.AppendLine("* Q-Value Cutoff for Training Targets: " + qValueCutoff);
s.AppendLine("* Targets Used for Training: " + positiveTrainingCount.ToString());
s.AppendLine("* Decoys Used for Training: " + negativeTrainingCount.ToString());
s.AppendLine("* Targets Used for Training: " + positiveTrainingCount);
s.AppendLine("* Decoys Used for Training: " + negativeTrainingCount);
s.AppendLine("************************************************************");
return s.ToString();
}
Expand Down Expand Up @@ -539,23 +539,24 @@ public PsmData CreateOnePsmDataEntry(string searchType, SpectralMatch psm, Spect
if (psm.DigestionParams.DigestionAgent.Name != "top-down")
{
missedCleavages = tentativeSpectralMatch.SpecificBioPolymer.MissedCleavages;
bool fileIsCzeSeparationType = FileSpecificParametersDictionary.ContainsKey(Path.GetFileName(psm.FullFilePath)) && FileSpecificParametersDictionary[Path.GetFileName(psm.FullFilePath)].SeparationType == "CZE";

if (!fileIsCzeSeparationType)
var fileName = Path.GetFileName(psm.FullFilePath);
bool fileIsCzeSeparationType = FileSpecificParametersDictionary.TryGetValue(fileName, out var fileParams) && fileParams.SeparationType == "CZE";

if (searchType != "RNA")
{
if (tentativeSpectralMatch.SpecificBioPolymer.BaseSequence.Equals(tentativeSpectralMatch.SpecificBioPolymer.FullSequence))
if (!fileIsCzeSeparationType)
{
hydrophobicityZscore = (float)Math.Round(GetSSRCalcHydrophobicityZScore(psm, tentativeSpectralMatch.SpecificBioPolymer, FileSpecificTimeDependantHydrophobicityAverageAndDeviation_unmodified) * 10.0, 0);
var isUnmodified = tentativeSpectralMatch.SpecificBioPolymer.BaseSequence.Equals(tentativeSpectralMatch.SpecificBioPolymer.FullSequence);
var dict = isUnmodified
? FileSpecificTimeDependantHydrophobicityAverageAndDeviation_unmodified
: FileSpecificTimeDependantHydrophobicityAverageAndDeviation_modified;
hydrophobicityZscore = (float)Math.Round(GetSSRCalcHydrophobicityZScore(psm, tentativeSpectralMatch.SpecificBioPolymer, dict) * 10.0, 0);
}
else
{
hydrophobicityZscore = (float)Math.Round(GetSSRCalcHydrophobicityZScore(psm, tentativeSpectralMatch.SpecificBioPolymer, FileSpecificTimeDependantHydrophobicityAverageAndDeviation_modified) * 10.0, 0);
hydrophobicityZscore = (float)Math.Round(GetMobilityZScore(psm, tentativeSpectralMatch.SpecificBioPolymer) * 10.0, 0);
}
}
else
{
hydrophobicityZscore = (float)Math.Round(GetMobilityZScore(psm, tentativeSpectralMatch.SpecificBioPolymer) * 10.0, 0);
}
}
//this is not for actual crosslinks but for the byproducts of crosslink loop links, deadends, etc.
if (psm is CrosslinkSpectralMatch)
Expand Down
8 changes: 8 additions & 0 deletions MetaMorpheus/EngineLayer/FdrAnalysis/PsmData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,14 @@ public class PsmData
"PrecursorChargeDiffToMode", "DeltaScore", "AlphaIntensity", "BetaIntensity",
"LongestFragmentIonSeries_Alpha", "LongestFragmentIonSeries_Beta", "IsInter", "IsIntra"
}
},
{
"RNA",
new []
{ "TotalMatchingFragmentCount", "Intensity", "PrecursorChargeDiffToMode", "DeltaScore",
"Notch", "ModsCount", "AbsoluteAverageFragmentMassErrorFromMedian","MissedCleavagesCount",
"Ambiguity", "LongestFragmentIonSeries", "ComplementaryIonCount"
}
}
}.ToImmutableDictionary();

Expand Down
48 changes: 28 additions & 20 deletions MetaMorpheus/EngineLayer/GlobalVariables.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.InteropServices;
using System.Text;
using TopDownProteomics;
Expand Down Expand Up @@ -89,22 +90,25 @@ public static void SetUpGlobalVariables()
LoadAvailableProteomes();
}

public static void AddMods(IEnumerable<Modification> modifications, bool modsAreFromTheTopOfProteinXml)
public static void AddMods(IEnumerable<Modification> modifications, bool modsAreFromTheTopOfProteinXml, bool isRna = false)
{
var allMods = isRna ? _AllRnaModsKnown : _AllModsKnown;
var modTypes = isRna ? _AllRnaModTypesKnown : _AllModTypesKnown;

foreach (var mod in modifications)
{
if (string.IsNullOrEmpty(mod.ModificationType) || string.IsNullOrEmpty(mod.IdWithMotif))
{
ErrorsReadingMods.Add(mod.ToString() + Environment.NewLine + " has null or empty modification type");
continue;
}
if (AllModsKnown.Any(b => b.IdWithMotif.Equals(mod.IdWithMotif) && b.ModificationType.Equals(mod.ModificationType) && !b.Equals(mod)))
if (allMods.Any(b => b.IdWithMotif.Equals(mod.IdWithMotif) && b.ModificationType.Equals(mod.ModificationType) && !b.Equals(mod)))
{
if (modsAreFromTheTopOfProteinXml)
{
_AllModsKnown.RemoveAll(p => p.IdWithMotif.Equals(mod.IdWithMotif) && p.ModificationType.Equals(mod.ModificationType) && !p.Equals(mod));
_AllModsKnown.Add(mod);
_AllModTypesKnown.Add(mod.ModificationType);
allMods.RemoveAll(p => p.IdWithMotif.Equals(mod.IdWithMotif) && p.ModificationType.Equals(mod.ModificationType) && !p.Equals(mod));
allMods.Add(mod);
modTypes.Add(mod.ModificationType);
}
else
{
Expand All @@ -113,36 +117,34 @@ public static void AddMods(IEnumerable<Modification> modifications, bool modsAre
}
continue;
}
else if (AllModsKnown.Any(b => b.IdWithMotif.Equals(mod.IdWithMotif) && b.ModificationType.Equals(mod.ModificationType)))
if (allMods.Any(b => b.IdWithMotif.Equals(mod.IdWithMotif) && b.ModificationType.Equals(mod.ModificationType)))
{
// same ID, same mod type, and same mod properties; continue and don't output an error message
// this could result from reading in an XML database with mods annotated at the top
// that are already loaded in MetaMorpheus
continue;
}
else if (AllModsKnown.Any(m => m.IdWithMotif == mod.IdWithMotif))
if (allMods.Any(m => m.IdWithMotif == mod.IdWithMotif))
{
// same ID but different mod types. This can happen if the user names a mod the same as a UniProt mod
// this is problematic because if a mod is annotated in the database, all we have to go on is an ID ("description" tag).
// so we don't know which mod to use, causing unnecessary ambiguity
if (modsAreFromTheTopOfProteinXml)
{
_AllModsKnown.RemoveAll(p => p.IdWithMotif.Equals(mod.IdWithMotif) && !p.Equals(mod));
_AllModsKnown.Add(mod);
_AllModTypesKnown.Add(mod.ModificationType);
allMods.RemoveAll(p => p.IdWithMotif.Equals(mod.IdWithMotif) && !p.Equals(mod));
allMods.Add(mod);
modTypes.Add(mod.ModificationType);
}
else if (!mod.ModificationType.Equals("Unimod"))
{
ErrorsReadingMods.Add("Duplicate mod IDs! Skipping " + mod.ModificationType + ":" + mod.IdWithMotif);
}
continue;
}
else
{
// no errors! add the mod
_AllModsKnown.Add(mod);
_AllModTypesKnown.Add(mod.ModificationType);
}

// no errors! add the mod
allMods.Add(mod);
modTypes.Add(mod.ModificationType);
}
}

Expand Down Expand Up @@ -408,6 +410,8 @@ private static void LoadModifications()
// Glycan modifications are handled separately in LoadGlycans()
continue;
}
if (modFile.Contains("Rna"))
continue;
AddMods(PtmListLoader.ReadModsFromFile(modFile, out var errorMods), false);
}

Expand Down Expand Up @@ -441,10 +445,14 @@ private static void LoadRnaModifications()
using (var reader = new StreamReader(stream))
{
string fileContent = reader.ReadToEnd();
foreach (var mod in PtmListLoader.ReadModsFromString(fileContent, out var errors))
{
_AllRnaModsKnown.Add(mod);
}
var mods = PtmListLoader.ReadModsFromString(fileContent, out var errors);
AddMods(mods, false, true);
}

var customModsPath = Path.Combine(DataDir, @"Mods", "RnaCustomModifications.txt");
if (File.Exists(customModsPath))
{
AddMods(PtmListLoader.ReadModsFromFile(customModsPath, out var errorMods), false, true);
}

// populate mod types and dictionary
Expand Down
1 change: 1 addition & 0 deletions MetaMorpheus/EngineLayer/MetaMorpheusEngine.cs
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ public static List<MatchedFragmentIon> MatchFragmentIons(Ms2ScanWithSpecificMass
continue;
}

// Magic number represents mzbinning space.
double theoreticalFragmentMz = Math.Round(product.NeutralMass.ToMz(1) / 1.0005079, 0) * 1.0005079;
var closestMzIndex = scan.TheScan.MassSpectrum.GetClosestPeakIndex(theoreticalFragmentMz);

Expand Down
17 changes: 5 additions & 12 deletions MetaMorpheus/EngineLayer/Mods/RnaMods.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,6 @@ MT Biological
CF C2 H4
DR Unimod; 34.
//
ID DeoxyFluoronation
TG A or C or G or U
PP Anywhere.
MT Biological
CF O-1 H-1 F1
DR Unimod; 34.
//
ID MethoxyEthoxylation
TG A or C or G or U
PP Anywhere.
Expand All @@ -57,12 +50,12 @@ CF N-1H-1O-1
DR Unimod; 34.
//
################################## Common Artificial
ID 2' Fluronation
TG X
ID DeoxyFluoronation
TG A or C or G or U
PP Anywhere.
MT Artificial
CF H-1 O-1 F1
DR Unimod; 280.
MT Common Artificial
CF O-1 H-1 F1
DR Unimod; 34.
//
################################## Terminal Shifts
ID Cyclic Phosphate
Expand Down
13 changes: 13 additions & 0 deletions MetaMorpheus/GUI/App.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<!--TODO: store these in a file and read them from disk, to let users style MetaMorpheus?-->
<SolidColorBrush x:Key="SideBarMainColor" Color="#353b48" />
<SolidColorBrush x:Key="AccentColor" Color="#0097e6" />
<SolidColorBrush x:Key="LightAccentColor" Color="#bdf0ff" />
<SolidColorBrush x:Key="PurpleAccentColor" Color="#e6aeff" />
<SolidColorBrush x:Key="SecondaryButtonColor" Color="#504B59" />
<SolidColorBrush x:Key="BackgroundColor" Color="#f5f6fa" />
Expand All @@ -20,6 +21,10 @@
<Color x:Key="ForegroundDark">#bdbdbd</Color>
<SolidColorBrush x:Key="ForegroundDarkBrush" Color="{StaticResource ForegroundDark}" />

<SolidColorBrush x:Key="RnaAccentColor" Color="#a64ef9" />
<SolidColorBrush x:Key="LightRnaAccentColor" Color="#FFC4C4FF" />
<SolidColorBrush x:Key="RnaSideBarMainColor" Color="#433d49" />

<!--Default button style for all of MetaMorpheus-->
<!--<Style TargetType="Button">
<Setter Property="BorderThickness" Value="0"/>
Expand Down Expand Up @@ -100,5 +105,13 @@
</Setter.Value>
</Setter>
</Style>

<!-- Icons -->
<BitmapImage x:Key="ProteinIcon" UriSource="Icons/IconProtein.bmp"/>
<BitmapImage x:Key="RnaIcon" UriSource="Icons/IconRna.bmp"/>

<!-- Converters -->
<local:ProteinRnaTerminologyConverter x:Key="ProteinRnaTerminologyConverter"/>
<local:CollapseOnRnaModeConverter x:Key="CollapseOnRnaModeConverter"/>
</Application.Resources>
</Application>
7 changes: 7 additions & 0 deletions MetaMorpheus/GUI/GUI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
<None Remove="Icons\mail_20.bmp" />
<None Remove="Icons\MMnice.ico" />
<None Remove="Icons\proxl-ms.bmp" />
<None Remove="Icons\rna_4.bmp" />
<None Remove="Icons\Slack_Mark_Web.bmp" />
<None Remove="Icons\spritz20.png" />
<None Remove="Icons\Twitter_Logo_Blue.bmp" />
Expand Down Expand Up @@ -107,9 +108,15 @@
<Resource Include="Icons\MMnice.ico">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Resource>
<Resource Include="Icons\IconProtein.bmp">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Resource>
<Resource Include="Icons\proxl-ms.bmp">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Resource>
<Resource Include="Icons\IconRna.bmp">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Resource>
<Resource Include="Icons\Slack_Mark_Web.bmp">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Resource>
Expand Down
Binary file added MetaMorpheus/GUI/Icons/IconProtein.bmp
Binary file not shown.
Binary file added MetaMorpheus/GUI/Icons/IconRna.bmp
Binary file not shown.
Loading
Loading