Previous topic

bioa.algorithms.reconstruction.update_freq_matrix_from_lp_output

Next topic

bioa.algorithms.reconstruction.random_bandwidth_strategy

This Page

bioa.algorithms.reconstruction.max_bandwidth_strategy

max_bandwidth_strategy(graph, epsilon=0.001, factor=1.0, until_covered=False, use_em=False)[source]

Finds quasispecies over an amplicon-based read graph by repeatedly finding the max bandwidth path until there is no possibly 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.

until_covered : bool (optional, default=False)

Setting ‘until_covered’ to True will only output the first set of quasispecies to cover all edges. Setting to False will output the entire set.

use_em : bool (optional, default=False)

Determines whether or not to use naive frequency assignment to the Quasispecies or to use the Expectation Maximization method.

Returns :

quasispecies : dict

Quasispecies spectrum with sequences as keys and frequency as value.