I am a beginer in bioinformatics.
After reading your fantastic code in both metaphlan(.py) v3 and v4, I still have questions.
What is the function of the list varible “removed” in below picture?
What is the piece of code with “removed” mainly doing?
Hi @cquxiaoy
That part of the code is responsible of managing the quasi-markers (markers that are present in external species / SGBs). MetaPhlAn will not account for the quasi-markers for which the external species / SGBs is present in the sample (i.e. it founds more than --perc_nonzero
markers of the external species / SGB, default 33%).
1 Like
Thank you very much, you helped me a lot. 
Since they should be removed, another question is: why are they picked up again in later?(see the picture in below)

Hi @cquxiaoy
That part of the code is used when defining markers at different taxonomic levels (from older versions of MetaPhlAn). As the markers of MetaPhlAn 3 and 4 are assigned at the lower taxonomic level, it will always enter in the line #571
condition and thus never pass the condition in line #577
1 Like