Repository: bioforensics/MicroHapDB (language: python)

Issue:
Pandas 1.2 causes test suite failures
Recent CI builds (see #68) were failing when installing the latest version (1.2) of Pandas. It appears the whitespace padding has changed a bit, which will require extensive updates to the test suite if we want to support higher versions of Pandas.

To be clear, I don't think this is a priority, but just a reminder in case pandas ≥ 1.2 support is desired or needed in the future. For now, `pandas<1.2` has been pinned in `setup.py`.


Discussion / hints:

Fix patch:
diff --git a/.github/workflows/cibuild.yml b/.github/workflows/cibuild.yml
index 7d18acd6..38e2afa1 100644
--- a/.github/workflows/cibuild.yml
+++ b/.github/workflows/cibuild.yml
@@ -9,7 +9,7 @@ jobs:
     strategy:
       max-parallel: 4
       matrix:
-        python-version: [3.6, 3.7, 3.8]
+        python-version: [3.7, 3.8, 3.9]
 
     steps:
     - uses: actions/checkout@v1
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 2a6c0d6c..09ddd78b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -8,6 +8,9 @@ This project adheres to [Semantic Versioning](http://semver.org/).
 - Markers and population frequency data (1000 Genomes and proprietary) for the mMHseq 90-plex panel (see #68).
 - New `--extend-mode` option when displaying markers in `fasta` or `detail` mode (see #72).
 
+### Changed
+- Support for pandas>=1.2 added, support for Python 3.6 dropped (see #74).
+
 ### Fixed
 - Error message when detail view is requested for a marker without frequency information (see #67).
 - Problematic haplotype frequencies for 4 mMHseq markers including SNPs whose rsIDs are not present in the original 1KGP data (see #73).
diff --git a/setup.py b/setup.py
index b7231ac4..4dcef67f 100644
--- a/setup.py
+++ b/setup.py
@@ -32,7 +32,7 @@
         'microhapdb': ['microhapdb/data/*', 'microhapdb/data/tests/*']
     },
     include_package_data=True,
-    install_requires=['pandas<1.2'],
+    install_requires=['pandas>=1.2'],
     entry_points={
         'console_scripts': ['microhapdb = microhapdb.cli:main']
     },


Test patch:
diff --git a/microhapdb/tests/test_cli.py b/microhapdb/tests/test_cli.py
index 412e0971..3187208a 100644
--- a/microhapdb/tests/test_cli.py
+++ b/microhapdb/tests/test_cli.py
@@ -93,10 +93,10 @@ def test_main_pop_query(capsys):
     microhapdb.cli.main(args)
     out, err = capsys.readouterr()
     testout = '''
-               ID    Name                        Source
- MHDBP-3dab7bdd14  Africa  10.1016/j.fsigen.2018.05.008
- MHDBP-936bc36f79    Asia  10.1016/j.fsigen.2018.05.008
- MHDBP-383d86606a      NL  10.1016/j.fsigen.2018.05.008
+              ID   Name                       Source
+MHDBP-3dab7bdd14 Africa 10.1016/j.fsigen.2018.05.008
+MHDBP-936bc36f79   Asia 10.1016/j.fsigen.2018.05.008
+MHDBP-383d86606a     NL 10.1016/j.fsigen.2018.05.008
 '''
     print(out)
     assert testout.strip() == out.strip()
@@ -120,24 +120,26 @@ def test_main_marker_detail(capsys):
 def test_main_marker_query(capsys):
     args = get_parser().parse_args(['marker', '--query', 'Chrom == "chr19"'])
     microhapdb.cli.main(args)
-    out, err = capsys.readouterr()
-    testout = '''
-         Name          PermID Reference  Chrom                                                         Offsets      Ae      In     Fst                          Source
- mh19USC-19pA  MHDBM-2d713eab    GRCh38  chr19                                            561778,561795,561815  2.7453  0.0870  0.0733    10.1016/j.fsigen.2019.102213
-   mh19KK-056  MHDBM-d6ff8635    GRCh38  chr19                                                 4852124,4852324  2.4391  0.0773  0.1760                          ALFRED
-   mh19CP-007  MHDBM-49dbcc57    GRCh38  chr19                                      14310739,14310772,14310780  3.0813  0.0466  0.0776                          ALFRED
- mh19USC-19pB  MHDBM-76427274    GRCh38  chr19                    16040864,16040894,16040899,16040921,16040929  3.5107  0.1647  0.0731    10.1016/j.fsigen.2019.102213
-    mh19NH-23  MHDBM-dd72537b    GRCh38  chr19                                      22052723,22052774,22052817  1.9380  0.0414 -0.0124  10.1016/j.legalmed.2015.06.003
- mh19KKCS-299  MHDBM-a70896aa    GRCh38  chr19  22546697,22546702,22546748,22546779,22546810,22546829,22546850     NaN     NaN     NaN    10.1016/j.fsigen.2020.102275
-   mh19KK-299  MHDBM-8cbeb11c    GRCh38  chr19                    22546697,22546748,22546779,22546810,22546850  4.1592  0.2335  0.1102                          ALFRED
-    mh19AT-47  MHDBM-8f439540    GRCh38  chr19                                      22546697,22546748,22546779  2.4025  0.1298  0.1170                   ISFG2019:P597
- mh19USC-19qA  MHDBM-f757e745    GRCh38  chr19                             33273771,33273785,33273811,33273816  3.3219  0.1127  0.0880    10.1016/j.fsigen.2019.102213
-   mh19KK-301  MHDBM-2069446a    GRCh38  chr19                             50938487,50938502,50938526,50938550  1.9707  0.2673  0.1698                          ALFRED
- mh19KKCS-300  MHDBM-bc8b7213    GRCh38  chr19  50947786,50947789,50947790,50947830,50947876,50947877,50947967     NaN     NaN     NaN    10.1016/j.fsigen.2020.102275
-   mh19KK-057  MHDBM-eb558c37    GRCh38  chr19                                      51654948,51655025,51655062  2.3266  0.0667  0.0428                          ALFRED
- mh19USC-19qB  MHDBM-7b40359b    GRCh38  chr19                                      53714387,53714389,53714413  4.0756  0.1368  0.0163    10.1016/j.fsigen.2019.102213
+    terminal = capsys.readouterr()
+    exp_out = '''
+        Name         PermID Reference Chrom                                                        Offsets     Ae     In     Fst                         Source
+mh19USC-19pA MHDBM-2d713eab    GRCh38 chr19                                           561778,561795,561815 2.7453 0.0870  0.0733   10.1016/j.fsigen.2019.102213
+  mh19KK-056 MHDBM-d6ff8635    GRCh38 chr19                                                4852124,4852324 2.4391 0.0773  0.1760                         ALFRED
+  mh19CP-007 MHDBM-49dbcc57    GRCh38 chr19                                     14310739,14310772,14310780 3.0813 0.0466  0.0776                         ALFRED
+mh19USC-19pB MHDBM-76427274    GRCh38 chr19                   16040864,16040894,16040899,16040921,16040929 3.5107 0.1647  0.0731   10.1016/j.fsigen.2019.102213
+   mh19NH-23 MHDBM-dd72537b    GRCh38 chr19                                     22052723,22052774,22052817 1.9380 0.0414 -0.0124 10.1016/j.legalmed.2015.06.003
+mh19KKCS-299 MHDBM-a70896aa    GRCh38 chr19 22546697,22546702,22546748,22546779,22546810,22546829,22546850    NaN    NaN     NaN   10.1016/j.fsigen.2020.102275
+  mh19KK-299 MHDBM-8cbeb11c    GRCh38 chr19                   22546697,22546748,22546779,22546810,22546850 4.1592 0.2335  0.1102                         ALFRED
+   mh19AT-47 MHDBM-8f439540    GRCh38 chr19                                     22546697,22546748,22546779 2.4025 0.1298  0.1170                  ISFG2019:P597
+mh19USC-19qA MHDBM-f757e745    GRCh38 chr19                            33273771,33273785,33273811,33273816 3.3219 0.1127  0.0880   10.1016/j.fsigen.2019.102213
+  mh19KK-301 MHDBM-2069446a    GRCh38 chr19                            50938487,50938502,50938526,50938550 1.9707 0.2673  0.1698                         ALFRED
+mh19KKCS-300 MHDBM-bc8b7213    GRCh38 chr19 50947786,50947789,50947790,50947830,50947876,50947877,50947967    NaN    NaN     NaN   10.1016/j.fsigen.2020.102275
+  mh19KK-057 MHDBM-eb558c37    GRCh38 chr19                                     51654948,51655025,51655062 2.3266 0.0667  0.0428                         ALFRED
+mh19USC-19qB MHDBM-7b40359b    GRCh38 chr19                                     53714387,53714389,53714413 4.0756 0.1368  0.0163   10.1016/j.fsigen.2019.102213
 '''
-    assert testout.strip() == out.strip()
+    obs_out = terminal.out
+    print(obs_out)
+    assert exp_out.strip() == obs_out.strip()
 
 
 def test_main_marker_fasta_default_delta(capsys):
@@ -205,10 +207,10 @@ def test_main_marker_panel(capsys):
         microhapdb.cli.main(args)
     terminal = capsys.readouterr()
     testout = '''
-       Name          PermID Reference  Chrom                     Offsets      Ae      In     Fst  Source
- mh06KK-101  MHDBM-8a2c760e    GRCh38   chr6         170280714,170280900  1.6705  0.2296  0.2590  ALFRED
- mh15KK-058  MHDBM-d6c594d2    GRCh38  chr15  28120284,28120471,28120586  2.2110  0.3799  0.0862  ALFRED
- mh20KK-035  MHDBM-92f3685a    GRCh38  chr20             2088698,2088728  2.1328  0.2104  0.2180  ALFRED
+      Name         PermID Reference Chrom                    Offsets     Ae     In    Fst Source
+mh06KK-101 MHDBM-8a2c760e    GRCh38  chr6        170280714,170280900 1.6705 0.2296 0.2590 ALFRED
+mh15KK-058 MHDBM-d6c594d2    GRCh38 chr15 28120284,28120471,28120586 2.2110 0.3799 0.0862 ALFRED
+mh20KK-035 MHDBM-92f3685a    GRCh38 chr20            2088698,2088728 2.1328 0.2104 0.2180 ALFRED
 '''
     print(terminal.out)
     assert testout.strip() == terminal.out.strip()
@@ -318,8 +320,8 @@ def test_lookup(capsys):
     args = get_parser().parse_args(arglist)
     microhapdb.cli.main(args)
     out, err = capsys.readouterr()
-    assert 'mh09KK-033  MHDBM-8458b727    GRCh38  chr9         680713,680762,680790  2.9343  0.1008  0.0504         ALFRED' in out
-    assert ' mh09AT-15  MHDBM-b46abf2e    GRCh38  chr9  680713,680762,680767,680790  2.9471  0.1160  0.0602  ISFG2019:P597' in out
+    assert 'mh09KK-033 MHDBM-8458b727    GRCh38  chr9        680713,680762,680790 2.9343 0.1008 0.0504        ALFRED' in out
+    assert ' mh09AT-15 MHDBM-b46abf2e    GRCh38  chr9 680713,680762,680767,680790 2.9471 0.1160 0.0602 ISFG2019:P597' in out
 
 
 def test_ae_pop(capsys):
@@ -328,14 +330,15 @@ def test_ae_pop(capsys):
     microhapdb.cli.main(args)
     terminal = capsys.readouterr()
     exp_out = '''
-         Name          PermID Reference  Chrom                                          Offsets      Ae      In     Fst                        Source
- mh18PK-87558  MHDBM-1e5374f1    GRCh38  chr18  1960542,1960557,1960561,1960566,1960582,1960588  1.9767  0.1325  0.0494  10.1016/j.fsigen.2018.05.008
- mh18USC-18pA  MHDBM-56dfa93b    GRCh38  chr18          5280017,5280020,5280070,5280071,5280093  1.8402  0.2130  0.1818  10.1016/j.fsigen.2019.102213
-   mh18CP-005  MHDBM-a85754d3    GRCh38  chr18                  8892864,8892893,8892896,8892907  3.3873  0.0904  0.0059                        ALFRED
-   mh18KK-285  MHDBM-ea520d26    GRCh38  chr18              24557354,24557431,24557447,24557489  2.6188  0.1721  0.0836                        ALFRED
-    mh18AT-38  MHDBM-db09ec41    GRCh38  chr18                       24557431,24557447,24557489  2.6144  0.1419  0.0837                 ISFG2019:P597
+        Name         PermID Reference Chrom                                         Offsets     Ae     In    Fst                       Source
+mh18PK-87558 MHDBM-1e5374f1    GRCh38 chr18 1960542,1960557,1960561,1960566,1960582,1960588 1.9767 0.1325 0.0494 10.1016/j.fsigen.2018.05.008
+mh18USC-18pA MHDBM-56dfa93b    GRCh38 chr18         5280017,5280020,5280070,5280071,5280093 1.8402 0.2130 0.1818 10.1016/j.fsigen.2019.102213
+  mh18CP-005 MHDBM-a85754d3    GRCh38 chr18                 8892864,8892893,8892896,8892907 3.3873 0.0904 0.0059                       ALFRED
+  mh18KK-285 MHDBM-ea520d26    GRCh38 chr18             24557354,24557431,24557447,24557489 2.6188 0.1721 0.0836                       ALFRED
+   mh18AT-38 MHDBM-db09ec41    GRCh38 chr18                      24557431,24557447,24557489 2.6144 0.1419 0.0837                ISFG2019:P597
 '''
     obs_out = terminal.out
+    print(obs_out)
     assert exp_out.strip() == obs_out.strip()
 
 
@@ -352,15 +355,16 @@ def test_hg37(capsys):
     microhapdb.cli.main(args)
     terminal = capsys.readouterr()
     exp_out = '''
-         Name          PermID Reference  Chrom                                          Offsets      Ae      In     Fst                        Source
- mh18PK-87558  MHDBM-1e5374f1    GRCh37  chr18  1960543,1960558,1960562,1960567,1960583,1960589  2.3659  0.1325  0.0494  10.1016/j.fsigen.2018.05.008
- mh18USC-18pA  MHDBM-56dfa93b    GRCh37  chr18          5280016,5280019,5280069,5280070,5280092  3.4330  0.2130  0.1818  10.1016/j.fsigen.2019.102213
-   mh18CP-005  MHDBM-a85754d3    GRCh37  chr18                  8892862,8892891,8892894,8892905  3.6722  0.0904  0.0059                        ALFRED
-   mh18KK-285  MHDBM-ea520d26    GRCh37  chr18              22137318,22137395,22137411,22137453  2.7524  0.1721  0.0836                        ALFRED
-    mh18AT-38  MHDBM-db09ec41    GRCh37  chr18                       22137395,22137411,22137453  2.7093  0.1419  0.0837                 ISFG2019:P597
-   mh18CP-003  MHDBM-6fdf83f9    GRCh37  chr18                       23068395,23068425,23068433  3.1124  0.1061  0.0183                        ALFRED
+        Name         PermID Reference Chrom                                         Offsets     Ae     In    Fst                       Source
+mh18PK-87558 MHDBM-1e5374f1    GRCh37 chr18 1960543,1960558,1960562,1960567,1960583,1960589 2.3659 0.1325 0.0494 10.1016/j.fsigen.2018.05.008
+mh18USC-18pA MHDBM-56dfa93b    GRCh37 chr18         5280016,5280019,5280069,5280070,5280092 3.4330 0.2130 0.1818 10.1016/j.fsigen.2019.102213
+  mh18CP-005 MHDBM-a85754d3    GRCh37 chr18                 8892862,8892891,8892894,8892905 3.6722 0.0904 0.0059                       ALFRED
+  mh18KK-285 MHDBM-ea520d26    GRCh37 chr18             22137318,22137395,22137411,22137453 2.7524 0.1721 0.0836                       ALFRED
+   mh18AT-38 MHDBM-db09ec41    GRCh37 chr18                      22137395,22137411,22137453 2.7093 0.1419 0.0837                ISFG2019:P597
+  mh18CP-003 MHDBM-6fdf83f9    GRCh37 chr18                      23068395,23068425,23068433 3.1124 0.1061 0.0183                       ALFRED
 '''
     obs_out = terminal.out
+    print(obs_out)
     assert exp_out.strip() == obs_out.strip()
 
 
@@ -416,19 +420,19 @@ def test_hg37_detail(capsys):
     assert exp_out.strip() == obs_out.strip()
 
 
-def test_h37_ae_pop(capsys):
+def test_hg37_ae_pop(capsys):
     arglist = ['marker', '--region=chr18:50000000-80000000', '--GRCh37', '--ae-pop=PJL']
     args = get_parser().parse_args(arglist)
     microhapdb.cli.main(args)
     terminal = capsys.readouterr()
     exp_out = '''
-         Name          PermID Reference  Chrom                                                         Offsets      Ae      In     Fst                        Source
- mh18USC-18qB  MHDBM-14fcada5    GRCh37  chr18                                      50547498,50547528,50547540  3.8565  0.1449  0.0500  10.1016/j.fsigen.2019.102213
- mh18USC-18qC  MHDBM-6bf74efc    GRCh37  chr18                             63842523,63842541,63842557,63842562  3.5570  0.1436 -0.0049  10.1016/j.fsigen.2019.102213
- mh18KKCS-293  MHDBM-350bd971    GRCh37  chr18  76089731,76089843,76089884,76089885,76089906,76089944,76089967     NaN     NaN     NaN  10.1016/j.fsigen.2020.102275
-   mh18KK-293  MHDBM-13ed6da8    GRCh37  chr18                             76089885,76089906,76089944,76089967  2.6445  0.2495  0.0837                        ALFRED
-    mh18AT-39  MHDBM-13ed6da8    GRCh37  chr18                             76089885,76089906,76089944,76089967  2.6445  0.2495  0.0837                 ISFG2019:P597
-
+        Name         PermID Reference Chrom                                                        Offsets     Ae     In     Fst                       Source
+mh18USC-18qB MHDBM-14fcada5    GRCh37 chr18                                     50547498,50547528,50547540 3.8565 0.1449  0.0500 10.1016/j.fsigen.2019.102213
+mh18USC-18qC MHDBM-6bf74efc    GRCh37 chr18                            63842523,63842541,63842557,63842562 3.5570 0.1436 -0.0049 10.1016/j.fsigen.2019.102213
+mh18KKCS-293 MHDBM-350bd971    GRCh37 chr18 76089731,76089843,76089884,76089885,76089906,76089944,76089967    NaN    NaN     NaN 10.1016/j.fsigen.2020.102275
+  mh18KK-293 MHDBM-13ed6da8    GRCh37 chr18                            76089885,76089906,76089944,76089967 2.6445 0.2495  0.0837                       ALFRED
+   mh18AT-39 MHDBM-13ed6da8    GRCh37 chr18                            76089885,76089906,76089944,76089967 2.6445 0.2495  0.0837                ISFG2019:P597
 '''
     obs_out = terminal.out
+    print(obs_out)
     assert exp_out.strip() == obs_out.strip()
diff --git a/microhapdb/tests/test_frequency.py b/microhapdb/tests/test_frequency.py
index 55e336e1..a9af50ad 100644
--- a/microhapdb/tests/test_frequency.py
+++ b/microhapdb/tests/test_frequency.py
@@ -64,11 +64,11 @@ def test_allele_frequencies():
 
 
 @pytest.mark.parametrize('marker,pop,allele,data', [
-    ('mh22KK-064', 'SA000009J', 'A,A,T,AATAATT', 'mh22KK-064  SA000009J  A,A,T,AATAATT      0.828'),
-    ('mh06PK-24844', 'MHDBP-383d86606a', 'C,C,G,C,C,C,A,A,A,A', 'mh06PK-24844  MHDBP-383d86606a  C,C,G,C,C,C,A,A,A,A      0.005'),
-    ('mh20AT-40', 'MHDBP-7c055e7ee8', 'T,C,G', 'mh20AT-40  MHDBP-7c055e7ee8  T,C,G     0.0806'),
-    ('mh11NH-17', 'MHDBP-63967b883e', 'C,G,G', 'mh11NH-17  MHDBP-63967b883e  C,G,G      0.153'),
-    ('mh01CP-016', 'MHDBP-48c2cfb2aa', 'T,G,A', 'mh01CP-016  MHDBP-48c2cfb2aa  T,G,A     0.2916'),
+    ('mh22KK-064', 'SA000009J', 'A,A,T,AATAATT', 'mh22KK-064  SA000009J A,A,T,AATAATT      0.828'),
+    ('mh06PK-24844', 'MHDBP-383d86606a', 'C,C,G,C,C,C,A,A,A,A', 'mh06PK-24844 MHDBP-383d86606a C,C,G,C,C,C,A,A,A,A      0.005'),
+    ('mh20AT-40', 'MHDBP-7c055e7ee8', 'T,C,G', 'mh20AT-40 MHDBP-7c055e7ee8  T,C,G     0.0806'),
+    ('mh11NH-17', 'MHDBP-63967b883e', 'C,G,G', 'mh11NH-17 MHDBP-63967b883e  C,G,G      0.153'),
+    ('mh01CP-016', 'MHDBP-48c2cfb2aa', 'T,G,A', 'mh01CP-016 MHDBP-48c2cfb2aa  T,G,A     0.2916'),
 ])
 def test_all_sources(marker, pop, allele, data, capsys):
     arglist = ['frequency', '--marker', marker, '--population', pop, '--allele', allele]
diff --git a/microhapdb/tests/test_marker.py b/microhapdb/tests/test_marker.py
index 1d5f3059..2618148f 100644
--- a/microhapdb/tests/test_marker.py
+++ b/microhapdb/tests/test_marker.py
@@ -56,10 +56,11 @@ def test_marker_table(capsys):
     marker = microhapdb.markers[microhapdb.markers.Name == 'mh04CP-003']
     microhapdb.marker.print_table(marker)
     testout = '''
-       Name          PermID Reference Chrom                  Offsets      Ae      In     Fst  Source
- mh04CP-003  MHDBM-2be52d8b    GRCh38  chr4  4324722,4324735,4324749  2.9151  0.1668  0.0321  ALFRED
+      Name         PermID Reference Chrom                 Offsets     Ae     In    Fst Source
+mh04CP-003 MHDBM-2be52d8b    GRCh38  chr4 4324722,4324735,4324749 2.9151 0.1668 0.0321 ALFRED
 '''
     terminal = capsys.readouterr()
+    print(terminal.out)
     assert terminal.out.strip() == testout.strip()
 
 
@@ -75,12 +76,12 @@ def test_marker_table_multi(capsys):
  mh10PK-62104  MHDBM-5f9c6cab    GRCh38  chr10  127392565,127392577,127392596,127392610,127392...  2.0068  0.0482  0.1032  10.1016/j.fsigen.2018.05.008
 '''
     testoutlong = '''
-         Name          PermID Reference  Chrom                                                                                    Offsets      Ae      In     Fst                        Source
- mh06PK-24844  MHDBM-aa39cbba    GRCh38   chr6  13861392,13861399,13861414,13861421,13861430,13861434,13861438,13861439,13861440,13861446     NaN     NaN     NaN  10.1016/j.fsigen.2018.05.008
- mh06PK-25713  MHDBM-7d00efdc    GRCh38   chr6                                      31196949,31196961,31196972,31196985,31196992,31197001  2.9544  0.0898  0.0681  10.1016/j.fsigen.2018.05.008
- mh07PK-38311  MHDBM-3ae6dc1b    GRCh38   chr7                                                        52677450,52677456,52677462,52677508  3.2638  0.1000  0.1927  10.1016/j.fsigen.2018.05.008
- mh08PK-46625  MHDBM-840756f3    GRCh38   chr8                                                            1194352,1194356,1194364,1194371  2.3775  0.1132  0.1395  10.1016/j.fsigen.2018.05.008
- mh10PK-62104  MHDBM-5f9c6cab    GRCh38  chr10                      127392565,127392577,127392596,127392610,127392611,127392620,127392632  2.0068  0.0482  0.1032  10.1016/j.fsigen.2018.05.008
+        Name         PermID Reference Chrom                                                                                   Offsets     Ae     In    Fst                       Source
+mh06PK-24844 MHDBM-aa39cbba    GRCh38  chr6 13861392,13861399,13861414,13861421,13861430,13861434,13861438,13861439,13861440,13861446    NaN    NaN    NaN 10.1016/j.fsigen.2018.05.008
+mh06PK-25713 MHDBM-7d00efdc    GRCh38  chr6                                     31196949,31196961,31196972,31196985,31196992,31197001 2.9544 0.0898 0.0681 10.1016/j.fsigen.2018.05.008
+mh07PK-38311 MHDBM-3ae6dc1b    GRCh38  chr7                                                       52677450,52677456,52677462,52677508 3.2638 0.1000 0.1927 10.1016/j.fsigen.2018.05.008
+mh08PK-46625 MHDBM-840756f3    GRCh38  chr8                                                           1194352,1194356,1194364,1194371 2.3775 0.1132 0.1395 10.1016/j.fsigen.2018.05.008
+mh10PK-62104 MHDBM-5f9c6cab    GRCh38 chr10                     127392565,127392577,127392596,127392610,127392611,127392620,127392632 2.0068 0.0482 0.1032 10.1016/j.fsigen.2018.05.008
 '''
     terminal = capsys.readouterr()
     print(terminal.out)
@@ -91,12 +92,12 @@ def test_marker_table_multi_notrunc(capsys):
     markers = microhapdb.markers.query('Name.str.contains("PK")', engine='python').head(n=5)
     microhapdb.marker.print_table(markers, trunc=False)
     testoutlong = '''
-         Name          PermID Reference  Chrom                                                                                    Offsets      Ae      In     Fst                        Source
- mh06PK-24844  MHDBM-aa39cbba    GRCh38   chr6  13861392,13861399,13861414,13861421,13861430,13861434,13861438,13861439,13861440,13861446     NaN     NaN     NaN  10.1016/j.fsigen.2018.05.008
- mh06PK-25713  MHDBM-7d00efdc    GRCh38   chr6                                      31196949,31196961,31196972,31196985,31196992,31197001  2.9544  0.0898  0.0681  10.1016/j.fsigen.2018.05.008
- mh07PK-38311  MHDBM-3ae6dc1b    GRCh38   chr7                                                        52677450,52677456,52677462,52677508  3.2638  0.1000  0.1927  10.1016/j.fsigen.2018.05.008
- mh08PK-46625  MHDBM-840756f3    GRCh38   chr8                                                            1194352,1194356,1194364,1194371  2.3775  0.1132  0.1395  10.1016/j.fsigen.2018.05.008
- mh10PK-62104  MHDBM-5f9c6cab    GRCh38  chr10                      127392565,127392577,127392596,127392610,127392611,127392620,127392632  2.0068  0.0482  0.1032  10.1016/j.fsigen.2018.05.008
+        Name         PermID Reference Chrom                                                                                   Offsets     Ae     In    Fst                       Source
+mh06PK-24844 MHDBM-aa39cbba    GRCh38  chr6 13861392,13861399,13861414,13861421,13861430,13861434,13861438,13861439,13861440,13861446    NaN    NaN    NaN 10.1016/j.fsigen.2018.05.008
+mh06PK-25713 MHDBM-7d00efdc    GRCh38  chr6                                     31196949,31196961,31196972,31196985,31196992,31197001 2.9544 0.0898 0.0681 10.1016/j.fsigen.2018.05.008
+mh07PK-38311 MHDBM-3ae6dc1b    GRCh38  chr7                                                       52677450,52677456,52677462,52677508 3.2638 0.1000 0.1927 10.1016/j.fsigen.2018.05.008
+mh08PK-46625 MHDBM-840756f3    GRCh38  chr8                                                           1194352,1194356,1194364,1194371 2.3775 0.1132 0.1395 10.1016/j.fsigen.2018.05.008
+mh10PK-62104 MHDBM-5f9c6cab    GRCh38 chr10                     127392565,127392577,127392596,127392610,127392611,127392620,127392632 2.0068 0.0482 0.1032 10.1016/j.fsigen.2018.05.008
 '''
     terminal = capsys.readouterr()
     print(terminal.out)
@@ -485,14 +486,14 @@ def test_amplicon_object(capsys):
 
 
 @pytest.mark.parametrize('name,data', [
-    ('mh04KK-010', 'mh04KK-010  MHDBM-07c8d144    GRCh38  chr4  1985210,1985244  2.9226  0.1306  0.0406  ALFRED'),
-    ('mh08PK-46625', 'mh08PK-46625  MHDBM-840756f3    GRCh38  chr8  1194352,1194356,1194364,1194371  2.3775  0.1132  0.1395  10.1016/j.fsigen.2018.05.008'),
-    ('mh04AT-10', 'mh04AT-10  MHDBM-07c8d144    GRCh38  chr4  1985210,1985244  2.9226  0.1306  0.0406  ISFG2019:P597'),
-    ('mh01NH-03', 'mh01NH-03  MHDBM-e7a95c5e    GRCh38  chr1  184807944,184807966,184808042  1.9086  0.1987  0.1725  10.1016/j.legalmed.2015.06.003'),
-    ('mh04CP-004', 'mh04CP-004  MHDBM-8408d717    GRCh38  chr4  7402842,7402854,7402870  2.6744  0.0477  0.061  10.1016/j.fsigen.2019.02.018'),
-    ('mh03LV-07', 'mh03LV-07  MHDBM-5f7e29b6    GRCh38  chr3  5783508,5783509,5783518,5783523,5783525,5783531,5783541,5783542,5783543,5783544,5783552,5783562,5783564,5783571,5783577,5783607,5783608,5783611,5783612,5783617,5783618,5783619,5783623,5783626,5783635,5783648,5783652,5783653,5783663,5783664,5783671,5783672,5783673,5783676,5783677,5783678,5783681,5783684,5783687,5783695,5783704,5783705  14.0275  1.081  0.057  10.1016/j.fsigen.2018.05.001'),
-    ('mh09USC-9pB', 'mh09USC-9pB  MHDBM-7da7af40    GRCh38  chr9  31196676,31196714,31196731,31196744  3.0919  0.1616  0.0574  10.1016/j.fsigen.2019.102213'),
-    ('mh13KKCS-223', 'mh13KKCS-223  MHDBM-3ca7e2fc    GRCh38  chr13  110154341,110154351,110154394,110154411,110154438,110154441,110154485,110154504 NaN NaN  NaN  10.1016/j.fsigen.2020.102275')
+    ('mh04KK-010', 'mh04KK-010 MHDBM-07c8d144    GRCh38  chr4 1985210,1985244 2.9226 0.1306 0.0406 ALFRED'),
+    ('mh08PK-46625', 'mh08PK-46625 MHDBM-840756f3    GRCh38  chr8 1194352,1194356,1194364,1194371 2.3775 0.1132 0.1395 10.1016/j.fsigen.2018.05.008'),
+    ('mh04AT-10', 'mh04AT-10 MHDBM-07c8d144    GRCh38  chr4 1985210,1985244 2.9226 0.1306 0.0406 ISFG2019:P597'),
+    ('mh01NH-03', 'mh01NH-03 MHDBM-e7a95c5e    GRCh38  chr1 184807944,184807966,184808042 1.9086 0.1987 0.1725 10.1016/j.legalmed.2015.06.003'),
+    ('mh04CP-004', 'mh04CP-004 MHDBM-8408d717    GRCh38  chr4 7402842,7402854,7402870 2.6744 0.0477 0.061 10.1016/j.fsigen.2019.02.018'),
+    ('mh03LV-07', 'mh03LV-07 MHDBM-5f7e29b6    GRCh38  chr3 5783508,5783509,5783518,5783523,5783525,5783531,5783541,5783542,5783543,5783544,5783552,5783562,5783564,5783571,5783577,5783607,5783608,5783611,5783612,5783617,5783618,5783619,5783623,5783626,5783635,5783648,5783652,5783653,5783663,5783664,5783671,5783672,5783673,5783676,5783677,5783678,5783681,5783684,5783687,5783695,5783704,5783705 14.0275 1.081 0.057 10.1016/j.fsigen.2018.05.001'),
+    ('mh09USC-9pB', 'mh09USC-9pB MHDBM-7da7af40    GRCh38  chr9 31196676,31196714,31196731,31196744 3.0919 0.1616 0.0574 10.1016/j.fsigen.2019.102213'),
+    ('mh13KKCS-223', 'mh13KKCS-223 MHDBM-3ca7e2fc    GRCh38 chr13 110154341,110154351,110154394,110154411,110154438,110154441,110154485,110154504 NaN NaN  NaN 10.1016/j.fsigen.2020.102275')
 ])
 def test_all_sources(name, data, capsys):
     marker = microhapdb.markers[microhapdb.markers.Name == name]
diff --git a/microhapdb/tests/test_population.py b/microhapdb/tests/test_population.py
index d84c1f99..3ea90bc5 100644
--- a/microhapdb/tests/test_population.py
+++ b/microhapdb/tests/test_population.py
@@ -63,10 +63,11 @@ def test_pop_table(capsys):
     masai = microhapdb.populations[microhapdb.populations.Name == 'Masai']
     microhapdb.population.print_table(masai)
     testout = '''
-        ID   Name  Source
- SA000854R  Masai  ALFRED
+       ID  Name Source
+SA000854R Masai ALFRED
 '''
     terminal = capsys.readouterr()
+    print(terminal.out)
     assert terminal.out.strip() == testout.strip()
 
 
@@ -74,12 +75,13 @@ def test_pop_table_multi(capsys):
     hanchinese = microhapdb.populations[microhapdb.populations.Name == 'Han']
     microhapdb.population.print_table(hanchinese)
     testout = '''
-               ID Name                        Source
- MHDBP-48c2cfb2aa  Han  10.1016/j.fsigen.2019.02.018
-        SA000001B  Han                        ALFRED
-        SA000009J  Han                        ALFRED
+              ID Name                       Source
+MHDBP-48c2cfb2aa  Han 10.1016/j.fsigen.2019.02.018
+       SA000001B  Han                       ALFRED
+       SA000009J  Han                       ALFRED
 '''
     terminal = capsys.readouterr()
+    print(terminal.out)
     assert terminal.out.strip() == testout.strip()
 
 
@@ -161,11 +163,11 @@ def test_pop_detail_multi(capsys):
 
 
 @pytest.mark.parametrize('ident,data', [
-    ('SA000019K', 'SA000019K  Russians  ALFRED'),
-    ('MHDBP-936bc36f79', 'MHDBP-936bc36f79  Asia  10.1016/j.fsigen.2018.05.008'),
-    ('MHDBP-7c055e7ee8', 'MHDBP-7c055e7ee8  Swedish  ISFG2019:P597'),
-    ('MHDBP-63967b883e', 'MHDBP-63967b883e  Japanese  10.1016/j.legalmed.2015.06.003'),
-    ('MHDBP-48c2cfb2aa', 'MHDBP-48c2cfb2aa  Han  10.1016/j.fsigen.2019.02.018'),
+    ('SA000019K', 'SA000019K Russians ALFRED'),
+    ('MHDBP-936bc36f79', 'MHDBP-936bc36f79 Asia 10.1016/j.fsigen.2018.05.008'),
+    ('MHDBP-7c055e7ee8', 'MHDBP-7c055e7ee8 Swedish ISFG2019:P597'),
+    ('MHDBP-63967b883e', 'MHDBP-63967b883e Japanese 10.1016/j.legalmed.2015.06.003'),
+    ('MHDBP-48c2cfb2aa', 'MHDBP-48c2cfb2aa  Han 10.1016/j.fsigen.2019.02.018'),
 ])
 def test_all_sources(ident, data, capsys):
     pop = microhapdb.populations[microhapdb.populations.ID == ident]