forked from ucvm/nemabiome
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathanalysis.Rmd
More file actions
106 lines (64 loc) · 6.03 KB
/
Copy pathanalysis.Rmd
File metadata and controls
106 lines (64 loc) · 6.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
---
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = FALSE)
```
# Analysis Protocols {.tabset .tabset-pills .tabset-fade}
Once you have generated the data from the MiSeq you must complete the following steps in order to analyze the data.
## Software Requirements
The primary software used for analysis is Mothur. This program is command line based, and will require you to type simple commands into either Terminal (Mac) or Command Prompt (Windows).
To download Mothur go to the Mothur github [downloads](https://github.com/mothur/mothur/releases/latest) page and download the latest version for your operating system. Unzip then move this folder to your home directory (your C: Drive on a PC, or your ‘User’ folder on a Mac).
<div class="panel panel-info">
<div class="panel-heading">Tip</div>
<div class="panel-body">
To check that you have placed the folder in the correct location, open up either Terminal (Mac) or Command Prompt (PC). Type `~/mothur/mothur` (Mac) or `C:\mothur\mothur.exe` (PC). If your screen looks similar to this:

You have done it correctly.
</div>
</div>
## Preparing files for analysis
### Downloading sequencing data files from BaseSpace
To download the sequencing fields from BaseSpace. Go to https://basespace.illumina.com/home/index, log-in, and navigate to your sequencing run. Click “Download” and select “All FASTQ files for this run”. Then click “Download your files”. BaseSpace uses the “BaseSpace Downloader” to download your files. If you have not previously downloaded this program, you must download it at this time. Select the location to download your files.
Once your files have downloaded, navigate to the folder where the files were downloaded. There will be one folder that corresponds to each sample that was sequenced. In each of these folders there will be two files, one that corresponds to the forward reads, and one that corresponds to the reverse reads. The forward and reverse read files for all samples will need to be moved to a single folder for analysis to conduct the analysis.
<div class="panel panel-success">
<div class="panel-heading">Recommendation</div>
<div class="panel-body">
Create a folder on your home directory with the name of your sequencing run (for the rest of this example it will be called “MiSeq_Run”). Move all of your files into this folder.
</div>
</div>
Once the files have been moved, the files must be unzipped/uncompressed. This can be done with the Archive Utility on a Mac and any file compression software, such as WinZip, on a PC. Make sure you unzip your files into the folder that you have created (i.e. “Miseq_Run”)
### Create sample list
You will need to create a file that contains the name of your sample, and specifies which files correspond to this sample. This will tell the program which files to analyze for each particular sample. You can download the file “nemabiome.files” in the [Examples](interpretation.html) section for an example of what this file must look like. Each line in this file represents a single sample that must be analyzed. The first column is the sample name, the second column is the file name for the forward read file, and the third column is the name of the reverse read file. Each column is separated by a single tab. An example is also listed below.
Example:
```
sample1 sample1_S1_L001_R1_001.fastq sample1_S1_L001_R2_001.fastq
sample2 sample2_S2_L001_R1_001.fastq sample2_S2_L001_R2_001.fastq
sample3 sample3_S3_L001_R1_001.fastq sample3_S3_L001_R2_001.fastq
...
```
Sample names may vary between different Illumina platforms, so please check the names of your downloaded files, to ensure the file names are correct. Please name this file as “stability.files”, with the “.files” file extension. Place this file in your folder that you created for analysis. This is the only file that you will need to create from scratch for this analysis, if you use the provided files.
### Download analysis files
Download the analysis files <a href="downloads/nematode_ITS2_database_version1_3.fasta" download>Nematode ITS2 database version 1.3</a>, <a href="downloads/nematode_taxonomy_1_3.tax" download>Nematode taxonomy file (version 1.3)</a> and <a href="downloads/batchfile.txt" download>Mothur batch file</a>. Place these files in the folder that contains your sequencing data (i.e. 'MiSeq_Run')
For a standard application do not make any changes to these files. If you are aware of the number of processors that your computer has, open up the `batchfile.txt` file, go to the first line and change the parameter “processors” from “processors=2” to the number of processors in your computer.
## Running analysis
Once all files have been downloaded, open up Terminal or Command Prompt. You will then need to navigate to the folder you created, which can be done using the “cd” command. If you created your analysis folder in your home directory type:
```
cd MiSeq_Run
```
This will change to this folder.
Then type:
```
~/mothur/mothur batchfile.txt
```
(On a Mac)
OR
```
C:\mothur\mothur.exe C:\MiSeq_Run\batchfile.txt
```
(On a PC)
This will launch Mothur, and begin to complete the commands that are contained within the batchfile. You will need to leave your computer open and running while the analysis completes. The amount of time that it will take to run will vary with your computer, and the number of samples/reads that you will be analyzing. General run times will probably be around ~4 hours, on a standard computer, 96 samples with an average read depth of ~50,000 reads.
Once the analysis has completed, you will have a file called `nemabiome_results.summary`. You can open this file up and copy the contents into an Excel workbook to properly view the data.
## Download list {#downloads}
* <a href="downloads/batchfile.txt" download="downloads/batchfile.txt">Mothur batch file</a>
* <a href="downloads/nematode_taxonomy_1_3.tax" download>Nematode taxonomy file (version 1.3)</a>
* <a href="downloads/nematode_ITS2_database_version1_3.fasta" download>Nematode ITS2 database version 1.3</a>