gwas_parsing.py

129 views
Skip to first unread message

Ketki Joshi

unread,
Jul 14, 2021, 12:33:17 PM7/14/21
to PrediXcan/MetaXcan
Hello,
I am running gwas_parsing.py script But I am getting some error.
python $GWAS_TOOLS/gwas_parsing.py \
  -gwas_file $AD_DATA/Mari_maternal_AD_GWAS.txt.gz \
  -snp_reference_metadata $DATA/reference_panel_1000G/variant_metadata.txt.gz METADATA \
  -output_column_map SNP variant_id \
  -output_column_map A2 non_effect_allele \
  -output_column_map A1 effect_allele \
  -output_column_map beta effect_size \
  -output_column_map p value \
  -output_column_map chr chromosome \
  --chromosome_format \
  -output_column_map bp position \
  -output_column_map effect_allele_freq frequency \
  --insert_value sample_size 314278 --insert_value n_cases 60801 \
  -output_order variant_id panel_variant_id chromosome position effect_allele non_effect_allele frequency pvalue zscore effect_size standard_error sample_size \
  -output $OUTPUT/harmonized_gwas/harmonized_AD_maternal_summary.txt.gz

The error:
INFO - Parsing input GWAS
Traceback (most recent call last):
  File "/work/08259/kjoshi/stampede2/i/summary-gwas-imputation/src/gwas_parsing.py", line 311, in <module>
    run(args)
  File "/work/08259/kjoshi/stampede2/i/summary-gwas-imputation/src/gwas_parsing.py", line 258, in run
    enforce_numeric_columns=args.enforce_numeric_columns)
  File "/work2/08259/kjoshi/stampede2/i/summary-gwas-imputation/src/genomic_tools_lib/file_formats/gwas/GWAS.py", line 18, in load_gwas
    d = _ensure_columns(d, input_pvalue_fix, enforce_numeric_columns)
  File "/work2/08259/kjoshi/stampede2/i/summary-gwas-imputation/src/genomic_tools_lib/file_formats/gwas/GWAS.py", line 47, in _ensure_columns
    _ensure_z(d, input_pvalue_fix)
  File "/work2/08259/kjoshi/stampede2/i/summary-gwas-imputation/src/genomic_tools_lib/file_formats/gwas/GWAS.py", line 83, in _ensure_z
    if z is None: raise ReportableException("Couldn't get zscore from GWAS")
genomic_tools_lib.Exceptions.ReportableException: Couldn't get zscore from GWAS

Festus

unread,
Jul 20, 2021, 5:57:28 AM7/20/21
to PrediXcan/MetaXcan
 
Hi,

The issue here is the tool can not calculate the zscore from the inputs you have provided. The tool calculates the zscore from either pvalue  or using beta and SE.
In your case the output column isn't provided correctly consider updating this section in your command line;
   -output_column_map p pvalue  instead of value only

To use the beta and SE you can provide this if available
    -output_column_map <beta column> effect_size
    -output_column_map <se column> standard_error
Reply all
Reply to author
Forward
0 new messages