Skip to content

Commit e5cd187

Browse files
committed
Fixed the error in generating DBS and INDEL matrix when only one sample input (#453).
1 parent b2a298d commit e5cd187

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

DESCRIPTION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Package: sigminer
22
Title: Extract, Analyze and Visualize Mutational Signatures for Genomic
33
Variations
4-
Version: 2.3.0
4+
Version: 2.3.1
55
Authors@R: c(
66
person("Shixiang", "Wang", , "[email protected]", role = c("aut", "cre"),
77
comment = c(ORCID = "0000-0001-9855-7357")),

NEWS.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# sigminer 2.3.1
2+
3+
- - Fixed the error in generating DBS and INDEL matrix when only one sample input (#453).
4+
15
# sigminer 2.3.0
26

37

R/generate_matrices.R

+4-4
Original file line numberDiff line numberDiff line change
@@ -416,10 +416,10 @@ generate_matrix_DBS <- function(query, ref_genome, genome_build = "hg19", add_tr
416416

417417
# Reorder mutation types
418418
res$all_matrices = lapply(res$all_matrices, function(x) {
419-
y = x[, sort(colnames(x))]
419+
y = x[, sort(colnames(x)), drop = FALSE]
420420
y
421421
})
422-
res$nmf_matrix = res$nmf_matrix[, sort(colnames(res$nmf_matrix))]
422+
res$nmf_matrix = res$nmf_matrix[, sort(colnames(res$nmf_matrix)), drop = FALSE]
423423

424424
res
425425
}
@@ -676,10 +676,10 @@ generate_matrix_INDEL <- function(query, ref_genome, genome_build = "hg19", add_
676676
}
677677
# Reorder mutation types
678678
res$all_matrices = lapply(res$all_matrices, function(x) {
679-
y = x[, sort(colnames(x))]
679+
y = x[, sort(colnames(x)), drop = FALSE]
680680
y
681681
})
682-
res$nmf_matrix = res$nmf_matrix[, sort(colnames(res$nmf_matrix))]
682+
res$nmf_matrix = res$nmf_matrix[, sort(colnames(res$nmf_matrix)), drop = FALSE]
683683

684684
res
685685
}

0 commit comments

Comments
 (0)