Changes between Version 16 and Version 17 of SOPs/miningSAMBAM


Ignore:
Timestamp:
06/03/14 15:03:54 (11 years ago)
Author:
thiruvil
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • SOPs/miningSAMBAM

    v16 v17  
    1 == Mining, summarizing, and processing SAM/BAM files ==
     1== Summarizing, processing and quality control(QC) of SAM/BAM files ==
    22
    33Many of these involve [http://samtools.sourceforge.net/samtools.shtml | samtools]
     
    8686
    8787
    88 === Use QualiMap to get (visual) summary of mapping statistics eg. coverage/distribution ===
     88=== Get a list of multi-mapped reads, including the number of times each one was mapped ===
     89
     90Tophat/bowtie mappers create the tag NH:i:XXX where XXX is the number of times the read has mapped.
     91{{{
     92bsub "samtools view accepted_hits.bam | grep -v NH:i:1 | perl -pe 's/AS.+(NH:i:\d+)/\$1/' | cut -f1,10,12 | perl -pe 's/NH:i://' | sort -u -k3,3nr > Multi-mapped.sorted.txt"
     93# Output format:
     94# read_ID<tab>read<tab>number times mapped
     95}}}
     96
     97=== QC to get a (visual) summary of mapping statistics.  For eg. coverage/distribution of mapped reads across the genome or transcriptome. ===
     98
     99==== RSeQC: RNA-Seq quality control package ====
     100{{{
     101#get mapping statistics (eg. unique/multi-mapped reads)
     102bam_stat.py -i myFile.bam
     103}}}
     104
     105==== QualiMap: can be used on DNA or RNA-Seq ====
    89106{{{
    90107# Graphical interface: enter 'qualimap' on the command line
     
    95112bsub "qualimap rnaseq -bam myFile.bam -gtf Homo_sapiens.GRCh37.72.canonical.gtf -outdir output_qualimap_rnaseq -protocol non-strand-specific"
    96113}}}
    97 
    98 === Get a list of multi-mapped reads, including the number of times each one was mapped ===
    99 
    100 Tophat/bowtie mappers create the tag NH:i:XXX where XXX is the number of times the read has mapped.
    101 {{{
    102 bsub "samtools view accepted_hits.bam | grep -v NH:i:1 | perl -pe 's/AS.+(NH:i:\d+)/\$1/' | cut -f1,10,12 | perl -pe 's/NH:i://' | sort -u -k3,3nr > Multi-mapped.sorted.txt"
    103 # Output format:
    104 # read_ID<tab>read<tab>number times mapped
    105 }}}