Coverage normalization in IGV

2,536 views
Skip to first unread message

Razvan Chereji

unread,
Jan 31, 2015, 6:55:33 PM1/31/15
to igv-...@googlegroups.com
Hi,

I know there is an option in the View>Preferences>Tracks to Normalize Coverage Data but for my tdf files this doesn't seem to work. I am converting some bedgraph file to tdf using the command:
igvtools toTDF coverage.bedGraph coverage.tdf genome
and my guess is that the bedGraph file doesn't contain the information about the total number of reads, totalReadCount, so IGV cannot normalize the profile later by multiplying it by 1,000,000 / totalReadCount. How can I enter manually the totalReadCount value into the tdf or bedgraph file, in order to get a proper rescaling in the browser?

Thank you,
Razvan

Jim Robinson

unread,
Jan 31, 2015, 8:16:52 PM1/31/15
to igv-...@googlegroups.com
Hi Razvan,  you're guess is correct.  There is no way to enter that for a bedgraph file with igvtools.    You can set  the scale in the bedgraph file using the "track" line prior to making the TDF.    The attribute is viewLimits, see http://www.broadinstitute.org/igv/TrackLine.   However you will need to compute the limits with some tool external to igv.
--

---
You received this message because you are subscribed to the Google Groups "igv-help" group.
To unsubscribe from this group and stop receiving emails from it, send an email to igv-help+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/igv-help/a230ce6f-4a2b-4537-811d-1d856f2db986%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Razvan Chereji

unread,
Jan 31, 2015, 8:32:10 PM1/31/15
to igv-...@googlegroups.com
Thanks Jim! I know I can change the limits in the browser, but I would like the values of the coverage profile to be rescaled according to the total number of reads that generated this coverage. For example if I compare a peak of height 100 obtained from an experiment with 1M reads with a peak of height 200 from another experiment with 2M reads, then I want them to appear with the same height. Isn't this what the View>Preferences>Tracks>Normalize Coverage Data option is supposed to do? The description says it normalizes the profiles by multiplying them by 1,000,000 / totalReadCount. In other words adjusts all profiles as if they were generated by 1M reads. So my question was: what exactly is totalReadCount and how can I include this in a tdf/bedgraph/wig/bigwig/any other format that can later be converted to tdf?

Jim Robinson

unread,
Jan 31, 2015, 8:34:50 PM1/31/15
to igv-...@googlegroups.com
Hi Razan,

Once again you can't do this from a wig or bedgraph file using igvtools,  it only works when starting from a bam file and computing coverage.   Total read count is the total # of aligned reads in the bam. 

Jim

Razvan Chereji

unread,
Jan 31, 2015, 8:46:23 PM1/31/15
to igv-...@googlegroups.com
Thanks Jim! That's good to know. Then I would like to know if I convert a paired-end bam file to a tdf, are the whole fragments considered to construct the coverage or just the 2 sequenced ends. If it uses the whole fragments, is it possible to tell "igvtools toTDF" to use only the "relevant sequenced fragments" (e.g. when the fragment size satisfies some constraints, like 100 bp < L < 200 bp to obtain a coverage profile of a protein that could cover between 100 - 200 bp of DNA)?

Jim Robinson

unread,
Jan 31, 2015, 8:49:35 PM1/31/15
to igv-...@googlegroups.com
You can count as reads or pairs, see the or readme file or documentation
on the website. You can't filter as you describe, you will need to use
some other tool for that.

Razvan Chereji

unread,
Jan 31, 2015, 8:57:49 PM1/31/15
to igv-...@googlegroups.com
Thanks Jim, but unfortunately I never saw such an option in the page http://www.broadinstitute.org/software/igv/igvtools_commandline
Could you please refer me to the documentation page that describes the option needed for "igvtools toTDF" to consider the whole fragment when it computes the coverage?

Razvan Chereji

unread,
Jan 31, 2015, 10:08:13 PM1/31/15
to igv-...@googlegroups.com
Nevermind. I saw the count part now.
Thanks!
Reply all
Reply to author
Forward
0 new messages