AlloViz.AlloViz.Filtering.Filtering#

class AlloViz.AlloViz.Filtering.Filtering(pkg, filtering, name, *, GetContacts_threshold=0, Sequence_Neighbor_distance=5, Interresidue_distance=10)[source]#

Bases: object

Class for network filtering

Instances of this class are used to be added as attributes to instances of Wrappers’ classes (as attributes of a AlloViz.Protein object) with the purpose of storing (un)filtered networks according to different criteria.

Raw network edges stored as a DataFrame in the passed pkg object are filtered with the corresponding function or combination of functions of the Filtering module and converted to individual NetworkX’ Graphs with _get_G() to be stored as private attributes.

Parameters:
pkginstance of a class from AlloViz.Wrappers

The object is used to retrieve the raw network edges for network analysis. It also contains/gives access to the corresponding:class:~AlloViz.Protein object and its information.

filteringstr or list

Filtering scheme(s) with which to filter the list of network edges. A list of strings is used to filter with a combination of criteria. All available (and combinable) filtering options are functions in the Filtering module: All(), GetContacts_edges(), No_Sequence_Neighbors(), GPCR_Interhelix(), Spatially_distant().

namestr

Name of the filtering scheme. It will be the same name as the passed filtering option if it is a single string, or the names of the filtering options joined by “_” if a lsit has been passed. It is used to name the pkg’s attribute in which the class instance is saved.

Other Parameters:
GetContacts_thresholdfloat

Optional kwarg that can be passed to specify the minimum contact frequency (0-1, default 0) threshold, which will be used to filter out contacts with a frequency (average) lower than it before analysis.

Sequence_Neighbor_distanceint

Optional kwarg that can be passed to specify the minimum number of sequence positions/distance between residues of a pair to retain in No_Sequence_Neighbors filtering, which defaults to 5.

Interresidue_distanceint or float

Optional kwarg that can be passed to specify the minimum number of angstroms that the CA atoms of residue pairs should have between each other in the initial PDB/structure (default 10 Å) to be considered spatially distant.

See also

AlloViz.Protein.filter

Class method to filter the network(s) raw edge weights with different criteria.

AlloViz.Wrappers.Base.Base.filter

Pkg’s method to filter the network(s) raw edge weights with different criteria.

Attributes:
graphsdict of external:ref:Graph <graph> objects

Methods

analyze([elements, metrics, cores, ...])

Analyze the filtered network