Biostar Beta. Not for public use.
Igv Coverage Track Display
2
Entering edit mode
13 months ago
liupfskygre • 190
United States

Hi, does anyone here know how to reverse the coverage track in IGV? I have separate the reads mapped to the + and -strand and want to display them one upwards and the other downwards, like the picture here:

http://davetang.org/muse/2013/09/07/creating-a-coverage-plot-in-r/cage_density_plot_histo/

thanks!

igv coverage • 2.8k views
ADD COMMENTlink
0
Entering edit mode

I don't think you can with IGV. There's a reason that example used R.

ADD REPLYlink
1
Entering edit mode
4.7 years ago
Singapore

First, you need to use bedtools to convert bam or bed file into bedgraph format for positive strand and negative strand respectively. Please remember multiply the coverage of negative strand by "-1". Then you can merge these two files together and load it in IGV.

Here is the example:

samtools view -h -b Input.bam | bedtools bamtobed -ed -i - | bedtools genomecov -split -strand "+" -i - -g mm10.chrom.sizes -bg -trackline -trackopts 'name="Input" visibility=2 color=255,30,30' > Input.bedgraph

samtools view -h -b Input.bam | bedtools bamtobed -ed -i - | bedtools genomecov -split -strand "-" -i - -g mm10.chrom.sizes -bg | awk '{OFS="\t"}{print $1,$2,$3,$4*-1;}' >> Input.bedgraph

ADD COMMENTlink
0
Entering edit mode
10 hours ago
University Park, USA

You can't do that in IGV because a coordinate cannot have two different values.

What you can do however is split the data into two tracks and plot the positive values in one and the negative ones in the other

ADD COMMENTlink

Login before adding your answer.

Similar Posts
Loading Similar Posts
Powered by the version 2.1