Mothur for 16S Analysis

The MiSeq SOP by Pat Schloss (link)

Downlaod binary and datasets

# Download binary release
wget "https://github.com/mothur/mothur/releases/download/v1.39.5/Mothur.linux_64_static.zip"
unzip Mothur.linux_64_static.zip
 
# Download datasets
wget "https://mothur.org/w/images/d/d6/MiSeqSOPData.zip"
wget "https://mothur.org/w/images/9/98/Silva.bacteria.zip"
wget "https://mothur.org/w/images/5/59/Trainset9_032012.pds.zip"
 
# Expand the downloaded datasets
unzip MiSeqSOPData.zip
unzip Silva.bacteria.zip
unzip Trainset9_032012.pds.zip
rm *.zip
 
# Run mothur
mothur

Mothur commands

Command make.file:

make.file(inputdir=MiSeq_SOP, type=fastq, prefix=stability)

Output:

Setting input directory to: MiSeq_SOP/

Output File Names:
MiSeq_SOP/stability.files

Problem

The output file should look like:

F3D0    F3D0_S188_L001_R1_001.fastq     F3D0_S188_L001_R2_001.fastq
F3D141  F3D141_S207_L001_R1_001.fastq   F3D141_S207_L001_R2_001.fastq
F3D142  F3D142_S208_L001_R1_001.fastq   F3D142_S208_L001_R2_001.fastq
F3D143  F3D143_S209_L001_R1_001.fastq   F3D143_S209_L001_R2_001.fastq
...

The issued command produces:

MiSeq   MiSeq_SOP/F3D0_S188_L001_R1_001.fastq   MiSeq_SOP/F3D0_S188_L001_R2_001.fastq
MiSeq   MiSeq_SOP/F3D141_S207_L001_R1_001.fastq MiSeq_SOP/F3D141_S207_L001_R2_001.fastq
MiSeq   MiSeq_SOP/F3D142_S208_L001_R1_001.fastq MiSeq_SOP/F3D142_S208_L001_R2_001.fastq
MiSeq   MiSeq_SOP/F3D143_S209_L001_R1_001.fastq MiSeq_SOP/F3D143_S209_L001_R2_001.fastq
...

Merge paired reads

From now on, Mothur is running from the MiSeq_SOP directory. Fusing the commands will require the make.contigs command:

make.contigs(file=mapping.files, processors=8)

Summary

summary.seqs(fasta=mapping.trim.contigs.fasta)
Using 4 processors.

                Start   End     NBases  Ambigs  Polymer NumSeqs
Minimum:        1       248     248     0       3       1
2.5%-tile:      1       252     252     0       3       3810
25%-tile:       1       252     252     0       4       38091
Median:         1       252     252     0       4       76181
75%-tile:       1       253     253     0       5       114271
97.5%-tile:     1       253     253     6       6       148552
Maximum:        1       502     502     249     243     152360
Mean:   1       252.811 252.811 0.70063 4.44854
# of Seqs:      152360

Output File Names:
mapping.trim.contigs.summary