gravatar for evelyn

2 hours ago by

Hello,

I have salmon output as a directory with multiple files including quant.sf. I am trying to import it to R using tximport:

setwd("/path/quant/")
dir <- dir(paste0(path.package("tximportData"), "/path/quant/"), full.names = TRUE)
list.files()
samples <- read.csv("path/Table.csv", sep=";", header = TRUE)
samples
files <- file.path(dir, "salmon", samples$Run, "quant.sf")
names(files) <- paste0("samples", 1:100)

But it gives an error:

Error in names(files) <- paste0("samples") : 
  'names' attribute [100] must be the same length as the vector [0]

However, the individual files, Table.csv and quant.sf both have 100 observations information. Thank you!

link

modified 52 minutes ago

written
2 hours ago
by

evelyn80



Source link