Converting mudata output to old-style SCENIC+ object: issues with create_nx_tables for visualization of nerworks #378
Replies: 2 comments
-
Hi,
Without setting the 'subset_eRegulons', there is no error message and it worked. eRegulon names are as follows:
I tried both TF (gene) names and these eRegulon names, but got the same error. I hope you can help us. Best, |
Beta Was this translation helpful? Give feedback.
-
Same problem here. |
Beta Was this translation helpful? Give feedback.
-
Hi,
I've managed to run the latest version of SCENIC+ successfully and obtained the mudata object. After converting it back to the old-style SCENIC+ object, I attempted to generate a network using create_nx_tables. However, the resulting dataframes are empty.
#scplus_mdata:
MuData object with n_obs × n_vars = 2468 × 386794 uns: 'direct_e_regulon_metadata', 'extended_e_regulon_metadata' 6 modalities scRNA_counts: 2468 x 17667 obs: 'celltype' scATAC_counts: 2468 x 366351 obs: 'celltype' var: 'Chromosome', 'Start', 'End', 'Width', 'cisTopic_nr_frag', 'cisTopic_log_nr_frag', 'cisTopic_nr_acc', 'cisTopic_log_nr_acc' direct_gene_based_AUC: 2468 x 511 direct_region_based_AUC: 2468 x 511 extended_gene_based_AUC: 2468 x 877 extended_region_based_AUC: 2468 x 877
#Converted scplus_obj:
SCENIC+ object with n_cells x n_genes = 2468 x 17667 and n_cells x n_regions = 2468 x 366351 metadata_regions:'Chromosome', 'Start', 'End', 'Width', 'cisTopic_nr_frag', 'cisTopic_log_nr_frag', 'cisTopic_nr_acc', 'cisTopic_log_nr_acc' metadata_cell:'celltype' menr:'cistarget_DARs_Chow-LSECs', 'cistarget_DARs_ProLSECs', 'cistarget_DARs_WD-LSECs', 'cistarget_DARs_pcVECs', 'cistarget_DARs_ppVECs', 'cistarget_topics_otsu_Topic1', 'cistarget_topics_otsu_Topic10', 'cistarget_topics_otsu_Topic11', 'cistarget_topics_otsu_Topic12', 'cistarget_topics_otsu_Topic13', 'cistarget_topics_otsu_Topic14', 'cistarget_topics_otsu_Topic15', 'cistarget_topics_otsu_Topic16', 'cistarget_topics_otsu_Topic17', 'cistarget_topics_otsu_Topic18', 'cistarget_topics_otsu_Topic19', 'cistarget_topics_otsu_Topic2', 'cistarget_topics_otsu_Topic20', 'cistarget_topics_otsu_Topic3', 'cistarget_topics_otsu_Topic4', 'cistarget_topics_otsu_Topic5', 'cistarget_topics_otsu_Topic6', 'cistarget_topics_otsu_Topic7', 'cistarget_topics_otsu_Topic8', 'cistarget_topics_otsu_Topic9', 'cistarget_topics_top_3_Topic1', 'cistarget_topics_top_3_Topic10', 'cistarget_topics_top_3_Topic11', 'cistarget_topics_top_3_Topic12', 'cistarget_topics_top_3_Topic13', 'cistarget_topics_top_3_Topic14', 'cistarget_topics_top_3_Topic15', 'cistarget_topics_top_3_Topic16', 'cistarget_topics_top_3_Topic17', 'cistarget_topics_top_3_Topic18', 'cistarget_topics_top_3_Topic19', 'cistarget_topics_top_3_Topic2', 'cistarget_topics_top_3_Topic20', 'cistarget_topics_top_3_Topic3', 'cistarget_topics_top_3_Topic4', 'cistarget_topics_top_3_Topic5', 'cistarget_topics_top_3_Topic6', 'cistarget_topics_top_3_Topic7', 'cistarget_topics_top_3_Topic8', 'cistarget_topics_top_3_Topic9', 'dem_DARs_WD-LSECs_vs_all', 'dem_DARs_ppVECs_vs_all', 'dem_topics_otsu_Topic10_vs_all', 'dem_topics_otsu_Topic11_vs_all', 'dem_topics_otsu_Topic13_vs_all', 'dem_topics_otsu_Topic15_vs_all', 'dem_topics_otsu_Topic16_vs_all', 'dem_topics_otsu_Topic1_vs_all', 'dem_topics_otsu_Topic2_vs_all', 'dem_topics_otsu_Topic4_vs_all', 'dem_topics_otsu_Topic5_vs_all', 'dem_topics_otsu_Topic6_vs_all', 'dem_topics_otsu_Topic7_vs_all', 'dem_topics_otsu_Topic9_vs_all', 'dem_topics_top_3_Topic10_vs_all', 'dem_topics_top_3_Topic11_vs_all', 'dem_topics_top_3_Topic13_vs_all', 'dem_topics_top_3_Topic16_vs_all', 'dem_topics_top_3_Topic17_vs_all', 'dem_topics_top_3_Topic2_vs_all', 'dem_topics_top_3_Topic4_vs_all', 'dem_topics_top_3_Topic5_vs_all', 'dem_topics_top_3_Topic6_vs_all', 'dem_topics_top_3_Topic7_vs_all', 'dem_topics_top_3_Topic9_vs_all'
#scplus_obj.uns['eRegulon_metadata'].columns:
Index(['Region', 'Gene', 'importance_R2G', 'rho_R2G', 'importance_x_rho', 'importance_x_abs_rho', 'TF', 'is_extended', 'eRegulon_name', 'Gene_signature_name', 'Region_signature_name', 'importance_TF2G', 'regulation', 'rho_TF2G', 'triplet_rank'], dtype='object')
I also tried to rename the columns in scplus_obj.uns['eRegulon_metadata' to match the old naming convention:
['Region', 'Gene', 'R2G_importance', 'R2G_rho', 'R2G_importance_x_rho', 'R2G_importance_x_abs_rho', 'TF', 'is_extended', 'Consensus_name', 'Gene_signature_name', 'Region_signature_name', 'TF2G_importance', 'TF2G_regulation', 'TF2G_rho', 'triplet_rank']
#But I still get empty dataframes: when running:
nx_tables = create_nx_tables( scplus_obj = scplus_obj, eRegulon_metadata_key ='eRegulon_metadata', subset_eRegulons = ["Atf3", "Bach1", "Cnot3"], subset_regions = hvr, subset_genes = hvg, add_differential_gene_expression = True, add_differential_region_accessibility = True, differential_variable = ['celltype'])
#nx_tables:
{'Edge': {'TF2R': Empty DataFrame Columns: [TF, Region, Consensus_name, Gene_signature_name, Region_signature_name, is_extended, triplet_rank] Index: [], 'R2G': Empty DataFrame Columns: [Region, Gene, Consensus_name, Gene_signature_name, R2G_importance, R2G_importance_x_abs_rho, R2G_importance_x_rho, R2G_rho, Region_signature_name, is_extended, triplet_rank] Index: [], 'TF2G': Empty DataFrame Columns: [TF, Gene, Consensus_name, Gene_signature_name, Region_signature_name, TF2G_importance, TF2G_regulation, TF2G_rho, is_extended, triplet_rank] Index: []}, 'Node': {'TF': Empty DataFrame Columns: [Node_type, TF] Index: [], 'Gene': Empty DataFrame Columns: [Node_type, Gene] Index: [], 'Region': Empty DataFrame Columns: [Node_type, Region] Index: []}}
Hope you can help.
Best regards,
Laura
Beta Was this translation helpful? Give feedback.
All reactions