Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Exercise 1: convert bam to fastq and look at the quality scores

Expand
titleSolutionclick here to see the code
Code Block
languagebash
titlesolution code
module load bedtools
bedtools bamtofastq -i yeast_pairedend_sort.mapped.q1.bam -fq yeast_pairedend_sort.mapped.q1.fastq
more yeast_pairedend_sort.mapped.q1.fastq

...

Exercise 2: Convert the filtered yeast paired end bam to bed using bamtobed, look at your file in more, and find the number of lines in the file

Expand
titleSolutionclick to see the code
Code Block
languagebash
titlesolution code
module load bedtools
bedtools bamtobed -i yeast_pairedend_sort.mapped.q1.bam > yeast_pairedend_sort.mapped.q1.bed

more yeast_pairedend_sort.mapped.q1.bed #to examine the bed file visually
wc -l yeast_pairedend_sort.mapped.q1.bed #to get the number of lines in a file

use ctrl+c to quit more

...

Exercise 3: Find the coverage of your bed file over the sacCer3 genome

Expand
titleSolutionclick here to see the code for bedtools coverage
Code Block
languagebash
titlesolution code
module load bedtools
bedtools coverage -a yeast_pairedend_sort.mapped.q1.bed -b sacCer3.chrom.sizes.bed > sacCer3coverage.bed
more sacCer3coverage.bed #this file should have 17 lines, one for each chromosome

...

Hint: make sure to remove whitespace between lists for the -c and -o options!

Expand
titleSolutionclick here to see the bedtools merge code
Code Block
languagebash
titlesolution code
bedtools merge -c 4,5,6 -o distinct,sum,distinct -i yeast_pairedend_sort.mapped.q1.bed > yeast_pairedend_sort.mapped.q1.merge.bed
more yeast_pairedend_sort.mapped.q1.merge.bed
wc -l yeast_pairedend_sort.mapped.q1.merge.bed

...

Expand
titlebam filtering and bed conversion of human bam files
Code Block
languagebash
 module load bedtools
#filtering the bam files

#converting the filtered bam files into bed files
bedtools bamtobed -i yeast_pairedend_sort.mapped.q1.bam > yeast_pairedend_sort.mapped.q1.bed

 

Exercise 5: Intersect two experiments using intersect

...