-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix function to calc editing efficiency where there are no reads
- Loading branch information
1 parent
c1afb13
commit 250bafb
Showing
5 changed files
with
9 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 7 additions & 2 deletions
9
crispr-ambiguous-mapping/crispr_ambiguous_mapping/utility/crispr_editing_utility.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,10 @@ | ||
from typing import Counter as CounterType | ||
|
||
def calculate_average_editing_frequency(total_mutation_counter: CounterType) -> float: | ||
editing_efficiency = (sum(total_mutation_counter.values()) - total_mutation_counter[0])/sum(total_mutation_counter.values()) | ||
return editing_efficiency | ||
total_editing_counts = (sum(total_mutation_counter.values()) - total_mutation_counter[0]) | ||
total_counts = sum(total_mutation_counter.values()) | ||
if total_counts > 0: | ||
editing_efficiency = total_editing_counts/total_counts | ||
return editing_efficiency | ||
else: | ||
return 0 |
Binary file added
BIN
+34.5 KB
crispr-ambiguous-mapping/dist/crispr_ambiguous_mapping-0.0.141-py3-none-any.whl
Binary file not shown.
Binary file added
BIN
+25.3 KB
crispr-ambiguous-mapping/dist/crispr_ambiguous_mapping-0.0.141.tar.gz
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[tool.poetry] | ||
name = "crispr-ambiguous-mapping" | ||
version = "0.0.140" | ||
version = "0.0.141" | ||
description = "" | ||
authors = ["Basheer Becerra <[email protected]>"] | ||
readme = "README.md" | ||
|