Hi, I am trying to tximport Salmon output from the Galaxy, which is a quantification file in tabular format (instead of .sf format?). I have followed the Users manual of DESeq2 to tximport but got the error at txi step.
files1 <- list.files( pattern = ".txt",full.names = TRUE)
names(files1) <- paste0("samples", 1:4)
all(file.exists(files1))
[1] TRUE
head(tx2gene)
TXNAME GENEID
1 uc001aaa.3 100287102
2 uc010nxq.1 100287102
3 uc010nxr.1 100287102
4 uc001aal.1 79501
5 uc001aaq.2 NA
6 uc001aar.2 NA
txi <- tximport(files1, type = "salmon", tx2gene = tx2gene)
reading in files with read_tsv
1 2 3 4
summarizing abundance
summarizing counts
summarizing length
Error in summarizeToGene(txi, tx2gene, varReduce, ignoreTxVersion, ignoreAfterBar,
all(names(aveLengthSampGene) == rownames(lengthMat)) is not TRUE
In addition: Warning messages:
1: In rowsum.default(abundanceMatTx, geneId) : missing values for 'group'
2: In rowsum.default(countsMatTx, geneId) : missing values for 'group'
3: In rowsum.default(abundanceMatTx * lengthMatTx, geneId)
missing values for 'group'
4: In names(aveLengthSampGene) == rownames(lengthMat)
longer object length is not a multiple of shorter object length
Samples file contains my sample information in 4x4 dim. Any suggestions, advice would be appreciated, Thanks in advance.
Thank you Michael for the quick response, I will go back and check vignette. I have ran the salmon on galaxy platform and it generated tabular files instead of .sf. is it even possible to import tabular files by tximport?
Now that I can see the code more clearly, it looks like you have NA values in your tx2gene table. Try removing those rows first.
It worked, Thank you for your time.