[BioC] transcriptDb object not found when call locateVariants() in a function
Valerie Obenchain
vobencha at fhcrc.org
Fri Feb 1 22:19:03 CET 2013
Hi Rebbecca,
Thanks for reporting this bug. Now fixed in release 1.4.8 and devel
1.5.33 in devel which should be available through biocList() tomorrow.
Valerie
On 02/01/2013 09:47 AM, sun wrote:
>> sessionInfo()
> R version 2.15.1 (2012-06-22)
> Platform: x86_64-unknown-linux-gnu (64-bit)
>
> locale:
> [1] C
>
> attached base packages:
> [1] stats graphics grDevices utils datasets methods base
>
> other attached packages:
> [1] GenomicFeatures_1.10.0 AnnotationDbi_1.20.0
> Biobase_2.18.0 VariantAnnotation_1.4.6 Rsamtools_1.10.1
> Biostrings_2.26.2 GenomicRanges_1.10.2 IRanges_1.16.3
> BiocGenerics_0.4.0 vimcom_0.9-5 setwidth_1.0-3
> [12] colorout_0.9-9
>
> loaded via a namespace (and not attached):
> [1] BSgenome_1.26.1 DBI_0.2-5 RCurl_1.95-1.1
> RSQLite_0.11.2 XML_3.95-0.1 biomaRt_2.14.0 bitops_1.0-4.1
> parallel_2.15.1 rtracklayer_1.18.0 stats4_2.15.1 tools_2.15.1
> zlibbioc_1.4.0
>
>
> On Fri, Feb 1, 2013 at 12:41 AM, sun <fireflysrb at gmail.com> wrote:
>
>> Hi
>>
>> I put locateVariants() in a test() function, save test() in "test.R" file.
>> see bellow scripts,
>>
>> In "test.R" file,
>> test <-function() {
>> vcf <-readVcf("var.raw.vcf","Arabidopsis")
>> rd <-rowData(vcf)
>> txdb <-loadDb("Arabidopsis.sqlite")
>> allvar <- locateVariants(rd,txdb, AllVariants())
>> }
>>
>> Then I open R to run the following scripts,
>>
>> source("test.R")
>> library(VariantAnnotation)
>> library(GenomicFeatures)
>> test()
>>
>> I got an error "Error in isActiveSeq(x) :
>> error in evaluating the argument 'x' in selecting a method for function
>> 'isActiveSeq': Error: object 'txdb' not found"
>>
>> However, when I run the following scripts directly (don't put in a
>> function) ,the locateVariants() works.
>> vcf <-readVcf("var.raw.vcf","Arabidopsis")
>> rd <-rowData(vcf)
>> txdb <-loadDb("Arabidopsis.sqlite")
>> allvar <- locateVariants(rd,txdb, AllVariants())
>>
>> How can I load txdb object correctly so I can call locateVariants() in
>> function?
>>
>> Thanks,
>>
>> Rebecca
>>
>
> [[alternative HTML version deleted]]
>
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at r-project.org
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor
>
More information about the Bioconductor
mailing list