aertslab / scenicplus

SCENIC+ is a python package to build gene regulatory networks (GRNs) using combined or separate single-cell gene expression (scRNA-seq) and single-cell chromatin accessibility (scATAC-seq) data.
Other
186 stars 29 forks source link

Plots showing projection of perturbation effect in embedding look the same for all regulons #404

Open solvi808 opened 6 months ago

solvi808 commented 6 months ago

Describe the bug This is not a hard error, but it's an issue with the output of the analysis.

Anyway I supplied the precomputed perturbed matrix ( perturbed_matrices_dict ) but the issue persisted even if I use the same code as in the SCENIC+ vignette.

My Code:

for TF in tqdm(TFs_of_interest, total = len(TFs_of_interest)):
        _ = plot_perturbation_effect_in_embedding(
                scplus_obj = scplus_obj ,
                reduction_name = 'eRegulons_PCA_gene_based' ,
                perturbed_matrix = perturbed_matrices_dict[TF]['0'] ,
                regressors = regressors ,
                n_cpu = NCPUS ,
               # perturbation = { TF : 0} , 
                variable = clustering_FIELD ,
                color_dictionary = { clustering_FIELD: clusterColors } ,
                genes_to_use = hvg , # hvg DEGs
                save = Path( PCA_perturbation_plots_dir , f'{TF}_perturbation.png' ) ,
                figsize = (10, 10) )

perturbation_featureplot

relevant software versions velocyto v 0.17.17 scanpy v 1.9.6 pandas v 1.5.0 numpy v 1.24.4 scenicplus v 1.0.1.dev4+ge4bdd9f Python version 3.8.18

SeppeDeWinter commented 5 months ago

Hi @solvi808

Sorry for the late reply.

Strange ...

Could you show a plot with the expression of these TFs on the PCA?

Best,

Seppe

solvi808 commented 5 months ago

Hello,

Ok I did as you suggested but I cannot see any co-expression between the TFs that explains the similarity between the perturbation-velocity plots

I also attached the jupyter notebook report in .pdf format, which shows the code from start to finish

PCA embedding (it changed a bit from before as I had re-ran SCENIC+ on this sample, but the issue remains the same) image

UMAP embedding image

TF eRegulon AUC and GEX on UMAP image

TF eRegulon AUC and GEX on PCA embedding image

Trp63 perturbation velocity plot image

Nfatc1 perturbation velocity plot image

Snail 1 image

Grhl3 image perturbation_analysis_test.pdf