OpenMS / pyopenms-docs

pyOpenMS readthedocs documentation, additional utilities, addons, scripts, and examples.
https://pyopenms.readthedocs.io
Other
46 stars 56 forks source link

Question #439

Open chulexuexibiedebushihewo opened 5 months ago

chulexuexibiedebushihewo commented 5 months ago

image Hi! I want to obtain the sample name in the demand: how can I get the sample name? Thank you !

jpfeuffer commented 5 months ago

You can get the map index and then lookup the name of the file in the ConsensusMap object where this feature is coming from.

chulexuexibiedebushihewo commented 5 months ago

tempmap = consensus_map[0].getFeatureList()[0]

I have already get the FeatureHandle, named "<pyopenms._pyopenms_3.FeatureHandle at 0x1202380a930>", how can I get the sample name of this FeatureHandle?

jpfeuffer commented 5 months ago

Hi! Roughly like this

sampleinfo = cmap.getColumnHeaders()
feat_filename = sampleinfo[featurehandle.getMapIdx()].filename

-- written on the phone

chulexuexibiedebushihewo commented 5 months ago

image thank you ! i have resolved this issue. I have another question? Why there are some minus numbers in RT of ConsensusMap ?

jpfeuffer commented 5 months ago

This can happen during retention time alignment. Looks a bit extreme in your case, though.