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
9b768d05
Commit
9b768d05
authored
5 years ago
by
Remi PLANEL
Browse files
Options
Downloads
Patches
Plain Diff
Add the off-target PAM seq
parent
60ca2962
No related branches found
No related tags found
No related merge requests found
Pipeline
#26016
passed with stage
in 53 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
crisprbact/predict.py
+6
-6
6 additions, 6 deletions
crisprbact/predict.py
with
6 additions
and
6 deletions
crisprbact/predict.py
+
6
−
6
View file @
9b768d05
...
...
@@ -31,10 +31,11 @@ def find_targets(seq):
seq_revcomp
=
rev_comp
(
seq
)
matching_target
=
re
.
finditer
(
"
(?=([ATGC]{6}
"
+
repam
+
"
[ATGC]{16}))
"
,
seq_revcomp
)
for
target
in
matching_target
:
matching_target
=
target
.
group
(
1
)
yield
dict
(
[
(
"
target
"
,
target
.
group
(
1
)
),
(
"
guide
"
,
target
.
group
(
1
)
[:
20
]),
(
"
target
"
,
matching_target
),
(
"
guide
"
,
matching_target
[:
20
]),
(
"
start
"
,
L
-
target
.
start
()
-
20
),
(
"
stop
"
,
L
-
target
.
start
()),
(
"
pam
"
,
L
-
target
.
start
()
-
22
),
...
...
@@ -97,6 +98,7 @@ def on_target_predict(seq, genome=None, seed_sizes=[8, 9, 10, 11, 12]):
"
recid
"
,
"
max_matching_len
"
,
"
max_matching_seq
"
,
"
pam_seq
"
,
"
features
"
,
],
]
...
...
@@ -113,9 +115,10 @@ def on_target_predict(seq, genome=None, seed_sizes=[8, 9, 10, 11, 12]):
"
off_target_strand
"
:
off_t
[
3
],
"
off_target_recid
"
:
off_t
[
4
],
"
off_target_max_matching_seq
"
:
off_t
[
6
],
"
off_target_pam_seq
"
:
off_t
[
7
],
"
off_target_good_orientation
"
:
None
,
}
index_features
=
7
index_features
=
8
# Loop through features associated to an off-target position
if
len
(
off_t
[
index_features
])
>
0
:
# Loop for each feature
...
...
@@ -145,8 +148,6 @@ 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
(
...
...
@@ -164,7 +165,6 @@ def on_target_predict(seq, genome=None, seed_sizes=[8, 9, 10, 11, 12]):
"
off_targets
"
:
[],
}
)
# target.update({"off_targets": off_targets_list})
target
.
update
({
"
off_targets_per_seed
"
:
off_targets_per_seed
})
else
:
target
.
update
({
"
off_targets_per_seed
"
:
[]})
...
...
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