Skip to content

Commit

Permalink
fix matching deseq2
Browse files Browse the repository at this point in the history
  • Loading branch information
fsantilli committed Dec 17, 2024
1 parent 8035d4e commit f20a887
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion workflow/scripts/deseq2_v1.R
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,9 @@ mat <- sapply(ls, function(p) {
setNames(dt$V2, dt$V1)
})

colnames_order <- match(colData$name,colnames(mat))
colnames_order <- sapply(colnames(mat), function(x) grep(sprintf("%s$",x), colData$name))
print(colnames_order)
print(colnames(mat)[colnames_order])

# Rename columns to match sample sheet sample column
colnames(mat)[colnames_order] <- rownames(colData)
Expand Down

0 comments on commit f20a887

Please sign in to comment.