Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integer plotting and width definition change #5

Open
walaj opened this issue Mar 21, 2016 · 0 comments
Open

Integer plotting and width definition change #5

walaj opened this issue Mar 21, 2016 · 0 comments

Comments

@walaj
Copy link
Collaborator

walaj commented Mar 21, 2016

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant