Hi,
I am using linkedTxome
function in tximeta
in order to use a local transcriptome database. However, in some random runs, the GTF file is being downloaded from a FTP server which causes errors when the device is not connected to the internet.
Here is the code I use:
s <- data.frame(files = quant, names = sample, label = label)
# setting BiocFileCache directory for accessing and saving TxDb sqlite files
BFCdir <- file.path(dirname(spath), "BFC")
setTximetaBFC(BFCdir)
makeLinkedTxome(indexDir = index_dir,
source = "gencode",
organism = "human",
release = "v31",
genome = "GRCh38",
fasta = fasta_file,
gtf = gtf_path,
write = FALSE)
txi.methname <- tximeta(s, type = ftype, useHub = FALSE)
And the error message:
NOTE: linkedTxome with source='GENCODE', set useHub=FALSE in tximeta
to avoid download of reference txome from AnnotationHub.
alternatively use a different string for source argument
linkedTxome was different than one in bfc, replacing
importing quantifications
reading in files with read_tsv
1 2 3 4 5 6 7 8 9 10
found matching transcriptome:
[ GENCODE - Homo sapiens - release 31 ]
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_human/release_31/gencode.v31.annotation.gtf.gz'
Error in download.file(resource(con), destfile) :
cannot open URL 'ftp://ftp.ebi.ac.uk/pub/databases/gencode/Gencode_human/release_31/gencode.v31.annotation.gtf.gz'
Calls: getTxiResults2 ... import -> import -> import -> .local -> download.file
In addition: Warning message:
In download.file(resource(con), destfile) :
cannot open URL 'ftp://ftp.ebi.ac.uk/pub/databases/gencode/Gencode_human/release_31/gencode.v31.annotation.gtf.gz': FTP status was '421 Service not available, closing control connection'
Execution halted
I was wondering if there is a way to ensure the local GTF file is going to be used instead of attempting to download it from a FTP server.
Thanks in advance.
I have tried "localEnsembl"; however, the transcript ids in FASTA file (and salmon quantification files) have versions while the transcript ids in the GTF file don't have the version. This causes an error in
tximeta
:I pass
ignoreTxVersion = TRUE
but it looks like it is not used intximeta
and only being passed totximport
. How can I fix this?The argument is used in tximeta as well. I’ve used it successfully to deal with this issue.
Can you copy paste the code that gives the error?
Sure, here is the code:
BTW,
tximeta
version is 1.12.4.What
ignoreTxVersion
does is to remove anything after a.
in the quantification files, when it is looking up the transcript in the GTF. It is just:Then
txId
is matched to thetranscript_id
in the GTF. Can you show an example of a transcript ID in the quantification file and one in the GTF (e.g. show atranscript
line from the GTF)?I searched for the first transcript (from quantification files) in the GTF file, but I removed the version in the search:
Can you try with the latest:
install_github(“mikelove/tximeta”)
I get the same error with the latest (tximeta 1.15.3).
This seems to be a bug I hadn't covered, can you try again (v1.15.4 on GitHub).
Thanks for the report by the way!
Thank you for the bug fix. It worked this time with tximeta v1.15.4.
When is this new version going to available on bioconductor?
In about a week:
http://bioconductor.org/developers/release-schedule/
For others, I changed the code so that
source="LocalEnsembl"
will behave the same way as"Ensembl"
, in terms of internally fixing the issue that transcript IDs in the FASTA and quantification files have release versions that are not present in the GTF.