Skip to content
Snippets Groups Projects
Commit cfb041e7 authored by Studer Gabriel's avatar Studer Gabriel
Browse files

The user can now add profiles to the build-model action

parent c37a34cd
No related branches found
No related tags found
No related merge requests found
...@@ -20,7 +20,7 @@ with ...@@ -20,7 +20,7 @@ with
.. code-block:: console .. code-block:: console
$ pm build-model [-h] (-f <FILE> | -c <FILE> | -j <OBJECT>|<FILE>) $ pm build-model [-h] (-f <FILE> | -c <FILE> | -j <OBJECT>|<FILE>)
(-p <FILE> | -e <FILE>) [-o <FILENAME>] (-p <FILE> | -e <FILE>) [-s <FILE>] [-o <FILENAME>]
Example usage: Example usage:
...@@ -105,6 +105,28 @@ sequence names are: ...@@ -105,6 +105,28 @@ sequence names are:
Example: ``... -p data/2jlp.pdb.gz``, where the pdb file has chains ``A``, Example: ``... -p data/2jlp.pdb.gz``, where the pdb file has chains ``A``,
``B``, ``C`` and the template sequence is named ``2jlp.A|55``. ``B``, ``C`` and the template sequence is named ``2jlp.A|55``.
You can optionally specify sequence profiles to be added (``-s``) and linked
to the corresponding target sequences. This has an impact on loop scoring with
the database approach.
The profiles can be provided as plain files or gzipped. Following file
extensions are understood: .hhm, .hhm.gz, .pssm, .pssm.gz.
* The profiles are mapped based on exact matches towards the gapless
target sequences from the provided alignment files,
i.e. one profile is mapped to several chains in case of homo-oligomers
* Every profile must have a unique sequence to avoid ambiguities
* All or nothing - You cannot provide profiles for only a subset of
target sequences
Example usage:
.. code-block:: console
$ pm build-model -f aln.fasta -p tpl.pdb -s prof.hhm
Possible exit codes of the action: Possible exit codes of the action:
- 0: all went well - 0: all went well
......
...@@ -23,6 +23,7 @@ ost.PushVerbosityLevel(2) ...@@ -23,6 +23,7 @@ ost.PushVerbosityLevel(2)
parser = pm3argparse.PM3ArgumentParser(__doc__, action=True) parser = pm3argparse.PM3ArgumentParser(__doc__, action=True)
parser.AddAlignment() parser.AddAlignment()
parser.AddStructure(attach_views=True) parser.AddStructure(attach_views=True)
parser.AddProfile()
parser.AssembleParser() parser.AssembleParser()
parser.add_argument('-o', '--model-file', metavar='<FILENAME>', type=str, parser.add_argument('-o', '--model-file', metavar='<FILENAME>', type=str,
default='model.pdb', help='File to store model coordinates'+ default='model.pdb', help='File to store model coordinates'+
...@@ -43,11 +44,13 @@ for aln in opts.alignments: ...@@ -43,11 +44,13 @@ for aln in opts.alignments:
for i in range(1, aln.GetCount()): for i in range(1, aln.GetCount()):
ost.mol.alg.AssignSecStruct(aln.GetSequence(i).GetAttachedView()) ost.mol.alg.AssignSecStruct(aln.GetSequence(i).GetAttachedView())
# model it # model it
try: try:
# get raw model # get raw model
mhandle = modelling.BuildRawModel(opts.alignments) mhandle = modelling.BuildRawModel(opts.alignments)
# add profiles if any
if len(opts.profiles) > 0:
modelling.SetSequenceProfiles(mhandle, opts.profiles)
  • Here is where I would add a small internal comment on us not using promod3.modelling.SetPsipredPredictions because we never use the Psipred predictions...

  • Please register or sign in to reply
# build final model # build final model
final_model = modelling.BuildFromRawModel(mhandle) final_model = modelling.BuildFromRawModel(mhandle)
except Exception as ex: except Exception as ex:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment