Skip to content

Example bowtie2 old

temehi edited this page Sep 25, 2018 · 3 revisions
  1. 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
    
  2. Download and extract the 5K version bowtie2 index (V_genomes_indices_20180924_bowtie.zip) from here. This bowtie index contains reference genome database of different viral species.

     wget http://ftp.mi.fu-berlin.de/pub/dadi/slimm/V_genomes_indices_20180924_bowtie.zip
     unzip V_genomes_indices_20180924_bowtie.zip
    
  3. 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/archive/slimmDB_5K.zip
     unzip slimmDB_5K.zip
    
  4. Create two new directories with the name alignment_files slimm_reports and place your metagenomic sequencing reads under a directory named mg_reads .

Now you should have the following folder/directory structure in your working directory:

    Working Directory
      │
      ├── bin
      ├    ├── slimm (slimm binary executable)
      │
      ├── V_genomes_indices_20180924_bowtie (indexed reference genomes)
      ├    ├── V_genomes.1.bt2l
      ├    ├── V_genomes.2.bt2l
      ├    ├── V_genomes.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
Bowtie2 version 2.2.0 or higher is required to handle the .bt2l large index files.
Bowtie2 version 2.3.1 has some formatting problems while trying to output secondary alignments. Use earlier versions until this problem is resolved.
  1. Use bowtie2 to map the metagenomic reads against reference genomes and produce alignment files.

     bowtie2 -x .V_genomes_indices_20180924_bowtie/V_genomes \
             -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 slightly better with BAM format.
    
     bowtie2 -x .V_genomes_indices_20180924_bowtie/V_genomes \
             -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;
    
  2. 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)

Clone this wiki locally