OpenMS / pyopenms-docs

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

Question #439

Open chulexuexibiedebushihewo opened 1 week ago

chulexuexibiedebushihewo commented 1 week ago

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

jpfeuffer commented 1 week 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 6 days 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 6 days ago

Hi! Roughly like this

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

-- written on the phone

chulexuexibiedebushihewo commented 6 days 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 6 days ago

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