mtag
mtag copied to clipboard
ValueError: Could not find SIGNED_SUMSTAT column
Hi
I am using mtag for two different traits, then I got error like this. Any idea why is that? Thanks in advance.
Best
Haojie
Calling ./mtag.py
--se-name StdErr
--p-name Pvalue
--bpos-name BP
--stream-stdout
--n-name N
--a2-name Allele2
--n-min 20000
--a1-name Allele1
--snp-name RSID
--chr-name CHR
--sumstats /home/result/final_data/SKBMD.txt.gz,/home/result/final_data/LSBMD.txt.gz
--beta-name Effect
--out /home/result/MTAG/Model.test
2022/08/02/12:44:22 PM Beginning MTAG analysis... 2022/08/02/12:44:22 PM MTAG will use the Z column for analyses. 2022/08/02/12:45:30 PM Read in Trait 1 summary statistics (14406717 SNPs) from /home/result/final_data/SKBMD.txt.gz ... 2022/08/02/12:45:30 PM <><><<>><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><> 2022/08/02/12:45:30 PM Munging Trait 1 <><><<>><><><><><><><><><><><><><><><><><><><><><><><><><>< 2022/08/02/12:45:30 PM <><><<>><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><> 2022/08/02/12:45:30 PM ERROR converting summary statistics:
2022/08/02/12:45:30 PM Traceback (most recent call last): File "/home/059904/software/mtag/mtag_munge.py", line 801, in munge_sumstats raise ValueError('Could not find {C} column.'.format(C=c)) ValueError: Could not find SIGNED_SUMSTAT column.
2022/08/02/12:45:30 PM
Conversion finished at Tue Aug 2 12:45:30 2022
2022/08/02/12:45:30 PM Total time elapsed: 0.0s
2022/08/02/12:45:30 PM Could not find SIGNED_SUMSTAT column.
Traceback (most recent call last):
File "/home/software/mtag/mtag.py", line 1577, in
It looks like it's having trouble finding the Z column that it's expecting (" 2022/08/02/12:44:22 PM MTAG will use the Z column for analyses.")
On Wed, Aug 3, 2022 at 4:10 AM Haojie818 @.***> wrote:
Hi
I am using mtag for two different traits, then I got error like this. Any idea why is that? Thanks in advance.
Best
Haojie
Calling ./mtag.py --se-name StdErr --p-name Pvalue --bpos-name BP --stream-stdout --n-name N --a2-name Allele2 --n-min 20000 --a1-name Allele1 --snp-name RSID --chr-name CHR --sumstats /home/result/final_data/SKBMD.txt.gz,/home/result/final_data/LSBMD.txt.gz --beta-name Effect --out /home/result/MTAG/Model.test
2022/08/02/12:44:22 PM Beginning MTAG analysis... 2022/08/02/12:44:22 PM MTAG will use the Z column for analyses. 2022/08/02/12:45:30 PM Read in Trait 1 summary statistics (14406717 SNPs) from /home/result/final_data/SKBMD.txt.gz ... 2022/08/02/12:45:30 PM <><><<>><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><> 2022/08/02/12:45:30 PM Munging Trait 1 <><><<>><><><><><><><><><><><><><><><><><><><><><><><><><>< 2022/08/02/12:45:30 PM <><><<>><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><> 2022/08/02/12:45:30 PM ERROR converting summary statistics:
2022/08/02/12:45:30 PM Traceback (most recent call last): File "/home/059904/software/mtag/mtag_munge.py", line 801, in munge_sumstats raise ValueError('Could not find {C} column.'.format(C=c)) ValueError: Could not find SIGNED_SUMSTAT column.
2022/08/02/12:45:30 PM Conversion finished at Tue Aug 2 12:45:30 2022 2022/08/02/12:45:30 PM Total time elapsed: 0.0s 2022/08/02/12:45:30 PM Could not find SIGNED_SUMSTAT column. Traceback (most recent call last): File "/home/software/mtag/mtag.py", line 1577, in mtag(args) File "/home/software/mtag/mtag.py", line 1343, in mtag DATA_U, DATA, args = load_and_merge_data(args) File "/home/software/mtag/mtag.py", line 273, in load_and_merge_data GWAS_d[p], sumstats_format[p] = _perform_munge(args, GWAS_d[p], gwas_dat_gen, p) File "/home/software/mtag/mtag.py", line 166, in _perform_munge munged_results = munge_sumstats.munge_sumstats(argnames, write_out=False, new_log=False) File "/home/software/mtag/mtag_munge.py", line 801, in munge_sumstats raise ValueError('Could not find {C} column.'.format(C=c)) ValueError: Could not find SIGNED_SUMSTAT column. 2022/08/02/12:45:30 PM Analysis terminated from error at Tue Aug 2 12:45:30 2022 2022/08/02/12:45:30 PM Total time elapsed: 1.0m:7.76s
— Reply to this email directly, view it on GitHub https://github.com/JonJala/mtag/issues/164, or unsubscribe https://github.com/notifications/unsubscribe-auth/APIOF52XA672YJA63LRMYNTVXISO7ANCNFSM55N364TA . You are receiving this because you are subscribed to this thread.Message ID: @.***>
Hi,
I also have the same problem.
This is my code.
python /home/gyu/mtag/mtag.py
--sumstats MAGIC_INSULIN_SECRETION_AUCins_AUCgluc_for_release_HMrel27_MTAG.txt,MAGIC_INSULIN_SECRETION_DI_for_release_HMrel27_MTAG.txt,MAGIC_INSULIN_SECRETION_ISI_for_release_HMrel27_MTAG.txt
--snp_name spnid
--out ./new
--no_chr_data
--beta_name beta
--p_name pval
--se_name se
--n_min 0.0
--stream_stdout
If I use the option "--use_beta_se", it will raise the error "RuntimeError("Due to bugs in the beta-se code, this option has been temporarily removed from the MTAG software. Dec 2, 2021")".
However, the help document has described that "--beta_name: If specified, it will override the z-score column." Since I specify the "--beta_name", it should override z-score column. However, the MTAG still report that "Beginning MTAG analysis... MTAG will use the Z column for analyses."
So is there anything wrong with current version of MTAG?
After checking the code, it appears that the usage documentation is erroneous (or at least incomplete....the --use-beta-se option would also need to be specified for MTAG to use the beta column). We can update that. In the meantime, the easiest way forward probably would be to use a z score column in your data, which you might need to calculate yourself, as the beta_se mode for MTAG has some bugs in it that have been a difficult to track down.
Hope that helps.
On Tue, Aug 30, 2022 at 9:52 PM CharlesLambert70 @.***> wrote:
Hi,
I also have the same problem. This is my code. python /home/gyu/mtag/mtag.py --sumstats MAGIC_INSULIN_SECRETION_AUCins_AUCgluc_for_release_HMrel27_MTAG.txt,MAGIC_INSULIN_SECRETION_DI_for_release_HMrel27_MTAG.txt,MAGIC_INSULIN_SECRETION_ISI_for_release_HMrel27_MTAG.txt
--snp_name spnid --out ./new --no_chr_data --beta_name beta --p_name pval --se_name se --n_min 0.0 --stream_stdout
If I use the option "--use_beta_se", it will raise the error "RuntimeError("Due to bugs in the beta-se code, this option has been temporarily removed from the MTAG software. Dec 2, 2021")".
However, the help document has described that "--beta_name: If specified, it will override the z-score column." Since I specify the "--beta_name", it should override z-score column. However, the MTAG still report that " Beginning MTAG analysis... MTAG will use the Z column for analyses."
So is there anything wrong with current version of MTAG?
— Reply to this email directly, view it on GitHub https://github.com/JonJala/mtag/issues/164#issuecomment-1232356670, or unsubscribe https://github.com/notifications/unsubscribe-auth/APIOF5YHPJM4FDTYRC66N5TV323GLANCNFSM55N364TA . You are receiving this because you commented.Message ID: @.***>
Thanks! @JonJala