Skip to content

Commit fc0a56a

Browse files
authored
Merge pull request #254 from loremendez/add-weight-regulon-assignment
fixed weight assignment when computing leading edge
2 parents bc5d498 + 110477a commit fc0a56a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/pyscenic/recovery.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ def get_genes(rank_at_max):
179179
# but is inline with the RcisTarget implementation.
180180
filtered_idx = sranking <= rank_at_max
181181
filtered_gene_ids = gene_ids[filtered_idx]
182-
return list(zip(filtered_gene_ids, weights[filtered_idx] if weights is not None else sranking[filtered_idx]))
182+
return list(zip(filtered_gene_ids, weights[sorted_idx][filtered_idx] if weights is not None else sranking[filtered_idx]))
183183

184184
rank_at_max, n_recovered_genes = critical_point()
185185
# noinspection PyTypeChecker

0 commit comments

Comments
 (0)