Skip to content
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

Merged
merged 63 commits into from
Nov 30, 2023

Conversation

trishorts
Copy link
Contributor

@trishorts trishorts commented Nov 6, 2023

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.

MICHAEL SHORTREED and others added 30 commits November 18, 2021 12:30
@trishorts trishorts changed the title PsmFromTsv PsmFromTsv Reader that also will work for RNA Nov 20, 2023
@@ -0,0 +1,112 @@
namespace Omics.SpectrumMatch
{
//for glcyo
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo on comment

elaboy
elaboy previously approved these changes Nov 20, 2023
YulingDai
YulingDai previously approved these changes Nov 21, 2023
Copy link
Member

@nbollis nbollis left a 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

mzLib/Omics/Fragmentation/TerminusSpecificProductTypes.cs Outdated Show resolved Hide resolved
@trishorts trishorts dismissed stale reviews from elaboy and YulingDai via 5833d0f November 27, 2023 18:13
Copy link
Member

@nbollis nbollis left a 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)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This feels too dangerous

Copy link
Member

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);
}

Copy link
Contributor

@Alexander-Sol Alexander-Sol left a 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;
Copy link
Contributor

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

Copy link
Contributor

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>
Copy link
Contributor

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?

@Alexander-Sol Alexander-Sol merged commit 74e2005 into smith-chem-wisc:master Nov 30, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Maintenance The user isn't impacted by it, it's purely behind the scenes ready for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants