Help in tximport
1
0
Entering edit mode
7.0 years ago
Tania ▴ 180

Hello everyone I am doing tximport one file by one then pass them to edgeR dgelist, and I feel this is wrong:

samples <- read.table(file.path("pathhere/salmon", "samples.txt"), header = FALSE)
files <- file.path("path here/", "salmon", samples$V1, "quant.sf")
names(files) <- paste0("sample", 1:20)
tx2gene <- read.csv(file.path("pathhere/salmon", "tx2gene.csv"))
txi.salmon1 <- tximport(files[1], type = "salmon", tx2gene = tx2gene, ignoreTxVersion = TRUE)
write.csv(txi.salmon1$counts, "spquant1.counts")
txi.salmon2 <- tximport(files[2], type = "salmon", tx2gene = tx2gene, ignoreTxVersion = TRUE)
write.csv(txi.salmon2$counts, "spquant2.counts")

Any help how can I Read all my files and use in tximport directly, tried this but not working:

txi_salmon <- tximport(files = files, type = "salmon", txOut = FALSE, tx2gene = tx2gene)reading in files with read_tsv
RNAseq tximport • 3.4k views
ADD COMMENT
1
Entering edit mode
7.0 years ago
Sharon ▴ 610

Using "files" this works with me:

txi.salmon <- tximport(files, type = "salmon", tx2gene = tx2gene, ignoreTxVersion = TRUE)
ADD COMMENT
0
Entering edit mode

Thanks Sharon. That works

ADD REPLY

Login before adding your answer.

Traffic: 2241 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