# Classify OTUs by sample using all sequences

**URL:** <https://forum.mothur.org/t/classify-otus-by-sample-using-all-sequences/1870>\
**Category:** Commands in mothur\
**Created:** [May 28, 2014, 6:20pm UTC](https://forum.mothur.org/t/classify-otus-by-sample-using-all-sequences/1870 "2014-05-28T18:20:47Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![cgivens](https://avatars.discourse-cdn.com/v4/letter/c/9d8465/32.png) [@cgivens](https://forum.mothur.org/u/cgivens)\
**Post date:** [May 28, 2014, 6:20pm UTC](https://forum.mothur.org/t/classify-otus-by-sample-using-all-sequences/1870/1 "2014-05-28T18:20:47Z")

</div>

I would like to classify my OTUs by sample (ie A2, A8…) but have an output that includes total number of sequences not just the unique sequences. I am a little confused on the output and the number of sequences that it is returning.

I originally tried:

mothur \> classify.otu(list=stabilityall.trim.contigs.good.unique.good.filter.unique.precluster.pick.pick.an.unique\_list.list, count=stabilityall.trim.contigs.good.unique.good.filter.unique.precluster.uchime.pick.pick.count\_table, taxonomy=stabilityall.trim.contigs.good.unique.good.filter.unique.precluster.pick.silva.wang.pick.taxonomy, label=0.03)  
reftaxonomy is not required, but if given will keep the rankIDs in the summary file static.  
0.03 678313

Output File Names:  
stabilityall.trim.contigs.good.unique.good.filter.unique.precluster.pick.pick.an.unique\_list.0.03.cons.taxonomy  
stabilityall.trim.contigs.good.unique.good.filter.unique.precluster.pick.pick.an.unique\_list.0.03.cons.tax.summary

I am not sure what the 678313 refers to ? This number is used in the summary file – as what appears to be the total number of sequences for all samples (6 samples) combined. The summary file is divided by sample, but the paired taxonomy file is not split by sample. However if I add up the number (in column designated as “size”) in my taxonomy file – it is 8580720 which is my total number of sequences (as indicated by summary.seqs prior to cluster.split). My total number of unique sequences was 1269398 prior to cluster.split command.

I want to know how many of my total number of sequences classify to OTUs at 97% similarity within each group. I want to compare across groups – to see if OTU 121 is shared among all samples or just some samples.

I have also tried make.shared(list=stabilityall.trim.contigs.good.unique.good.filter.unique.precluster.pick.pick.an.unique\_list.list, count=stabilityall.trim.contigs.good.unique.good.filter.unique.precluster.uchime.pick.pick.count\_table, label=0.03)  
and then tried to classify using:  
mothur \> classify.otu(list=stabilityall.trim.contigs.good.unique.good.filter.unique.precluster.pick.pick.an.unique\_list.shared, count=stabilityall.trim.contigs.good.unique.good.filter.unique.precluster.uchime.pick.pick.count\_table, taxonomy=stabilityall.trim.contigs.good.unique.good.filter.unique.precluster.pick.silva.wang.pick.taxonomy, label=0.03)  
reftaxonomy is not required, but if given will keep the rankIDs in the summary file static.  
0.03 0

Output File Names:  
stabilityall.trim.contigs.good.unique.good.filter.unique.precluster.pick.pick.an.unique\_list.0.03.cons.taxonomy  
stabilityall.trim.contigs.good.unique.good.filter.unique.precluster.pick.pick.an.unique\_list.0.03.cons.tax.summary

Files were empty and contained no information.

Lastly, I have tried variations on

classify.otu(list=stabilityall.trim.contigs.good.unique.good.filter.unique.precluster.pick.pick.an.unique\_list.list, count=stabilityall.trim.contigs.good.unique.good.filter.unique.precluster.uchime.pick.pick.count\_table, taxonomy=stabilityall.trim.contigs.good.unique.good.filter.unique.precluster.pick.silva.wang.pick.taxonomy, basis=sequence, persample=true, label=0.03)

classify.otu(list=stabilityall.trim.contigs.good.unique.good.filter.unique.precluster.pick.pick.an.unique\_list.list, count=stabilityall.trim.contigs.good.unique.good.filter.unique.precluster.uchime.pick.pick.count\_table, taxonomy=stabilityall.trim.contigs.good.unique.good.filter.unique.precluster.pick.silva.wang.pick.taxonomy, persample=true, label=0.03, reftaxonomy=silva.bacteria.silva.tax)

The numbers in the taxonomy files (designated as “size”) for each sample are quite large ~4 million when they should be ~1-1.5 million.

---

<div class="post-metadata">

**Author:** ![pschloss](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.mothur.org/pschloss/32/4_2.png) [@pschloss](https://forum.mothur.org/u/pschloss)\
**Post date:** [May 30, 2014, 12:34pm UTC](https://forum.mothur.org/t/classify-otus-by-sample-using-all-sequences/1870/2 "2014-05-30T12:34:38Z")

</div>

I’m pretty sure 678313 is the number of OTUs you have.

Pat

---

<div class="post-metadata">

**Author:** ![cgivens](https://avatars.discourse-cdn.com/v4/letter/c/9d8465/32.png) [@cgivens](https://forum.mothur.org/u/cgivens)\
**Post date:** [May 30, 2014, 2:51pm UTC](https://forum.mothur.org/t/classify-otus-by-sample-using-all-sequences/1870/3 "2014-05-30T14:51:21Z")

</div>

Is it possible to have the taxonomy file (stability.trim.contigs.good.unique.good.filter.unique.precluster.pick.pick.pick.an.unique\_list.0.03.cons.taxonomy) split by sample? My paired summary file is split by sample.

classify.otu(list=stabilityall.trim.contigs.good.unique.good.filter.unique.precluster.pick.pick.an.unique\_list.list, count=stabilityall.trim.contigs.good.unique.good.filter.unique.precluster.uchime.pick.pick.count\_table, taxonomy=stabilityall.trim.contigs.good.unique.good.filter.unique.precluster.pick.silva.wang.pick.taxonomy, label=0.03, reftaxonomy=silva.bacteria.silva.tax)

---

<div class="post-metadata">

**Author:** ![pschloss](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.mothur.org/pschloss/32/4_2.png) [@pschloss](https://forum.mothur.org/u/pschloss)\
**Post date:** [May 30, 2014, 4:32pm UTC](https://forum.mothur.org/t/classify-otus-by-sample-using-all-sequences/1870/4 "2014-05-30T16:32:37Z")

</div>

You could run get.groups for each of the groups you want - you’ll have to change the output file names so they don’t overwrite each other.

[http://www.mothur.org/wiki/Get.groups](http://www.mothur.org/wiki/Get.groups)

---

<div class="post-metadata">

**Author:** ![Kristin](https://avatars.discourse-cdn.com/v4/letter/k/2bfe46/32.png) [@Kristin](https://forum.mothur.org/u/Kristin)\
**Post date:** [June 20, 2014, 9:15am UTC](https://forum.mothur.org/t/classify-otus-by-sample-using-all-sequences/1870/5 "2014-06-20T09:15:02Z")

</div>

Hi Pat and all other users,

some months ago I had the same problem with getting the right classify.otu output for my data. With applying the get.groups command I got the number of unique sequences per OTU per sample. However, because I am interested in the assignment of the total number of sequences I just worked with the classify.seqs command so far. But in this case, the sequences were not clustered. How can I get the total number of sequences using classify.otu?

Am I right with using the basis option? e.g. mothur \> classify.otu(taxonomy=abrecovery.silva.full.taxonomy, list=abrecovery.fn.list, basis=sequence)?

Thanks, one more time 😉  
Cheers, Kristin

---

<div class="post-metadata">

**Author:** ![pschloss](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.mothur.org/pschloss/32/4_2.png) [@pschloss](https://forum.mothur.org/u/pschloss)\
**Post date:** [June 20, 2014, 2:03pm UTC](https://forum.mothur.org/t/classify-otus-by-sample-using-all-sequences/1870/6 "2014-06-20T14:03:04Z")

</div>

that should work
