thelovelab / tximport

Transcript quantification import for modular pipelines
134 stars 33 forks source link

Tximport issue with new R version #47

Closed alexandregmartini closed 3 years ago

alexandregmartini commented 3 years ago

I use the package called Tximport for long time to generate the tables I use for RNA-Seq. The code is quite simple. Here it is:

gene_id_import <- read.delim("gene_id_import.txt") # This is the file with the transcripts version and their respective gene names. library(tximport) filepath = "C:/ad4gy/MM" files<- sapply(list.dirs(path = filepath, recursive = FALSE)[grep("_quant2TRIMbias",list.dirs(path = filepath, recursive = FALSE))],function(x) paste0(x,"/quant.sf"))# This command searchs for the quant.sf files inside each folder

Tximport with length scaled TPM values as output (scaled up to library size and average transcript length over samples)

txi<- tximport(files= files, type= "salmon", tx2gene = gene_id_import, countsFromAbundance = "lengthScaledTPM")# When I run this line, now it’s giving the error:

reading in files with read_tsv Error in parse_con(txt, bigint_as_char) : lexical error: invalid bytes in UTF8 string. "seqBias": [], "": "–gcBias", "auxDir": "aux_in (right here) ------^

save your output file typing:

write.table(txi, file = "counts.txt", quote = TRUE, sep = "\t")

I have no idea about this error or how to correct it. Besides, it’s in the last line of the code. I noticed the mistake started after I upgrade to R4.0.3 Do you any idea how to fix it? I appreciate all the help? Regards,

mikelove commented 3 years ago

I just saw this on the support site:

https://support.bioconductor.org/p/p134400/

To keep information in one place, could you post your sessionInfo there, and we can continue to debug?

alexandregmartini commented 3 years ago

Thanks for the reply. Sure, I will do that