mtag icon indicating copy to clipboard operation
mtag copied to clipboard

Beta, SE and sample size flags

Open nay421 opened this issue 6 years ago • 5 comments

I note the new --beta_name and --se_name flags in the most recent version of mtag script. I also read somewhere in the forum that beta and standard errors should be standardized beforehand. My phenotype is a quantitative variable which has been inverse normal rank-transformed. Do I still need standardized GWAS summary betas and ses for mtag?

Secondly, the GWAS summary statistics table from BOLT-LMM does not include the sample size column. Of course, the overall sample size of the phenotype is known. Is it ok to create a new column with a single overall sample size in the summary stats for mtag script? The wiki page on ldsc summary stats (https://github.com/bulik/ldsc/wiki/Summary-Statistics-File-Format) mentioned that the sample size may vary from SNP to SNP. What is the best way to obtain SNP-specific sample sizes?

nay421 avatar Jul 25 '18 16:07 nay421

Hi @nay421 ,

Right now the --beta and --se flags are placed as an alternative to the --z flag. So essentially a single Z=Beta/SE step is added before MTAG analyses if you use --beta together with --se. Eventually we'll allow MTAG to take and use beta+se columns, so you won't need to prepare or input Z nor N if you have BETA and SE (see here). However this has not been fully implemented yet.

In terms of the sample size, I've personally encountered the same issue before with the BOLT-LMM results. It'll be slightly less accurate, but using a hard-coded number for the N column may be the best way to get around here. I'm not sure how to obtain SNP-specific sample size information.

@paturley Do you have any comments on these?

Best, Hui

huilisabrina avatar Jul 25 '18 17:07 huilisabrina

Thanks @huilisabrina. So I presume that it does not matter whether the GWAS betas are standardized or not since we are calculating a simple ratio for Z-score.

nay421 avatar Jul 26 '18 08:07 nay421

Hi @nay421,

You don't need to standardize the phenotype, but whether or not you do so, MTAG results will correspond to a phenotype that had been standardized (but the genotype has not been). So if you want betas and SEs that are in the same units as the original summary stats, you'll need to transform them afterwards.

Re using BOLT-LMM results: I think that you'd be fine if you just use the known size of the sample you input. As long as there is not huge variation in N across SNPs, you'd almost certainly be fine. If you wanted to be really careful, you could run BOLT on a standardized phenotype, take the SEs, and estimate the implicit N as N=1/[SE^22p*(1-p)] where p is the allele frequency. That should give you numbers that are quite close to the N of the sample, but it would account for differences in N across SNPs.

On Thu, Jul 26, 2018 at 4:19 AM nay421 [email protected] wrote:

Thanks @huilisabrina https://github.com/huilisabrina. So I presume that it does not matter whether the GWAS betas are standardized or not since we are calculating a simple ratio for Z-score.

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/omeed-maghzian/mtag/issues/37#issuecomment-408016821, or mute the thread https://github.com/notifications/unsubscribe-auth/AUNA9RDTag8aDrhgO_LtAtHH1Qt02j9gks5uKXuigaJpZM4VgYAJ .

paturley avatar Jul 26 '18 14:07 paturley

Hi @nay421 ,

MTAG has been updated now to handle the Beta/SE input. Please feel free to repull the master and try using the --beta_name and --se_name options. The output will be in the same unit as the original input sumstats.

Thanks, Hui

huilisabrina avatar Aug 28 '18 19:08 huilisabrina

Thanks @huilisabrina . I will repull the repo and run it again.

nay421 avatar Sep 03 '18 13:09 nay421