Trying to use the liftOver function from the rtracklayer package in R 2.14.0
2
0
Entering edit mode
@lcolladotor
Last seen 14 days ago
United States
Hello BioC-list, I've been organizing some code for a local package, and was doing so in R 2.13.1. I just installed R 2.14.0 today and I found out that the liftOver function from the rtracklayer package no longer works. The example for that function is defined as: > example(liftOver) lftOvr> ## Not run: lftOvr> ##D chain <- import.chain("hg19ToHg18.over.chain") lftOvr> ##D library(TxDb.Hsapiens.UCSC.hg19.knownGene) lftOvr> ##D tx_hg19 <- transcripts(TxDb.Hsapiens.UCSC.hg19.knownGene) lftOvr> ##D tx_hg18 <- liftOver(tx_hg19, chain) lftOvr> ## End(Not run) lftOvr> lftOvr> lftOvr> > So, I simply tried re-running the example. Note that I had the chain file from before on our local package bumphunter. > library(GenomicRanges); library(rtracklayer) Loading required package: IRanges Attaching package: ‘IRanges’ The following object(s) are masked from ‘package:base’: cbind, eval, intersect, Map, mapply, order, paste, pmax, pmax.int, pmin, pmin.int, rbind, rep.int, setdiff, table, union Loading required package: RCurl Loading required package: bitops > chain <- import.chain(system.file("extdata", "hg19ToHg18.over.chain", package="bumphunter")) > chain Chain of length 25 names(25): chr22 chr21 chr19 chr20 chr18 chrY ... chr6 chr5 chr4 chr3 chr2 chr1 > library(TxDb.Hsapiens.UCSC.hg19.knownGene) Loading required package: GenomicFeatures Loading required package: AnnotationDbi Loading required package: Biobase Welcome to Bioconductor Vignettes contain introductory material. To view, type 'browseVignettes()'. To cite Bioconductor, see 'citation("Biobase")' and for packages 'citation("pkgname")'. Attaching package: ‘Biobase’ The following object(s) are masked from ‘package:IRanges’: updateObject > tx_hg19 <- transcripts(TxDb.Hsapiens.UCSC.hg19.knownGene) > tx_hg18 <- liftOver(tx_hg19, chain) Discarding unchained sequences: chr6_ssto_hap7, chr6_mcf_hap5, chr6_cox_hap2, chr6_mann_hap4, chr6_apd_hap1, chr6_qbl_hap6, chr6_dbb_hap3, chr17_ctg5_hap1, chr4_ctg9_hap1, chr1_gl000192_random, chrUn_gl000225, chr4_gl000194_random, chr4_gl000193_random, chr9_gl000200_random, chrUn_gl000222, chrUn_gl000212, chr7_gl000195_random, chrUn_gl000223, chrUn_gl000224, chrUn_gl000219, chr17_gl000205_random, chrUn_gl000215, chrUn_gl000216, chrUn_gl000217, chr9_gl000199_random, chrUn_gl000211, chrUn_gl000213, chrUn_gl000220, chrUn_gl000218, chr19_gl000209_random, chrUn_gl000221, chrUn_gl000214, chrUn_gl000228, chrUn_gl000227, chr1_gl000191_random, chr19_gl000208_random, chr9_gl000198_random, chr17_gl000204_random, chrUn_gl000233, chrUn_gl000237, chrUn_gl000230, chrUn_gl000242, chrUn_gl000243, chrUn_gl000241, chrUn_gl000236, chrUn_gl000240, chr17_gl000206_random, chrUn_gl000232, chrUn_gl000234, chr11_gl000202_random, chrUn_gl000238, chrUn_gl000244, chrUn_gl000248, chr8_gl000196_random, chrUn_gl000249, chrUn_gl000246, chr17_gl000203_random, chr8_gl000197_random, chrUn_gl000245, chrUn_gl000247, chr9_gl000201_random, chrUn_gl000235, chrUn_gl000239, chr21_gl000210_random, chrUn_gl000231, chrUn_gl000229, chrUn_gl000226, chr18_gl000207_random Error in unlist(mseqapply(liftOverSpace, rl[sharedNames], chain[sharedNames], : error in evaluating the argument 'x' in selecting a method for function 'unlist': Error in `[.default`(strandRevCodes, as.vector(flipped)) : only 0's may be mixed with negative subscripts I guess that the error wasn't noticed before since the example is set as notrun. I guess that's simply because of the process of getting the chain file. Thank you for your help. Cheers, Leonardo Here is my session information: > sessionInfo() R version 2.14.0 (2011-10-31) Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit) locale: [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8 attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] TxDb.Hsapiens.UCSC.hg19.knownGene_2.6.2 [2] GenomicFeatures_1.6.4 [3] AnnotationDbi_1.16.8 [4] Biobase_2.14.0 [5] rtracklayer_1.14.4 [6] RCurl_1.7-0 [7] bitops_1.0-4.1 [8] GenomicRanges_1.6.4 [9] IRanges_1.12.4 loaded via a namespace (and not attached): [1] biomaRt_2.10.0 Biostrings_2.22.0 BSgenome_1.22.0 DBI_0.2-5 [5] RSQLite_0.10.0 tools_2.14.0 XML_3.4-3 zlibbioc_1.0.0 [[alternative HTML version deleted]]
PROcess rtracklayer bumphunter PROcess rtracklayer bumphunter • 3.5k views
ADD COMMENT
0
Entering edit mode
@michael-lawrence-3846
Last seen 2.9 years ago
United States
Thanks. I knew about this but have been unable to fix it. It is some sort of memory error. It happens in IRanges C code but the corruption could be happening from read.chain(). There haven't been any consequential changes to read.chain. Must just be showing up now. Haven't been able to find any obvious errors in read.chain. On Mon, Dec 5, 2011 at 2:52 PM, Leonardo Collado Torres <lcollado@jhsph.edu>wrote: > Hello BioC-list, > > I've been organizing some code for a local package, and was doing so in R > 2.13.1. I just installed R 2.14.0 today and I found out that the liftOver > function from the rtracklayer package no longer works. The example for that > function is defined as: > > > example(liftOver) > > lftOvr> ## Not run: > lftOvr> ##D chain <- import.chain("hg19ToHg18.over.chain") > lftOvr> ##D library(TxDb.Hsapiens.UCSC.hg19.knownGene) > lftOvr> ##D tx_hg19 <- transcripts(TxDb.Hsapiens.UCSC.hg19.knownGene) > lftOvr> ##D tx_hg18 <- liftOver(tx_hg19, chain) > lftOvr> ## End(Not run) > lftOvr> > lftOvr> > lftOvr> > > > > So, I simply tried re-running the example. Note that I had the chain file > from before on our local package bumphunter. > > > library(GenomicRanges); library(rtracklayer) > Loading required package: IRanges > > Attaching package: ‘IRanges’ > > The following object(s) are masked from ‘package:base’: > > cbind, eval, intersect, Map, mapply, order, paste, pmax, pmax.int, > pmin, pmin.int, rbind, rep.int, setdiff, table, union > > Loading required package: RCurl > Loading required package: bitops > > chain <- import.chain(system.file("extdata", "hg19ToHg18.over.chain", > package="bumphunter")) > > chain > Chain of length 25 > names(25): chr22 chr21 chr19 chr20 chr18 chrY ... chr6 chr5 chr4 chr3 chr2 > chr1 > > library(TxDb.Hsapiens.UCSC.hg19.knownGene) > Loading required package: GenomicFeatures > Loading required package: AnnotationDbi > Loading required package: Biobase > > Welcome to Bioconductor > > Vignettes contain introductory material. To view, type > 'browseVignettes()'. To cite Bioconductor, see > 'citation("Biobase")' and for packages 'citation("pkgname")'. > > > Attaching package: ‘Biobase’ > > The following object(s) are masked from ‘package:IRanges’: > > updateObject > > > tx_hg19 <- transcripts(TxDb.Hsapiens.UCSC.hg19.knownGene) > > tx_hg18 <- liftOver(tx_hg19, chain) > Discarding unchained sequences: chr6_ssto_hap7, chr6_mcf_hap5, > chr6_cox_hap2, chr6_mann_hap4, chr6_apd_hap1, chr6_qbl_hap6, chr6_dbb_hap3, > chr17_ctg5_hap1, chr4_ctg9_hap1, chr1_gl000192_random, chrUn_gl000225, > chr4_gl000194_random, chr4_gl000193_random, chr9_gl000200_random, > chrUn_gl000222, chrUn_gl000212, chr7_gl000195_random, chrUn_gl000223, > chrUn_gl000224, chrUn_gl000219, chr17_gl000205_random, chrUn_gl000215, > chrUn_gl000216, chrUn_gl000217, chr9_gl000199_random, chrUn_gl000211, > chrUn_gl000213, chrUn_gl000220, chrUn_gl000218, chr19_gl000209_random, > chrUn_gl000221, chrUn_gl000214, chrUn_gl000228, chrUn_gl000227, > chr1_gl000191_random, chr19_gl000208_random, chr9_gl000198_random, > chr17_gl000204_random, chrUn_gl000233, chrUn_gl000237, chrUn_gl000230, > chrUn_gl000242, chrUn_gl000243, chrUn_gl000241, chrUn_gl000236, > chrUn_gl000240, chr17_gl000206_random, chrUn_gl000232, chrUn_gl000234, > chr11_gl000202_random, chrUn_gl000238, chrUn_gl000244, chrUn_gl000248, > chr8_gl000196_random, chrUn_gl000249, chrUn_gl000246, > chr17_gl000203_random, chr8_gl000197_random, chrUn_gl000245, > chrUn_gl000247, chr9_gl000201_random, chrUn_gl000235, chrUn_gl000239, > chr21_gl000210_random, chrUn_gl000231, chrUn_gl000229, chrUn_gl000226, > chr18_gl000207_random > Error in unlist(mseqapply(liftOverSpace, rl[sharedNames], > chain[sharedNames], : > error in evaluating the argument 'x' in selecting a method for function > 'unlist': Error in `[.default`(strandRevCodes, as.vector(flipped)) : > only 0's may be mixed with negative subscripts > > > > I guess that the error wasn't noticed before since the example is set as > notrun. I guess that's simply because of the process of getting the chain > file. > > Thank you for your help. > > Cheers, > Leonardo > > > Here is my session information: > > > sessionInfo() > R version 2.14.0 (2011-10-31) > Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit) > > locale: > [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8 > > attached base packages: > [1] stats graphics grDevices utils datasets methods base > > other attached packages: > [1] TxDb.Hsapiens.UCSC.hg19.knownGene_2.6.2 > [2] GenomicFeatures_1.6.4 > [3] AnnotationDbi_1.16.8 > [4] Biobase_2.14.0 > [5] rtracklayer_1.14.4 > [6] RCurl_1.7-0 > [7] bitops_1.0-4.1 > [8] GenomicRanges_1.6.4 > [9] IRanges_1.12.4 > > loaded via a namespace (and not attached): > [1] biomaRt_2.10.0 Biostrings_2.22.0 BSgenome_1.22.0 DBI_0.2-5 > [5] RSQLite_0.10.0 tools_2.14.0 XML_3.4-3 zlibbioc_1.0.0 > > [[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
0
Entering edit mode
@michael-lawrence-3846
Last seen 2.9 years ago
United States
This was caused by a bug in IRanges. The fix (in release) will come with IRanges 1.12.5. Michael On Mon, Dec 5, 2011 at 2:52 PM, Leonardo Collado Torres <lcollado@jhsph.edu>wrote: > Hello BioC-list, > > I've been organizing some code for a local package, and was doing so in R > 2.13.1. I just installed R 2.14.0 today and I found out that the liftOver > function from the rtracklayer package no longer works. The example for that > function is defined as: > > > example(liftOver) > > lftOvr> ## Not run: > lftOvr> ##D chain <- import.chain("hg19ToHg18.over.chain") > lftOvr> ##D library(TxDb.Hsapiens.UCSC.hg19.knownGene) > lftOvr> ##D tx_hg19 <- transcripts(TxDb.Hsapiens.UCSC.hg19.knownGene) > lftOvr> ##D tx_hg18 <- liftOver(tx_hg19, chain) > lftOvr> ## End(Not run) > lftOvr> > lftOvr> > lftOvr> > > > > So, I simply tried re-running the example. Note that I had the chain file > from before on our local package bumphunter. > > > library(GenomicRanges); library(rtracklayer) > Loading required package: IRanges > > Attaching package: ‘IRanges’ > > The following object(s) are masked from ‘package:base’: > > cbind, eval, intersect, Map, mapply, order, paste, pmax, pmax.int, > pmin, pmin.int, rbind, rep.int, setdiff, table, union > > Loading required package: RCurl > Loading required package: bitops > > chain <- import.chain(system.file("extdata", "hg19ToHg18.over.chain", > package="bumphunter")) > > chain > Chain of length 25 > names(25): chr22 chr21 chr19 chr20 chr18 chrY ... chr6 chr5 chr4 chr3 chr2 > chr1 > > library(TxDb.Hsapiens.UCSC.hg19.knownGene) > Loading required package: GenomicFeatures > Loading required package: AnnotationDbi > Loading required package: Biobase > > Welcome to Bioconductor > > Vignettes contain introductory material. To view, type > 'browseVignettes()'. To cite Bioconductor, see > 'citation("Biobase")' and for packages 'citation("pkgname")'. > > > Attaching package: ‘Biobase’ > > The following object(s) are masked from ‘package:IRanges’: > > updateObject > > > tx_hg19 <- transcripts(TxDb.Hsapiens.UCSC.hg19.knownGene) > > tx_hg18 <- liftOver(tx_hg19, chain) > Discarding unchained sequences: chr6_ssto_hap7, chr6_mcf_hap5, > chr6_cox_hap2, chr6_mann_hap4, chr6_apd_hap1, chr6_qbl_hap6, chr6_dbb_hap3, > chr17_ctg5_hap1, chr4_ctg9_hap1, chr1_gl000192_random, chrUn_gl000225, > chr4_gl000194_random, chr4_gl000193_random, chr9_gl000200_random, > chrUn_gl000222, chrUn_gl000212, chr7_gl000195_random, chrUn_gl000223, > chrUn_gl000224, chrUn_gl000219, chr17_gl000205_random, chrUn_gl000215, > chrUn_gl000216, chrUn_gl000217, chr9_gl000199_random, chrUn_gl000211, > chrUn_gl000213, chrUn_gl000220, chrUn_gl000218, chr19_gl000209_random, > chrUn_gl000221, chrUn_gl000214, chrUn_gl000228, chrUn_gl000227, > chr1_gl000191_random, chr19_gl000208_random, chr9_gl000198_random, > chr17_gl000204_random, chrUn_gl000233, chrUn_gl000237, chrUn_gl000230, > chrUn_gl000242, chrUn_gl000243, chrUn_gl000241, chrUn_gl000236, > chrUn_gl000240, chr17_gl000206_random, chrUn_gl000232, chrUn_gl000234, > chr11_gl000202_random, chrUn_gl000238, chrUn_gl000244, chrUn_gl000248, > chr8_gl000196_random, chrUn_gl000249, chrUn_gl000246, > chr17_gl000203_random, chr8_gl000197_random, chrUn_gl000245, > chrUn_gl000247, chr9_gl000201_random, chrUn_gl000235, chrUn_gl000239, > chr21_gl000210_random, chrUn_gl000231, chrUn_gl000229, chrUn_gl000226, > chr18_gl000207_random > Error in unlist(mseqapply(liftOverSpace, rl[sharedNames], > chain[sharedNames], : > error in evaluating the argument 'x' in selecting a method for function > 'unlist': Error in `[.default`(strandRevCodes, as.vector(flipped)) : > only 0's may be mixed with negative subscripts > > > > I guess that the error wasn't noticed before since the example is set as > notrun. I guess that's simply because of the process of getting the chain > file. > > Thank you for your help. > > Cheers, > Leonardo > > > Here is my session information: > > > sessionInfo() > R version 2.14.0 (2011-10-31) > Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit) > > locale: > [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8 > > attached base packages: > [1] stats graphics grDevices utils datasets methods base > > other attached packages: > [1] TxDb.Hsapiens.UCSC.hg19.knownGene_2.6.2 > [2] GenomicFeatures_1.6.4 > [3] AnnotationDbi_1.16.8 > [4] Biobase_2.14.0 > [5] rtracklayer_1.14.4 > [6] RCurl_1.7-0 > [7] bitops_1.0-4.1 > [8] GenomicRanges_1.6.4 > [9] IRanges_1.12.4 > > loaded via a namespace (and not attached): > [1] biomaRt_2.10.0 Biostrings_2.22.0 BSgenome_1.22.0 DBI_0.2-5 > [5] RSQLite_0.10.0 tools_2.14.0 XML_3.4-3 zlibbioc_1.0.0 > > [[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
0
Entering edit mode
Excellent! Thank you very much, Leonardo On Thu, Dec 8, 2011 at 9:35 AM, Michael Lawrence <lawrence.michael@gene.com>wrote: > This was caused by a bug in IRanges. The fix (in release) will come with > IRanges 1.12.5. > > Michael > > On Mon, Dec 5, 2011 at 2:52 PM, Leonardo Collado Torres < > lcollado@jhsph.edu> wrote: > >> Hello BioC-list, >> >> I've been organizing some code for a local package, and was doing so in R >> 2.13.1. I just installed R 2.14.0 today and I found out that the liftOver >> function from the rtracklayer package no longer works. The example for >> that >> function is defined as: >> >> > example(liftOver) >> >> lftOvr> ## Not run: >> lftOvr> ##D chain <- import.chain("hg19ToHg18.over.chain") >> lftOvr> ##D library(TxDb.Hsapiens.UCSC.hg19.knownGene) >> lftOvr> ##D tx_hg19 <- transcripts(TxDb.Hsapiens.UCSC.hg19.knownGene) >> lftOvr> ##D tx_hg18 <- liftOver(tx_hg19, chain) >> lftOvr> ## End(Not run) >> lftOvr> >> lftOvr> >> lftOvr> >> > >> >> So, I simply tried re-running the example. Note that I had the chain file >> from before on our local package bumphunter. >> >> > library(GenomicRanges); library(rtracklayer) >> Loading required package: IRanges >> >> Attaching package: ‘IRanges’ >> >> The following object(s) are masked from ‘package:base’: >> >> cbind, eval, intersect, Map, mapply, order, paste, pmax, pmax.int, >> pmin, pmin.int, rbind, rep.int, setdiff, table, union >> >> Loading required package: RCurl >> Loading required package: bitops >> > chain <- import.chain(system.file("extdata", "hg19ToHg18.over.chain", >> package="bumphunter")) >> > chain >> Chain of length 25 >> names(25): chr22 chr21 chr19 chr20 chr18 chrY ... chr6 chr5 chr4 chr3 chr2 >> chr1 >> > library(TxDb.Hsapiens.UCSC.hg19.knownGene) >> Loading required package: GenomicFeatures >> Loading required package: AnnotationDbi >> Loading required package: Biobase >> >> Welcome to Bioconductor >> >> Vignettes contain introductory material. To view, type >> 'browseVignettes()'. To cite Bioconductor, see >> 'citation("Biobase")' and for packages 'citation("pkgname")'. >> >> >> Attaching package: ‘Biobase’ >> >> The following object(s) are masked from ‘package:IRanges’: >> >> updateObject >> >> > tx_hg19 <- transcripts(TxDb.Hsapiens.UCSC.hg19.knownGene) >> > tx_hg18 <- liftOver(tx_hg19, chain) >> Discarding unchained sequences: chr6_ssto_hap7, chr6_mcf_hap5, >> chr6_cox_hap2, chr6_mann_hap4, chr6_apd_hap1, chr6_qbl_hap6, >> chr6_dbb_hap3, >> chr17_ctg5_hap1, chr4_ctg9_hap1, chr1_gl000192_random, chrUn_gl000225, >> chr4_gl000194_random, chr4_gl000193_random, chr9_gl000200_random, >> chrUn_gl000222, chrUn_gl000212, chr7_gl000195_random, chrUn_gl000223, >> chrUn_gl000224, chrUn_gl000219, chr17_gl000205_random, chrUn_gl000215, >> chrUn_gl000216, chrUn_gl000217, chr9_gl000199_random, chrUn_gl000211, >> chrUn_gl000213, chrUn_gl000220, chrUn_gl000218, chr19_gl000209_random, >> chrUn_gl000221, chrUn_gl000214, chrUn_gl000228, chrUn_gl000227, >> chr1_gl000191_random, chr19_gl000208_random, chr9_gl000198_random, >> chr17_gl000204_random, chrUn_gl000233, chrUn_gl000237, chrUn_gl000230, >> chrUn_gl000242, chrUn_gl000243, chrUn_gl000241, chrUn_gl000236, >> chrUn_gl000240, chr17_gl000206_random, chrUn_gl000232, chrUn_gl000234, >> chr11_gl000202_random, chrUn_gl000238, chrUn_gl000244, chrUn_gl000248, >> chr8_gl000196_random, chrUn_gl000249, chrUn_gl000246, >> chr17_gl000203_random, chr8_gl000197_random, chrUn_gl000245, >> chrUn_gl000247, chr9_gl000201_random, chrUn_gl000235, chrUn_gl000239, >> chr21_gl000210_random, chrUn_gl000231, chrUn_gl000229, chrUn_gl000226, >> chr18_gl000207_random >> Error in unlist(mseqapply(liftOverSpace, rl[sharedNames], >> chain[sharedNames], : >> error in evaluating the argument 'x' in selecting a method for function >> 'unlist': Error in `[.default`(strandRevCodes, as.vector(flipped)) : >> only 0's may be mixed with negative subscripts >> >> >> >> I guess that the error wasn't noticed before since the example is set as >> notrun. I guess that's simply because of the process of getting the chain >> file. >> >> Thank you for your help. >> >> Cheers, >> Leonardo >> >> >> Here is my session information: >> >> > sessionInfo() >> R version 2.14.0 (2011-10-31) >> Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit) >> >> locale: >> [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8 >> >> attached base packages: >> [1] stats graphics grDevices utils datasets methods base >> >> other attached packages: >> [1] TxDb.Hsapiens.UCSC.hg19.knownGene_2.6.2 >> [2] GenomicFeatures_1.6.4 >> [3] AnnotationDbi_1.16.8 >> [4] Biobase_2.14.0 >> [5] rtracklayer_1.14.4 >> [6] RCurl_1.7-0 >> [7] bitops_1.0-4.1 >> [8] GenomicRanges_1.6.4 >> [9] IRanges_1.12.4 >> >> loaded via a namespace (and not attached): >> [1] biomaRt_2.10.0 Biostrings_2.22.0 BSgenome_1.22.0 DBI_0.2-5 >> [5] RSQLite_0.10.0 tools_2.14.0 XML_3.4-3 zlibbioc_1.0.0 >> >> [[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 REPLY

Login before adding your answer.

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