Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
CRISPRbact
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
David BIKARD
CRISPRbact
Commits
9f9ef253
Commit
9f9ef253
authored
5 years ago
by
Remi PLANEL
Browse files
Options
Downloads
Patches
Plain Diff
Fix bug: get the len of off_target_longest_perfect_match
parent
f839029b
No related branches found
No related tags found
No related merge requests found
Pipeline
#29608
passed
5 years ago
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
crisprbact/predict.py
+12
-5
12 additions, 5 deletions
crisprbact/predict.py
with
12 additions
and
5 deletions
crisprbact/predict.py
+
12
−
5
View file @
9f9ef253
...
...
@@ -89,8 +89,15 @@ def on_target_predict(seq, genome=None, seed_sizes=[8, 9, 10, 11, 12, GUIDE_LEN]
target
.
update
({
"
pred
"
:
preds
[
i
]})
if
genome
:
# lookup for off-targets in genome
off_targets_per_seed
=
gen_off_target_per_seed_size
(
i
,
target
[
"
guide
"
],
records
,
genome_features
,
target_id
,
seed_sizes
off_targets_per_seed
=
list
(
gen_off_target_per_seed_size
(
i
,
target
[
"
guide
"
],
records
,
genome_features
,
target_id
,
seed_sizes
,
)
)
target
.
update
({
"
off_targets_per_seed
"
:
list
(
off_targets_per_seed
)})
else
:
...
...
@@ -157,8 +164,8 @@ def gen_off_target_per_seed_size(
)
if
off_target_df
is
not
None
and
not
off_target_df
.
empty
:
off_targets
=
slice_off_targets_results
(
off_target_df
)
off_targets_list
=
gen_off_targets_dict_
list
(
target_id
,
seed_size
,
off_targets
off_targets_list
=
list
(
gen_off_targets_dict_list
(
target_id
,
seed_size
,
off_targets
)
)
yield
{
"
id
"
:
str
(
index
)
+
"
-
"
+
str
(
seed_size
),
...
...
@@ -188,7 +195,7 @@ def gen_off_targets_dict_list(target_id, seed_size, off_targets):
}
if
(
seed_size
==
GUIDE_LEN
or
off_target_dict
[
"
off_target_longest_perfect_match
"
]
!=
GUIDE_LEN
or
len
(
off_target_dict
[
"
off_target_longest_perfect_match
"
]
)
!=
GUIDE_LEN
):
index_features
=
7
# Get feature details associated
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment