kacst-bioinfo-lab / labwork

3 stars 1 forks source link

Bowtie2 and Tophat2 aligners for mapping reads to genome reference. #9

Closed SULTAN-ALHARBI closed 5 years ago

SULTAN-ALHARBI commented 7 years ago

A) Bowtie

Downloading Genome FASTA from: [http://www.ensembl.org/info/data/ftp/index.html]

1 ) Choose species and version of its genome From Mac terminal: use this command $ wget link of FASTA genome Example\ $ wget ftp://ftp.ensembl.org/pub/release-88/fasta/homo_sapiens/dna/Homo_sapiens.GRCh38.dna.toplevel.fa.gz
$ gunzip file.fa.gz

2) Build index with bowrie2-build command:

$ bowtie2-build [options]* Example\ $ bowtie2-build -f Homo_sapiens.GRCh38.fa Homo_sapiens.GRCh38 -f reference file is FASTA file

Output: 1) Homo_sapiens.GRCh38.1.bt2 2) Homo_sapiens.GRCh38.2.bt2 3) Homo_sapiens.GRCh38.3.bt2 4) Homo_sapiens.GRCh38.4.bt2 5) Homo_sapiens.GRCh38.rev.1.bt2 6) Homo_sapiens.GRCh38.rev.2.bt2

3) Align Reads to Genome $ ./bowtie2 [options]* -x -1 -2 -U -S

      Files with #1 mates, paired with files in .       Files with #2 mates, paired with files in .         Files with unpaired reads.       File for SAM output (default: stdout) Example\ $ ./bowtie2 -x Homo_sapiens.GRCh38 -p 32 -t -N 0 --no-unal -1 SRR4780878_NIKS3_1.fastq -2 SRR4780878_NIKS3_2.fastq -S SRR4780878_NIKS3_pareid.sam -p/--threads number of alignment threads to launch (1)  -t/--time          print wall-clock time taken by search phases. -N           max # mismatches in seed alignment; can be 0 or 1 (0). --no-unal          suppress SAM records for unaligned reads Output: SRR4780878_NIKS3_pareid.sam # Tophat2 1) Transcriptome index: $ tophat2 -G file_base.gtf/gff --transcriptome-index=file_base.tr genome_index Example\ $ tophat2 -G Homo_sapiens.GRCh38.gtf --transcriptome-index=Homo_sapiens.GRCh38.tr Homo_sapiens.GRCh38 Output: 1) Homo_sapiens.GRCh38.tr.1.bt2 2) Homo_sapiens.GRCh38.tr.2.bt2 3) Homo_sapiens.GRCh38.tr.3.bt2 4) Homo_sapiens.GRCh38.tr.4.bt2 5) Homo_sapiens.GRCh38.tr.fa 6) Homo_sapiens.GRCh38.tr.fa.tlst 7) Homo_sapiens.GRCh38.tr.gff 8) Homo_sapiens.GRCh38.tr.rev.1.bt2 9) Homo_sapiens.GRCh38.tr.rev.2.bt2 10) Homo_sapiens.GRCh38.tr.ver 2) Aligning the reads $ ./tophat2 [options] -o outputFolder --trancriptome-index= filebase.tr