I created a txt2gene for Rattus Norvegicus (rnor6) assembly. I downloaded the Ensembl v100 GTF for that ftp://ftp.ensembl.org/pub/release-100/gtf/rattusnorvegicus/Rattusnorvegicus.Rnor_6.0.100.gtf.gz I took only the transcriptID and GeneName:
gtf.gr = rtracklayer::import(gtf.file) # creates a GRanges object
gtf.df = as.data.framegtf.gr)
txt2gene=(gtf.df[gtf.df$type=='transcript' ,c("transcript_id","gene_name")])
names(txt2gene)<-c('TXNAME','GENEID')
The fastq files were quantified using Salmon against the same GTF. When I try to txtimport using
txi <- tximport(files, type="salmon", tx2gene = tx2gene,ignoreTxVersion = TRUE)
I get warnings and error as follows: "missing values for 'group'summarizing counts missing values for 'group'summarizing length missing values for 'group'longer object length is not a multiple of shorter object lengthError in .local(object, ...) : all(names(aveLengthSampGene) == rownames(lengthMat)) is not TRUE"
I've checked according to another post and I have no duplicated transcripts and no NAs.
sessionInfo() R version 4.0.1 (2020-06-06) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 10 x64 (build 18362)
Matrix products: default
locale:
[1] LCCOLLATE=EnglishUnited States.1252 LCCTYPE=EnglishUnited States.1252 LCMONETARY=EnglishUnited States.1252
[4] LCNUMERIC=C LCTIME=English_United States.1252
system code page: 1255
attached base packages: [1] stats graphics grDevices utils datasets methods base
other attached packages: [1] readr1.3.1 tximportData1.16.0 tximport1.16.1 EPIC1.1.5
Could you please help me out? What could be wrong?