Skip to content

Commit

Permalink
Revert "fixing #68"
Browse files Browse the repository at this point in the history
This reverts commit e39fe5b.
  • Loading branch information
teng-gao committed Nov 28, 2022
1 parent e39fe5b commit 75f9462
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 16 deletions.
4 changes: 2 additions & 2 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# numbat 1.0.5 - 11/27/2022

* Fixing bugs #65, #66, #67, #68
* Fixing bugs #65, #66, #67

* Retiring dependency on `reshape2`
* Retire dependency on `reshape2`

# numbat 1.0.4 - 11/20/2022

Expand Down
3 changes: 2 additions & 1 deletion R/main.R
Original file line number Diff line number Diff line change
Expand Up @@ -673,6 +673,7 @@ exp_hclust = function(count_mat, lambdas_ref, gtf, sc_refs = NULL, window = 101,
#' @keywords internal
make_group_bulks = function(groups, count_mat, df_allele, lambdas_ref, gtf, min_depth = 0, ncores = NULL) {


if (length(groups) == 0) {
return(data.frame())
}
Expand Down Expand Up @@ -1552,7 +1553,7 @@ get_joint_post = function(exp_post, allele_post, segs_consensus) {
#' @keywords internal
retest_bulks = function(bulks, segs_consensus = NULL,
t = 1e-5, min_genes = 10, gamma = 20,
use_loh = FALSE, diploid_chroms = NULL, ncores = 1, exclude_neu = TRUE, min_LLR = 5) {
segs_loh = NULL, use_loh = FALSE, diploid_chroms = NULL, ncores = 1, exclude_neu = TRUE, min_LLR = 5) {

if (is.null(segs_consensus)) {
segs_consensus = get_segs_consensus(bulks)
Expand Down
6 changes: 1 addition & 5 deletions R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@ analyze_bulk = function(
stop('Must define diploid region if not given')
}

if (is.null(segs_loh) & (!'loh' %in% colnames(bulk))) {
if (is.null(segs_loh)) {
bulk = bulk %>% mutate(loh = FALSE)
}

Expand Down Expand Up @@ -584,10 +584,6 @@ analyze_bulk = function(
cnv_state_post = ifelse(is.na(cnv_state_post), 'neu', cnv_state_post),
cnv_state = ifelse(is.na(cnv_state), 'neu', cnv_state)
) %>%
mutate(
cnv_state_post = ifelse(loh, 'del', cnv_state_post),
cnv_state = ifelse(loh, 'del', cnv_state)
) %>%
mutate(state_post = ifelse(
cnv_state_post %in% c('amp', 'del', 'loh') & (!cnv_state %in% c('bamp', 'bdel')),
paste0(cnv_state_post, '_', str_extract(state, 'up_1|down_1|up_2|down_2|up|down|1_up|2_up|1_down|2_down')),
Expand Down
11 changes: 3 additions & 8 deletions docs/news/index.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 75f9462

Please sign in to comment.