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
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
2592f048
Commit
2592f048
authored
5 years ago
by
Remi PLANEL
Browse files
Options
Downloads
Patches
Plain Diff
Add good orientation info
parent
aa7ca893
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Pipeline
#25692
failed with stage
in 53 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
crisprbact/predict.py
+14
-11
14 additions, 11 deletions
crisprbact/predict.py
with
14 additions
and
11 deletions
crisprbact/predict.py
+
14
−
11
View file @
2592f048
...
...
@@ -103,22 +103,23 @@ def on_target_predict(seq, genome=None, seed_sizes=[8, 9, 10, 11, 12]):
"
off_target_pampos
"
:
off_t
[
2
],
"
off_target_strand
"
:
off_t
[
3
],
"
off_target_recid
"
:
off_t
[
4
],
"
off_target_good_orientation
"
:
None
,
}
# Filter the off targets if the strand
# is not the opposite of the feature
off_t
[
5
]
=
list
(
filter
(
lambda
feat
:
get_strand_value
(
off_target_dict
[
"
off_target_strand
"
]
)
!=
get_strand_value
(
feat
.
location
.
strand
),
off_t
[
5
],
)
)
# Loop through features associated to an off-target position
if
len
(
off_t
[
5
])
>
0
:
# Loop for each feature
for
feat
in
off_t
[
5
]:
if
get_strand_value
(
off_target_dict
[
"
off_target_strand
"
]
)
!=
get_strand_value
(
feat
.
location
.
strand
):
off_target_dict
[
"
off_target_good_orientation
"
]
=
True
else
:
off_target_dict
[
"
off_target_good_orientation
"
]
=
False
feature_dict
=
{
"
off_target_feat_strand
"
:
feat
.
location
.
strand
,
"
off_target_feat_start
"
:
feat
.
location
.
start
,
...
...
@@ -133,6 +134,8 @@ def on_target_predict(seq, genome=None, seed_sizes=[8, 9, 10, 11, 12]):
off_targets_list
.
append
(
{
**
feature_dict
,
**
off_target_dict
}
)
# elif not has_feature:
# off_targets_list.append(off_target_dict)
else
:
off_targets_list
.
append
(
off_target_dict
)
off_targets_per_seed
.
append
(
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
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