xcms icon indicating copy to clipboard operation
xcms copied to clipboard

Remove features found in blank/QC/wash samples from the main samples

Open etrh opened this issue 6 years ago • 4 comments

I am not sure how practical this is (#132 made me think of it); would it be possible to implement a function that would remove features found in blank and/or QC samples?

What I do right now is that I separately analyze my samples and then my blanks/QC's. Afterwards, I remove features found in wash/blank/QC samples from my final table before starting the statistical analysis.

etrh avatar Oct 31 '18 14:10 etrh

QC samples are trivial. See the D-ratio in https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5960010/

Blanks are more difficult since they are difficult to align. See the discussion here: https://github.com/sneumann/xcms/issues/232

stanstrup avatar Oct 31 '18 15:10 stanstrup

The story with the alignment of blanks is a different one - it's still on the TODO list... Otherwise - have a look at the featureSummary function - you could use that one to identify peaks present in e.g. blanks. Then you can use filterFeatureDefinitions to keep only features/peak groups you are interested in.

jorainer avatar Nov 05 '18 08:11 jorainer

Following Johannes's solution for blank removal, Should I put the blank/QC together with the main samples in the same xcms object when trying to remove the background features?

My current task is to remove features that have relatively similar intensities between blank and the main samples; I also want to have Q-Standard samples features extracted so that I may compute correlation within batches of them to ensure quality along the run.

Still thinking how to do it in a proper way. Please help provide me any suggestions!

Thanks very much!

Best, Minghao Gong

gmhhope avatar May 13 '21 03:05 gmhhope

I would always keep all the files from an experiment together (i.e. in the same XMCSnExp object). peak detection is done anyway on a per file (sample) basis, for the alignment we have now the possibility to run subset alignment in which all samples are aligned based on e.g. QC samples (have a look at the xcms vignette). Correspondence is also OK keeping all samples.

jorainer avatar May 13 '21 06:05 jorainer