Skip to content

Commit

Permalink
Merge pull request #87 from hlasimpk/master
Browse files Browse the repository at this point in the history
Updated several operations in SIMBAD
  • Loading branch information
hlasimpk committed Oct 11, 2018
2 parents a318474 + 36eecb3 commit 5ba9e90
Show file tree
Hide file tree
Showing 25 changed files with 1,311 additions and 941 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,20 @@ Changelog

Added
~~~~~
- Added in code that uses pointless to reindex mtz files
- EXE_EXT calls to all executable commands to allow for windows compatibility
- Completely reformatted all pyjob calls to use version 0.2.0 and updated dependencies list.
- Function to get the sequence from a pdb file
- Function to generate ensemble database


Changed
~~~~~~~
- Replaced CCTBX code that checked the columns in the input MTZ with MrBump code as CCTBX was giving errors for certain input MTZs.
- Replaced `simbad.util.mtz_util.get_labels` with a class called `simbad.util.mtz_util.GetLabels`. This returns more types of input labels and simplifies how the labels are passed into other functions.
- Updated test cases affected by changes
- `simbad.util.mtz_util.GetLabels` was changed to use miller arrays and is therefore more robust when handling columns with non-standard names
- `simbad.rotsearch.phaser_search` changed to rank models by RFZ rather than LLG.

0.1.12
------
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Sequence Independent Molecular Replacement Based on Available Database
:target: https://landscape.io/github/rigdenlab/SIMBAD/master
:alt: Code Health

.. image:: https://img.shields.io/badge/solution%20count-4-blue.svg?style=flat
.. image:: https://img.shields.io/badge/solution%20count-5-blue.svg?style=flat
:alt: Solution count

.. image:: https://img.shields.io/badge/DOI-10.1107/S2059798318005752-blue.svg
Expand Down
7 changes: 3 additions & 4 deletions docs/doc-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
pyjob ==0.2.0
enum34
pandas
pyjob >= 0.1.5
sphinx-argparse
sphinx_bootstrap_theme ==0.5.3
numpy

23 changes: 12 additions & 11 deletions simbad/command_line/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
from enum import Enum

from pyjob import cexec
from pyjob.platform import EXE_EXT
from pyjob.factory import TASK_PLATFORMS
from pyjob.script import EXE_EXT
from simbad.mr.options import MrPrograms, RefPrograms, SGAlternatives
from simbad.util import SIMBAD_DIRNAME

Expand Down Expand Up @@ -221,7 +222,10 @@ def _argparse_job_submission_options(p):
sg.add_argument('-nproc', type=int, default=1,
help="Number of processors. For local, serial runs the jobs will be split across nproc "
"processors. For cluster submission, this should be the number of processors on a node.")
sg.add_argument('-submit_qtype', type=str, default='local', choices=['local', 'sge'],
sg.add_argument('-submit_nproc', type=int, default=1,
help="For cluster submission, the number of processors to use on head node when creating "
"submission scripts")
sg.add_argument('-submit_qtype', type=str, default='local', choices=TASK_PLATFORMS.keys(),
help='The job submission queue type')
sg.add_argument('-submit_queue', type=str, default=None,
help='The queue to submit to on the cluster.')
Expand Down Expand Up @@ -341,9 +345,7 @@ def _simbad_contaminant_search(args):
if os.path.isfile(temp_mtz):
pass
else:
ed = simbad.util.mtz_util.ExperimentalData(args.mtz)
ed.process_miller_arrays()
ed.output_mtz(temp_mtz)
simbad.util.mtz_util.ctruncate(args.mtz, temp_mtz)

from simbad.rotsearch import rotation_search_factory
rotation_obj = rotation_search_factory(args.rot_program)
Expand All @@ -362,6 +364,7 @@ def _simbad_contaminant_search(args):
npic=args.npic,
rotastep=args.rotastep,
min_solvent_content=args.min_solvent_content,
submit_nproc=args.submit_nproc,
submit_qtype=args.submit_qtype,
submit_queue=args.submit_queue,
chunk_size=args.chunk_size
Expand Down Expand Up @@ -426,9 +429,7 @@ def _simbad_morda_search(args):
if os.path.isfile(temp_mtz):
pass
else:
ed = simbad.util.mtz_util.ExperimentalData(args.mtz)
ed.process_miller_arrays()
ed.output_mtz(temp_mtz)
simbad.util.mtz_util.ctruncate(args.mtz, temp_mtz)

from simbad.rotsearch import rotation_search_factory
rotation_obj = rotation_search_factory(args.rot_program)
Expand All @@ -447,6 +448,7 @@ def _simbad_morda_search(args):
npic=args.npic,
rotastep=args.rotastep,
min_solvent_content=args.min_solvent_content,
submit_nproc=args.submit_nproc,
submit_qtype=args.submit_qtype,
submit_queue=args.submit_queue,
chunk_size=args.chunk_size
Expand Down Expand Up @@ -507,9 +509,7 @@ def _simbad_lattice_search(args):
logger = logging.getLogger(__name__)
if MTZ_AVAIL:
temp_mtz = os.path.join(args.work_dir, "input.mtz")
ed = simbad.util.mtz_util.ExperimentalData(args.mtz)
ed.process_miller_arrays()
ed.output_mtz(temp_mtz)
simbad.util.mtz_util.ctruncate(args.mtz, temp_mtz)
space_group, _, cell_parameters = simbad.util.mtz_util.crystal_data(
temp_mtz)
else:
Expand Down Expand Up @@ -740,6 +740,7 @@ def submit_mr_jobs(mtz, mr_dir, search_results, refine_type, refine_cycles, args
molecular_replacement.submit_jobs(search_results,
nproc=args.nproc,
process_all=args.process_all,
submit_nproc=args.submit_nproc,
submit_qtype=args.submit_qtype,
submit_queue=args.submit_queue)
return molecular_replacement

0 comments on commit 5ba9e90

Please sign in to comment.