(exp, targeted, picker)
| 16 | |
| 17 | |
| 18 | def 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 | |
| 50 | def main(options): |
| 51 | out = options.outfile |
no test coverage detected