Salmon (quant.sf) to tximport error
1
0
Entering edit mode
@liqinrobin08-24248
Last seen 3.7 years ago

Hello everyone,

I'm new to bioinformatic in general and R too, and i am taking the workshop of DGE analysis overview: https://hbctraining.github.io/DGEworkshopsalmon/lessons/01DGEsetupandoverview.html.

Unfortunately, i can not follow the step with the provided code: Salmon (quant.sf) to tximport

## List all directories containing data           samples <- list.files(path = "./data", full.names = T, pattern="salmon$")
## Obtain a vector of all filenames including the path               files <- file.path(samples, "quant.sf")
## Since all quant files have the same name it is useful to have names for each element        names(files) <- str_replace(samples, "./data/", "") %>%    str_replace(".salmon", "")

It showed files character(0) and samples character(empty) in value. But there are quant.sf files in each sample file(.salmon)

And i have written the whole path for this codes, it is yet not working well. Wish for someone to help me figure out the problem. Thanks a lot.

deseq2 • 1.1k views
ADD COMMENT
0
Entering edit mode
@mikelove
Last seen 2 days ago
United States

So you have:

samples <- list.files(path = "./data", full.names = T, pattern="salmon$")

Then

files <- file.path(samples, "quant.sf")

If files is an empty vector, then samples is an empty vector, so then you need to figure out why there are no directories starting with salmon... in the data directory relative to your current working directory.

ADD COMMENT
0
Entering edit mode

Hi Michael,

Thanks a lot. According to your advice, i have gotten it. it is the path not right. Really appreciate. Qin

ADD REPLY

Login before adding your answer.

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