# remove.lineage -not removing lineages

**URL:** <https://forum.mothur.org/t/remove-lineage-not-removing-lineages/2605>\
**Category:** Commands in mothur\
**Created:** [November 19, 2015, 10:08am UTC](https://forum.mothur.org/t/remove-lineage-not-removing-lineages/2605 "2015-11-19T10:08:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jenz](https://avatars.discourse-cdn.com/v4/letter/j/4bbf92/32.png) [@jenz](https://forum.mothur.org/u/jenz)\
**Post date:** [November 19, 2015, 10:08am UTC](https://forum.mothur.org/t/remove-lineage-not-removing-lineages/2605/1 "2015-11-19T10:08:44Z")

</div>

HI,  
using Mothur v 1.36  
commands  
classify.seqs(fasta=mander.final.fasta,template=gg.fasta, taxonomy=gg.tax, cutoff=80, processors=8, group=mander.final.groups)

Using 8 processors.  
[WARNING]: This command can take a namefile and you did not provide one. The current namefile is mander.trim.unique.good.filter.unique.precluster.pick.names which seems to match mander.final.fasta.  
Reading template taxonomy… DONE.  
Reading template probabilities… DONE.  
It took 45 seconds get probabilities.  
Classifying sequences from mander.final.fasta …  
[WARNING]: bac27#FL2ME8Y01EKRUV could not be classified. You can use the remove.lineage command with taxon=unknown; to remove such sequences.  
[WARNING]: bac19#FL2ME8Y01ESSJF could not be classified. You can use the remove.lineage command with taxon=unknown; to remove such sequences.

It took 587 secs to classify 29891 sequences.

  
It took 2 secs to create the summary file for 29891 sequences.  
Output File Names: mander.final.gg.wang.taxonomy mander.final.gg.wang.tax.summary  
mothur \> remove.lineage(taxonomy=mander.final.gg.wang.taxonomy, name=mander.final.names, group=mander.final.groups, fasta=mander.final.fasta, taxon=k\_\_Bacteria;p\_\_Cyanobacteria;c\_\_Chloroplast;-k\_\_Archaea-k\_Bacteria;unclassified;-unknown, dups=T)

Output File Names:  
mander.final.gg.wang.pick.taxonomy  
mander.final.pick.names  
mander.final.pick.fasta  
mander.final.pick.groups

All fine but actually mander.final.gg.wang.pick.taxonomy is chock full of lineages it should have gotten rid of with remove.lineage command.  
Fore example…  
bac17#FL2ME8Y01BU9SZ k\_\_Bacteria(97);unclassified;unclassified;unclassified;unclassified;unclassified;unclassified;  
bac17#FL2ME8Y01BRLQZ k\_\_Bacteria(99);unclassified;unclassified;unclassified;unclassified;unclassified;unclassified;  
bac17#FL2ME8Y01B6CYE k\_\_Bacteria(98);unclassified;unclassified;unclassified;unclassified;unclassified;unclassified;  
bac17#FL2ME8Y01AZW9R k\_\_Bacteria(99);unclassified;unclassified;unclassified;unclassified;unclassified;unclassified;  
bac17#FL2ME8Y01AGCZ5 k\_\_Bacteria(99);unclassified;unclassified;unclassified;unclassified;unclassified;unclassified;  
bac17#FL2ME8Y01AF1SE k\_\_Bacteria(97);unclassified;unclassified;unclassified;unclassified;unclassified;unclassified;

are just some of the 750 - results for grep ‘k\_\_Bacteria.\d\d.;unclassified’ mander.final.gg.wang.pick.taxonomy -P.  
also the sequences bac27#FL2ME8Y01EKRUV,bac19#FL2ME8Y01ESSJF (mentioned in the error message of clasify seqs),  
remain fine in the mander.final.pick.fasta.

Is there something wrong with my commands or what?

---

<div class="post-metadata">

**Author:** ![jenz](https://avatars.discourse-cdn.com/v4/letter/j/4bbf92/32.png) [@jenz](https://forum.mothur.org/u/jenz)\
**Post date:** [November 19, 2015, 10:17am UTC](https://forum.mothur.org/t/remove-lineage-not-removing-lineages/2605/2 "2015-11-19T10:17:44Z")

</div>

Self -reply seems to be that the trouble might come from not finishing the classifications with semicolon in classify.seqs command.  
remove.lineage(taxonomy=mander.final.gg.wang.taxonomy, name=mander.final.names, group=mander.final.groups, fasta=mander.final.fasta, taxon=k\_\_Bacteria;p\_\_Cyanobacteria;c\_\_Chloroplast;-k\_\_Archaea-k\_Bacteria;unclassified;-unknown, dups=T)  
I think the command tries to remove taxon “k\_\_Archaea-k\_Bacteria;unclassified” instead of taxon k\_Archaea and taxon k\_Bacteria;unclassified etc?

---

<div class="post-metadata">

**Author:** ![westcott](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.mothur.org/westcott/32/18_2.png) [@westcott](https://forum.mothur.org/u/westcott)\
**Post date:** [November 20, 2015, 4:34pm UTC](https://forum.mothur.org/t/remove-lineage-not-removing-lineages/2605/3 "2015-11-20T16:34:29Z")

</div>

In your example: taxon=k\_\_Bacteria;p\_\_Cyanobacteria;c\_\_Chloroplast;-k\_\_Archaea-k\_Bacteria;unclassified;-unknown;.

1. Mothur divides the taxons by the ‘-’ character first. Taxons to remove:  
k\_\_Bacteria;p\_\_Cyanobacteria;c\_\_Chloroplast;  
k\_\_Archaea  
k\_Bacteria;unclassified;  
unknown;

Looking closely at the sequences that weren’t removed and the taxons listed, it appears to be a typo.

k\_\_Bacteria(97);unclassified;unclassified;unclassified;unclassified;unclassified;unclassified;  
k\_Bacteria;unclassified;

Kindly,  
Sarah
