MCPcopy Create free account
hub / github.com/OpenMS/OpenMS / algorithm

Function algorithm

src/pyOpenMS/pyTOPP/MRMTransitionGroupPicker.py:18–48  ·  view source on GitHub ↗
(exp, targeted, picker)

Source from the content-addressed store, hash-verified

16
17
18def algorithm(exp, targeted, picker):
19
20 output = pyopenms.FeatureMap()
21
22 chrom_map = {}
23 pepmap = {}
24 trmap = {}
25 for i, chrom in enumerate(exp.getChromatograms()):
26 chrom_map[ chrom.getNativeID() ] = i
27 for i, pep in enumerate(targeted.getPeptides() ):
28 pepmap[ pep.id ] = i
29 for i, tr in enumerate(targeted.getTransitions() ):
30 tmp = trmap.get( tr.getPeptideRef() , [])
31 tmp.append( i )
32 trmap[ tr.getPeptideRef() ] = tmp
33
34 for key, value in trmap.iteritems():
35 print key, value
36 transition_group = getTransitionGroup(exp, targeted, key, value, chrom_map)
37 picker.pickTransitionGroup(transition_group);
38 for mrmfeature in transition_group.getFeatures():
39 features = mrmfeature.getFeatures()
40 for f in features:
41 # TODO
42 # f.getConvexHulls().clear()
43 f.ensureUniqueId()
44
45 mrmfeature.setSubordinates(features) # add all the subfeatures as subordinates
46 output.push_back(mrmfeature)
47
48 return output
49
50def main(options):
51 out = options.outfile

Callers 1

mainFunction · 0.70

Calls 11

FeatureMapMethod · 0.80
getChromatogramsMethod · 0.80
getNativeIDMethod · 0.80
getPeptideRefMethod · 0.80
getFeaturesMethod · 0.80
ensureUniqueIdMethod · 0.80
setSubordinatesMethod · 0.80
getTransitionGroupFunction · 0.70
getMethod · 0.45
appendMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected