Tximport for kallisto abundance.tsv files prior to DESeq analysis (RNASeq)
0
0
Entering edit mode
4.7 years ago
AW ▴ 10

Hello, I am very new to RNASeq analysis and need help figuring out how to prep abundance.tsv files (kallisto output files) for eventual DESeq2 analysis

I have a sample annotation file that contains the file name, build id and subject names called samples.csv. I also have abundance.tsv files for each subject. I am having trouble running tximport using the following code:

library(tximportData)
directory <- C:/Users/xyz/Downloads
samples <- read.table(file.path(directory, "samples.csv"))
files <- file.path(directory, "kallisto", samples$V1, "Subject1.abundance.tsv")
names(files) <- paste0("sample", 1:4)

library(TxDb.Hsapiens.UCSC.hg19.knownGene) 
txdb <- TxDb.Hsapiens.UCSC.hg19.knownGene
k <- keys(txdb, keytype = "TXNAME")
tx2gene <- select(txdb, k, "GENEID", "TXNAME")

library(readr)
tx2gene <- read_csv(file.path(dir, "tx2gene.gencode.v27.csv"))

txi.kallisto.tsv <- tximport(files, type = "kallisto", tx2gene = tx2gene, ignoreAfterBar = TRUE)

I got error: Error in tximport(files, type = "kallisto", tx2gene = tx2gene, ignoreAfterBar = TRUE) : all(file.exists(files)) is not TRUE.

Please help, I am not sure what I'm doing wrong.

RNA-Seq rna-seq R tximport • 2.7k views
ADD COMMENT
1
Entering edit mode

tximport says it can't find your sample files - basically there is a problem with how the link to your sample files is structured in 'files' if you just check what the output of 'files' is, you should be able to spot the problem?

ADD REPLY

Login before adding your answer.

Traffic: 1855 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6