Entering edit mode
Hi, i have multiple quant.sf files in different directories with names SRX1022857, SRX1022858, SRX1022859 etc
files <- list.files(pattern = "SRX")
> files
[1] "SRX1022857" "SRX1022858" "SRX1022859" "SRX1022860" "SRX1022861" "SRX1022862" "SRX1022863" "SRX1022864" "SRX1022865" "SRX1022866" "SRX1022867"
[12] "SRX1022868" "SRX1022869" "SRX1022870" "SRX1022871" "SRX1022872" "SRX1022873" "SRX1022874" "SRX1022875" "SRX1022876" "SRX1022877" "SRX1022878"
[23] "SRX1022879" "SRX1022880" "SRX1022881" "SRX1022882" "SRX1022883" "SRX1022884" "SRX1022885" "SRX1022886" "SRX1022887" "SRX1022888" "SRX1022889"
[34] "SRX1022890" "SRX1022891" "SRX1022892" "SRX1022893" "SRX1022894" "SRX1022895" "SRX1022896" "SRX1022897" "SRX1022898" "SRX1022899" "SRX1022900"
[45] "SRX1022901" "SRX1022902" "SRX1022903" "SRX1022904" "SRX1022905" "SRX1022906" "SRX1022907" "SRX1022908" "SRX1022909" "SRX1022910" "SRX1022911"
[56] "SRX1022912" "SRX1022913" "SRX1022914" "SRX1022915" "SRX1022916" "SRX1022917" "SRX1022918" "SRX1022919" "SRX1022920" "SRX1022921" "SRX1022922"
[67] "SRX1022923" "SRX1022924" "SRX1022925" "SRX1022926" "SRX1022927" "SRX1022928" "SRX1022929"
How can I use library(tximport)
to create a count matrix for all of them?
each SRX* is a directory and inside this directory there is a quant.sf file with the same name. I am confused how to use the files in order to import the names for each sample and the number of reads with tximport to create a count matrix. In previous case I used quant.sf but from the same directory like that
But I am wondering how to import them if I am in a directory called salmon and inside this there are all SRX1022857.... folders I do
But it doesn't list anything although that inside salmon_res there are all directories with SRX10*
Edited to add a missing quote
i tried it but this also returns
character(0)
.But I managed to do it in a different way I specify the dir manually , list the files , provide a csv with the names of each directory and specify the files and then use the tximport