Skip to content

Commit 0725cd4

Browse files
committed
add fallback options for too many input genes
1 parent 5159b2f commit 0725cd4

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

R/run_tkoi.R

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,7 @@ run_tkoi = function(
168168
substitute_genes = character(n_genes)
169169
for(i in seq_len(n_genes)){
170170
pool = setdiff(candidate_pools[[i]], substitute_genes)
171+
if(length(pool) == 0L) pool = candidate_pools[[i]] # fallback: allow reuse when pool exhausted by large seed sets
171172
substitute_genes[i] = sample(pool, 1)
172173
}
173174

0 commit comments

Comments
 (0)