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.