-
Notifications
You must be signed in to change notification settings - Fork 0
Example bowtie2
-
Make a clean working directory and download and extract the SLIMM executable inside it. For example (on a Mac),
mkdir ~/slimm_tutorial cd ~/slimm_tutorial wget https://github.com/seqan/slimm/releases/download/v0.2/slimm-0.2-Mac-x86_64.zip unzip slimm-0.2-Mac-x86_64.zip -
Download and extract the 5K version bowtie2 index (AB_5K_indexed_ref_genomes_bowtie2.zip) from here. This bowtie2 index contains reference genome database of 4538 complete bacterial and archaeal genomes that spans around 2500 different species. For example,
wget http://ftp.mi.fu-berlin.de/pub/dadi/slimm/AB_5K_indexed_ref_genomes_bowtie2.zip unzip AB_5K_indexed_ref_genomes_bowtie2.zip -
Download and extract the 5K version of SLIMM database (slimmDB_5K.zip) from here. For example,
wget http://ftp.mi.fu-berlin.de/pub/dadi/slimm/slimmDB_5K.zip unzip slimmDB_5K.zip -
Create two new directories with the name
alignment_filesslimm_reportsand place your metagenomic sequencing reads under a directory namedmg_reads.
Now you should have the following folder/directory structure in your working directory:
Working Directory
│
├── bin
├ ├── slimm (slimm binary executable)
│
├── AB_5K_indexed_ref_genomes_bowtie2 (indexed reference genomes)
├ ├── AB_5K.1.bt2l
├ ├── AB_5K.2.bt2l
├ ├── AB_5K.3.bt2l
├ ├── ...
│
├── slimmDB_5K (SLIMM taxonomic database)
│
├── alignment_files (alignment files will be stored here)
│
├── slimm_reports (slimm taxonomic reports will be stored here)
│
├── mg_reads (metagenomic sequencing reads)
├ ├── SRR1748536_1.fastq
├ ├── SRR1748536_2.fastq
-
Use bowtie2 to map the metagenomic reads against reference genomes and produce alignment files.
bowtie2 -x .AB_5K_indexed_ref_genomes_bowtie2/AB_5K \ -1 ./mg_reads/SRR1748536_1.fastq \ -2 ./mg_reads/SRR1748536_1.fastq \ -q --no-unal --mm -p 10 -k 60 \ -S ./alignment_files/SRR1748536.sam
[recomended] Alternatively we can directly pipe the output to samtools to save it as BAM format. This is even faster than just writing into SAM files since it avoids a lot of IO operations. And SLIMM performs sligtly better on BAM format.
bowtie2 -x .AB_5K_indexed_ref_genomes_bowtie2/AB_5K \
-1 ./mg_reads/SRR1748536_1.fastq \
-2 ./mg_reads/SRR1748536_1.fastq \
-q --no-unal --mm -p 10 -k 60 \
2>./alignment_files/SRR1748536.txt | samtools view -bS - > ./alignment_files/SRR1748536.bam;
-
Run SLIMM on the output of the read mapper (SAM/BAM files)
slimm -m ./slimmDB_5K -o slimm_reports/ ./alignment_files/SRR1748536.bam
you will find multiple reports under the directory slimm_reports for each level of taxonomy (species-superkingdom) named as SRR1748536_[rank]_reported.tsv contains the rank level taxonomic profile of the sample that SLIMM reported.
You can also tell SLIMM to report only a single rank using -r parameter. For example,
slimm -m ./slimmDB_5K -o slimm_reports/ -r species ./alignment_files/SRR1748536.bam
Would generate species level report only.
(see slimm --help for more details)