how to remove specific feature from specific sample ?

Hi

I got some contamination in my control sample so I want to remove them without removing them from all the samples. I have tried with this command ‘ qiime feature-table filter-features’ which eliminate the feature from all of the sample not from a specific sample.

Hi @ilhem!
This isn't something I've done before, so take my advice with a large grain of salt - there may be a cleaner way to go about it, but I haven't found it yet! :joy:

You could use filter-samples to separate your table into two new tables: a) the sample you want to modify and b) all the other samples. You could then use filter-features to remove the feature from the one sample, and merge to bring the two tables back together.

This is an interesting situation, and I don't spend any time doing wet lab work, so I'm curious to know more. If you're interested in sharing, how did the contamination happen? And how did you figure out the contamination event only impacted your control?

Best,
Chris :cat:

1 Like

That is an interesting workflow, @ChrisKeefe, thanks for sharing!

@ilhem (and anyone else following along) - I just want to let you know that contaminant filtering has been discussed at length on the forum: Search results for 'control filter' - QIIME 2 Forum, and there is a lot to review on the subject.

I would recommend reviewing the first page or so of those posts - there are many opinions on this matter, but I think that there is sufficient reason to at least proceed with caution when attempting to filter based on control samples. I think @Nicholas_Bokulich summarized it best here (link):

5 Likes

Hi @ilhem,

I will be honest and say if I was reviewing a paper that didn't apply consistent filtering based on some reasonable criteria, I would be really concerned. (For example, if you told me you were doing a systematic filtering by plate, Id want to know what about the plate made it appropriate, among other details, but I would be okay with it. If you told me you were filtering by kit lot, I could understand. If you tell me you're filtering specific samples or metadata parameters not related to processing, I get concerned) However, filtering a specific sample will likely require careful justification and consideration. You may be better off filtering everything or excluding the sample.

Best,
Justine

7 Likes

thank you for sharing your opinion , in fact I want to check the influence of inoculation of soil with specific bacteria on the other community of the soil ( with other parametres…). so I have 3 sample control and 3 inoculated with bacteria. When I did the taxa bar plot as shown in the figure attached here

I find one out of three of controle samples has 0.147% of this bacteria that I have used in inoculation of the other sample and the two other control don t have so I conclude it was a contamination and it will be good to eliminate this contamination and don’t throw this sample

In reality, I don’t have a specific method :innocent: it all depend to my experiment in fact I want to check the influence of inoculation of soil with specific bacteria on the other community of the soil ( with other parameters…). so I have 3 sample control and 3 inoculated with bacteria. When I did the taxa bar plot as shown in the figure attached here

I find one out of three of control samples has 0.147% of this bacteria that I have used in inoculation of the other sample and the two other control don t have so I conclude it was a contamination and it will be good to eliminate this contamination and don’t throw this sample.

Thank you for providing those links I will check them. :slightly_smiling_face:

@ilhem, I'm glad to hear you're looking into the resources @thermokarst shared. He and @jwdebelius are both much more experienced with this work than I am, and their advice to proceed with caution is sound.

As I learn every time I come back from a bike ride :mountain_biking_man: with bruises, just because you can do something, doesn't always mean you should. :nerd_face:

Good luck with your study!
CK :chicken:

3 Likes

As I learn every time I come back from a bike ride :mountain_biking_man: with bruises, just because you can do something, doesn’t always mean you should. :nerd_face:
I totally agree with you :+1: and good luck to you also!

2 Likes

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.