Problem rendering a bedgraph as a line plot

65 views
Skip to first unread message

mtr...@mindspring.com

unread,
Aug 5, 2019, 9:15:55 PM8/5/19
to igv-help
Hello

I'm trying to render the following bedgraph as a line plot

track type=bedGraph name="MIR604_FS_IS_FS.fa consensus base quality" description="MIR604_FS_IS_FS.fa consensus base quality" visibility=2 autoScale=off windowingFunction=maximum graphType=line color=230,0,0
MIR604_FS_IS_FS
.fa 1 7301 93
MIR604_FS_IS_FS
.fa 7302 7302 61
MIR604_FS_IS_FS
.fa 7303 8630 93
MIR604_FS_IS_FS
.fa 8631 8631 92
MIR604_FS_IS_FS
.fa 8632 11594 93
MIR604_FS_IS_FS
.fa 11595 11595 36
MIR604_FS_IS_FS
.fa 11596 11632 0

When this is loaded into IGV using the following session file

<?xml version="1.0" encoding="UTF-8"?>
<Global> genome="MIR604_FS_IS_FS.fa" locus="MIR604_FS_IS_FS.fa" version="3"
<Resources>
<Resource name="low complexity" path="http://demeter//scratch-large/2-weekly/TrEC-SIPB/1565051826/MIR604_FS_IS_FS.fa-1565051826-low_complexity.bedgraph"/>
<Resource name="homopolymers" path="http://demeter//scratch-large/2-weekly/TrEC-SIPB/1565051826/MIR604_FS_IS_FS.fa-1565051826-homopolymers.bedgraph"/>
<Resource name="arrow variants" path="http://demeter//scratch-large/2-weekly/TrEC-SIPB/1565051826/Zma-B-S1-47K15_MIR604.bam-vs-MIR604_FS_IS_FS.fa.1565051826.blasr.sort.arrow.gff3"/>
<Resource name="blasr alignment" path="http://demeter//scratch-large/2-weekly/TrEC-SIPB/1565051826/Zma-B-S1-47K15_MIR604.bam-vs-MIR604_FS_IS_FS.fa.1565051826.blasr.sort.bam"/>
<Resource name="consensus_base_quality" path="http://demeter//scratch-large/2-weekly/TrEC-SIPB/1565051826/MIR604_FS_IS_FS.fa-1565051826-consensus_base_quality.bedgraph"/>
</Resources>
</Global>


It renders a line but only over part of the length designated in the bedgraph file.  If I zoom in and out the the extent of the line will change but it still does not cover the whole range.  Only if I click on a terminus of line several times can I eventually get it to cover the full range specified in the bedgraph file.  Note that this is not the case if I specify a bar graph, the whole range is covered.  How can I correct this behavior so the whole range is covered when using a line plot?

Thanks 

Helga Thorvaldsdottir

unread,
Aug 27, 2019, 11:48:11 AM8/27/19
to igv-help
It looks like you've run into a couple of different issues with bedgraph line plots: 
1) the first segment of a chromosome is not drawn at all; and 
2) if the left edge of a segment is out of view, the line is not drawn.

I've created an issue on our GitHub repo, but unfortunately, I can't give you an estimate on when this can be looked at. If you subscribe to the issue on GitHub, you'll be notified of any updates.
You can work around the first problem by adding a dummy 1-base locus before the first locus of each chromosome represented in the file.
Also, try looking at the "point" rendering of the data. For long segments it actually draws a line. It may not be exactly what you want, but it doesn't seem to have the above issues.


James Robinson

unread,
Aug 27, 2019, 2:05:23 PM8/27/19
to igv-help
Looking at this now.  Irrespective of other issues there is a problem with the coordinates in this file.   UCSC bedgraph uses the 0-start half-open system, as does bed.   This feature, for example, has length zero as written

MIR604_FS_IS_FS.fa 8631 8631 92

It should be 

MIR604_FS_IS_FS.fa 8630 8631 92

--

---
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/9b98266f-2686-4ed3-8c10-02bf2a667f3d%40googlegroups.com.

James Robinson

unread,
Aug 27, 2019, 2:16:50 PM8/27/19
to igv-help
Its not at all clear to me what a line plot should do with begraph or wig data.  UCSC only supports bar and points.  What do you expect to see with the line plot as compared to the bar graph?   
Reply all
Reply to author
Forward
0 new messages