mtag
mtag copied to clipboard
After merging with reference panel LD, 0 SNPs remain
I got "After merging with reference panel LD, 0 SNPs remain." for my MTAG analysis. I found a previous issue discussing similar warning. But my data do not include ChrX. My SNPs are only on chr1 to chr22. Any idea what problem could it be?
python /$LocationMTAG/mtag.py \
--sumstats $LocationV457/GWAS_V457.txt,$LocationV1698/GWAS_V1698.txt,$LocationV1762/GWAS_V1762.txt,$LocationV2139/GWAS_V2139.txt \
--snp_name SNP \
--a1_name A1 \
--a2_name A2 \
--eaf_name MAF \
--z_name STAT \
--n_name NMISS \
--chr_name CHR \
--bpos_name BP \
--out $LocationSummary/MTAGoutput \
--n_min 0.0 \
--stream_stdout \
--perfect_gencov \
--force &
... Merge of GWAS summary statistics complete. Number of SNPs: 5053091
Using 5053091 SNPs to estimate Omega (0 SNPs excluded due to strand ambiguity)
Estimating sigma..
After merging with reference panel LD, 0 SNPs remain.
Traceback (most recent call last):
File "//rdsgpfs/general/user/jhuang18/home/mtag//mtag.py", line 1567, in <module>
mtag(args)
File "//rdsgpfs/general/user/jhuang18/home/mtag//mtag.py", line 1351, in mtag
args.sigma_hat = estimate_sigma(DATA[not_SA], args)
File "//rdsgpfs/general/user/jhuang18/home/mtag//mtag.py", line 468, in estimate_sigma
rg_results = sumstats_sig.estimate_rg(args_ldsc_rg, Logger_to_Logging())
File "/rdsgpfs/general/user/jhuang18/home/mtag/ldsc_mod/ldscore/sumstats.py", line 423, in estimate_rg
M_annot, w_ld_cname, ref_ld_cnames, sumstats, _ = _read_ld_sumstats(args, log, None, alleles=True, dropna=True,sumstats=p1)
File "/rdsgpfs/general/user/jhuang18/home/mtag/ldsc_mod/ldscore/sumstats.py", line 251, in _read_ld_sumstats
sumstats = _merge_and_log(ref_ld, sumstats, 'reference panel LD', log)
File "/rdsgpfs/general/user/jhuang18/home/mtag/ldsc_mod/ldscore/sumstats.py", line 236, in _merge_and_log
raise ValueError(msg.format(N=len(sumstats), F=noun))
ValueError: After merging with reference panel LD, 0 SNPs remain.
Analysis terminated from error at Wed Apr 10 15:12:08 2019
Total time elapsed: 14.0m:19.49s
Thank you.
Hi @jianvhuang ,
One possibility is that the variants in your input sumstats are not formatted correctly. From the log it seems that you're using the default LD reference panel in the ldsc
/mtag
package. The column used for merging the two datasets is rsID. Have you checked that the SNP identifiers are formatted consistently?
Best, Hui
Thank you Hui, I think that is the problem. I will convert my chr:pos to rsID and try it again.
@huilisabrina hello! I was wondering if there's any information on the ldsc reference panel (hg19 or hg38? rsid indentifiers based in which version). Thank you
Hello Diana,
Sorry for the delayed reply here. Your email made me realize that our documentation isn't as complete as I would like, so it took a little bit of scouting to figure this out.
I'm fairly confident that the build on the LD scores we provide with MTAG is hg19. If you think is wrong though, please let me know and we can look into it further.
Best, Patrick
On Tue, Feb 22, 2022 at 1:25 PM diana.cornejo @.***> wrote:
@huilisabrina https://github.com/huilisabrina hello! I was wondering if there's any information on the ldsc reference panel (hg19 or hg38? rsid indentifiers based in which version). Thank you
— Reply to this email directly, view it on GitHub https://github.com/JonJala/mtag/issues/67#issuecomment-1048087214, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFBUB5KJPBRJKHWUKA4CIVTU4PILLANCNFSM4HE4RBGA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you are subscribed to this thread.Message ID: @.***>
@paturley Patrick thanks, yes I figured out they were hg19...
I have another question, is there any way I could provide my own file with the calculated L2 (although I do not have the CM and all of the chromosomes are in one file). I'm working with the UKBB and these have already been calculated for the EUR population. However I cannot find a way to tell to mtag.py to use this reference instead of the default one in the ld_ref_panel/eur_w_ld_chr
folder
Thanks a lot for your help
You should be able to use the "--ld_ref_panel" flag to do that (see "mtag.py -h" for a full list of flags and options)
@JonJala does this take one one file (with all autosomes), or do the files have to be split by chromosome?
Thanks
It needs to be split by chromosome, much like the panel included in MTAG.
(The help message for the flag: "Specify folder of the ld reference panel (split by chromosome) that will be used in the estimation of the error VCV (sigma). This option is passed to --ref-ld-chr and --w-ld-chr when running LD score regression. The default is to use the reference panel of LD scores computed from 1000 Genomes European subjects (eur_w_ld_chr) that is included with the distribution of MTAG")