compomics / compomics-utilities

Open source Java library for computational proteomics
http://compomics.github.io/projects/compomics-utilities.html
29 stars 16 forks source link

Get MolecularFormula from Selenocysteine containing peptide #19

Closed cctsou closed 7 years ago

cctsou commented 7 years ago

Hi,

I am trying to generate MolecularFormula from a rare Selenocysteine containing peptide using the following codes.

String pepseq="AASUBR";
AASequenceImpl aaseq=new AASequenceImpl(pepseq);
MolecularFormula formula = new MolecularFormula(aaseq);

It threw null exception at MolecularFormula() where it seems like elements.txt does not have definition for amino acid U (Selenocysteine). Since selenocysteine has Se element which is not listed in the top of elements.txt so I figured it may take more efforts to add this amino acid. Could you help me or guide me where should I modify the codes make it worked?

Thanks a lot,

mvaudel commented 7 years ago

Hi,

Sorry this is some rather old code, may we get some more input on what you want to do?

Would AminoAcidSequence do what you need?

Best regards,

Marc

cctsou commented 7 years ago

Hi Marc,

Thank you for the response, I am using it for for calculating isotope pattern.

AASequenceImpl AAimple=new AASequenceImpl(Sequence);
formula=new MolecularFormula(AAimple);
IsotopicDistribution calc = new IsotopicDistribution(formula);   

Is it possible to generate MolecularFormula from AminoAcidSequence?

Thanks, Chih-Chiang

mvaudel commented 7 years ago

Hi Chih-Chiang,

No sorry, I will need to check with the developers of this part of the code. We will keep you posted.

Apologies for the inconvenience,

Marc

hbarsnes commented 7 years ago

Hi Chih-Chiang,

We've just deployed utilities version 4.11.6 which adds the required support for Selenocysteine (thanks to @nielshulstaert). Please give the new version a go and let us know if you come across any new issues.

Best regards, Harald

cctsou commented 7 years ago

Hi Harald,

It's awesome, thanks a lot.

Best, Chih-Chiang