Skip to content

Commit

Permalink
Merge pull request #32 from danielparton/master
Browse files Browse the repository at this point in the history
Version 1.0.3 release
  • Loading branch information
danielparton committed Aug 5, 2015
2 parents b92d884 + 3d7ce93 commit d216e2b
Show file tree
Hide file tree
Showing 15 changed files with 528 additions and 291 deletions.
23 changes: 23 additions & 0 deletions docs/cli_docs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,26 @@ PDB-format coordinate files in the directory ``templates/structures-resolved``.
Each structure should be named XXX.pdb, where XXX matches the identifier in the
fasta file. The residues in the coordinate files should also match the
sequences in the fasta file.

Additional Tools
================

Ensembler includes a ``tools`` submodule, which allows the user to conduct
various useful tasks which are not considered core pipeline functions. The
use-cases for many of these tools are quite specific, so they may not be
applicable to every project, and should also be used with caution.

Residue renumbering according to UniProt sequence coordinates
-------------------------------------------------------------

::

$ ensembler renumber_residues --target EGFR_HUMAN_D0

The given target ID must begin with a UniProt mnemonic, e.g. "EGFR_HUMAN".
This will output two files in the ``models/[target_id]`` directory:
``topol-renumbered-implicit.pdb`` and ``topol-renumbered-explicit.pdb``.
The coordinates are simply copied from the first example found for each of
``refined-implicit.pdb.gz`` and ``refined-explicit.pdb.gz``. The residue
numbers are renumbered according to the canonical isoform sequence coordinates
in the UniProt entry.
2 changes: 1 addition & 1 deletion ensembler/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ def main():

if not command_dispatched and args['--help']:
print('\n'.join([ensembler.cli_commands.general.helpstring_header, ensembler.cli_commands.general.ensembler_helpstring]))
pass
pass
4 changes: 3 additions & 1 deletion ensembler/cli_commands/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
'refine_explicit',
'package_models',
'quickmodel',
'renumber_residues',
]

from . import general
Expand All @@ -27,4 +28,5 @@
from . import solvate
from . import refine_explicit
from . import package_models
from . import quickmodel
from . import quickmodel
from . import renumber_residues
3 changes: 2 additions & 1 deletion ensembler/cli_commands/general.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,14 @@
[--api_params <params>] [-v | --verbose]
ensembler package_models [-h | --help] [--package_for <choice>] [--targets <target>]
[--targetsfile <targetsfile>] [--templates <template>] [--templatesfile <templatesfile>]
[--template_seqid_cutoff <cutoff>] [--nfahclones <n>] [--archivefahproject] [-v | --verbose]
[--template_seqid_cutoff <cutoff>] [--nfahclones <n>] [--compressruns] [-v | --verbose]
ensembler testrun_pipeline [-h | --help]
ensembler quickmodel [-h | --help] [--targetid <id>] [--templateids <ids>]
[--target_uniprot_entry_name <entry_name>] [--uniprot_domain_regex <regex>]
[--template_pdbids <pdbids>] [--template_chainids <chainids>]
[--template_uniprot_query <query>] [--template_seqid_cutoff <cutoff>] [--no-loopmodel]
[--package_for_fah] [--nfahclones <nfahclones>] [--structure_dirs <structure_dirs>]
ensembler renumber_residues [-h | --help] [--target <targetid>] [-v | --verbose]
Commands:
init Initialize a new Ensembler project
Expand Down
8 changes: 4 additions & 4 deletions ensembler/cli_commands/package_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
to use for each model [default: 1].""",

"""\
--archivefahproject If packaging for Folding@Home, choose whether to compress
the results into a .tgz file.""",
--compressruns If packaging for Folding@Home, choose whether to compress
each RUN into a .tgz file.""",
]

helpstring_nonunique_options = [
Expand Down Expand Up @@ -86,7 +86,7 @@ def dispatch(args):
else:
n_fah_clones = 1

if args['--archivefahproject']:
if args['--compressruns']:
archive = True
else:
archive = False
Expand All @@ -109,5 +109,5 @@ def dispatch(args):
template_seqid_cutoff=template_seqid_cutoff,
nclones=n_fah_clones,
archive=archive,
verbose=args['--verbose'],
loglevel=loglevel,
)
1 change: 1 addition & 0 deletions ensembler/cli_commands/refine_explicit.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@
helpstring = '\n\n'.join([helpstring_header, '\n\n'.join(helpstring_unique_options), '\n\n'.join(helpstring_nonunique_options)])
docopt_helpstring = '\n\n'.join(helpstring_unique_options)


def dispatch(args):
if args['--targetsfile']:
with open(args['--targetsfile'], 'r') as targetsfile:
Expand Down
30 changes: 30 additions & 0 deletions ensembler/cli_commands/renumber_residues.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
from ensembler.tools.renumber_residues import RenumberResidues

helpstring_header = """Renumber residues using the canonical UniProt sequence coordinates.
Target IDs must start with the UniProt mnemonic, e.g. 'ABL1_HUMAN'
"""

helpstring_unique_options = [
"""\
--target <targetid> ID for target to work, e.g. 'ABL1_HUMAN_D0'""",
]

helpstring_nonunique_options = [
"""\
-v --verbose """,
]

helpstring = '\n\n'.join([helpstring_header, '\n\n'.join(helpstring_unique_options), '\n\n'.join(helpstring_nonunique_options)])
docopt_helpstring = '\n\n'.join(helpstring_unique_options)


def dispatch(args):
if args['--verbose']:
log_level = 'debug'
else:
log_level = 'info'

RenumberResidues(
targetid=args['--target'],
log_level=log_level
)
1 change: 1 addition & 0 deletions ensembler/initproject.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
from Bio.SeqRecord import SeqRecord

import ensembler
import ensembler.version
import ensembler.targetexplorer
import ensembler.uniprot
import ensembler.pdb
Expand Down
Loading

0 comments on commit d216e2b

Please sign in to comment.