Skip to content
Snippets Groups Projects
Commit 6c36180a authored by Holger Brandl's avatar Holger Brandl
Browse files

tweaked names in star count matrix aggregation

parent caeeea12
No related branches found
No related tags found
No related merge requests found
......@@ -459,14 +459,14 @@ devtools::source_url("https://raw.githubusercontent.com/holgerbrandl/datautils/v
exprCounts <- list.files(".", "ReadsPerGene.out.tab") %>% ldply(function(countFile){
read.delim(countFile, header=F) %>%
select(V1, V2) %>%
set_names("gene_id", "num_alignments") %>%
filter(!str_detect(gene_id, "^N_")) %>%
set_names("ensembl_gene_id", "num_alignments") %>%
filter(!str_detect(ensembl_gene_id, "^N_")) %>%
mutate(sample=trim_ext(countFile, ".ReadsPerGene.out.tab"))
}, .progress="text")
countMatrix <- spread(exprCounts, sample, num_alignments)
write.delim(countMatrix, "star_count_matrix.txt")
write.delim(countMatrix, "star_counts_matrix.txt")
' | R --vanilla -q
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment