Mentions légales du service
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Sequencing_Modules
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor 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
Admin message
GitLab upgrade completed. Current version is 17.11.3.
Show more breadcrumbs
dnarXiv
Sequencing_Modules
Commits
0adb6003
Commit
0adb6003
authored
2 years ago
by
BOULLE Olivier
Browse files
Options
Downloads
Patches
Plain Diff
lowered abundancy for dsk, exit when starting sequence not found in kmers
parent
cbe6d5f5
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
reads_consensus.py
+3
-4
3 additions, 4 deletions
reads_consensus.py
with
3 additions
and
4 deletions
reads_consensus.py
+
3
−
4
View file @
0adb6003
...
...
@@ -51,7 +51,7 @@ def count_kmers_dsk(input_path: str, start_sequence: str) -> (str, dict):
dsk_script_path
=
currentdir
+
"
/dsk/build/bin/dsk
"
dsk_tempfile_path
=
currentdir
+
"
/dsk/tmp/kmer_count
"
min_occ
=
2
# threshold of occurrences to save the kmer
min_occ
=
1
# threshold of occurrences to save the kmer
kmer_count_command
=
dsk_script_path
+
'
-file
'
+
input_path
+
'
-out
'
+
dsk_tempfile_path
+
'
-kmer-size
'
+
str
(
KMER_SIZE
)
+
'
-abundance-min
'
+
str
(
min_occ
)
+
'
-verbose 0
'
subprocess
.
call
(
'
/bin/bash -c
"
$DSK
"'
,
shell
=
True
,
env
=
{
'
DSK
'
:
kmer_count_command
})
...
...
@@ -77,10 +77,9 @@ def count_kmers_dsk(input_path: str, start_sequence: str) -> (str, dict):
potential_starters_dict
=
dict
((
k
,
v
)
for
k
,
v
in
kmer_occurrences_dict
.
items
()
if
k
.
startswith
(
start_sequence
))
if
len
(
potential_starters_dict
)
==
0
:
print
(
"
kmer_consensus
warning
: starting sequence not found in the reads
"
)
return
print
(
"
kmer_consensus
error
: starting sequence not found in the reads
"
)
exit
(
1
)
start_kmer
=
max
(
potential_starters_dict
,
key
=
potential_starters_dict
.
get
)
# kmer with the maximum occurrences that begins with the starting sequence
return
start_kmer
,
kmer_occurrences_dict
...
...
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