Closed AmosFong1 closed 4 months ago
Hi @AmosFong1
Yes, these functions still exist.
You can import them like this
from scenicplus.regulon_qc.quality_metrics import generate_pseudobulks, calculate_correlation
generate_pseudobulks
uses the following parameters:
scplus_mudata.obs.columns
)scplus_mudata.mod.keys()
)This function will produce a pandas DataFrame.
calculate_correlation
takes two pandas dataframes as input. Note that the index of these dataframes should match (for example they should represent the same cells / pseudobulks). It will then calculate the correlation across regulons (columns).
I hope this helps?
Best,
Seppe
Hi @SeppeDeWinter ,
Thanks for the quick reply, can you clarify what is the parameter mapping_A_to_B
in calculate_correlation
? Can't seem to find it on the SCENIC+ read the docs, and running calculate_correlation?
indicates dict
.
Best, Amos
Hi @AmosFong1
Right! It's a dictionary that maps the features (columns) in the A dataframe to those in B. For example, when calculating the correlation between region and gene values the features might look like this:
Gene based: TF_+_+(xg)
Region based : TF_+_+(xr)
Then the mapping would be {"TF_+_+(xg)": "TF_+_+(xr)"}
.
All the best,
Seppe
Hi @SeppeDeWinter,
Thanks, the function worked nicely. I want to confirm, is it spearman correlation used in calculate_correlation?
Best, Amos
Hi @AmosFong1
By default it is the pearson correlation coefficient. You can change it however, using the parameter corr_function
.
Best,
Seppe
I recently completed the updated scenicplus workflow (snakemake version) and realized that the functions to calculate TF expression and region/gene AUC correlations are missing. Is there a function to do this still similar to the functions in
from scenicplus.cistromes import TF_cistrome_correlation, generate_pseudobulks
? If not can you provide me with details about which statistical test to use?