Skip to content

Adding spearman correlation to findmodules#123

Open
Buiboni wants to merge 1 commit intomortazavilab:developefrom
Buiboni:spearman
Open

Adding spearman correlation to findmodules#123
Buiboni wants to merge 1 commit intomortazavilab:developefrom
Buiboni:spearman

Conversation

@Buiboni
Copy link

@Buiboni Buiboni commented Oct 15, 2024

Spearman correlation is widely use in biology especially when dealing with semi-quantitative data. This pull request implement spearman correlation in the main function findmodules.

@nargesr
Copy link
Member

nargesr commented Oct 21, 2024

Thank you @Buiboni

It's wonderful. Could you add a docstring describing the spearman parameter you used for those functions?

Once you add that information, I can start merging your pull request.

Best,
Narges

@gitbenlewis
Copy link
Contributor

@Buiboni here is a docstring for your pull request (appended to class doc string attributes section)

class WGCNA(GeneExp):
"""
A class used to create WGCNA (weighted gene co-expression network analysis).
Attributes
----------
name: str
name of the WGCNA we used to visualize data (default: 'WGCNA')
geneExpression : class GeneExp
gene expression class
geneExpPath: str
geneExp: dataframe
sep: str
datExpr: anndata
clean gene expression matrix with genes and sample information
TPMcutoff: int
cut off for removing genes with out any specific expression
power : int
power used to have scale free network (default: 6)
networkType : str
Type of network we can create (default: "signed hybrid")
possible Type: "unsigned", "signed" and "signed hybrid"
TOMType: str
Type of topological overlap matrix(TOM) (default: "signed")
possible Type: "unsigned", "signed"
minModuleSize : int
We like large modules, so we set the minimum module size relatively high (default: 50)
naColor: str
color we used to identify genes we don't find any cluster for them (default: "grey")
cut: float
number to remove outlier sample (default: 'inf')
By default we don't remove any sample by hierarchical clustering
MEDissThres: int
(default: 0.2)
save: bool
define wether you want to save result of important steps or not (default: False)
outputPath: str
if save is TRUE, define where you want to save your data (default: '')
    spearman : bool, default False
        If True, compute correlations using Spearman correlation instead of the default Pearson correlation. This is achieved by replacing the expression data with their ranks before computing the correlation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants