-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PsmFromTsv Reader that also will work for RNA #737
Conversation
…r interface in Omics
Touched up PR
@@ -0,0 +1,112 @@ | |||
namespace Omics.SpectrumMatch | |||
{ | |||
//for glcyo |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo on comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe we need to move one class from omics back to proteomics.
The nuspec will also need to be updated to ensure that the omics project gets packed in the nuget package on release
library spectrum is child class of mzspectrum spectrum match from tsv now abstract class
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, minor change requested
@@ -86,6 +86,7 @@ static MzSpectrum() | |||
} | |||
} | |||
|
|||
public MzSpectrum(){} | |||
public MzSpectrum(double[,] mzintensities) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This feels too dangerous
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
XArray and YArray can be removed from LibrarySpectrum as they are a member of MzSpectrum.
We can avoid the empty constructor in MzSpectrum by altering the LibrarySpectrum constructor as follows:
public LibrarySpectrum(string sequence, double precursorMz, int chargeState, List peaks, double? rt, bool isDecoy = false)
: base(peaks.Select(p => p.Mz).ToArray(), peaks.Select(p => p.Intensity).ToArray(), false)
{
Sequence = sequence;
PrecursorMz = precursorMz;
MatchedFragmentIons = peaks;
ChargeState = chargeState;
IsDecoy = isDecoy;
RetentionTime = rt;
Array.Sort(XArray, YArray);
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it packed and loaded into MetaMorpheus. Looks like it will work once all the necessary namespace references are updated
@@ -1,7 +1,7 @@ | |||
using Chemistry; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm seeing three weird characters ("") at the start of this line
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nevermind, the characters only show up on GitHub
/// <summary> | ||
/// All parsing should take place within the derived class constructurs | ||
/// TODO: Reconsider this once osmtsv is added | ||
/// </summary> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should the TODO statement be left in?
If you don't have a constructor, shouldn't this be an abstract class?
We need to be able to load PSM data into multiple applications. Currently, it is MetaMorpheus. But that is highly limiting. Therefore, we are moving it to mzlib, to enable greater access.
In the process of making this PR it was decided that we should create an omics project that could house some classes appropriate to both RNA and protein.
To begin with we made a Fragmentation folder in Omics that has FragmentationTerminus, MatchedFragmentIon, Product, ProductType and TerminusSpecificProductType.
We also have a SpectrumMatch folder in Omics that contains LibrarySpectrum, SpectrumMatchFromTsv and SpectrumMatchFromTsvHeader
Note, we made several new header fields that get rid of reference to protein and peptide so that they could be used for RNA as well.