thelovelab / tximeta

Transcript quantification import with automatic metadata detection
https://thelovelab.github.io/tximeta/
64 stars 11 forks source link

Error in .nextMethod(.Object, ...) : invalid names for slots of class "EnsDb": conn, packageName #70

Closed Yang-amd closed 1 year ago

Yang-amd commented 1 year ago

Hello Mike: When I was running tximeta, I encountered the following error, I tried to google the solution but couldn't find the anwser. I hope you can help me to see how to solve it. Thank you very much!

setwd('E:\\Datasets\\GSE167199')
list.files()
library(tximeta)
sample_table <- read.csv('sample_table.csv')
se <- tximeta(sample_table)

indexDir <- file.path(getwd(),'human_index')
fastaFTP <- c('ftp://ftp.ensembl.org/pub/release-108/fasta/homo_sapiens/cdna/')
gtfPath <- file.path(getwd(),"Homo_sapiens.GRCh38.108.gtf.gz")

makeLinkedTxome(indexDir = indexDir,source = 'LocalEnsembl',organism = 'Homo sapiens',
                release = '108',genome = 'GRCh38.108',
                fasta = fastaFTP,gtf = gtfPath,
                write = FALSE)

se2 <- tximeta(sample_table)

The message returned is ——

importing quantifications
reading in files with read_tsv
1 2 3 4 5 6 
found matching linked transcriptome:
[ LocalEnsembl - Homo sapiens - release 108 ]
loading existing TxDb created: 2022-11-25 08:19:53
Error in .nextMethod(.Object, ...) : 
  invalid names for slots of class "EnsDb": conn, packageName
package.version("tximeta")
[1] "1.14.1"

Thanks & looking forward to your reply :)

mikelove commented 1 year ago

hi thanks for the report.

Can you try source=Ensembl?

Yang-amd commented 1 year ago

Thank you for reply.

I used source=Ensembl at first, and then it would report an error

> makeLinkedTxome(indexDir = indexDir,source = 'Ensembl',organism = 'Homo sapiens',
+                 release = '108',genome = 'GRCh38.108',
+                 fasta = fastaFTP,gtf = gtfPath,
+                 write = FALSE)
NOTE: linkedTxome with source='Ensembl', ensembldb will be used to parse GTF.
this may produce errors if the GTF is not from Ensembl, or has been modified.
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
> se2 <- tximeta(sample_table)
importing quantifications
reading in files with read_tsv
1 2 3 4 5 6 
found matching linked transcriptome:
[ Ensembl - Homo sapiens - release 108 ]
loading existing EnsDb created: 2022-11-25 08:19:53
loading existing transcript ranges created: 2022-11-25 08:20:53
Error in checkAssays2Txps(assays, txps) : 
  none of the transcripts in the quantification files are in the GTF

And I was struggling in fixing that Error

Error in checkAssays2Txps(assays, txps) : none of the transcripts in the quantification files are in the GTF

mikelove commented 1 year ago

Try upgrading to latest with install_github() and this repo “mikelove/tximeta”

Yang-amd commented 1 year ago

Thanks ~ Still,the same error after I upgraded it,

Error in checkAssays2Txps(assays, txps) : none of the transcripts in the quantification files are in the GTF

But the above error only occurs when I set the source to ensembl. If I change it to source = "LocalEnsembl" ,the above Error would disappear.

But then,I runse2 <- tximeta(sample_table) It will occur --

Error in .nextMethod(.Object, ...) : 
  invalid names for slots of class "EnsDb": conn, packageName
mikelove commented 1 year ago

I wonder what the transcript names look like in the quant.sf files?

Yang-amd commented 1 year ago

like this?

Name    Length  EffectiveLength TPM     NumReads
NM_000014.6     4610    4615.828        1.519330        149.000
NM_000015.3     1285    963.987 0.585903        12.000
NM_000016.6     2261    1851.392        19.336035       760.590
NM_000017.4     1859    1336.328        5.635369        160.000
NM_000018.4     2184    1833.512        130.109296      5068.468
NM_000019.4     1537    1257.506        43.447653       1160.810
NM_000020.3     4177    3722.114        0.000000        0.000
mikelove commented 1 year ago

Yes. These transcript names don't look similar to Ensembl transcript IDs (as are in the GTF file). Maybe you used a different source for transcripts?

Yang-amd commented 1 year ago

Yes,thank you very much. I changed my transcripts and solve the problem. Thanks again for your patient anwser!