Package csb :: Package bio :: Package fragments :: Module rosetta :: Class RosettaFragmentMap
[frames] | no frames]

Class RosettaFragmentMap

source code

            object --+    
                     |    
core.AbstractContainer --+
                         |
                        RosettaFragmentMap

Represents a Rosetta fragment library.

Nested Classes

Inherited from core.AbstractContainer: __metaclass__

Instance Methods
 
__init__(self, fragments, length=None)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
__len__(self) source code
 
append(self, fragment)
Append a new RosettaFragment
source code
 
at(self, qrank)
Returns: a tuple of all fragments, covering the specified position.
source code
 
complement(self, fragment)
Append fragment to the library, if the fragment is anchored around a low-confidence position.
source code
 
dump(self, file, builder=<class 'csb.bio.fragments.rosetta.OutputBuilder'>)
Write the library to a Rosetta fragment file.
source code
 
fromsource(self, accession)
Returns: a tuple of all fragments, extracted from the specified source.
source code
 
mark_unconfident(self, rank)
Mark the specified position in the target as a low-confidence one.
source code
 
sort(self, field='score', reverse=False)
Sort the fragments in the library.
source code
 
starting_at(self, qrank)
Returns: a tuple of all fragments, starting at the specified target position.
source code

Inherited from core.AbstractContainer: __bool__, __getitem__, __iter__, __nonzero__

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Static Methods
RosettaFragmentMap
read(file, top=None)
Read a standard fragment file.
source code
Class Variables
  __abstractmethods__ = frozenset([])
Properties
  size
  sources
  start_positions
  unconfident_positions

Inherited from object: __class__

Method Details

__init__(self, fragments, length=None)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Parameters:
  • fragments (iterable of RosettaFragment) - library fragments
  • length (int) - target sequence's length. If not defined, the qend of the last fragment will be used instead.
Overrides: object.__init__
(inherited documentation)

__len__(self)
(Length operator)

source code 
Overrides: core.AbstractContainer.__len__

at(self, qrank)

source code 
Parameters:
  • qrank (int) - position in target, rank
Returns:
a tuple of all fragments, covering the specified position.

complement(self, fragment)

source code 

Append fragment to the library, if the fragment is anchored around a low-confidence position.

Parameters:

dump(self, file, builder=<class 'csb.bio.fragments.rosetta.OutputBuilder'>)

source code 

Write the library to a Rosetta fragment file.

Parameters:
  • file (str) - destination file name

fromsource(self, accession)

source code 
Parameters:
  • accession (str) - source entry ID
Returns:
a tuple of all fragments, extracted from the specified source.

mark_unconfident(self, rank)

source code 

Mark the specified position in the target as a low-confidence one.

Parameters:
  • rank (int) - position in target

read(file, top=None)
Static Method

source code 

Read a standard fragment file.

Parameters:
  • file (str) - file name
  • top (int or None) - if defined, read only top fragments per start position (default=all)
Returns: RosettaFragmentMap
parsed fragment library

starting_at(self, qrank)

source code 
Parameters:
  • qrank (int) - fragment origin (in target, rank)
Returns:
a tuple of all fragments, starting at the specified target position.

Property Details

size

Get Method:
unreachable.size(self)

sources

Get Method:
unreachable.sources(self)

start_positions

Get Method:
unreachable.start_positions(self)

unconfident_positions

Get Method:
unreachable.unconfident_positions(self)