rtracklayer error?
1
0
Entering edit mode
Tim Smith ★ 1.1k
@tim-smith-1532
Last seen 7.9 years ago
Hi, I was just trying out the rtracklayer package with the example given in the bioinformatics paper on rtracklayer. Here is my code and the error statement: > library(IRanges) > library(rtracklayer) > data(targets) > tt <- >with(targets,GenomicData(IRanges(start,end),target,strand=strand,chro m=chrom)) > class(tt) [1] "RangedData" attr(,"package") [1] "IRanges" > session <- browserSession() > session$targets <- tt Error in FUN(X[[1L]], ...) : Invalid chromosomes for hg19: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, X, Y, MT My sessionInfo and traceback for the error are: > sessionInfo() R version 2.13.0 (2011-04-13) Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit) locale: [1] en_US.UTF-8/en_US.UTF-8/C/C/en_US.UTF-8/en_US.UTF-8 attached base packages: [1] grid stats graphics grDevices utils datasets methods base other attached packages: [1] hash_2.1.0 biomaRt_2.8.0 rtracklayer_1.12.2 RCurl_1.5-0 bitops_1.0-4.1 [6] IRanges_1.10.4 pvclust_1.2-2 les_1.2.0 fdrtool_1.2.7 ggplot2_0.8.9 [11] proto_0.3-9.2 reshape_0.8.4 plyr_1.5.2 loaded via a namespace (and not attached): [1] Biostrings_2.20.1 boot_1.2-43 BSgenome_1.20.0 gdata_2.8.1 GenomicRanges_1.4.6 [6] gplots_2.8.0 gtools_2.6.2 RColorBrewer_1.0-2 tools_2.13.0 XML_3.4-0 > traceback() 15: stop("Invalid chromosomes for ", genome(session), ": ", paste(badSpaces, collapse = ", ")) 14: FUN(X[[1L]], ...) 13: lapply(split(X, group), FUN, ...) 12: tapply(value, unlist(genomes), function(tracks) { genome <- genome(tracks[[1]]) if (length(genome)) genome(session) <- genome spaces <- unlist(lapply(tracks, names)) badSpaces <- setdiff(spaces, seqnames(session)) if (length(badSpaces)) stop("Invalid chromosomes for ", genome(session), ": ", paste(badSpaces, collapse = ", ")) }) 11: normArgTrackData(value, session) 10: .local(object, ..., value = value) 9: `track<-`(`*tmp*`, name, ..., value = <s4 object="" of="" class="" "rangeddatalist"="">) 8: `track<-`(`*tmp*`, name, ..., value = <s4 object="" of="" class="" "rangeddatalist"="">) 7: .local(object, ..., value = value) 6: `track<-`(`*tmp*`, i, ..., value = <s4 object="" of="" class="" "rangeddata"="">) 5: `track<-`(`*tmp*`, i, ..., value = <s4 object="" of="" class="" "rangeddata"="">) 4: `[[<-`(`*tmp*`, name, value = <s4 object="" of="" class="" "rangeddata"="">) 3: `[[<-`(`*tmp*`, name, value = <s4 object="" of="" class="" "rangeddata"="">) 2: `$<-`(`*tmp*`, "targets", value = <s4 object="" of="" class="" "rangeddata"="">) 1: `$<-`(`*tmp*`, "targets", value = <s4 object="" of="" class="" "rangeddata"="">) [[alternative HTML version deleted]]
rtracklayer rtracklayer • 891 views
ADD COMMENT
0
Entering edit mode
@michael-lawrence-3846
Last seen 8 months ago
United States
You just need to paste("chr", targets$chrom). I will update the targets.rda so that is already done. Things have changed a bit since that paper was written. Michael On Tue, Jun 7, 2011 at 10:16 AM, Tim Smith <tim_smith_666@yahoo.com> wrote: > Hi, > > I was just trying out the rtracklayer package with the example given in the > bioinformatics paper on rtracklayer. Here is my code and the error > statement: > > > library(IRanges) > > library(rtracklayer) > > data(targets) > > tt <- > > >with(targets,GenomicData(IRanges(start,end),target,strand=strand,ch rom=chrom)) > > class(tt) > [1] "RangedData" > attr(,"package") > [1] "IRanges" > > > session <- browserSession() > > session$targets <- tt > Error in FUN(X[[1L]], ...) : > Invalid chromosomes for hg19: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, > 14, > 15, 16, 17, 18, 19, 20, 21, 22, X, Y, MT > > > My sessionInfo and traceback for the error are: > > > > sessionInfo() > R version 2.13.0 (2011-04-13) > Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit) > > locale: > [1] en_US.UTF-8/en_US.UTF-8/C/C/en_US.UTF-8/en_US.UTF-8 > > attached base packages: > [1] grid stats graphics grDevices utils datasets methods > base > > > other attached packages: > [1] hash_2.1.0 biomaRt_2.8.0 rtracklayer_1.12.2 RCurl_1.5-0 > bitops_1.0-4.1 > > [6] IRanges_1.10.4 pvclust_1.2-2 les_1.2.0 fdrtool_1.2.7 > ggplot2_0.8.9 > > [11] proto_0.3-9.2 reshape_0.8.4 plyr_1.5.2 > > loaded via a namespace (and not attached): > [1] Biostrings_2.20.1 boot_1.2-43 BSgenome_1.20.0 > gdata_2.8.1 GenomicRanges_1.4.6 > [6] gplots_2.8.0 gtools_2.6.2 RColorBrewer_1.0-2 > tools_2.13.0 XML_3.4-0 > > > > > > traceback() > 15: stop("Invalid chromosomes for ", genome(session), ": ", > paste(badSpaces, > collapse = ", ")) > 14: FUN(X[[1L]], ...) > 13: lapply(split(X, group), FUN, ...) > 12: tapply(value, unlist(genomes), function(tracks) { > genome <- genome(tracks[[1]]) > if (length(genome)) > genome(session) <- genome > spaces <- unlist(lapply(tracks, names)) > badSpaces <- setdiff(spaces, seqnames(session)) > if (length(badSpaces)) > stop("Invalid chromosomes for ", genome(session), ": ", > paste(badSpaces, collapse = ", ")) > }) > 11: normArgTrackData(value, session) > 10: .local(object, ..., value = value) > 9: `track<-`(`*tmp*`, name, ..., value = <s4 object="" of="" class=""> "RangedDataList">) > 8: `track<-`(`*tmp*`, name, ..., value = <s4 object="" of="" class=""> "RangedDataList">) > 7: .local(object, ..., value = value) > 6: `track<-`(`*tmp*`, i, ..., value = <s4 object="" of="" class="" "rangeddata"="">) > 5: `track<-`(`*tmp*`, i, ..., value = <s4 object="" of="" class="" "rangeddata"="">) > 4: `[[<-`(`*tmp*`, name, value = <s4 object="" of="" class="" "rangeddata"="">) > 3: `[[<-`(`*tmp*`, name, value = <s4 object="" of="" class="" "rangeddata"="">) > 2: `$<-`(`*tmp*`, "targets", value = <s4 object="" of="" class="" "rangeddata"="">) > 1: `$<-`(`*tmp*`, "targets", value = <s4 object="" of="" class="" "rangeddata"="">) > [[alternative HTML version deleted]] > > _______________________________________________ > Bioconductor mailing list > Bioconductor@r-project.org > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: > http://news.gmane.org/gmane.science.biology.informatics.conductor > [[alternative HTML version deleted]]
ADD COMMENT

Login before adding your answer.

Traffic: 197 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