Alignment - mlbendall/telescope_tutorial GitHub Wiki

Aligning reads to genome

bowtie2 manual

module load bowtie2
bowtie2 --help

Output should look like this:

Bowtie 2 version 2.2.9 by Ben Langmead ([email protected], www.cs.jhu.edu/~langmea)
Usage:
  bowtie2 [options]* -x <bt2-idx> {-1 <m1> -2 <m2> | -U <r>} [-S <sam>]

  <bt2-idx>  Index filename prefix (minus trailing .X.bt2).
             NOTE: Bowtie 1 and Bowtie 2 indexes are not compatible.
  <m1>       Files with #1 mates, paired with files in <m2>.
             Could be gzip'ed (extension: .gz) or bzip2'ed (extension: .bz2).
  <m2>       Files with #2 mates, paired with files in <m1>.
             Could be gzip'ed (extension: .gz) or bzip2'ed (extension: .bz2).
  <r>        Files with unpaired reads.
             Could be gzip'ed (extension: .gz) or bzip2'ed (extension: .bz2).
  <sam>      File for SAM output (default: stdout)

  <m1>, <m2>, <r> can be comma-separated lists (no whitespace) and can be
  specified many times.  E.g. '-U file1.fq,file2.fq -U file3.fq'.

Inputs for bowtie2 include the reference genome and the paired-end fastq files.

Important arguments for Telescope:

--very-sensitive-local Find local alignments with high sensitivity

--score-min L,0,1.6 Report alignments that are approximately 95% similar

-k 100 Report up to 100 alignments

The reference genome we are using, hg19, is located at /lustre/groups/nixonlab/References/hg19. The index is found at /lustre/groups/nixonlab/References/hg19/Sequence/Bowtie2Index/genome

ref=/lustre/groups/nixonlab/References/hg19/Sequence/Bowtie2Index/genome
bowtie2  \
  --very-sensitive-local -k 100 --score-min L,0,1.6 \
  -x $ref \
  -1 SRR1686362/SRR1686362_pass_1.fastq.gz \
  -2 SRR1686362/SRR1686362_pass_1.fastq.gz \
  -S SRR1686362/aligned.sam

We can examine the output using samtools:

module load samtools/1.3.1
samtools view SRR1686362/aligned.sam

Finally, with this alignment we can run Telescope

module load telescope/0.3.1
telescope id \
  --outdir SRR1686362 \
  --exp_tag inform \
  --verbose \
  --out_matrix \
  --updated_sam \
  --thetaPrior 100000 \
  SRR1686362/aligned.sam 
⚠️ **GitHub.com Fallback** ⚠️