I'm having a little trouble with running the combined module, please see the error below.
This is immediately after running the RDR and BAF modules successfully.
Any idea what I could be doing wrong here? Thanks in advance.
>>> combine_Xdata = xclone.model.run_combine(RDR_c,
... BAF_c,
... config_file=combine_cfg, verbose=True,
... run_verbose=True)
XClone combine module Started
[XClone Combination module running]************************
[XClone] BAF extend bins to genes.
[XClone data checking]: RDR and BAF in same cell order.
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/jonest/apps/anaconda/envs/xclone_run/lib/python3.9/site-packages/xclone/model/xclone_combine_wrap.py", line 154, in run_combine
combine_Xdata = xclone.model.bin_to_gene_mapping(BAF_merge_Xdata,
File "/jonest/apps/anaconda/envs/xclone_run/lib/python3.9/site-packages/xclone/model/XClone_combine.py", line 291, in bin_to_gene_mapping
RDR_Xdata.layers[extend_layer] = extend_res
File "/jonest/apps/anaconda/envs/xclone_run/lib/python3.9/site-packages/anndata/_core/aligned_mapping.py", line 216, in __setitem__
value = self._validate_value(value, key)
File "/jonest/apps/anaconda/envs/xclone_run/lib/python3.9/site-packages/anndata/_core/aligned_mapping.py", line 97, in _validate_value
raise ValueError(msg)
ValueError: Value passed for key 'BAF_extend_post_prob' is of incorrect shape. Values of layers must match dimensions ('obs', 'var') of parent. Value had shape (6579, 527) while it should have had (6579, 6966).
>>> RDR_c
AnnData object with n_obs × n_vars = 6579 × 6966
obs: 'background_fraction', 'cell_probability', 'cell_size', 'droplet_efficiency', 'n_raw', 'n_cellbender', 'kit_used', 'rnase_inhibitor', 'n_genes_by_counts', 'log1p_n_genes_by_counts', 'total_counts', 'log1p_total_counts', 'total_counts_mt', 'log1p_total_counts_mt', 'pct_counts_mt', 'total_counts_ribo', 'log1p_total_counts_ribo', 'pct_counts_ribo', 'total_counts_hb', 'log1p_total_counts_hb', 'pct_counts_hb', 'leiden', 'scrublet_scores', 'scrublet_class', 'doubletdetection_class', 'doubletdetection_score', 'status', 'assigned_sample', 'sample_id', 'sample', 'leiden_harmony', 'predicted_labels', 'over_clustering', 'majority_voting', 'conf_score', 'majority_voting_orig', '__ref_group__', 'counts_ratio'
var: 'highly_variable', 'highly_variable_rank', 'means', 'variances', 'variances_norm', 'GeneName', 'GeneID', 'chr', 'start', 'stop', 'arm', 'chr_arm', 'band', 'ref_avg', 'gene_index'
uns: 'log1p', 'hvg', 'pca', 'neighbors', 'umap', 'leiden', 'neighbors_harmony', 'leiden_harmony', 'leiden_colors', 'leiden_harmony_colors', 'majority_voting_colors', 'majority_voting_orig_colors', 'sample_id_colors', 'rank_marker_genes'
obsm: 'X_pca', 'X_umap', 'cellbender_embedding', 'X_pca_harmony'
varm: 'PCs'
layers: 'cellbender', 'counts', 'raw', 'raw_expr', 'log_ratio_ab', 'WMA_smoothed_log_ratio_ab', 'WMA_smoothed_log_ratio_ab_dynamic', 'gaussian_loglike', 'gaussian_likelihood', 'gaussian_probabilities', 'post_HMM_prob', 'post_HMM_prob_2', 'post_HMM_prob_2_gauss', 'post_HMM_prob_2_gauss_lowrank', 'posterior_mtx'
obsp: 'distances', 'connectivities', 'neighbors_harmony_distances', 'neighbors_harmony_connectivities'
varp: 'WMA_connect'
>>> BAF_c
AnnData object with n_obs × n_vars = 6579 × 328
obs: 'sample_id', 'majority_voting', '__ref_group__'
var: 'chr', 'start', 'stop', 'arm', 'chr_arm', 'band', 'gene1_stop', 'bin_stop_arm', 'bin_stop_chr_arm', 'bin_stop_band', 'bin_idx', 'bin_idx_cum', 'GeneName_lst', 'GeneID_lst', 'bin_genes_cnt', 'ref_BAF_phased', 'brk_gene_index'
uns: 'local_phasing_key', 'local_phasing_len'
layers: 'BAF', 'BAF_phased', 'fill_BAF_phased', 'BAF_phased_KNN', 'BAF_phased_KNN_WMA', 'BAF_phased_WMA', 'posterior_mtx', 'posterior_mtx_log', 'denoised_posterior_mtx'
obsp: 'connectivities_expr'
varp: 'WMA_connect'
>>> RDR_c.var
highly_variable highly_variable_rank means variances variances_norm GeneName GeneID chr start stop arm chr_arm band ref_avg gene_index
0 False NaN 0.220903 0.275678 0.963106 CICP27 CICP27 1 131068 134836 p 1p p36.33 0.080725 0
1 False NaN 0.033904 0.043153 0.979629 LOC112268260 LOC112268260 1 350706 476822 p 1p p36.33 0.058484 1
2 False NaN 0.000474 0.000323 0.557701 MTCO1P12 MTCO1P12 1 631074 632616 p 1p p36.33 0.070840 2
3 False NaN 0.000110 0.000080 1.000317 MTCO2P12 MTCO2P12 1 632757 633438 p 1p p36.33 0.959638 3
4 False NaN 0.000231 0.000160 0.692914 MTATP6P1 MTATP6P1 1 633696 634376 p 1p p36.33 0.157331 4
... ... ... ... ... ... ... ... .. ... ... .. ... ... ... ...
6961 False NaN 0.061669 0.085951 1.070450 CHKB CHKB 22 50578963 50582849 q 22q q13.33 0.272652 6961
6962 False NaN 0.078976 0.097960 0.953323 CHKB-DT CHKB-DT 22 50583026 50595281 q 22q q13.33 0.052718 6962
6963 False NaN 0.002702 0.003964 1.118375 RNU6-409P RNU6-409P 22 50691260 50691363 q 22q q13.33 0.111203 6963
6964 False NaN 0.000348 0.000797 1.000456 LOC150417 LOC150417 22 50754454 50755468 q 22q q13.33 0.093081 6964
6965 False NaN 0.119129 0.135734 0.876846 RABL2B RABL2B 22 50767500 50783705 q 22q q13.33 0.082372 6965
[6966 rows x 15 columns]
>>> BAF_c.var
chr start stop arm chr_arm band ... bin_idx_cum GeneName_lst GeneID_lst bin_genes_cnt ref_BAF_phased brk_gene_index
0 1 29554 2530245 p 1p p36.33 ... 0 MIR1302-2HG,FAM138A,OR4F5,AL627309.1,AL627309.... ENSG00000243485,ENSG00000237613,ENSG0000018609... 818 0.476277 0
1 1 2530064 8434838 p 1p p36.32 ... 1 AL139246.5,TNFRSF14-AS1,TNFRSF14,AL139246.3,FA... ENSG00000272449,ENSG00000238164,ENSG0000015787... 870 0.454237 1
2 1 8805860 13179464 p 1p p36.23 ... 2 AL357552.2,ENO1,ENO1-AS1,CA6,SLC2A7,SLC2A5,GPR... ENSG00000228423,ENSG00000074800,ENSG0000023067... 809 0.476269 2
3 1 13196330 18486126 p 1p p36.21 ... 3 PRAMEF13,PRAMEF18,PRAMEF5,PRAMEF8,PRAMEF33,PRA... ENSG00000279169,ENSG00000279804,ENSG0000027060... 860 0.483481 3
4 1 18631006 23838620 p 1p p36.13 ... 4 PAX7,TAS1R2,AL080251.1,ALDH4A1,IFFO2,UBR4,AL03... ENSG00000009709,ENSG00000179002,ENSG0000025527... 756 0.488972 4
.. .. ... ... .. ... ... ... ... ... ... ... ... ...
323 22 30285238 36070110 q 22q q12.2 ... 323 AC004997.1,TBC1D10A,SF3A1,CCDC157,RNF215,SEC14... ENSG00000248751,ENSG00000099992,ENSG0000009999... 823 0.496531 323
324 22 36071000 39020352 q 22q q12.3 ... 324 Z95114.1,Z95114.2,APOL3,APOL4,APOL2,APOL1,MYH9... ENSG00000279217,ENSG00000279714,ENSG0000012828... 784 0.472644 324
325 22 39014363 43213661 q 22q q13.1 ... 325 AL022318.4,APOBEC3D,APOBEC3F,APOBEC3G,APOBEC3H... ENSG00000284554,ENSG00000243811,ENSG0000012839... 760 0.479764 325
326 22 43232141 50217616 q 22q q13.2 ... 326 Z82214.1,Z99756.1,LINC01639,MPPED1,EFCAB6-AS1,... ENSG00000234892,ENSG00000203527,ENSG0000023611... 860 0.483738 326
327 22 50205585 50783663 q 22q q13.33 ... 327 AL022328.1,AL022328.2,TUBGCP6,HDAC10,MAPK12,MA... ENSG00000272836,ENSG00000273137,ENSG0000012815... 271 0.502096 327
[328 rows x 17 columns]
Hello,
I'm having a little trouble with running the combined module, please see the error below.
This is immediately after running the RDR and BAF modules successfully.
Any idea what I could be doing wrong here? Thanks in advance.