JonJala / mtag

Python command line tool for Multi-Trait Analysis of GWAS (MTAG)
GNU General Public License v3.0
172 stars 55 forks source link

ValueError: Could not find P column. #116

Open Shicheng-Guo opened 4 years ago

Shicheng-Guo commented 4 years ago

An interesting error comes out. I have set mtag to use 'Z', I don't know why it still trying to look for 'P'

mtag.py --sumstats bip.sumstats.txt,scz.sumstats.txt --snp_name SNP --z_name Z --n_name N bip.sumstats.txt scz.sumstats.txt

2020/10/22/10:51:25 PM
<><><<>><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
<>
<> MTAG: Multi-trait Analysis of GWAS
<> Version: 1.0.8
<> (C) 2017 Omeed Maghzian, Raymond Walters, and Patrick Turley
<> Harvard University Department of Economics / Broad Institute of MIT and Harvard
<> GNU General Public License v3
<><><<>><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
<> Note:  It is recommended to run your own QC on the input before using this program.
<> Software-related correspondence: maghzian@nber.org
<> All other correspondence: paturley@broadinstitute.org
<><><<>><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>

Calling ./mtag.py \
--z-name Z \
--n-name N \
--snp-name SNP \
--sumstats bip.sumstats.txt,scz.sumstats.txt

2020/10/22/10:51:25 PM Beginning MTAG analysis...
2020/10/22/10:51:25 PM MTAG will use the Z column for analyses.
2020/10/22/10:51:25 PM Read in Trait 1 summary statistics (1000 SNPs) from bip.sumstats ...
2020/10/22/10:51:25 PM <><><<>><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
2020/10/22/10:51:25 PM Munging Trait 1  <><><<>><><><><><><><><><><><><><><><><><><><><><><><><><><
2020/10/22/10:51:25 PM <><><<>><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
2020/10/22/10:51:25 PM
ERROR converting summary statistics:

2020/10/22/10:51:25 PM Traceback (most recent call last):
  File "/projects/ps-janssen4/dsci-csb/user/sguo2/bin/mtag/mtag_munge.py", line 801, in munge_sumstats
    raise ValueError('Could not find {C} column.'.format(C=c))
ValueError: Could not find P column.

2020/10/22/10:51:25 PM
Conversion finished at Thu Oct 22 22:51:25 2020
2020/10/22/10:51:25 PM Total time elapsed: 0.0s
2020/10/22/10:51:25 PM Could not find P column.
Traceback (most recent call last):
  File "/home/sguo2/janssen4/bin/mtag/mtag.py", line 1567, in <module>
    mtag(args)
  File "/home/sguo2/janssen4/bin/mtag/mtag.py", line 1336, in mtag
    DATA_U, DATA, args = load_and_merge_data(args)
  File "/home/sguo2/janssen4/bin/mtag/mtag.py", line 269, in load_and_merge_data
    GWAS_d[p], sumstats_format[p] = _perform_munge(args, GWAS_d[p], gwas_dat_gen, p)
  File "/home/sguo2/janssen4/bin/mtag/mtag.py", line 162, in _perform_munge
    munged_results = munge_sumstats.munge_sumstats(argnames, write_out=False, new_log=False)
  File "/projects/ps-janssen4/dsci-csb/user/sguo2/bin/mtag/mtag_munge.py", line 801, in munge_sumstats
    raise ValueError('Could not find {C} column.'.format(C=c))
ValueError: Could not find P column.
2020/10/22/10:51:25 PM Analysis terminated from error at Thu Oct 22 22:51:25 2020
2020/10/22/10:51:25 PM Total time elapsed: 0.01s
paturley commented 4 years ago

Hello,

You are right that having the p-value and the z-stat is redundant, but the software uses it as a robustness check to make sure it is reading in the correct columns. If you sumstats done have a p-value column, I suggest you create a new file with the p-values that you calculate yourself.

Best, Patrick

On Fri, Oct 23, 2020 at 1:58 AM Shicheng Guo notifications@github.com wrote:

An interesting error comes out. I have set mtag to use 'Z', I don't know why it still trying to look for 'P'

mtag.py --sumstats bip.sumstats,scz.sumstats --snp_name SNP --z_name Z --n_name N bip.sumstats.txt https://github.com/JonJala/mtag/files/5427572/bip.sumstats.txt scz.sumstats.txt https://github.com/JonJala/mtag/files/5427573/scz.sumstats.txt

2020/10/22/10:51:25 PM <><><<>><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><> <> <> MTAG: Multi-trait Analysis of GWAS <> Version: 1.0.8 <> (C) 2017 Omeed Maghzian, Raymond Walters, and Patrick Turley <> Harvard University Department of Economics / Broad Institute of MIT and Harvard <> GNU General Public License v3 <><><<>><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><> <> Note: It is recommended to run your own QC on the input before using this program. <> Software-related correspondence: maghzian@nber.org <> All other correspondence: paturley@broadinstitute.org <><><<>><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>

Calling ./mtag.py \ --z-name Z \ --n-name N \ --snp-name SNP \ --sumstats bip.sumstats.txt,scz.sumstats.txt

2020/10/22/10:51:25 PM Beginning MTAG analysis... 2020/10/22/10:51:25 PM MTAG will use the Z column for analyses. 2020/10/22/10:51:25 PM Read in Trait 1 summary statistics (1000 SNPs) from bip.sumstats ... 2020/10/22/10:51:25 PM <><><<>><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><> 2020/10/22/10:51:25 PM Munging Trait 1 <><><<>><><><><><><><><><><><><><><><><><><><><><><><><><>< 2020/10/22/10:51:25 PM <><><<>><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><> 2020/10/22/10:51:25 PM ERROR converting summary statistics:

2020/10/22/10:51:25 PM Traceback (most recent call last): File "/projects/ps-janssen4/dsci-csb/user/sguo2/bin/mtag/mtag_munge.py", line 801, in munge_sumstats raise ValueError('Could not find {C} column.'.format(C=c)) ValueError: Could not find P column.

2020/10/22/10:51:25 PM Conversion finished at Thu Oct 22 22:51:25 2020 2020/10/22/10:51:25 PM Total time elapsed: 0.0s 2020/10/22/10:51:25 PM Could not find P column. Traceback (most recent call last): File "/home/sguo2/janssen4/bin/mtag/mtag.py", line 1567, in mtag(args) File "/home/sguo2/janssen4/bin/mtag/mtag.py", line 1336, in mtag DATA_U, DATA, args = load_and_merge_data(args) File "/home/sguo2/janssen4/bin/mtag/mtag.py", line 269, in load_and_merge_data GWAS_d[p], sumstats_format[p] = _perform_munge(args, GWAS_d[p], gwas_dat_gen, p) File "/home/sguo2/janssen4/bin/mtag/mtag.py", line 162, in _perform_munge munged_results = munge_sumstats.munge_sumstats(argnames, write_out=False, new_log=False) File "/projects/ps-janssen4/dsci-csb/user/sguo2/bin/mtag/mtag_munge.py", line 801, in munge_sumstats raise ValueError('Could not find {C} column.'.format(C=c)) ValueError: Could not find P column. 2020/10/22/10:51:25 PM Analysis terminated from error at Thu Oct 22 22:51:25 2020 2020/10/22/10:51:25 PM Total time elapsed: 0.01s

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/JonJala/mtag/issues/116, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFBUB5KUG76VSPXI5YWN5W3SMELSBANCNFSM4S4DRNZA .