Sort SCINET output edges alphabetically and add LLS weight from HumanNetv3.
Parameters:
celltype_specific_networks(Dict[str, pd.DataFrame]): Dictionary of cell-type specific networksreference_network(nx.Graph, optional): Reference network (HumanNetv3)
Returns:
Dict[str, pd.DataFrame]: Dictionary of dataframes with gene interactions and weights
Calculate centrality values for nodes in scHumanNet networks.
Parameters:
method(str): Centrality measure ('degree', 'betweenness', 'closeness', 'eigenvector')net_list(Dict[str, pd.DataFrame]): Output of sort_add_lls()exclude_ribosomal(bool): Whether to exclude ribosomal genes
Returns:
Dict[str, Dict[str, float]]: Dictionary of centrality values for each cell type
Combine percentile rank centrality values across cell types.
Parameters:
perc_rank_list(Dict[str, Dict[str, float]]): Output of get_centrality()reference_genes(List[str], optional): List of reference genes to include
Returns:
pd.DataFrame: DataFrame with genes as rows and cell types as columns
Find statistically significant hub genes in each network.
Parameters:
net_list(Dict[str, pd.DataFrame]): Output of sort_add_lls()centrality(str): Centrality methodq_method(str): Multiple testing correction methodthreshold(float): Significance threshold
Returns:
pd.DataFrame: DataFrame with significant hub genes
Find statistically significant differential hub genes.
Parameters:
rank_df(pd.DataFrame): Output of combine_perc_rank()meta(pd.DataFrame): Metadata DataFramecelltypes_col(str): Column name for cell typescondition_col(str): Column name for conditionscontrol_value(str): Control condition valuenet_list(Dict[str, pd.DataFrame]): Network list from sort_add_lls()
Returns:
pd.DataFrame: DataFrame with statistical significance results
Load HumanNetv3 reference network.
Calculate connectivity measure for a gene list in a network.
Calculate basic network statistics.
Save networks to files.
Load networks from files.
Sort SCINET output edges alphabetically and add LLS weight derived from HumanNetv3.
Parameters:
Celltype.specific.networks: SCINET output from function run.SCINET.clusters()reference.network: reference network input, default is HumanNetv3
Returns:
- List of dataframe edgelist, with gene interaction and weights from SCINET and HumanNetv3
Get centrality values for each nodes of scHumanNet list.
Parameters:
method: Centrality measure ('degree', 'betweenness', 'closeness', 'eigenvector')net.list: Output of SortAddLLS()
Returns:
- List of named vector, each value corresponding to node's centrality value
Calculate percentile rank of each centrality measure.
Parameters:
perc.rank.list: Output of GetCentrality()
Returns:
- Dataframe of celltypes and their centrality values
Find statistically significant hub genes in each scHumanNets.
Parameters:
net.list: output of SortAddLLScentrality: centrality methodq.method: multiple testing correction methodthreshold: significance threshold
Returns:
- Dataframe with Percentile Rank Centrality, gene, pvalue, qvalue and celltype
Calculate statistical significance of diffPR values.
Parameters:
rank.df.final: Output from CombinePercRankmeta: metadata data.framecelltypes: column name for celltypes annotationcondition: column name for disease and control annotationcontrol: character string specifying control valuenet.list: Output of SortAddLLS
Returns:
- Dataframe with percentile rank of centrality, differences, and statistical significance
Get top n genes in terms of centrality for each scHumanNet.
Get difference of normalized centrality values.
The Python package includes a command-line interface:
# Find hub genes
schumannet find-hubs --networks /path/to/networks --output results.csv
# Differential analysis
schumannet diff-analysis --networks /path/to/networks --metadata meta.csv \
--celltype-col celltype --condition-col condition --control Control \
--output diff_results.csv
# Calculate network statistics
schumannet network-stats --networks /path/to/networks --output stats.csv
# Convert R data to Python format
schumannet convert --input data.rda --output data.pklNetworks should be provided as DataFrames/data.frames with columns:
gene1: First gene in interactiongene2: Second gene in interactionLLS: LLS weight from HumanNetv3scinet_weight: Weight from SCINET (optional)
Metadata should contain:
- Cell identifiers
- Cell type annotations
- Condition/group annotations
- Additional covariates (optional)