# Using pre-defined OTU list

**URL:** https://forum.mothur.org/t/using-pre-defined-otu-list/383
**Category:** Commands in mothur
**Created:** [October 22, 2010, 8:42pm UTC](https://forum.mothur.org/t/using-pre-defined-otu-list/383 "2010-10-22T20:42:31Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![schellenberg](https://avatars.discourse-cdn.com/v4/letter/s/cc9497/32.png) [@schellenberg](https://forum.mothur.org/u/schellenberg)
#### Post date: [October 22, 2010, 8:42pm UTC](https://forum.mothur.org/t/using-pre-defined-otu-list/383/1 "2010-10-22T20:42:31Z")

</div>

I am doing phylogenetic analysis of vaginal microbiota, using the protein-encoding cpn60 instead of 16S.

We have used an alternative approach to assembling our sequence data and have a list of OTU with associated frequencies for a number of samples with associated metadata. I would like to use mothur to calculate a-diversity measures using this dataset, but can’t see a way into the analysis pipeline with a pre-defined list of OTU.

Is there a way to access mothur without having to start at the “beginning”? I am not defining my OTU based on similarity cutoffs, is this a barrier to using mothur?

Thanks

---

<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: [October 25, 2010, 4:17pm UTC](https://forum.mothur.org/t/using-pre-defined-otu-list/383/2 "2010-10-25T16:17:30Z")

</div>

This shouldn’t be a problem. You’d have to create either your own list, rabund, sabund, or shared files. The formats are pretty simple so it shouldn’t be too hard to convert your data to our format. Let us know if you have any problems.

---

<div class="post-metadata">

### Author: ![schellenberg](https://avatars.discourse-cdn.com/v4/letter/s/cc9497/32.png) [@schellenberg](https://forum.mothur.org/u/schellenberg)
#### Post date: [October 25, 2010, 7:45pm UTC](https://forum.mothur.org/t/using-pre-defined-otu-list/383/3 "2010-10-25T19:45:45Z")

</div>

OK great - now I know its possible at least!  
Right now I have a table with 3 columns that I have been using in Unifrac - 1st is OTU label, 2nd is sample label, 3rd is normalized abundance of reads/OTU/sample. It is unclear to me how to transform this into one of the formats you are talking about. The wiki refers to a dataset called AmazonData but there are no examples of rabun files etc. in that folder. (Below see contents of folder…)

96\_lt\_column\_11\_amazon.dist  
96\_lt\_column\_amazon.dist  
96\_lt\_phylip\_amazon.dist  
96\_sq\_column\_amazon.dist  
98\_lt\_phylip\_amazon.dist  
98\_sq\_phylip\_amazon.dist  
amazon.fasta  
amazon.groups  
amazon.names  
amazon1.names

Any help much appreciated!

---

<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: [October 25, 2010, 8:34pm UTC](https://forum.mothur.org/t/using-pre-defined-otu-list/383/4 "2010-10-25T20:34:06Z")

</div>

See…

[http://www.mothur.org/wiki/Rabund\_file](http://www.mothur.org/wiki/Rabund_file)  
[http://www.mothur.org/wiki/List\_file](http://www.mothur.org/wiki/List_file)  
[http://www.mothur.org/wiki/Shared\_file](http://www.mothur.org/wiki/Shared_file)

---

<div class="post-metadata">

### Author: ![schellenberg](https://avatars.discourse-cdn.com/v4/letter/s/cc9497/32.png) [@schellenberg](https://forum.mothur.org/u/schellenberg)
#### Post date: [October 26, 2010, 3:59am UTC](https://forum.mothur.org/t/using-pre-defined-otu-list/383/5 "2010-10-26T03:59:16Z")

</div>

OK… but I don’t see how to translate my file format into those file formats.  
As I said my file has three columns - here’s the first few lines:

OTULabel SampleName #reads  
050 N\_B\_2315 2  
318 N\_B\_2315 2  
198 N\_B\_2315 2  
233 N\_B\_2315 2  
246 N\_B\_2315 2  
307 N\_B\_2315 2  
313 N\_B\_2315 2  
420 N\_B\_2315 2

Since I have 250 OTU and 44 samples, would my shared file be a table with 44 rows and 250 columns representing abundance of each OTU

? N\_B\_2315 250 2 4 19256…

But then what is the value for the first column?? Your example looks like a % identity value.  
Am I on the right track here?

---

<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: [October 26, 2010, 11:15am UTC](https://forum.mothur.org/t/using-pre-defined-otu-list/383/6 "2010-10-26T11:15:13Z")

</div>

Almost - the shared file will have 44 rows and 253 columns…

Column 1 - pick some label (e.g. NA - it doesn’t matter what you use as long as there are no spaces in the label)  
Column 2 - sample name (e.g. N\_B\_2315)  
Column 3 - the number of columns to follow (e.g. 250)  
Columns 4-253 - the abundance of each OTU

---

<div class="post-metadata">

### Author: ![schellenberg](https://avatars.discourse-cdn.com/v4/letter/s/cc9497/32.png) [@schellenberg](https://forum.mothur.org/u/schellenberg)
#### Post date: [October 26, 2010, 5:40pm UTC](https://forum.mothur.org/t/using-pre-defined-otu-list/383/7 "2010-10-26T17:40:39Z")

</div>

So I can generate .rabund files for each of my samples, and a .shared file.  
But I can’t get mothur to read the files - (my experience with the command line is very limited).

mothur \> read.otu(rabund=2315.rabund)

Unable to open 2315.rabund

I’ve tried moving the file around (desktop, home directory or parent directory), and it says it can’t read the file.

---

<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: [October 26, 2010, 5:49pm UTC](https://forum.mothur.org/t/using-pre-defined-otu-list/383/8 "2010-10-26T17:49:30Z")

</div>

in the directory that you’re running mothur from you should either type “dir” (if windows) or “ls” (if mac/'nix). you should see the file you want in the output.

also, if you create the shared file, when you run read.otu mothur will create all of the rabund files automatically for you.
