Class: IndistinguishablePeptide
Overview
<indistinguishable_peptide peptide_sequence=“MEYENTLTAAMK” charge=“2” calc_neutral_pep_mass=“1416.63”>
<modification_info modified_peptide="M[147]EYENTLTAAMK"/>
</indistinguishable_peptide>
Instance Attribute Summary
Attributes inherited from Peptide
#charge, #indistinguishable_peptides, #modifications, #modified_sequence, #probability, #protein_name, #sequence, #theoretical_neutral_mass
Class Method Summary collapse
Methods inherited from Peptide
#as_protxml, #coords_in_protein, from_mzid, from_sequence, #gff_record_for_peptide_fragment, #gff_records_for_coords_in_protein, #initialize, #modifications_from_sequence, #mods_to_gff3_records, #to_gff3_records
Constructor Details
This class inherits a constructor from Peptide
Class Method Details
.from_protxml(xmlnode) ⇒ Object
291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 |
# File 'lib/protk/peptide.rb', line 291 def from_protxml(xmlnode) pep=new() pep.sequence=xmlnode['peptide_sequence'] pep.charge=xmlnode['charge'].to_i mod_info_node = xmlnode.find('protxml:modification_info','protxml:http://regis-web.systemsbiology.net/protXML') if ( mod_info_node.length > 0 ) throw "Encountered multiple modification_info nodes for an indistinguishable peptide" if mod_info_node.length > 1 pep.modified_sequence = mod_info_node[0]['modified_peptide'] mod_nodes = mod_info_node[0].find('protxml:mod_aminoacid_mass','protxml:http://regis-web.systemsbiology.net/protXML') if ( mod_nodes.length > 0 ) pep.modifications = mod_nodes.collect { |e| PeptideMod.from_protxml(e) } else pep.modifications = pep.modifications_from_sequence(pep.modified_sequence) end end pep end |