flotilla.visualize.network module

Visualize results from :py:mod:flotilla.compute.network

class flotilla.visualize.network.NetworkerViz(DataModel)[source]

Bases: flotilla.compute.network.Networker

draw_graph(n_pcs=5, use_pc_1=True, use_pc_2=True, use_pc_3=True, use_pc_4=True, degree_cut=2, cov_std_cut=1.8, weight_function='no_weight', featurewise=False, rpkms_not_events=False, feature_of_interest='RBFOX2', draw_labels=True, reduction_name=None, feature_ids=None, sample_ids=None, graph_file='', compare='', sample_id_to_color=None, label_to_color=None, label_to_marker=None, groupby=None, data_type=None)[source]

Draw the graph of similarities between samples or features

Parameters:

feature_ids : list of str, or None

Feature ids to subset the data. If None, all features will be used.

sample_ids : list of str, or None

Sample ids to subset the data. If None, all features will be used.

x_pc : str, optional

Which component to use for the x-axis, default “pc_1”

y_pc :

y component for PCA, default “pc_2”

n_pcs : int

Number of components to use for cells’ covariance calculation

cov_std_cut : float

Covariance cutoff for edges

use_pc{1-4} : bool

Use these pcs in cov calculation (default True)

degree_cut : int

miniumum degree for a node to be included in graph display

weight_function : [‘arctan’ | ‘sq’ | ‘abs’ | ‘arctan_sq’]

weight function (arctan (arctan cov), sq (sq cov), abs (abs cov), arctan_sq (sqared arctan of cov))

gene_of_interest : str

map a gradient representing this gene’s data onto nodes (ENSEMBL id or gene symbol)

Returns:

graph : networkx.Graph

positions : (x,y) positions of nodes

draw_nonreduced_graph(degree_cut=2, cov_std_cut=1.8, wt_fun='abs', featurewise=False, rpkms_not_events=False, feature_of_interest='RBFOX2', draw_labels=True, feature_ids=None, group_id=None, graph_file='', compare='')[source]
Parameters:

feature_ids : list of str, or None

Feature ids to subset the data. If None, all features will be used.

sample_ids : list of str, or None

Sample ids to subset the data. If None, all features will be used.

x_pc : str

x component for DataFramePCA, default “pc_1”

y_pc :

y component for DataFramePCA, default “pc_2”

n_pcs : int???

n components to use for cells’ covariance calculation

cov_std_cut : float??

covariance cutoff for edges

use_pc{1-4} use these pcs in cov calculation (default True)

degree_cut : int??

miniumum degree for a node to be included in graph display

weight_function : [‘arctan’ | ‘sq’ | ‘abs’ | ‘arctan_sq’]

weight function (arctan (arctan cov), sq (sq cov), abs (abs cov), arctan_sq (sqared arctan of cov))

gene_of_interest : str

map a gradient representing this gene’s data onto nodes (ENSEMBL id or gene name???)

Returns:

#TODO: Mike please fill these in

graph : networkx.Graph

???

positions : ???

???

Olga B. Botvinnik is funded by the NDSEG fellowship and is a NumFOCUS John Hunter Technology Fellow.
Michael T. Lovci was partially funded by a fellowship from Genentech.
Partially funded by NIH grants NS075449 and HG004659 and CIRM grants RB4-06045 and TR3-05676 to Gene Yeo.