Question: Visualizing Coverage Of Ngs Reads Across Reference Genome
2
gravatar for nicolazilio
5.6 years ago by
nicolazilio20
nicolazilio20 wrote:

I am interested in finding out at how well my genome is covered (depth of coverage) by the reads I got out on an Illumina run to determine if there are loci that are under-represented, or missing (i.e. large deletion) or over-represented. Is there any script that can do that? I already aligned the reads using BWA.

Thank you.

coverage sequencing • 4.0k views
ADD COMMENTlink modified 6 months ago by Biostar ♦♦ 20 • written 5.6 years ago by nicolazilio20
4
gravatar for KCC
5.6 years ago by
KCC3.9k
Cambridge, MA
KCC3.9k wrote:

You probably have a file in SAM format. Convert to BAM (samtools):

samtools view -bS -F 4 data.sam > data.bam

Convert from BAM to BED (bedtools command):

bamToBed -i data.bam > data.bed

BED to Sorted BED (unix system command):

sort -k1,1 data.bed > data.sorted

Sorted BED to BedGraph (bedtools command):

genomeCoverageBed -bga -i data.sorted -g chrom.sizes > data.bedGraph

Convert to bigwig for fast viewing (UCSC utilities):

bedGraphToBigWig data.bedGraph chrom.sizes data.bw

Finally, use a program like IGV to view it. On a Mac, it's as easy as selecting the right genome, then drag and drop the bigwig file into the window. You can now explore your underrepresented features.

Note that the chrom.sizes file is a tab delimited file with the format: <chromosome name><tab><number of bases in chromosome>

ADD COMMENTlink modified 5.6 years ago • written 5.6 years ago by KCC3.9k
2

You can skip all the bed stuff and just load a sorted and indexed bam file directly into IGV. It shows a coverage track along with the reads, so it should give you the same result with fewer steps.

ADD REPLYlink written 5.6 years ago by matted7.0k

Here are other ways to do it! http://onetipperday.blogspot.com/2012/07/three-ways-to-convert-bambed-file-to.html

ADD REPLYlink written 5.6 years ago by Geparada1.4k
3
gravatar for swbarnes2
5.6 years ago by
swbarnes24.8k
United States
swbarnes24.8k wrote:

If you want to eyeball coverage, one easy way is with IGV, from the Broad institute.

ADD COMMENTlink written 5.6 years ago by swbarnes24.8k

IGV works well, but make sure you have a coverage file. This can be created using igvtools (should be under "Run --> Run igvtools...")

ADD REPLYlink written 5.6 years ago by Charles Warden6.1k

Like I said, you can eyeball coverage. Just throw the indexed .bam in there.

ADD REPLYlink written 5.6 years ago by swbarnes24.8k
0
gravatar for nicolazilio
5.6 years ago by
nicolazilio20
nicolazilio20 wrote:

Thank you, that worked!

ADD COMMENTlink written 5.6 years ago by nicolazilio20
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 2272 users visited in the last hour