Class: PeptideEvidence

Inherits:
Object
  • Object
show all
Defined in:
lib/protk/psm.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializePeptideEvidence

Returns a new instance of PeptideEvidence.



60
61
62
# File 'lib/protk/psm.rb', line 60

def initialize()

end

Instance Attribute Details

#is_decoyObject

attr_accessor :peptide_sequence



22
23
24
# File 'lib/protk/psm.rb', line 22

def is_decoy
  @is_decoy
end

#peptide_next_aaObject

Returns the value of attribute peptide_next_aa.



18
19
20
# File 'lib/protk/psm.rb', line 18

def peptide_next_aa
  @peptide_next_aa
end

#peptide_prev_aaObject

Returns the value of attribute peptide_prev_aa.



17
18
19
# File 'lib/protk/psm.rb', line 17

def peptide_prev_aa
  @peptide_prev_aa
end

#proteinObject

Returns the value of attribute protein.



19
20
21
# File 'lib/protk/psm.rb', line 19

def protein
  @protein
end

#protein_descrObject

Returns the value of attribute protein_descr.



20
21
22
# File 'lib/protk/psm.rb', line 20

def protein_descr
  @protein_descr
end

Class Method Details

.from_mzid(pe_node, mzid_doc) ⇒ Object



29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# File 'lib/protk/psm.rb', line 29

def from_mzid(pe_node,mzid_doc)
	pe = new()
	pe.peptide_prev_aa=pe_node.attributes['pre']
	pe.peptide_next_aa=pe_node.attributes['post']
	pe.is_decoy=pe_node.attributes['isDecoy'].to_bool

	# peptide_ref = pe_node.attributes['peptide_ref']
	prot_ref = pe_node.attributes['dBSequence_ref']
	# pep_node = MzIdentMLDoc.find(pe_node,"Peptide[@id=\'#{peptide_ref}\']",true)[0]
	prot_node = MzIdentMLDoc.find(pe_node,"DBSequence[@id=\'#{prot_ref}\']",true)[0]


	# <DBSequence id="JEMP01000193.1_rev_g3500.t1"
	# accession="JEMP01000193.1_rev_g3500.t1"
	# searchDatabase_ref="SearchDB_1">
	#   <cvParam cvRef="PSI-MS" accession="MS:1001088"
	#   name="protein description" value="280755|283436" />
	# </DBSequence>
	pe.protein=prot_node.attributes['accession']
	pe.protein_descr=mzid_doc.get_cvParam(prot_node,"MS:1001088")['value']


	# pe.peptide_sequence=pep_node

	pe
end

Instance Method Details

#as_pepxmlObject

<alternative_protein protein=“lcl|JEMP01000005.1_rev_g4624.t1” protein_descr=“652491|654142” num_tol_term=“2” peptide_prev_aa=“K” peptide_next_aa=“Y”/> We use this only for alternative_proteins The first peptide_evidence item is baked into the attributes of a spectrum_query



68
69
70
71
72
73
74
75
76
77
# File 'lib/protk/psm.rb', line 68

def as_pepxml()
	alt_node = XML::Node.new('alternative_protein')
	alt_node['protein']=self.protein
	alt_node['protein_descr']=self.protein_descr
	alt_node['peptide_prev_aa']=self.peptide_prev_aa
	alt_node['peptide_next_aa']=self.peptide_next_aa


	alt_node
end