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
37ca0b4f
Commit
37ca0b4f
authored
5 years ago
by
Remi PLANEL
Browse files
Options
Downloads
Patches
Plain Diff
update headers name and make sequence in which lookup to off-target optional
parent
510a8c82
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!4
Multi seed size
Pipeline
#24819
passed
5 years ago
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
crisprbact/cli.py
+17
-12
17 additions, 12 deletions
crisprbact/cli.py
with
17 additions
and
12 deletions
crisprbact/cli.py
+
17
−
12
View file @
37ca0b4f
...
...
@@ -20,18 +20,18 @@ OFF_TARGET_DETAILS = [
"
off_target_feat_start
"
,
"
off_target_feat_end
"
,
"
off_target_feat_strand
"
,
"
locus_tag
"
,
"
gene
"
,
"
note
"
,
"
product
"
,
"
protein_id
"
,
"
off_target_
locus_tag
"
,
"
off_target_
gene
"
,
"
off_target_
note
"
,
"
off_target_
product
"
,
"
off_target_
protein_id
"
,
]
HEADER
=
[
"
target_id
"
,
"
target
"
,
"
PAM position
"
,
"
prediction
"
,
"
seq_id
"
,
"
target_
seq_id
"
,
"
seed_size
"
,
]
+
OFF_TARGET_DETAILS
SEED_SIZE
=
8
...
...
@@ -53,7 +53,7 @@ def predict(config):
@predict.command
()
@click.option
(
"
-t
"
,
"
--target
"
,
type
=
str
,
required
=
True
)
@click.option
(
"
-g
"
,
"
--genome
"
,
type
=
click
.
File
(
"
rU
"
),
required
=
True
,
help
=
"
Genome
"
)
@click.option
(
"
-g
"
,
"
--genome
"
,
type
=
click
.
File
(
"
rU
"
),
help
=
"
Genome
"
)
@click.option
(
"
-gf
"
,
"
--genome-format
"
,
...
...
@@ -72,10 +72,12 @@ def from_str(config, target, genome, genome_format, output_file):
[OUTPUT_FILE] file where the candidate guide RNAs are saved. Default =
"
stdout
"
"""
if
config
.
verbose
:
print_parameters
(
target
)
genome_fh
=
SeqIO
.
parse
(
genome
,
genome_format
)
if
genome
:
genome_fh
=
SeqIO
.
parse
(
genome
,
genome_format
)
else
:
genome_fh
=
None
guide_rnas
=
on_target_predict
(
target
,
genome_fh
)
click
.
echo
(
"
\t
"
.
join
(
HEADER
),
file
=
output_file
)
...
...
@@ -97,7 +99,7 @@ def from_str(config, target, genome, genome_format, output_file):
# @click.option(
# "-s", "--seed-size", type=click.IntRange(8, 15, clamp=True),
# )
@click.option
(
"
-g
"
,
"
--genome
"
,
type
=
click
.
File
(
"
rU
"
),
required
=
True
,
help
=
"
Genome
"
)
@click.option
(
"
-g
"
,
"
--genome
"
,
type
=
click
.
File
(
"
rU
"
),
help
=
"
Genome
"
)
@click.option
(
"
-gf
"
,
"
--genome-format
"
,
...
...
@@ -123,7 +125,10 @@ def from_seq(config, target, seq_format, genome, genome_format, output_file):
for
record
in
SeqIO
.
parse
(
target
,
seq_format
):
if
config
.
verbose
:
click
.
secho
(
"
- search guide RNAs for %s
"
%
record
.
id
,
fg
=
fg
)
genome_fh
=
SeqIO
.
parse
(
genome
,
genome_format
)
if
genome
:
genome_fh
=
SeqIO
.
parse
(
genome
,
genome_format
)
else
:
genome_fh
=
None
guide_rnas
=
on_target_predict
(
str
(
record
.
seq
),
genome_fh
)
# print(guide_rnas)
write_guide_rnas
(
guide_rnas
,
output_file
,
record
.
id
)
...
...
@@ -137,7 +142,7 @@ def print_parameters(target, fg="blue"):
def
write_guide_rnas
(
guide_rnas
,
output_file
,
seq_id
=
"
N/A
"
):
for
guide_rna
in
guide_rnas
:
row
=
[
str
(
guide_rna
[
"
id
"
]),
str
(
guide_rna
[
"
target_
id
"
]),
guide_rna
[
"
target
"
],
str
(
guide_rna
[
"
pam
"
]),
str
(
guide_rna
[
"
pred
"
]),
...
...
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