rna_library.core.folding

Holds utility functions for folding RNA sequences.

Module Contents

Functions

folding_params()

See the default folding parameters being used with Vienna.

fold_cache(sequence, params = _DEFAULT_PARAMS)

Uses RNAfold to predict the mfe for a structure using a global cache of results to save time.

save_cache()

Saves fold results to the cache and updats the _LAST_SIZE value to _CURRENT_SIZE.

Attributes

_CACHE_FILE

Value where the cached fold results will be stored. Set to {_CACHE_FILE} in current system.

_DEFAULT_PARAMS

Default folding parameters for Vienna’s RNAfold. Default values are {_DEFAULT_PARAMS}

_CACHE

Cache that holds folding results.

_CURRENT_SIZE

The current size of the cache.

_LAST_SIZE

The size of the cache the last time it was saved.

_CACHE

Cache that holds folding results.

FoldResult

namedtuple that holds sequence, structure, ensembled defect and folding parameters for an RNAfold prediction.

rna_library.core.folding._CACHE_FILE

Value where the cached fold results will be stored. Set to {_CACHE_FILE} in current system.

rna_library.core.folding._DEFAULT_PARAMS = ['-p', '--noLP', '-d2']

Default folding parameters for Vienna’s RNAfold. Default values are {_DEFAULT_PARAMS}

rna_library.core.folding._CACHE

Cache that holds folding results.

rna_library.core.folding._CURRENT_SIZE

The current size of the cache.

rna_library.core.folding._LAST_SIZE

The size of the cache the last time it was saved.

rna_library.core.folding._CACHE
rna_library.core.folding.FoldResult

namedtuple that holds sequence, structure, ensembled defect and folding parameters for an RNAfold prediction.

rna_library.core.folding.folding_params()

See the default folding parameters being used with Vienna. :rtype: Tuple[str]

Return type

Tuple[str]

rna_library.core.folding.fold_cache(sequence, params=_DEFAULT_PARAMS)

Uses RNAfold to predict the mfe for a structure using a global cache of results to save time.

Param

str sequence: RNA sequence ot be folded.

Param

Tuple[str] params: default folding params for RNAfold, defaults to (‘-p’,’–noLP’,’-d2’) :rtype: FoldResult

Parameters
  • sequence (str) –

  • params (Tuple[str]) –

Return type

FoldResult

rna_library.core.folding.save_cache()

Saves fold results to the cache and updats the _LAST_SIZE value to _CURRENT_SIZE.

Return type

None