Skip to content
Snippets Groups Projects
Commit 9c19933a authored by marco's avatar marco
Browse files

Fix layout of io doc

git-svn-id: https://dng.biozentrum.unibas.ch/svn/openstructure/trunk@2463 5a81b35b-ba03-0410-adc8-b2c5c5119f08
parent 55ad44fb
Branches
Tags
No related merge requests found
...@@ -4,7 +4,13 @@ ...@@ -4,7 +4,13 @@
.. module:: ost.io .. module:: ost.io
:synopsis: Input and output of sequences, alignments, structures, images and density maps. :synopsis: Input and output of sequences, alignments, structures, images and density maps.
The io module deals with input and output of :class:`entities <ost.mol.EntityHandle>`, :class:`alignments <ost.seq.AlignmentHandle>`, :class:`sequences <ost.seq.SequenceHandle>`, :class:`images <ost.img.ImageHandle>`. Importers for common file formats containing molecules such as PDB, SDF and CHARMM trajectory files are available. Sequence and alignment file formats such as FASTA and CLUSTALW are supported as well, alongside various image data (e.g. png, dm3) and density map files (e.g. CCP4, MRC). The io module deals with input and output of :class:`entities
<ost.mol.EntityHandle>`, :class:`alignments <ost.seq.AlignmentHandle>`,
:class:`sequences <ost.seq.SequenceHandle>`, :class:`images
<ost.img.ImageHandle>`. Importers for common file formats containing molecules
such as PDB, SDF and CHARMM trajectory files are available. Sequence and
alignment file formats such as FASTA and CLUSTALW are supported as well as
various image data (e.g. png, dm3) and density map files (e.g. CCP4, MRC).
Molecular Structures Molecular Structures
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
...@@ -105,10 +111,12 @@ Loading sequence or alignment files ...@@ -105,10 +111,12 @@ Loading sequence or alignment files
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. function:: LoadSequence(filename, format='auto') .. function:: LoadSequence(filename, format='auto')
Load sequence data from disk. If format is set to 'auto', the function guesses the Load sequence data from disk. If format is set to 'auto', the function guesses
filetype based on the extension of the file. Files ending in '.fasta', '.aln' will automatically be loaded. the filetype based on the extension of the file. Files ending in '.fasta',
For files with non-standard extensions, the format can be set explicitly specifying '.aln' will automatically be loaded.
the 'format' parameter.
For files with non-standard extensions, the format can be set explicitly
specifying the `format` parameter.
.. code-block:: python .. code-block:: python
...@@ -119,7 +127,8 @@ Loading sequence or alignment files ...@@ -119,7 +127,8 @@ Loading sequence or alignment files
# or for multiple aligned fasta files use # or for multiple aligned fasta files use
aln=io.LoadAlignment('algnm.aln',format="clustal") aln=io.LoadAlignment('algnm.aln',format="clustal")
For a list of file formats supported by :func:`LoadSequence` see :doc:`formats`. For a list of file formats supported by :func:`LoadSequence` see
:doc:`formats`.
:raises: :exc:`~ost.io.IOUnknownFormatException` if the format string supplied :raises: :exc:`~ost.io.IOUnknownFormatException` if the format string supplied
is not recognized or the file format can not be detected based on the is not recognized or the file format can not be detected based on the
...@@ -130,22 +139,24 @@ For a list of file formats supported by :func:`LoadSequence` see :doc:`formats`. ...@@ -130,22 +139,24 @@ For a list of file formats supported by :func:`LoadSequence` see :doc:`formats`.
.. function:: LoadSequenceList(filename, format='auto') .. function:: LoadSequenceList(filename, format='auto')
For a desription of how to use :func:`LoadSequenceList` please refer to :func:`LoadSequence`. For a desription of how to use :func:`LoadSequenceList` please refer to
For a list of file formats supported by :func:`LoadSequenceList` see :doc:`formats`. :func:`LoadSequence`. For a list of file formats supported by
:func:`LoadSequenceList` see :doc:`formats`.
.. function:: LoadAlignment(filename, format='auto') .. function:: LoadAlignment(filename, format='auto')
For a desription of how to use :func:`LoadAlignment` please refer to :func:`LoadSequence`. For a desription of how to use :func:`LoadAlignment` please refer to
For a list of file formats supported by :func:`LoadAlignment` see :doc:`formats`. :func:`LoadSequence`. For a list of file formats supported by
:func:`LoadAlignment` see :doc:`formats`.
Saving Sequence Data Saving Sequence Data
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. function:: SaveSequence(filename, format='auto') .. function:: SaveSequence(filename, format='auto')
Saving sequence data is performed by calling :func:`SaveSequence`. Saving sequence data is performed by calling :func:`SaveSequence`.
For files with non-standard extensions, the format can be set explicitly specifying For files with non-standard extensions, the format can be set explicitly
the 'format' parameter. specifying the 'format' parameter.
.. code-block:: python .. code-block:: python
...@@ -156,7 +167,8 @@ the 'format' parameter. ...@@ -156,7 +167,8 @@ the 'format' parameter.
# or multiple aligned fasta files # or multiple aligned fasta files
io.SaveAlignment(aln,'algnm.aln',format="clustal") io.SaveAlignment(aln,'algnm.aln',format="clustal")
For a list of file formats supported by :func:`SaveSequence` see :doc:`formats`. For a list of file formats supported by :func:`SaveSequence` see
:doc:`formats`.
:raises: :exc:`~ost.io.IOUnknownFormatException` if the format string supplied :raises: :exc:`~ost.io.IOUnknownFormatException` if the format string supplied
is not recognized or the file format can not be detected based on the is not recognized or the file format can not be detected based on the
...@@ -167,13 +179,17 @@ For a list of file formats supported by :func:`SaveSequence` see :doc:`formats`. ...@@ -167,13 +179,17 @@ For a list of file formats supported by :func:`SaveSequence` see :doc:`formats`.
.. function:: SaveSequenceList(filename, format='auto') .. function:: SaveSequenceList(filename, format='auto')
For a desription of how to use :func:`SaveSequenceList` please refer to :func:`SaveSequence`. For a desription of how to use :func:`SaveSequenceList` please refer to
For a list of file formats supported by :func:`SaveSequenceList` see :doc:`formats`. :func:`SaveSequence`. For a list of file formats supported by
:func:`SaveSequenceList` see :doc:`formats`.
.. function:: SaveAlignment(filename, format='auto') .. function:: SaveAlignment(filename, format='auto')
For a desription of how to use :func:`SaveAlignment` please refer to :func:`SaveSequence`. For a desription of how to use :func:`SaveAlignment` please refer to
For a list of file formats supported by :func:`SaveAlignment` see :doc:`formats`. :func:`SaveSequence`.
For a list of file formats supported by :func:`SaveAlignment` see
:doc:`formats`.
.. testsetup:: io .. testsetup:: io
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment