Skip to content

Example yara mapper 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 yara index (V_genomes_indices_20180924_yara.zip) from here. This yara index contains reference genome database of different viral species.

     wget http://ftp.mi.fu-berlin.de/pub/dadi/slimm/V_genomes_indices_20180924_yara.zip
     unzip V_genomes_indices_20180924_yara.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_yara (indexed reference genomes)
      ├    ├── V_genomes.lf.drs
      ├    ├── V_genomes.lf.drv
      ├    ├── V_genomes.rid.concat
      ├    ├── ...
      │
      ├── 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
  1. Use yara-mapper to map the metagenomic reads against reference genomes and produce alignment files.

     yara_mapper -v -t 30 -s 2 -sa record
             -o ./alignment_files/SRR1748536.bam \
             .V_genomes_indices_20180924_yara/V_genomes \
             ./mg_reads/SRR1748536_1.fastq \
             ./mg_reads/SRR1748536_2.fastq \
    
  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