Skip to content

Integer plotting and width definition change #5

Open

Description

@walaj

gTrack has typically plotted ranges with a different definition of widths than GRanges. e.g. a range of [4,5] is width 1 in gTrack and width 2 in GRanges. This can cause strange behavior and odd looking plots when looking at small genomes where single base-pairs make a difference.

I have changed the code so that gTrack now defines width the same as GRanges. This means that the x-axis had to be shifted by 0.5 as below, and GRanges-width 1 ranges now plot to "cover" that base:

mdat <- matrix(sample(10, 4, replace=TRUE), ncol=2, nrow=2)
mdat[upper.tri(mdat)] <- mdat[lower.tri(mdat)]
gr <- GRanges(c(1,1), IRanges(c(5,6), width=1), strand=c("+","-"))

image

gr <- GRanges(1, IRanges(c(5), width=1), strand=c("+"))

image

Doing some debugging on this fix, will check in soon.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions