-
Notifications
You must be signed in to change notification settings - Fork 6
Description
Hi, I got MAMA to work. But now I have an issue I can't seem to figure out. I keep getting NaN output because something goes wrong with calculating the omega. When I only run European data I do get output, but when I analyze it with African and Latin data, it seems to drop SNPs.
What could be the issue?
Verbose log file:
2025-02-18 15:29:43,197
<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
<>
<> MAMA: Multi-Ancestry Meta-Analysis
<> Version: 1.0.0
<> (C) 2020 Social Science Genetic Association Consortium (SSGAC)
<> MIT License
<>
<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
<> Software-related correspondence: jjala.ssgac@gmail.com
<> All other correspondence: paturley@broadinstitute.org
<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>2025-02-18 15:29:43,197 See full log at: /hpc/dhl_ec/esmulders/mama/cIMT_FEMALES_MAMA.log
2025-02-18 15:29:43,197
Program executed via:
./mama.py \
--sumstats /hpc/dhl_ec/svanderlaan/projects/consortia/CHARGE_cIMT_Sex/SECOND_ROUND/CHARGE_cIMT_FEMALES_EUR/females_eur/META/input/CHARGE_cIMT_FEMALES_EUR.mama.b37.gwaslab.qc.txt.gz,EUR,FEMALES_cIMT /hpc/dhl_ec/svanderlaan/projects/consortia/CHARGE_cIMT_Sex/SECOND_ROUND/CHARGE_cIMT_FEMALES_AFR/females_afr/META/input/CHARGE_cIMT_FEMALES_AFR.mama.b37.gwaslab.qc.txt.gz,AFR,FEMALES_cIMT \
--ld-scores /hpc/dhl_ec/esmulders/references/MAMA/1kgp3v5.hg19.split_norm_af.AFR_AMR_EUR.FEMALES_maf0_01_geno0_10.ldscore.ldscores.txt \
--out ./cIMT_FEMALES_MAMA \
--verbose \
--use-standardized-units \
--allow-palindromic-snps \
--input-sep \t2025-02-18 15:29:43,197 Printing Pandas' version summary:
2025-02-18 15:29:43,340
INSTALLED VERSIONScommit : 478d340667831908b5b4bf09a2787a11a14560c9
python : 3.9.21.final.0
python-bits : 64
OS : Linux
OS-release : 4.18.0-553.30.1.el8_10.x86_64
Version : #1 SMP Tue Nov 26 18:56:25 UTC 2024
machine : x86_64
processor : x86_64
byteorder : little
LC_ALL : None
LANG : en_US.UTF-8
LOCALE : en_US.UTF-8pandas : 2.0.0
numpy : 1.23.0
pytz : 2025.1
dateutil : 2.9.0.post0
setuptools : 75.8.0
pip : 25.0.1
Cython : None
pytest : None
hypothesis : None
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : None
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : None
IPython : None
pandas_datareader: None
bs4 : None
bottleneck : None
brotli : None
fastparquet : None
fsspec : None
gcsfs : None
matplotlib : None
numba : None
numexpr : None
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : None
pyreadstat : None
pyxlsb : None
s3fs : None
scipy : 1.11.1
snappy : None
sqlalchemy : None
tables : None
tabulate : None
xarray : None
xlrd : None
zstandard : None
tzdata : 2025.1
qtpy : None
pyqt5 : None2025-02-18 15:29:43,341
Program was called with the following arguments:
{'use_standardized_units': True, 'allow_palindromic_snps': True, 'ld_scores': ['/hpc/dhl_ec/esmulders/references/MAMA/1kgp3v5.hg19.split_norm_af.AFR_AMR_EUR.FEMALES_maf0_01_geno0_10.ldscore.ldscores.txt'], 'sumstats': [('/hpc/dhl_ec/svanderlaan/projects/consortia/CHARGE_cIMT_Sex/SECOND_ROUND/CHARGE_cIMT_FEMALES_EUR/females_eur/META/input/CHARGE_cIMT_FEMALES_EUR.mama.b37.gwaslab.qc.txt.gz', 'EUR', 'FEMALES_cIMT'), ('/hpc/dhl_ec/svanderlaan/projects/consortia/CHARGE_cIMT_Sex/SECOND_ROUND/CHARGE_cIMT_FEMALES_AFR/females_afr/META/input/CHARGE_cIMT_FEMALES_AFR.mama.b37.gwaslab.qc.txt.gz', 'AFR', 'FEMALES_cIMT')], 'out': './cIMT_FEMALES_MAMA', 'input_sep': '\t', 'verbose': True}
2025-02-18 15:29:43,401
Regex map = {'SNP': '.SNP.|.RS.', 'BP': '.BP.|.POS.', 'CHR': '.CHR.', 'BETA': '.BETA.', 'FREQ': '.FREQ.|.FRQ.|.*AF', 'SE': '.SE.', 'A1': '.A1.|.MAJOR.|.EFFECT.ALL.|REF.', 'A2': '.A2.|.MINOR.|.OTHER.ALL.|ALT.', 'P': 'P|P.VAL.', 'INFO': 'INFO', 'N': 'N'}
2025-02-18 15:29:43,406
Filter map = {'NO NAN': (<function at 0x7f18d4eceaf0>, "Filters out SNPs with any NaN values in required columns {'FREQ', 'BETA', 'CHR', 'P', 'SE', 'BP', 'A1', 'SNP', 'A2'}"), 'FREQ BOUNDS': (<function create_freq_filter.. at 0x7f18cd9d03a0>, 'Filters out SNPs with FREQ values outside of [0.01, 0.99]'), 'SE BOUNDS': (<function at 0x7f18cd9d0430>, 'Filters out SNPs with non-positive SE values'), 'CHR VALUES': (<function create_chr_filter.. at 0x7f18cd9d04c0>, "Filters out SNPs with listed chromosomes not in ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', 'X', 'Y']"), 'DUPLICATE ALLELE SNPS': (<function at 0x7f18cd9d0550>, 'Filters out SNPs with major allele = minor allele'), 'INVALID ALLELES': (<function at 0x7f18cd9d0670>, "Filters out SNPs with alleles not in {'T', 'G', 'C', 'A'}"), 'NEGATIVE GWAS P': (<function at 0x7f18cd9d0700>, 'Filters out SNPs with negative GWAS P values')}2025-02-18 15:29:43,406 Regression coeffient option (LD) = all_unconstrained
2025-02-18 15:29:43,406 Regression coeffient option (LD Scale) = None
2025-02-18 15:29:43,406 Regression coeffient option (Intercept) = all_unconstrained
2025-02-18 15:29:43,406 Regression coeffient option (SE^2) = offdiag_zero
2025-02-18 15:29:43,406Reading in and running QC on LD Scores
2025-02-18 15:29:43,406
List of files: ['/hpc/dhl_ec/esmulders/references/MAMA/1kgp3v5.hg19.split_norm_af.AFR_AMR_EUR.FEMALES_maf0_01_geno0_10.ldscore.ldscores.txt']
2025-02-18 15:29:43,406 Reading in LD Scores file: /hpc/dhl_ec/esmulders/references/MAMA/1kgp3v5.hg19.split_norm_af.AFR_AMR_EUR.FEMALES_maf0_01_geno0_10.ldscore.ldscores.txt
2025-02-18 15:31:45,171Reading in summary statistics.
2025-02-18 15:31:45,1722025-02-18 15:31:45,172 Reading in ('EUR', 'FEMALES_cIMT') sumstats file: /hpc/dhl_ec/svanderlaan/projects/consortia/CHARGE_cIMT_Sex/SECOND_ROUND/CHARGE_cIMT_FEMALES_EUR/females_eur/META/input/CHARGE_cIMT_FEMALES_EUR.mama.b37.gwaslab.qc.txt.gz
2025-02-18 15:32:48,331
Running QC on ('EUR', 'FEMALES_cIMT') summary statistics
2025-02-18 15:32:48,332 Column mapping = {'BP': 'BP', 'Chr': 'CHR', 'rsID': 'SNP', 'A1': 'A1', 'A2': 'A2', 'EAF': 'FREQ', 'BETA': 'BETA', 'P': 'P', 'SE': 'SE', 'N': 'N'}2025-02-18 15:32:48,333 First set of rows from initial reading of summary stats:
BP Chr rsID A1 A2 EAF BETA P SE N
0 10177 1 1:10177:A:AC AC A 0.401 -0.0005 0.81272 0.0022 11540
1 10352 1 1:10352:T:TA TA T 0.403 0.0004 0.84544 0.0023 11113
2 14599 1 1:14599:T:A A T 0.189 -0.0023 0.41643 0.0029 10585
3 14930 1 1:14930:A:G G A 0.539 0.0034 0.12661 0.0022 10935
4 15903 1 1:15903:G:GC GC G 0.412 -0.0035 0.10523 0.0022 11659
2025-02-18 15:32:48,345
Initial number of SNPs / rows = 8986320���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������� '1:15903:g:gc', '1:63735:ccta:c', '1:129010:aatg:a', '1:249275:g:gt', '1:251627:ac:a', '1:255923:g:gtc', '1:540540:gc:g', '1:612688:tctc:t', '1:668394:ag:a', '1:701779:gaata:g', '1:713131:a:at', '1:732134:t:ta', '1:733581:ca:c', '1:745642:ac:a', '1:746211:a:ag', '1:747753:tgc:t', '1:752307:at:a', '1:760811:ctctt:c', '1:761957:a:at', '1:765155:ttgac:t', '1:769138:cat:c', '1:787069:cag:c', '1:789513:ga:g', '1:797126:gtaat:g', '1:821325:acagt:a', '1:832297:ctg:c', '1:832960:at:a', '1:833172:t:tcgaa', '1:834637:ac:a', '1:837553:ggtgt:g', '1:838329:g:gc', '1:842057:a:aaactcagctgcctctccccttc', '1:842387:a:acc', '1:846600:ct:c', '1:848654:tg:t', '1:849863:g:gactgcccagctc', '1:850425:g:ggtcc', '1:852011:agagccggccct:a', '1:858691:tg:t', '1:868928:a:ag', '1:871042:c:ca', '1:874950:t:tccctggaggacc', '1:875159:agccagtggacgccgacct:a', '1:880639:tc:t', '1:886179:ca:c', '1:893461:tc:t', '1:895755:a:ag', '1:900717:cttat:c', '...']
2025-02-18 15:33:06,577 Filtered out 0 SNPs with "NEGATIVE GWAS P" (Filters out SNPs with negative GWAS P values)
2025-02-18 15:33:06,577 RS IDs = []
2025-02-18 15:33:06,580Filtered out 564607 SNPs in total (as the union of drops, this may be less than the total of all the per-filter drops)
2025-02-18 15:33:06,580 Additionally dropped 0 duplicate SNPs
2025-02-18 15:33:06,580 RS IDs = []
2025-02-18 15:33:06,5922025-02-18 15:33:06,592 Reading in ('AFR', 'FEMALES_cIMT') sumstats file: /hpc/dhl_ec/svanderlaan/projects/consortia/CHARGE_cIMT_Sex/SECOND_ROUND/CHARGE_cIMT_FEMALES_AFR/females_afr/META/input/CHARGE_cIMT_FEMALES_AFR.mama.b37.gwaslab.qc.txt.gz
2025-02-18 15:34:22,988
Running QC on ('AFR', 'FEMALES_cIMT') summary statistics
2025-02-18 15:34:22,989 Column mapping = {'BP': 'BP', 'Chr': 'CHR', 'rsID': 'SNP', 'A1': 'A1', 'A2': 'A2', 'EAF': 'FREQ', 'BETA': 'BETA', 'P': 'P', 'SE': 'SE', 'N': 'N'}2025-02-18 15:34:22,990 First set of rows from initial reading of summary stats:
BP Chr rsID A1 A2 EAF BETA P SE N
0 662622 1 1:662622:G:A A G 0.202 0.0882 0.057074 0.0463 1148
1 693731 1 1:693731:A:G G A 0.196 0.0906 0.052977 0.0468 1165
2 693823 1 1:693823:G:C C G 0.211 0.0694 0.131840 0.0461 1174
3 703942 1 1:703942:G:C C G 0.189 0.0234 0.615080 0.0466 1292
4 705452 1 1:705452:T:A A T 0.193 0.0238 0.607910 0.0463 1299
2025-02-18 15:34:22,998
Initial number of SNPs / rows = 100116082025-02-18 15:34:45,599 Filtered out 0 SNPs with "NO NAN" (Filters out SNPs with any NaN values in required columns {'FREQ', 'BETA', 'CHR', 'P', 'SE', 'BP', 'A1', 'SNP', 'A2'})
2025-02-18 15:34:45,599 RS IDs = []
2025-02-18 15:34:45,599 Filtered out 0 SNPs with "FREQ BOUNDS" (Filters out SNPs with FREQ values outside of [0.01, 0.99])
2025-02-18 15:34:45,599 RS IDs = []
2025-02-18 15:34:45,599 Filtered out 0 SNPs with "SE BOUNDS" (Filters out SNPs with non-positive SE values)
2025-02-18 15:34:45,599 RS IDs = []
2025-02-18 15:34:45,599 Filtered out 0 SNPs with "CHR VALUES" (Filters out SNPs with listed chromosomes not in ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', 'X', 'Y'])
2025-02-18 15:34:45,599 RS IDs = []
2025-02-18 15:34:45,599 Filtered out 0 SNPs with "DUPLICATE ALLELE SNPS" (Filters out SNPs with major allele = minor allele)
2025-02-18 15:34:45,599 RS IDs = []
2025-02-18 15:34:45,599 Filtered out 510337 SNPs with "INVALID ALLELES" (Filters out SNPs with alleles not in {'T', 'G', 'C', 'A'})
2025-02-18 15:34:45,599 RS IDs = ['1:723738:act:a', '1:746037:tac:t', '1:752509:ca:c', '1:764261:tca:t', '1:769138:cat:c', '1:774546:tgaga:t', '1:779797:g:gctcc', '1:780347:tttaa:t', '1:781057:tc:t', '1:789513:ga:g', '1:819121:c:cat', '1:821325:acagt:a', '1:821862:cacagcagctgtgctgtgtt:c', '1:827712:t:ta', '1:832297:ctg:c', '1:833172:t:tcgaa', '1:834637:ac:a', '1:837553:ggtgt:g', '1:838329:g:gc', '1:846600:ct:c', '1:848654:tg:t', '1:848828:ga:g', '1:856513:tc:t', '1:862822:g:gc', '1:875159:agccagtggacgccgacct:a', '1:880639:tc:t', '1:884549:cagag:c', '1:886831:g:gggtca', '1:895037:a:ag', '1:900717:cttat:c', '1:904868:atg:a', '1:905043:cat:c', '1:907170:ag:a', '1:919525:tagtc:t', '1:922305:g:gc', '1:925551:at:a', '1:928849:cag:c', '1:938709:ggggtggatcctgggctgca:g', '1:939491:tg:t', '1:940809:c:ca', '1:945135:g:ga', '1:948846:t:ta', '1:950113:gaagt:g', '1:962036:a:ag', '1:963466:acact:a', '1:975992:gacgtgggt:g', '1:978147:a:ag', '1:978603:cct:c', '1:994395:ag:a', '1:995305:ct:c', '...']
2025-02-18 15:34:45,599 Filtered out 0 SNPs with "NEGATIVE GWAS P" (Filters out SNPs with negative GWAS P values)
2025-02-18 15:34:45,599 RS IDs = []
2025-02-18 15:34:45,603Filtered out 510337 SNPs in total (as the union of drops, this may be less than the total of all the per-filter drops)
2025-02-18 15:34:45,604 Additionally dropped 0 duplicate SNPs
2025-02-18 15:34:45,604 RS IDs = []
2025-02-18 15:34:50,793Number of SNPS in initial intersection of all sources: 5224321
2025-02-18 15:35:10,041
Standardizing reference alleles in summary statistics.
2025-02-18 15:35:19,861 Standardized to population: ('EUR', 'FEMALES_cIMT')
2025-02-18 15:35:19,863 Dropped 0 SNPs during reference allele standardization.
2025-02-18 15:35:19,864 RS IDs of drops during standardization: []
2025-02-18 15:35:24,9902025-02-18 15:35:25,013 Harmonized EUR FEMALES_cIMT mean chi squared: 1.0277880531787356
2025-02-18 15:35:25,033 Harmonized AFR FEMALES_cIMT mean chi squared: 1.0146716506139801
2025-02-18 15:35:25,0332025-02-18 15:35:25,387 Converting ('EUR', 'FEMALES_cIMT') to standardized units
2025-02-18 15:35:25,459 Converting ('AFR', 'FEMALES_cIMT') to standardized units
2025-02-18 15:35:25,650Running LD Score regression.
2025-02-18 15:35:25,650 Options = {'ld_fixed_opt': 'all_unconstrained', 'se_fixed_opt': 'offdiag_zero', 'int_fixed_opt': 'all_unconstrained', 'ld_scale_factor': None}
2025-02-18 15:35:26,750 Received Numpy error: divide by zero (1)
2025-02-18 15:35:27,027 Regression coefficients (LD):
[[-2.11877785e-07 -4.30949835e-05]
[-4.30949835e-05 -1.58572224e-05]]
2025-02-18 15:35:27,027 Regression coefficients (Intercept):
[[ 2.07948130e-06 -3.34591361e-06]
[-3.34591361e-06 3.59172410e-04]]
2025-02-18 15:35:27,028 Regression coefficients (SE^2):
[[0.4876061 0. ]
[0. 0.33165499]]
2025-02-18 15:35:27,028Creating omega and sigma matrices.
2025-02-18 15:36:29,023 Average Omega (including dropped slices) =
[[-9.60234438e-07 -1.11267192e-04]
[-1.11267192e-04 -6.36156502e-05]]
2025-02-18 15:36:29,105 Average Sigma (including dropped slices) =
[[ 3.13543520e-06 -3.34591361e-06]
[-3.34591361e-06 5.03155489e-04]]
2025-02-18 15:36:29,108
Adjusted 0 SNPs to make omega positive semi-definite.
2025-02-18 15:36:29,109 RS IDs = []
2025-02-18 15:36:29,112
Dropped 5224321 SNPs due to non-positive-semi-definiteness of omega.
2025-02-18 15:36:29,321 RS IDs = ['10:10000018:a:g', '10:100000625:a:g', '10:100000645:a:c', '10:100003242:t:g', '10:100003785:t:c', '10:100004360:g:a', '10:100004906:c:a', '10:100004996:g:a', '10:10000514:t:c', '10:100005282:c:t', '10:100007362:g:c', '10:100008436:g:a', '10:100010186:a:g', '10:10001085:g:a', '10:100011114:t:a', '10:100011970:g:a', '10:10001208:t:c', '10:100012739:a:g', '10:100012890:a:g', '10:100013244:a:c', '10:100013438:c:t', '10:100013563:c:t', '10:100013815:c:t', '10:100013977:a:t', '10:100015563:g:c', '10:100015603:g:t', '10:100016313:a:t', '10:100016339:c:t', '10:100017453:t:g', '10:100018238:c:t', '10:100018844:g:a', '10:100019039:g:t', '10:100020572:t:g', '10:100020880:c:t', '10:10002142:g:a', '10:100021533:a:g', '10:100021672:c:t', '10:10002186:g:a', '10:100021983:g:a', '10:100023208:c:t', '10:100023359:t:c', '10:100023614:a:g', '10:100023857:c:g', '10:100023957:t:g', '10:100024195:g:t', '10:100024848:g:a', '10:100025095:t:c', '10:100025816:g:a', '10:100025924:a:g', '10:100026127:t:a', '...']
2025-02-18 15:36:29,324 Dropped 0 SNPs due to non-positive-definiteness of sigma.
2025-02-18 15:36:29,325 RS IDs = []
2025-02-18 15:36:29,328 Dropped 5224321 total SNPs due to non-positive-(semi)-definiteness of omega / sigma.
2025-02-18 15:36:29,460 RS IDs = ['10:10000018:a:g', '10:100000625:a:g', '10:100000645:a:c', '10:100003242:t:g', '10:100003785:t:c', '10:100004360:g:a', '10:100004906:c:a', '10:100004996:g:a', '10:10000514:t:c', '10:100005282:c:t', '10:100007362:g:c', '10:100008436:g:a', '10:100010186:a:g', '10:10001085:g:a', '10:100011114:t:a', '10:100011970:g:a', '10:10001208:t:c', '10:100012739:a:g', '10:100012890:a:g', '10:100013244:a:c', '10:100013438:c:t', '10:100013563:c:t', '10:100013815:c:t', '10:100013977:a:t', '10:100015563:g:c', '10:100015603:g:t', '10:100016313:a:t', '10:100016339:c:t', '10:100017453:t:g', '10:100018238:c:t', '10:100018844:g:a', '10:100019039:g:t', '10:100020572:t:g', '10:100020880:c:t', '10:10002142:g:a', '10:100021533:a:g', '10:100021672:c:t', '10:10002186:g:a', '10:100021983:g:a', '10:100023208:c:t', '10:100023359:t:c', '10:100023614:a:g', '10:100023857:c:g', '10:100023957:t:g', '10:100024195:g:t', '10:100024848:g:a', '10:100025095:t:c', '10:100025816:g:a', '10:100025924:a:g', '10:100026127:t:a', '...']
2025-02-18 15:36:29,460Running main MAMA method.
2025-02-18 15:36:37,462
Preparing results for output.2025-02-18 15:36:37,462 Population 0: ('EUR', 'FEMALES_cIMT')
2025-02-18 15:36:47,576 Received Numpy error: invalid value (8)
2025-02-18 15:36:47,576 Mean Chi^2 for ('EUR', 'FEMALES_cIMT') = nan
2025-02-18 15:36:47,576 Converting ('EUR', 'FEMALES_cIMT') from standardized units
2025-02-18 15:36:47,577 Population 1: ('AFR', 'FEMALES_cIMT')
2025-02-18 15:36:57,791 Received Numpy error: invalid value (8)
2025-02-18 15:36:57,791 Mean Chi^2 for ('AFR', 'FEMALES_cIMT') = nan
2025-02-18 15:36:57,791 Converting ('AFR', 'FEMALES_cIMT') from standardized units
2025-02-18 15:36:58,075
Final SNP count = 0
2025-02-18 15:36:58,751 Writing results to disk.
2025-02-18 15:36:58,751 ./cIMT_FEMALES_MAMA_EUR_FEMALES_cIMT.res
2025-02-18 15:36:58,759 ./cIMT_FEMALES_MAMA_AFR_FEMALES_cIMT.res
2025-02-18 15:36:58,761
Execution complete.