BIMSBbioinfo / ciRcus

An R package for annotation of circular RNAs
10 stars 5 forks source link

gtf2sqlite #48

Open BaluPai opened 6 years ago

BaluPai commented 6 years ago

Hi, Trying to use the ciRcus after a while now. I have this issue after gtf2sqlite..I do not find the sqlite file in the extdata..!! and obviously the loadannotation gives error..

gtf2sqlite( assembly = "hg38",db.file = system.file("extdata/db/human_hg38_ens75.sqlite",package="ciRcus")) snapshotDate(): 2018-04-30 downloading 0 resources loading from cache ‘C:/Users/Balu/Documents/AppData/.AnnotationHub/54269’ TxDb object: Db type: TxDb Supporting package: GenomicFeatures Genome: hg38 transcript_nrow: 198455 exon_nrow: 675723 cds_nrow: 269843 Db created by: GenomicFeatures package from Bioconductor Creation time: 2018-06-21 17:41:47 +0200 (Thu, 21 Jun 2018) GenomicFeatures version at creation time: 1.32.0 Warning message: In .get_cds_IDX(type, phase) : The "phase" metadata column contains non-NA values for features of type stop_codon. This information was ignored.

annot.list <- loadAnnotation(system.file("extdata/db/human_hg38_ens75_txdb.sqlite",package="ciRcus")) loading TxDb annotation from SQLite database file... Error in dbFileConnect(file) : DB file '' not found

Thanks,

regards, Balu

mschilli87 commented 6 years ago

@retaj: I can confirm that copy/paste of the README example 'no work'! :wink:


@BaluPai: What does

system.file("extdata/db/human_hg38_ens75_txdb.sqlite",package="ciRcus")

return for you?

I get "" which explains the error: There is no file called "" so the annotation cannot be read from there.

Note that there is no need to actually call the extdata function here: ciRcus does not ship with the human annotation, it is downloaded via AnnotationHub using the gtf2sqlite function.

When you copy from the README (using system.file), you dump the annotation into an SQLite data base file at "" (so nowhere?) and then loading fails.

If instead you set db.file to any (local!) path, gtf2sqlite should be able to write the annotation and loadAnnotation should be able to read it back.


@retaj:

I think we should either

  1. fix the system.file code to work, or
  2. re-write the README to not use system.file, or
  3. drop the whole SQLite-dump to begin with (AnnotationHub caches by default on disk and ciRcus should be able to construct everything from there anyways. I guess the main idea was to speed-up the whole process when starting with a local GTF file, but AnnotationHub seems to be the more widely use-case.

What do you think? (also @frenkiboy, obviously)