Closed guidohooiveld closed 11 months ago
Because tximeta uses AnnotationHub when possible, you need to resolve this AHub issue first.
If you go to that URL, you can literally copy paste the code under 5.1, point 3 and it will fix the issue.
Thank you for your prompt reply!
Not knowing the inner works of AnnotationHub
, I didn't realize a persistent cache remained after closing the R-session. Indeed, copy/pasting the code under 5.1 - point 3 moved files I didn't know were there, and also correctly changed the location of the cache.
Importing data now worked without any issue!
Thanks, G
For completeness:
First:
> moveFiles<-function(package){
olddir <- path.expand(rappdirs::user_cache_dir(appname=package))
newdir <- tools::R_user_dir(package, which="cache")
dir.create(path=newdir, recursive=TRUE)
files <- list.files(olddir, full.names =TRUE)
moveres <- vapply(files,
FUN=function(fl){
filename = basename(fl)
newname = file.path(newdir, filename)
file.rename(fl, newname)
},
FUN.VALUE = logical(1))
if(all(moveres)) unlink(olddir, recursive=TRUE)
}
> package="AnnotationHub"
> moveFiles(package)
Then:
> se <- tximeta(
coldata = coldata,
type = "salmon",
txOut = TRUE,
skipMeta = FALSE,
skipSeqinfo = FALSE,
useHub = TRUE,
markDuplicateTxps = FALSE,
cleanDuplicateTxps = FALSE,
customMetaInfo = NULL)
importing quantifications
reading in files with read_tsv
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
found matching transcriptome:
[ GENCODE - Mus musculus - release M32 ]
useHub=TRUE: checking for TxDb via 'AnnotationHub'
|======================================================================| 100%
snapshotDate(): 2023-04-24
did not find matching TxDb via 'AnnotationHub'
building TxDb with 'GenomicFeatures' package
Import genomic features from the file as a GRanges object ... trying URL 'ftp://ftp.ebi.ac.uk/pub/databases/gencode/Gencode_mouse/release_M32/gencode.vM32.annotation.gtf.gz'
Content type 'unknown' length 29299972 bytes (27.9 MB)
==================================================
OK
Prepare the 'metadata' data frame ... OK
Make the TxDb object ... OK
generating transcript ranges
fetching genome info for GENCODE
Loading required package: S4Vectors
Loading required package: stats4
Attaching package: 'S4Vectors'
The following object is masked from 'package:utils':
findMatches
The following objects are masked from 'package:base':
expand.grid, I, unname
Warning messages:
1: In .get_cds_IDX(mcols0$type, mcols0$phase) :
The "phase" metadata column contains non-NA values for features of type
stop_codon. This information was ignored.
2: In valid.GenomicRanges.seqinfo(x, suggest.trim = TRUE) :
GRanges object contains 132 out-of-bound ranges located on sequences
chr4, chr8, chr13, chr14, and chr17. Note that ranges located on a
sequence whose length is unknown (NA) or on a circular sequence are not
considered out-of-bound (use seqlengths() and isCircular() to get the
lengths and circularity flags of the underlying sequences). You can use
trim() to trim these ranges. See ?`trim,GenomicRanges-method` for more
information.
>
Hi, First attempt to use
tximeta
, but I cannot get it to work because of an issue with the cache. I tried to change/set the location of theAnnotationHub
cache folder, but that didn't do the trick. Since I don't fully understand the instructions given in thetximeta
vignette nor link given in the error, I would appreciate getting some hints.TIA, Guido