Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
X
xia2pipe
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package Registry
Container Registry
Operate
Terraform modules
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
Thomas Lane
xia2pipe
Commits
0b0fd48c
Commit
0b0fd48c
authored
3 years ago
by
TJ Lane
Browse files
Options
Downloads
Patches
Plain Diff
robustness improvements
parent
5e608eb8
Branches
mhier/gcc-bookworm
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
xia2pipe/dbdaemon.py
+1
-1
1 addition, 1 deletion
xia2pipe/dbdaemon.py
xia2pipe/dmpldaemon.py
+2
-2
2 additions, 2 deletions
xia2pipe/dmpldaemon.py
xia2pipe/projbase.py
+39
-15
39 additions, 15 deletions
xia2pipe/projbase.py
with
42 additions
and
18 deletions
xia2pipe/dbdaemon.py
+
1
−
1
View file @
0b0fd48c
...
...
@@ -12,7 +12,7 @@ class DBDaemon(ProjectBase):
def
in_db
(
self
,
metadata
,
run
,
table
):
cid
=
self
.
metadata_to_id
(
metadata
,
run
)
cid
=
self
.
metadata_to_id
(
metadata
,
run
)
# crystal ID
if
table
==
'
Data_Reduction
'
:
try
:
...
...
This diff is collapsed.
Click to expand it.
xia2pipe/dmpldaemon.py
+
2
−
2
View file @
0b0fd48c
...
...
@@ -166,7 +166,7 @@ class DimplingDaemon(ProjectBase):
#SBATCH --ntasks=1
#SBATCH --cpus-per-task={nproc}
#SBATCH --mem=6GB
#SBATCH --time=
5
:00:00
#SBATCH --time=
10
:00:00
#SBATCH --job-name {name}-dmpl_{metadata}-{run}
#SBATCH --output {outdir}/{name}-dmpl_{metadata}-{run}.out
#SBATCH --error {outdir}/{name}-dmpl_{metadata}-{run}.err
...
...
@@ -252,7 +252,7 @@ if __name__ == '__main__':
#('l11p17_11', 1),
]
dd
=
DimplingDaemon
.
load_config
(
'
../configs/
d1p7
_v2.yaml
'
)
dd
=
DimplingDaemon
.
load_config
(
'
../configs/
mpro_v2/DIALS
_v2.yaml
'
)
for
md
,
run
in
jobs
:
print
(
md
,
run
)
...
...
This diff is collapsed.
Click to expand it.
xia2pipe/projbase.py
+
39
−
15
View file @
0b0fd48c
...
...
@@ -78,22 +78,41 @@ def _phenix_model_b(pdb_path):
def
_get_pdb_chosen_by_dimple
(
dimple_log_path
):
"""
dimple is used to choose the closest matching PDB
pdb_path
=
None
with
open
(
dimple_log_path
,
'
r
'
)
as
f
:
watching
=
False
for
line
in
f
.
readlines
():
this function returns just the PDB file name, not a full path
"""
if
line
.
startswith
(
'
# PDBs in order of similarity (using the first one):
'
):
watching
=
True
if
line
.
startswith
(
'
#
'
)
and
watching
:
g
=
re
.
search
(
'
(\S+\.pdb)
'
,
line
)
if
g
:
pdb_path
=
g
.
groups
()[
0
]
break
# TJL 06 Jan 2021
# I think this works and is much better
# the old version (commented below) breaks if you have only one PDB input
config
=
configparser
.
ConfigParser
()
config
.
read
(
dimple_log_path
)
pdbs
=
ast
.
literal_eval
(
config
[
'
workflow
'
][
'
pdb_files
'
]
)
pdb_path
=
pdbs
[
0
]
# they are in order
#pdb_path = None
#
#with open(dimple_log_path, 'r') as f:
# watching = False
# for line in f.readlines():
#
# if line.startswith('# PDBs in order of similarity (using the first one):'):
# watching = True
#
# if line.startswith('#') and watching:
# g = re.search('(\S+\.pdb)', line)
# if g:
# pdb_path = g.groups()[0]
# break
#
#if pdb_path is None:
# raise IOError('could not find dimple-chosen reference PDB'
# ' in: {}'.format(dimple_log_path))
return
pdb_path
...
...
@@ -139,6 +158,11 @@ class ProjectBase:
self
.
xia2_config
=
xia2_config
self
.
refinement_config
=
refinement_config
# this is for backward compatability and is not desirable
# provides a default method name
if
'
method_name
'
not
in
self
.
refinement_config
.
keys
():
self
.
refinement_config
[
'
method_name
'
]
=
'
dmpl2
'
return
...
...
@@ -221,7 +245,7 @@ class ProjectBase:
qid
=
self
.
db
.
select
(
'
refinement_id
'
,
'
{}.Refinement
'
.
format
(
self
.
_analysis_db
),
{
'
data_reduction_id
'
:
data_reduction_id
,
'
method
'
:
'
dmpl2
'
})
'
method
'
:
self
.
refinement_config
[
'
method_name
'
]
})
return
get_single
(
qid
,
crystal_id
,
run
,
'
refinement_id
'
)
...
...
@@ -603,7 +627,7 @@ class ProjectBase:
'
initial_pdb_path
'
:
initial_pdb_path
,
'
final_pdb_path
'
:
pdb_path
,
'
refinement_mtz_path
'
:
mtz_path
,
'
method
'
:
'
dmpl2
'
,
'
method
'
:
self
.
refinement_config
[
'
method_name
'
]
,
'
resolution_cut
'
:
self
.
get_refinement_res
(
metadata
,
run
),
'
rfree
'
:
log_results
[
1
],
'
rwork
'
:
log_results
[
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