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

plotGenes not work? #17

Open
shenweima opened this issue May 19, 2019 · 1 comment
Open

plotGenes not work? #17

shenweima opened this issue May 19, 2019 · 1 comment

Comments

@shenweima
Copy link

this is my code

bdata <-read.table("gene.bed",header=T)
head(bdata)
chrom            = "SM_V7_1"
chromstart       = 33135620
chromend         = 33143037
plotGenes(bdata, chrom=chrom,chromstart = chromstart,chromend = chromend, types=bdata$type, maxrows=50,bheight=0.08,plotgenetype="box",bentline=FALSE,col="brown", labeloffset=.2,fontsize=0.9,arrowlength = 0.025,labeltext=TRUE)
labelgenome( chrom, chromstart,chromend,side=1,scipen=20,n=3,scale="Mb",line=.18,chromline=.5,scaleline=0.5)

Run this code in jutyter notebook. Only labelgenome() function work
image


chrom | start | stop | gene | score | strand | type
-- | -- | -- | -- | -- | -- | --
SM_V7_1 | 33135620 | 33135696 | Smp_012860.1 | . | 1 | CDS
SM_V7_1 | 33135730 | 33135847 | Smp_012860.1 | . | 1 | CDS
SM_V7_1 | 33135886 | 33136029 | Smp_012860.1 | . | 1 | CDS
SM_V7_1 | 33136062 | 33136237 | Smp_012860.1 | . | 1 | CDS
SM_V7_1 | 33137617 | 33137839 | Smp_012860.1 | . | 1 | CDS
SM_V7_1 | 33139243 | 33139362 | Smp_012860.1 | . | 1 | CDS
SM_V7_1 | 33140579 | 33140630 | Smp_012860.1 | . | 1 | CDS
SM_V7_1 | 33141423 | 33141616 | Smp_012860.1 | . | 1 | CDS
SM_V7_1 | 33142706 | 33142927 | Smp_012860.1 | . | 1 | CDS
SM_V7_1 | 33134853 | 33135619 | Smp_012860.1 | . | 1 | utr
SM_V7_1 | 33142926 | 33143037 | Smp_012860.1 | . | 1 | utr
SM_V7_1 | 33134851 | 33135030 | Smp_012860.2 | . | 1 | CDS
SM_V7_1 | 33136062 | 33136237 | Smp_012860.2 | . | 1 | CDS
SM_V7_1 | 33137617 | 33137839 | Smp_012860.2 | . | 1 | CDS
SM_V7_1 | 33139243 | 33139362 | Smp_012860.2 | . | 1 | CDS
SM_V7_1 | 33140579 | 33140630 | Smp_012860.2 | . | 1 | CDS
SM_V7_1 | 33141423 | 33141616 | Smp_012860.2 | . | 1 | CDS
SM_V7_1 | 33142706 | 33142927 | Smp_012860.2 | . | 1 | CDS
SM_V7_1 | 33134803 | 33134850 | Smp_012860.2 | . | 1 | utr
SM_V7_1 | 33142926 | 33143037 | Smp_012860.2 | . | 1 | utr
SM_V7_1 | 33135620 | 33135696 | g789.t1 | . | 1 | CDS
SM_V7_1 | 33135730 | 33135847 | g789.t1 | . | 1 | CDS
SM_V7_1 | 33135886 | 33136029 | g789.t1 | . | 1 | CDS
SM_V7_1 | 33136062 | 33136237 | g789.t1 | . | 1 | CDS
SM_V7_1 | 33137617 | 33137839 | g789.t1 | . | 1 | CDS
SM_V7_1 | 33139243 | 33139362 | g789.t1 | . | 1 | CDS
SM_V7_1 | 33140579 | 33140630 | g789.t1 | . | 1 | CDS
SM_V7_1 | 33141423 | 33141616 | g789.t1 | . | 1 | CDS
SM_V7_1 | 33142706 | 33142927 | g789.t1 | . | 1 | CDS
SM_V7_1 | 33134853 | 33135619 | g789.t1 | . | 1 | utr
SM_V7_1 | 33142926 | 33143037 | g789.t1 | . | 1 | utr
@dstern
Copy link

dstern commented Aug 22, 2020

I am getting the same error. Coincides with upgrading to R 4.0. Fails also with Sushi-provided bed file

load("/Users/sternd/Downloads/Sushi_genes.bed.rda")
Sushi_genes.bed
chrom start stop gene score strand
1 chr15 73017309 73017438 COX5A . -1
2 chr15 72999672 72999836 COX5A . -1
3 chr15 73003042 73003164 COX5A . -1
4 chr15 73006160 73006281 COX5A . -1
5 chr15 73008510 73008626 COX5A . -1
plotGenes(Sushi_genes.bed)
[[1]]
NULL

[[2]]
function (n)
{
x <- ramp(seq.int(0, 1, length.out = n))
if (ncol(x) == 4L)
rgb(x[, 1L], x[, 2L], x[, 3L], x[, 4L], maxColorValue = 255)
else rgb(x[, 1L], x[, 2L], x[, 3L], maxColorValue = 255)
}
<bytecode: 0x7fcfc4dac3a0>
<environment: 0x7fcf9bfe4400>

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

2 participants