Previous topic

bioa.algorithms.reconstruction.max_bandwidth_strategy

Next topic

bioa.algorithms.reconstruction.max_frequency_strategy

This Page

bioa.algorithms.reconstruction.random_bandwidth_strategy

random_bandwidth_strategy(graph, freq_name='count', epsilon=0.001, factor=1.0)[source]

Finds quasispecies over an amplicon-based read graph by repeatedly finding a random max-bandwidth path until there is no possible path from the source to the sink.

Parameters :

graph : DecliquedAmpliconReadGraph

Amplicon read graph with fork vertices added.

freq_name : str (optional, default=”count”)

Name of the frequency or count property to use.

epsilon : float (optional, default=1e-3)

Threshold for edge values to consider.

factor : float (optional, default=1.0)

This is a scaling factor to reduce edge weights by. By default it will not change the amount.

Returns :

quasispecies : dict

Quasispecies spectrum with sequences as keys and frequency as value.