Gviz: UcscTrack() getting error when there is no genes in the region
1
0
Entering edit mode
shuoguo ▴ 10
@shuoguo-10625
Last seen 8.2 years ago

I have this function and sometimes it gives me error:

refGenes <- UcscTrack(track="RefSeq Genes",
                        table="refGene",
                        trackType="GeneRegionTrack",
                        genome=genome_build,
                        chromosome=chrom,
                        from=pos0, to=pos1,
                        rstart="exonStarts", rends="exonEnds",
                        gene="name",
                        symbol="name2",
                        transcript="name",
                        strand="strand",
                        name="RefSeq Genes",
                        feature="name2",
                        showId=T,
                        fill = "green")

Error in make.unique(rep(if (!missing(feature) && !is.null(feature)) as.character(feature) else covars[["feature"]],  :
  'names' must be a character vector

I wonder if it is due to the fact that there was no genes in the region. e.g.

​[1] "chr16"    "33379409" "33476447"
 

Any way to by passing this?

 

Thanks a lot,

 

Shuoguo

 

givz UcscTrack • 1.2k views
ADD COMMENT
1
Entering edit mode
shuoguo ▴ 10
@shuoguo-10625
Last seen 8.2 years ago

Just in case in the future people run into the same issue. 

I have temporarily "fixed" this issue by removing the two lines in the command:

gene="name",
feature="name2",

please let me know if you have other ways.

Thanks,

ADD COMMENT

Login before adding your answer.

Traffic: 865 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6