bioneuralnet.metrics.correlation
Functions
|
Compute the Pearson correlation coefficient between PC1 of a cluster and phenotype. |
|
Retrieves a global logger configured to write to 'bioneuralnet.log' at the project root. |
|
Convert a Louvain cluster to an adjacency matrix. |
|
Compute the Pearson correlation between a group of omics data (reduced to one principal component) and a phenotype. |
|
Pearson correlation coefficient and p-value for testing non-correlation. |
- bioneuralnet.metrics.correlation.cluster_correlation(cluster_df: DataFrame, pheno: DataFrame) tuple[source]
Compute the Pearson correlation coefficient between PC1 of a cluster and phenotype.
- Parameters:
cluster_df – DataFrame representing a cluster of samples.
pheno – DataFrame representing the phenotype.
- Returns:
(cluster_size, correlation) or (size, None) if correlation fails.
- bioneuralnet.metrics.correlation.louvain_to_adjacency(louvain_cluster: DataFrame) DataFrame[source]
Convert a Louvain cluster to an adjacency matrix.
- Parameters:
louvain_cluster – represents an induced subnetwork (from Louvain).
- Returns:
Adjacency matrix
- Return type:
pd.DataFrame