Problem when constructing a TxDb with makeTxDbFromGFF:Error in dbGetQuery(conn,SQL) :
0
0
Entering edit mode
JunLVI ▴ 40
@junlvi-8996
Last seen 6.3 years ago
Japan

I was learning RNA-seq analysis following the RNA-seq workflow: gene-level exploratory analysis and differential expression. 

I came to the step of constructing a TxDb:

 

gtffile <- file.path(dir,"Homo_sapiens.GRCh37.75_subset.gtf")

> (txdb <- makeTxDbFromGFF(gtffile, format="gtf",circ_seqs=character()))

Import genomic features from the file as a GRanges object ... OK

Prepare the 'metadata' data frame ... OK

Make the TxDb object ... Warning messages:

1: 'BiocGenerics:::updateS4' is deprecated.

Use 'replaceSlots' instead.

See help("Deprecated") 

2: 'BiocGenerics:::updateS4' is deprecated.

Use 'replaceSlots' instead.

See help("Deprecated") 

3: 'BiocGenerics:::updateS4' is deprecated.

Use 'replaceSlots' instead.

See help("Deprecated") 

4: 'BiocGenerics:::updateS4' is deprecated.

Use 'replaceSlots' instead.

See help("Deprecated") 

Error in dbGetQuery(conn, SQL) : 

  error in evaluating the argument 'conn' in selecting a method for function 'dbGetQuery': Error in get(name, envir = asNamespace(pkg), inherits = FALSE) : 

  object 'dbconn' not found

 

and:

> (ebg <- exonsBy(txdb,by="gene"))

Error in exonsBy(txdb, by = "gene") : 

  error in evaluating the argument 'x' in selecting a method for function 'exonsBy': Error: object 'txdb' not found

 

I guess that I could not ignore the error (and warning?)

Some people also had similar problem with makeTxDbFromGFF

problem using makeTxDbFromGFF and exonsBy() functions

he solved his problem through installing a new version of R and GenomicFeatures, but I don't think that could apply to my problem, for both my R and GenomicFeatures are new:

 

> sessionInfo()

R version 3.2.2 (2015-08-14)

Platform: x86_64-apple-darwin13.4.0 (64-bit)

Running under: OS X 10.9.5 (Mavericks)


locale:

[1] C/UTF-8/C/C/C/C


attached base packages:

[1] stats4    parallel  stats     graphics  grDevices utils     datasets 

[8] methods   base     


other attached packages:

 [1] GenomicFeatures_1.20.6 AnnotationDbi_1.30.1   Biobase_2.28.0        

 [4] Rsamtools_1.20.5       Biostrings_2.36.4      XVector_0.8.0         

 [7] airway_0.102.0         GenomicRanges_1.20.8   GenomeInfoDb_1.4.3    

[10] IRanges_2.4.0          S4Vectors_0.8.0        BiocGenerics_0.14.0   

[13] BiocInstaller_1.18.5  


loaded via a namespace (and not attached):

 [1] zlibbioc_1.14.0         GenomicAlignments_1.4.2 BiocParallel_1.2.22    

 [4] tools_3.2.2             DBI_0.3.1               lambda.r_1.1.7         

 [7] futile.logger_1.4.1     rtracklayer_1.28.10     futile.options_1.0.0   

[10] bitops_1.0-6            RCurl_1.95-4.7          biomaRt_2.24.1         

[13] RSQLite_1.0.0           XML_3.98-1.3           

Could anyone have any idea how to solve this problem?

Thanks very much!

 

Sorry I forgot to paste the traceback()

traceback()

13: dbGetQuery(conn, SQL)

12: AnnotationDbi:::dbEasyQuery(AnnotationDbi:::dbconn(annotationdb), 

        paste(sql, collapse = "\n"))

11: queryAnnotationDb(txdb, sql)

10: load_chrominfo(.self, set.col.class = TRUE)

9: .Object$initialize(...)

8: initialize(value, ...)

7: initialize(value, ...)

6: methods::new(def, ...)

5: .TxDb$new(conn = conn)

4: TxDb(conn)

3: makeTxDb(transcripts, splicings, genes = genes, chrominfo = chrominfo, 

       metadata = metadata, reassign.ids = TRUE)

2: makeTxDbFromGRanges(gr, metadata = metadata)

1: makeTxDbFromGFF(gtffile, format = "gtf", circ_seqs = character())

> (txdb <- makeTxDbFromGFF(gtffile, format="gtf",circ_seqs=character()))


 

R differential expression rnaseqgene • 4.2k views
ADD COMMENT
0
Entering edit mode

Does the command BiocInstaller::biocValid() suggest any version mis-matches between your packages?

ADD REPLY
0
Entering edit mode

Dear Martin, 

Thank you very much for your kind suggestion!

Yes. Indeed "IRanges", "S4Vectors" are too new for Bioconductor version '3.1'. I am trying to figure out the ways to downgrade them to see whether the problem could be solved, if you already known how, please kindly let me know. Thanks a lot!

> BiocInstaller::biocValid()

* sessionInfo()

R version 3.2.2 (2015-08-14)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: OS X 10.9.5 (Mavericks)

locale:
[1] C/UTF-8/C/C/C/C

attached base packages:
[1] stats4    parallel  stats     graphics  grDevices utils     datasets 
[8] methods   base     

other attached packages:
 [1] GenomicFeatures_1.20.6 AnnotationDbi_1.30.1   Biobase_2.28.0        
 [4] Rsamtools_1.20.5       Biostrings_2.36.4      XVector_0.8.0         
 [7] airway_0.102.0         GenomicRanges_1.20.8   GenomeInfoDb_1.4.3    
[10] IRanges_2.4.0          S4Vectors_0.8.0        BiocGenerics_0.14.0   
[13] BiocInstaller_1.18.5  

loaded via a namespace (and not attached):
 [1] zlibbioc_1.14.0         GenomicAlignments_1.4.2 BiocParallel_1.2.22    
 [4] tools_3.2.2             DBI_0.3.1               lambda.r_1.1.7         
 [7] futile.logger_1.4.1     rtracklayer_1.28.10     futile.options_1.0.0   
[10] bitops_1.0-6            RCurl_1.95-4.7          biomaRt_2.24.1         
[13] RSQLite_1.0.0           XML_3.98-1.3           

* Packages too new for Bioconductor version '3.1'

          Version
IRanges   "2.4.0"
S4Vectors "0.8.0"
          LibPath                                                         
IRanges   "/Library/Frameworks/R.framework/Versions/3.2/Resources/library"
S4Vectors "/Library/Frameworks/R.framework/Versions/3.2/Resources/library"

downgrade with biocLite(c("IRanges", "S4Vectors"))

Error: 2 package(s) too new
> 
ADD REPLY
0
Entering edit mode

To downgrade, simply re-intstall them, BiocInstaller::biocLite(c("IRanges", "S4Vectors")).

ADD REPLY
0
Entering edit mode

Yes, problem solved! Thank very much for your kindness and patience, Martin. 

 

 

ADD REPLY
0
Entering edit mode

Hi,

It's good to hear that you could solve your problem by downgrading your packages but you're using BioC 3.1 which is superseded by BioC 3.2 (released last week), and thus is not supported anymore. I would highly recommend that you upgrade to BioC 3.2. This should be as easy as running:

source("http://bioconductor.org/biocLite.R")
biocLite("BiocUpgrade")

Cheers,

H.

ADD REPLY
0
Entering edit mode

 

Dear Herve, 

Thank very much for reminding me of the version problem. Actually that was a temporary compromise:

As I mentioned, I was trying to follow the RNA-seq workflow package, but always ran into problem when I tried to install the workflows package by

biocLite("BiocUpgrade") 

It turned out the workflows (at present) only work with Bioconductor 3.1, they will be upgraded in the next few days to work with the current release version (3.2). I did not want to wait, so I deliberately downgrade the BioC. Wish that would make sense to you. 

Again really appreciate your kindness. 

Best,

Jun

 

 

ADD REPLY

Login before adding your answer.

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