У меня есть 507 папок из TCGA с подсчетом данных (htseq.counts.gz), с помощью которых у меня уже есть эти данные в data.frame, как показано в скрипте ниже, теперь я хочу объединить эти файлы, чтобы выполнить анализ дифференциальных выражений
# Find all files
library(stringr)
short<-list.files("Desktop/TCGA_SquamousCell/", full.names = FALSE, recursive = TRUE)
# Find the last / in order to determine the start of the file name
start <- str_locate(short,"^.+/")
# Retrieve the file name from the complete directory path
name <- substring(short, start[,2]+1)
# Create a data frame and save to disk
df <- data.frame(name, path=short, stringsAsFactors = FALSE)