We will be offering mothur and R workshops throughout 2019. Learn more.

Difference between revisions of "Get.sharedseqs"

From mothur
Jump to: navigation, search
(groups)
(unique & shared)
Line 82: Line 82:
 
  0.04 12
 
  0.04 12
  
There are 12 OTUs that are shared between A and B at a distance of 0.04.  The file abrecovery.fn.0.04unique.shared.seqs contains:
+
There are 12 OTUs that are unique to groups A and B at a distance of 0.04.  The file abrecovery.fn.0.04unique.shared.seqs contains:
  
 
  AY457754 B 44
 
  AY457754 B 44

Revision as of 18:03, 27 January 2010

The get.sharedseqs command takes a list and group file and outputs a *.shared.seqs file for each distance. This is useful for those cases where you might be interested in identifying sequences that are either unique or shared by specific groups, which you could then classify. To run through the commands below use AbRecovery files.



Default settings

To execute the get.sharedseqs command you must provide a list and group file. By default this will output the sequences found in the OTUs shared by all the groups in your groupfile. For example:

mothur > get.sharedseqs(list=abrecovery.fn.list, group=abrecovery.groups)

This will result in output to the screen looking like:

unique	0 - No otus shared by groups  A  B  C.
0.00	0 - No otus shared by groups  A  B  C.
0.01	1
0.02	2
0.03	3
0.04	3
0.05	4
0.06	5
0.07	6
...


The left column indicates the label for each line in the data set and the right column indicates the number of OTUs at this distance.

The .shared.seqs output files look like:

AY457715	C	59
AY457838	A	59
AY457774	B	59
...

The first column is the sequence accession number, the second is the group that the sequence is from, and the third is the OTU number that the sequence belongs to.


Options

fasta

If you provide a fasta file mothur will also output a fasta file for each distance you specify:

mothur > get.sharedseqs(list=abrecovery.fn.list, group=abrecovery.groups, fasta=abrecovery.fasta)

The .shared.fasta output files look like:

>AY457838 	 A 	 59
CCCTTAGAGTTTGATCCTGGCTCAGGACG...
>AY457774 	 B 	 59
CCCTTAGAGTTTGATCCTGGCTCAGGACG...
>AY457715 	 C 	 59
CCCTTAGAGTTTGATCCTGGCTCAGGACG...
...

label

There may only be a couple of lines in your list file that you are interested in. You could either manually delete the lines you aren't interested in from you list file or use the label option.

mothur > get.sharedseqs(list=abrecovery.fn.list, group=abrecovery.groups, label=0.04-0.82)
0.04	3
0.82	1


Opening abrecovery.fn.0.04.shared.seqs you would see the output as:

AY457701 	 C  	  45
AY457715 	 C  	  45
AY457838 	 A  	  45
AY457774 	 B  	  45
...

unique & shared

The unique parameter allows you to see sequences belonging to OTUs unique to the specific groups or unique to a particular group. For example to see the sequences from OTUs unique to group A at distance 0.04, you would enter the following:

mothur > get.sharedseqs(list=abrecovery.fn.list, group=abrecovery.groups, label=0.04, unique=A)
0.04	38

There are 38 OTUs that are unique to A at distance 0.04 and their sequence names are listed in abrecovery.fn.0.04.shared.seqs.

Similarly, if you wanted the sequences from OTUs unique to groups A and B at distance 0.04, you would enter the following

mothur > get.sharedseqs(list=abrecovery.fn.list, group=abrecovery.groups, label=0.04, unique=A-B)
0.04	12

There are 12 OTUs that are unique to groups A and B at a distance of 0.04. The file abrecovery.fn.0.04unique.shared.seqs contains:

AY457754 	 B 	 44
AY457871 	 A 	 44
AY457910 	 A 	 44
AY457805 	 B 	 63
AY457853 	 A 	 63
...

The shared parameter allows you to see sequences belonging to OTUs that contain specific groups or a particular group. For example to see the sequences from OTUs that contain sequences from group A at distance 0.04, you would enter the following:

mothur > get.sharedseqs(list=abrecovery.fn.list, group=abrecovery.groups, label=0.04, shared=A)
0.04	57

There are 57 OTUs that contain sequences from group A at distance 0.04 and their names are listed in abrecovery.fn.0.04A.shared.seqs.

Similarly, if you wanted the sequences from OTUs unique to groups A and B at distance 0.04, you would enter the following

mothur > get.sharedseqs(list=abrecovery.fn.list, group=abrecovery.groups, label=0.04, unique=A-B)
0.04	15

There are 15 OTUs that are shared between A and B at a distance of 0.04. The file abrecovery.fn.0.04A-B.shared.seqs contains:

AY457754	B	44
AY457871	A	44
AY457910	A	44
AY457701	C	45
AY457715	C	45
AY457838	A	45
AY457774	B	45
AY457747	C	45
AY457859	A	45
...

output

The output parameter allows you to have the .names file be in .accnos form so you can use it with the get.seqs, list.seqs and remove.seqs commands. For example:

mothur > get.sharedseqs(list=abrecovery.fn.list, group=abrecovery.groups, label=0.04, output=accnos)

Opening abrecovery.fn.0.04.shared.seqs you would see the output as:

AY457701
AY457715
AY457838
AY457774
AY457747
AY457859
AY457695
AY457732
AY457860
AY457826
AY457767
AY457698
AY457855
AY457804