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
0420d915
Commit
0420d915
authored
5 years ago
by
Remi PLANEL
Browse files
Options
Downloads
Patches
Plain Diff
Add test to be sure correct guide
parent
7a02f643
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/predict_test.py
+21
-1
21 additions, 1 deletion
tests/predict_test.py
with
21 additions
and
1 deletion
tests/predict_test.py
+
21
−
1
View file @
0420d915
...
...
@@ -30,4 +30,24 @@ def test_on_target_predict_size_guide():
(
pam_val
,
start_val
)
=
pam
assert
(
start_val
-
pam_val
==
3
),
"
the difference between start and pam position is different than 2
"
),
"
the difference between start and pam position is different than 3
"
def
test_smaller_target_seq
():
size_guide
=
20
seq
=
"
TTTTTTTTTTTTTTTTCCAGAAAAGAAAAAAAAAAAAAC
"
predicted_targets
=
crisprbact
.
on_target_predict
(
seq
)
list_predicted_targets
=
list
(
predicted_targets
)
assert
len
(
list_predicted_targets
)
==
1
,
"
Should have only 1 result
"
for
predicted_target
in
list_predicted_targets
:
guide
=
predicted_target
[
"
guide
"
]
assert
guide
==
"
GTTTTTTTTTTTTTCTTTTC
"
,
"
matching guide
"
assert
(
predicted_target
[
"
target
"
]
==
"
CTTTTCTGGAAAAAAAAAAAAAAAA
"
),
"
the predicted target
"
assert
predicted_target
[
"
start
"
]
==
19
,
"
position start
"
assert
predicted_target
[
"
stop
"
]
==
39
,
"
position stop
"
assert
predicted_target
[
"
pam
"
]
==
16
,
"
PAM pos
"
assert
len
(
guide
)
==
size_guide
,
(
"
the guide do not have a length of
"
+
size_guide
)
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