makeTxDbPackage() ERROR: values for symbols SOURCEURL are not single strings
1
0
Entering edit mode
gtho123 ▴ 40
@gtho123-8872
Last seen 6.6 years ago
New Zealand

I am trying to make a TxDb package from a gff3 file for an organism not available from UNSC.

I can successfully make the TxDb like so:

library(GenomicFeatures)
txdb <- makeTxDbFromGFF(file="file.gff3",
                        dataSource="Organism Genome Project",
                        organism="My organisim")

 

However when I to make the package using the makeTxDbPackage function like so:

makeTxDbPackage(txdb,
                version = "4.2",
                maintainer="My name <email@address.com>",
                author="My name <email@address.com>",
                destDir=".",
                license="Artistic-2.0",
                pkgname=NULL,
                providerVersion = "4.2")

I get an error:

Error in makeTxDbPackage(txdb, version = "4.2", maintainer = "My name <email@address.com>",  :   values for symbols SOURCEURL are not single strings

What is the SOURCEURL? Since I am generating the TxDb from a local file I shouldn't need a url and I don't see where to enter one anyway.

I tried creating the original txdb object using the url to the online repository I obtained the gff3 file from and was successful, however when I tried to make the package I got the same error.

 

Any help appreciated.

genomicfeatures txdb • 1.3k views
ADD COMMENT
2
Entering edit mode
@james-w-macdonald-5106
Last seen 10 hours ago
United States

It doesn't look like this TxDb was ever considered a candidate for package status, as there isn't a Resource URL in the metadata table. But that's pretty easy to correct. Here is an example, using one of the examples for makeTxDbFromGFF.

## first run the example, to make a couple of TxDb objects

> example("makeTxDbFromGFF")

mTDFGF> ## TESTING GFF3
mTDFGF> gffFile <- system.file("extdata","GFF3_files","a.gff3",package="GenomicFeatures")

mTDFGF> txdb <- makeTxDbFromGFF(file=gffFile,
mTDFGF+             dataSource="partial gtf file for Tomatoes for testing",
mTDFGF+             organism="Solanum lycopersicum")
Import genomic features from the file as a GRanges object ... OK
Prepare the 'metadata' data frame ... OK
Make the TxDb object ... OK

mTDFGF> ## TESTING GTF, this time specifying the chrominfo
mTDFGF> gtfFile <- system.file("extdata","GTF_files","Aedes_aegypti.partial.gtf",
mTDFGF+                        package="GenomicFeatures")

mTDFGF> chrominfo <- data.frame(chrom = c('supercont1.1','supercont1.2'),
mTDFGF+                         length=c(5220442, 5300000),
mTDFGF+                         is_circular=c(FALSE, FALSE))

mTDFGF> txdb2 <- makeTxDbFromGFF(file=gtfFile,
mTDFGF+              chrominfo=chrominfo,
mTDFGF+              dataSource=paste("ftp://ftp.ensemblgenomes.org/pub/metazoa/",
mTDFGF+                               "release-13/gtf/aedes_aegypti/",sep=""),
mTDFGF+              organism="Aedes aegypti")
Import genomic features from the file as a GRanges object ... OK
Prepare the 'metadata' data frame ... OK
Make the TxDb object ... OK

## try to make a package with the second txdb
> makeTxDbPackage(txdb2, version = "0.0.1", maintainer = "me <me@mine.org>", author = "me", pkgname = "whatevs", providerVersion = "0.0.1")
Error in makeTxDbPackage(txdb2, version = "0.0.1", maintainer = "me <me@mine.org>",  :
  values for symbols SOURCEURL are not single strings

I get the same error as you, which is pretty cryptic. But let's fix it anyway, shall we?

## Make a connection to the db
> con <- dbconn(txdb2)

## insert a Resource URL entry in the metadata table,
## pointing to the ftp site where the data were procured
> DBI::dbGetQuery(con, "INSERT INTO metadata VALUES ('Resource URL', 'ftp://ftp.ensemblgenomes.org/pub/metazoa/release-13/gtf/aedes_aegypti');")

## Make the package
> makeTxDbPackage(txdb2, version = "0.0.1", maintainer = "me <me@mine.org>", author = "me", pkgname = "whatevs", providerVersion = "0.0.1")
Creating package in ./whatevs
TxDb object:
# Db type: TxDb
# Supporting package: GenomicFeatures
# Data source: ftp://ftp.ensemblgenomes.org/pub/metazoa/release-13/gtf/aedes_aegypti/
# Organism: Aedes aegypti
# Taxonomy ID: 7159
# miRBase build ID: NA
# Genome: NA
# transcript_nrow: 105
# exon_nrow: 402
# cds_nrow: 381
# Db created by: GenomicFeatures package from Bioconductor
# Creation time: 2016-11-29 09:54:12 -0500 (Tue, 29 Nov 2016)
# GenomicFeatures version at creation time: 1.26.0
# RSQLite version at creation time: 1.0.0
# DBSCHEMAVERSION: 1.1
# Resource URL: ftp://ftp.ensemblgenomes.org/pub/metazoa/release-13/gtf/aedes_aegypti

And now that can be installed as per usual. We should change the API for makeTxDbFromGFF to natively accommodate building a package from the resulting TxDb, but that won't occur before the next release (changes to the API for release packages are verboten), so for now you will have to fix your TxDb by hand.

ADD COMMENT

Login before adding your answer.

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