I was able to download the paper feature training set (per #7), munged successfully and went ahead and filtered my Magma output (which is in ENSG format as with the example) to only the genes present in my output and gene_annot_jun10.txt, to make sure they are the same. When I run step 2, I get the following error:
INFO: Verbose output enabled.
INFO: Config dict = {'gene_annot_path': 'gene_annot.txt', 'feature_mat_prefix': 'features_munged/pops', 'num_feature_chunks': 12, 'magma_prefix': 'features_magma/striatum_4x_AdultBrain.pops', 'use_magma_covariates': True, 'use_magma_error_cov': True, 'y_path': None, 'y_covariates_path': None, 'y_error_cov_path': None, 'project_out_covariates_chromosomes': None, 'project_out_covariates_remove_hla': True, 'subset_features_path': None, 'control_features_path': 'control.features', 'feature_selection_chromosomes': None, 'feature_selection_p_cutoff': 0.05, 'feature_selection_max_num': None, 'feature_selection_fss_num_features': None, 'feature_selection_remove_hla': True, 'training_chromosomes': None, 'training_remove_hla': True, 'method': 'ridge', 'out_prefix': '/labs/flongo/PREDICT_HD/PoPS/striatum_4x', 'save_matrix_files': False, 'random_seed': 42, 'verbose': True}
INFO: --project_out_covariates_chromosomes is None, defaulting to all chromosomes
INFO: --feature_selection_chromosomes is None, defaulting to all chromosomes
INFO: --training_chromosomes is None, defaulting to all chromosomes
INFO: MAGMA scores provided, loading MAGMA.
Traceback (most recent call last):
File "/oak/stanford/scg/lab_flongo/PREDICT_HD/PoPS/pops/pops.py", line 912, in <module>
main(config_dict)
File "/oak/stanford/scg/lab_flongo/PREDICT_HD/PoPS/pops/pops.py", line 727, in main
Y, covariates, error_cov, Y_ids = read_magma(config_dict["magma_prefix"],
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/oak/stanford/scg/lab_flongo/PREDICT_HD/PoPS/pops/pops.py", line 106, in read_magma
sigmas, gene_metadata = munge_magma_covariance_metadata(magma_prefix + ".genes.raw")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/oak/stanford/scg/lab_flongo/PREDICT_HD/PoPS/pops/pops.py", line 153, in munge_magma_covariance_metadata
curr_sigma[curr_ind, curr_ind - gene_corrs.shape[0]:curr_ind] = gene_corrs
~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: could not broadcast input array from shape (28,) into shape (0,)
It looks like there is an issue with the genes.raw file, but when comparing mine to the example, they have the same format and number of columns. It looks like that particular line is trying to take the tenth and beyond columns and build a covariance matrix? I thought I would see if it was a simple mistake someone else had come across.
Head of genes.raw (doesn't work on four different ones):
I was able to download the paper feature training set (per #7), munged successfully and went ahead and filtered my Magma output (which is in ENSG format as with the example) to only the genes present in my output and
gene_annot_jun10.txt
, to make sure they are the same. When I run step 2, I get the following error:It looks like there is an issue with the
genes.raw
file, but when comparing mine to the example, they have the same format and number of columns. It looks like that particular line is trying to take the tenth and beyond columns and build a covariance matrix? I thought I would see if it was a simple mistake someone else had come across.Head of genes.raw (doesn't work on four different ones):
python version 3.11.1