# Bio.SCOP package

## Submodules

- Bio.SCOP.Cla module
  - `Record`
    - `Record.__init__()`
    - `Record.__str__()`
    - `Record.__annotate_func__`
    - `Record.__annotations_cache__`
    - `Record.__firstlineno__`
    - `Record.__static_attributes__`
  - `parse()`
  - `Index`
    - `Index.__init__()`
    - `Index.__getitem__()`
    - `Index.__annotate_func__`
    - `Index.__annotations_cache__`
    - `Index.__firstlineno__`
    - `Index.__static_attributes__`
- Bio.SCOP.Des module
  - `Record`
    - `Record.__init__()`
    - `Record.__str__()`
    - `Record.__annotate_func__`
    - `Record.__annotations_cache__`
    - `Record.__firstlineno__`
    - `Record.__static_attributes__`
  - `parse()`
- Bio.SCOP.Dom module
  - `Record`
    - `Record.__init__()`
    - `Record.__str__()`
    - `Record.__annotate_func__`
    - `Record.__annotations_cache__`
    - `Record.__firstlineno__`
    - `Record.__static_attributes__`
  - `parse()`
- Bio.SCOP.Hie module
  - `Record`
    - `Record.__init__()`
    - `Record.__str__()`
    - `Record.__annotate_func__`
    - `Record.__annotations_cache__`
    - `Record.__firstlineno__`
    - `Record.__static_attributes__`
  - `parse()`
- Bio.SCOP.Raf module
  - `normalize_letters()`
  - `SeqMapIndex`
    - `SeqMapIndex.__init__()`
    - `SeqMapIndex.__getitem__()`
    - `SeqMapIndex.getSeqMap()`
    - `SeqMapIndex.__annotate_func__`
    - `SeqMapIndex.__annotations_cache__`
    - `SeqMapIndex.__firstlineno__`
    - `SeqMapIndex.__static_attributes__`
  - `SeqMap`
    - `SeqMap.__init__()`
    - `SeqMap.index()`
    - `SeqMap.__getitem__()`
    - `SeqMap.append()`
    - `SeqMap.extend()`
    - `SeqMap.__iadd__()`
    - `SeqMap.__add__()`
    - `SeqMap.getAtoms()`
    - `SeqMap.__annotate_func__`
    - `SeqMap.__annotations_cache__`
    - `SeqMap.__firstlineno__`
    - `SeqMap.__static_attributes__`
  - `Res`
    - `Res.__init__()`
    - `Res.__annotate_func__`
    - `Res.__annotations_cache__`
    - `Res.__firstlineno__`
    - `Res.__static_attributes__`
  - `parse()`
- Bio.SCOP.Residues module
  - `Residues`
    - `Residues.__init__()`
    - `Residues.__str__()`
    - `Residues.__annotate_func__`
    - `Residues.__annotations_cache__`
    - `Residues.__firstlineno__`
    - `Residues.__static_attributes__`

## Module contents

SCOP: Structural Classification of Proteins.

The SCOP database aims to provide a manually constructed classification of all know protein structures into a hierarchy, the main levels of which are family, superfamily and fold.

- “SCOP”:http://scop.mrc-lmb.cam.ac.uk/legacy/

- “Introduction”:http://scop.mrc-lmb.cam.ac.uk/legacy/intro.html

- “SCOP parsable files”:http://scop.mrc-lmb.cam.ac.uk/legacy/parse/

The Scop object in this module represents the entire SCOP classification. It can be built from the three SCOP parsable files, modified is so desired, and converted back to the same file formats. A single SCOP domain (represented by the Domain class) can be obtained from Scop using the domain’s SCOP identifier (sid).

- nodeCodeDict – A mapping between known 2 letter node codes and a longer

    description. The known node types are ‘cl’ (class), ‘cf’ (fold), ‘sf’ (superfamily), ‘fa’ (family), ‘dm’ (domain), ‘sp’ (species), ‘px’ (domain). Additional node types may be added in the future.

Bio.SCOP.cmp_sccs(sccs1, sccs2)

  Order SCOP concise classification strings (sccs).

  a.4.5.1 < a.4.5.11 < b.1.1.1

  A sccs (e.g. a.4.5.11) compactly represents a domain’s classification. The letter represents the class, and the numbers are the fold, superfamily, and family, respectively.

Bio.SCOP.parse_domain(term)

  Convert an ASTRAL header string into a Scop domain.

  An ASTRAL (http://astral.stanford.edu/) header contains a concise description of a SCOP domain. A very similar format is used when a Domain object is converted into a string. The Domain returned by this method contains most of the SCOP information, but it will not be located within the SCOP hierarchy (i.e. The parent node will be None). The description is composed of the SCOP protein and species descriptions.

  A typical ASTRAL header looks like – >d1tpt_1 a.46.2.1 (1-70) Thymidine phosphorylase {Escherichia coli}

class Bio.SCOP.Scop(cla_handle=None, des_handle=None, hie_handle=None, dir_path=None, db_handle=None, version=None)

  Bases: `object`

  The entire SCOP hierarchy.

  root – The root node of the hierarchy

  __init__(cla_handle=None, des_handle=None, hie_handle=None, dir_path=None, db_handle=None, version=None)

    Build the SCOP hierarchy from the SCOP parsable files, or a sql backend.

    If no file handles are given, then a Scop object with a single empty root node is returned.

    If a directory and version are given (with dir_path=.., version=…) or file handles for each file, the whole scop tree will be built in memory.

    If a MySQLdb database handle is given, the tree will be built as needed, minimising construction times. To build the SQL database to the methods write_xxx_sql to create the tables.

  getRoot()

    Get root node.

  getDomainBySid(sid)

    Return a domain from its sid.

  getNodeBySunid(sunid)

    Return a node from its sunid.

  getDomains()

    Return an ordered tuple of all SCOP Domains.

  write_hie(handle)

    Build an HIE SCOP parsable file from this object.

  write_des(handle)

    Build a DES SCOP parsable file from this object.

  write_cla(handle)

    Build a CLA SCOP parsable file from this object.

  getDomainFromSQL(sunid=None, sid=None)

    Load a node from the SQL backend using sunid or sid.

  getAscendentFromSQL(node, type)

    Get ascendents using SQL backend.

  getDescendentsFromSQL(node, type)

    Get descendents of a node using the database backend.

    This avoids repeated iteration of SQL calls and is therefore much quicker than repeatedly calling node.getChildren().

  write_hie_sql(handle)

    Write HIE data to SQL database.

  write_cla_sql(handle)

    Write CLA data to SQL database.

  write_des_sql(handle)

    Write DES data to SQL database.

  __annotate_func__ = None
  __annotations_cache__ = {}
  __firstlineno__ = 160
  __static_attributes__ = ('_domains', '_sidDict', '_sunidDict', 'db_handle', 'root')

class Bio.SCOP.Node(scop=None)

  Bases: `object`

  A node in the Scop hierarchy.

  Attributes:

    - sunid – SCOP unique identifiers. e.g. ‘14986’

    - parent – The parent node

    - children – A list of child nodes

    - sccs – SCOP concise classification string. e.g. ‘a.1.1.2’

    - type – A 2 letter node type code. e.g. ‘px’ for domains

    - description – Description text.

  __init__(scop=None)

    Initialize a Node in the scop hierarchy.

    If a Scop instance is provided to the constructor, this will be used to lookup related references using the SQL methods. If no instance is provided, it is assumed the whole tree exists and is connected.

  __str__()

    Represent the node as a string.

  toHieRecord()

    Return an Hie.Record.

  toDesRecord()

    Return a Des.Record.

  getChildren()

    Return a list of children of this Node.

  getParent()

    Return the parent of this Node.

  getDescendents(node_type)

    Return a list of all descendant nodes of the given type.

    Node type can be a two letter code or longer description, e.g. ‘fa’ or ‘family’.

  getAscendent(node_type)

    Return the ancenstor node of the given type, or None.

    Node type can be a two letter code or longer description, e.g. ‘fa’ or ‘family’.

  __annotate_func__ = None
  __annotations_cache__ = {}
  __firstlineno__ = 546
  __static_attributes__ = ('children', 'description', 'parent', 'sccs', 'scop', 'sunid', 'type')

class Bio.SCOP.Domain(scop=None)

  Bases: `Node`

  A SCOP domain. A leaf node in the Scop hierarchy.

  Attributes:

    - sid - The SCOP domain identifier. e.g. `"d5hbib_"`

    - residues - A Residue object. It defines the collection of PDB atoms that make up this domain.

  __init__(scop=None)

    Initialize a SCOP Domain object.

  __str__()

    Represent the SCOP Domain as a string.

  toDesRecord()

    Return a Des.Record.

  toClaRecord()

    Return a Cla.Record.

  __annotate_func__ = None
  __annotations_cache__ = {}
  __firstlineno__ = 666
  __static_attributes__ = ('residues', 'sid')

class Bio.SCOP.Astral(dir_path=None, version=None, scop=None, astral_file=None, db_handle=None)

  Bases: `object`

  Representation of the ASTRAL database.

  Abstraction of the ASTRAL database, which has sequences for all the SCOP domains, as well as clusterings by percent id or evalue.

  __init__(dir_path=None, version=None, scop=None, astral_file=None, db_handle=None)

    Initialize the astral database.

    You must provide either a directory of SCOP files:
      - dir_path - string, the path to location of the scopseq-x.xx directory

          (not the directory itself), and

      - version -a version number.

    or, a FASTA file:

      - astral_file - string, a path to a fasta file (which will be loaded in memory)

    or, a MYSQL database:

      - db_handle - a database handle for a MYSQL database containing a table ‘astral’ with the astral data in it. This can be created using writeToSQL.

  domainsClusteredByEv(id)

    Get domains clustered by evalue.

  domainsClusteredById(id)

    Get domains clustered by percentage identity.

  getAstralDomainsFromFile(filename=None, file_handle=None)

    Get the scop domains from a file containing a list of sids.

  getAstralDomainsFromSQL(column)

    Load ASTRAL domains from the MySQL database.

    Load a set of astral domains from a column in the astral table of a MYSQL database (which can be created with writeToSQL(…).

  getSeqBySid(domain)

    Get the seq record of a given domain from its sid.

  getSeq(domain)

    Return seq associated with domain.

  hashedDomainsById(id)

    Get domains clustered by sequence identity in a dict.

  hashedDomainsByEv(id)

    Get domains clustered by evalue in a dict.

  isDomainInId(dom, id)

    Return true if the domain is in the astral clusters for percent ID.

  __annotate_func__ = None
  __annotations_cache__ = {}
  __firstlineno__ = 725
  __static_attributes__ = ('EvDatahash', 'EvDatasets', 'IdDatahash', 'IdDatasets', 'astral_file', 'db_handle', 'fasta_dict', 'path', 'scop', 'version')
  isDomainInEv(dom, id)

    Return true if the domain is in the ASTRAL clusters for evalues.

  writeToSQL(db_handle)

    Write the ASTRAL database to a MYSQL database.

Biopython v: 1.86

Versions
  Previous
  Latest
  Develop

Biopython Project
  Homepage
  On GitHub