Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
PTV
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
Véronique LEGRAND
PTV
Commits
a230b47b
Commit
a230b47b
authored
1 month ago
by
Veronique Legrand
Browse files
Options
Downloads
Patches
Plain Diff
work in progress: better handling of checkpoints
parent
0fb36a15
No related branches found
No related tags found
No related merge requests found
Pipeline
#152402
failed
1 month ago
Stage: tests
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
phagetermvirome/functions_PhageTerm.py
+6
-1
6 additions, 1 deletion
phagetermvirome/functions_PhageTerm.py
phagetermvirome/readsCoverage_res.py
+12
-0
12 additions, 0 deletions
phagetermvirome/readsCoverage_res.py
with
18 additions
and
1 deletion
phagetermvirome/functions_PhageTerm.py
+
6
−
1
View file @
a230b47b
...
...
@@ -118,7 +118,12 @@ def readsCoverage(inRawDArgs,refseq,inDArgs,fParms,return_dict, core_id,line_sta
p_res
=
chk_handler
.
load
(
core_id
,
idx_refseq
)
gen_len
,
host_len
,
termini_coverage
,
whole_coverage
,
paired_whole_coverage
,
phage_hybrid_coverage
,
host_hybrid_coverage
,
\
host_whole_coverage
,
list_hybrid
,
insert
,
paired_missmatch
,
k
,
count_line
,
read_match
=
init_ws
(
p_res
,
refseq
,
inDArgs
.
hostseq
)
host_whole_coverage
,
list_hybrid
,
insert
,
paired_mismatch
,
k
,
count_line
,
read_match
=
init_ws
(
p_res
,
refseq
,
inDArgs
.
hostseq
)
if
p_res
==
None
:
# no existing checkpoint and starting processing of a new sequence
chk_handler
.
start
(
count_line
,
core_id
,
idx_refseq
,
termini_coverage
,
whole_coverage
,
paired_whole_coverage
,
\
phage_hybrid_coverage
,
host_hybrid_coverage
,
\
host_whole_coverage
,
list_hybrid
,
insert
,
paired_mismatch
,
count_line
,
read_match
)
if
logger
!=
None
:
logger
.
add_rw
(
p_res
)
test_read_seq
=
match
=
0
...
...
This diff is collapsed.
Click to expand it.
phagetermvirome/readsCoverage_res.py
+
12
−
0
View file @
a230b47b
...
...
@@ -291,6 +291,18 @@ class RCCheckpoint_handler:
host_whole_coverage
,
list_hybrid
,
insert
,
paired_mismatch
,
reads_tested
,
read_match
)
chkp
.
save
(
self
.
dir_chk
,
core_id
,
idx_seq
)
# When running on a cluster, ptv may be killed due to timeout. It is possible that in that case, that the processing of sequence n-1 is over
# (there is no more checkpoint for n-1) and ptv has not yet created a checkpoint for sequence n.
# The following method is used for creating a checkpoint at the beginning of processing of sequence n to avoid ptv
# having to restart from the beginning if it is killed due to timeout
def
start
(
self
,
count_line
,
core_id
,
idx_seq
,
termini_coverage
,
whole_coverage
,
paired_whole_coverage
,
\
phage_hybrid_coverage
,
host_hybrid_coverage
,
\
host_whole_coverage
,
list_hybrid
,
insert
,
paired_mismatch
,
reads_tested
,
read_match
):
if
self
.
chk_freq
!=
0
and
self
.
test_mode
==
False
:
chkp
=
RCCheckpoint
(
count_line
,
core_id
,
idx_seq
,
termini_coverage
,
whole_coverage
,
paired_whole_coverage
,
\
phage_hybrid_coverage
,
host_hybrid_coverage
,
\
host_whole_coverage
,
list_hybrid
,
insert
,
paired_mismatch
,
reads_tested
,
read_match
)
chkp
.
save
(
self
.
dir_chk
,
core_id
,
idx_seq
)
def
end
(
self
,
core_id
):
if
(
self
.
test_mode
==
False
and
self
.
chk_freq
!=
0
)
:
...
...
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