Closed dupontct closed 1 year ago
Code and data to replicate issue, note next time please provide both code and data that will replicate the issue so we can assist:
a <- MungeSumstats::formatted_example()
a[,N:=100]
a[,N_studies:=100]
data.table::setcolorder(a,c('SNP','CHR','BP','A1','A2','N','N_studies',
'FRQ','BETA','SE','P'))
a[,P2:=P]
a[,P3:=P]
a[,P4:=P]
data.table::setnames(a,c('rsID', 'CHROM', 'POS_b37', 'REF', 'ALT', 'N',
'N_studies', 'POOLED_ALT_AF', 'EFFECT_SIZE', 'SE',
'pvalue_neg_log10', 'pvalue', 'pvalue_neg_log10_GC',
'pvalue_GC'))
MungeSumstats::format_sumstats(a,ref_genome='grch37')
So I have updated MSS (v1.9.7), available in the dev bioc in a few days or from the master branch on this github now, adding a parameter ignore_multi_trait
to format_sumstats()
which will ignore any multi-trait p-values if set to TRUE. I believe this will cover your issue? The above example will now run with:
MungeSumstats::format_sumstats(a,ref_genome='grch37',dbSNP=144,ignore_multi_trait=TRUE)
Let me know if this doesn't work as expected.
Thanks, Alan.
Closing because of inactivity, feel free to reopen if this doesn't clear things up
I have a GWAS sumstat with headers:
rsID, CHROM, POS_b37, REF, ALT, N, N_studies, POOLED_ALT_AF, EFFECT_SIZE, SE, pvalue_neg_log10, pvalue, pvalue_neg_log10_GC, pvalue_GC
format_sumstats
identifies that there are are multiple traits of NEG_LOG10, NEG_LOG10_GC, and GC. I know that theanalysis_trait
argument can be used to select eitherpvalue_neg_log10
,pvalue_neg_log10_GC
orpvalue_GC
, but I need to use the columnpvalue
for the P-value.