Skip to content

Commit fd193f0

Browse files
committed
number groups after removing irrelevant components from sample name
1 parent c51d105 commit fd193f0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bin/deseq2_qc.r

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,10 @@ decompose <- n_components!=1 && all(sapply(name_components, length)==n_com
7777
coldata <- data.frame(samples.vec, sample=samples.vec, row.names=1)
7878
if (decompose) {
7979
groupings <- as.data.frame(lapply(1:n_components, function(i) sapply(name_components, "[[", i)))
80-
names(groupings) <- paste0("Group", 1:n_components)
8180
n_distinct <- sapply(groupings, function(grp) length(unique(grp)))
8281
groupings <- groupings[n_distinct!=1 & n_distinct!=length(samples.vec)]
8382
if (ncol(groupings)!=0) {
83+
names(groupings) <- paste0("Group", 1:ncol(groupings))
8484
coldata <- cbind(coldata, groupings)
8585
} else {
8686
decompose <- FALSE

0 commit comments

Comments
 (0)