Skip to main content

munger for GWAS summary statistics.

Project description

smunger

pypi python

License: MIT

munger for GWAS summary statistics

Features

  • define column properties

    • required columns: CHR, BP, EA, NEA
    • optional columns: BETA, SE, P, EAF, MAF
    • Auxiliary columns: OR, OR_SE, Z
    • Data types
    • Data ranges
    • Allow missing values and default missing values
  • semi-automatically header mapping

    • read first five rows and display in terminal
    • guess header map by common column names
    • manually check if the mapping is correct
    • input the right column number if it is wrong
    • check if OR, OR_SE, Z are present if BETA, SE are absent
    • save the final column map to json for further munging
  • data munging

    • EA ≠ NEA
    • if EAF presents, MAF = min(EAF, 1-EAF)
    • convert OR/ORSE to BETA/SE, if BETA, SE are absent and OR, ORSE are present
    • remove duplicate SNPs with same chr-bp-sorted(EA,NEA), keep the one with lowest P
    • output: \t separated, bgzip compress, tabix index.
    • optional output: significant SNPs, munge report
    CHR BP rsID EA NEA EAF MAF BETA SE P OR OR_SE Z
    type int int str str str float float float float float float float float
    allow null False False True False False False False True False True True False True
    null value 0 0.999 1 0
    range [1,23] (0,inf) only contains ‘ACGT’ only contains ‘ACGT’ [0,1] [0,0.5] (-inf,inf) (0, inf) (0,1) (0, inf) (0, inf) (-inf,inf)
  • liftover

    • guess genome build
    • liftover
  • annotate

    • annotate rsID

Credits

This package was created with Cookiecutter and the waynerv/cookiecutter-pypackage project template.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

smunger-0.0.27.tar.gz (1.4 MB view details)

Uploaded Source

Built Distribution

smunger-0.0.27-py3-none-any.whl (18.7 kB view details)

Uploaded Python 3

File details

Details for the file smunger-0.0.27.tar.gz.

File metadata

  • Download URL: smunger-0.0.27.tar.gz
  • Upload date:
  • Size: 1.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.4

File hashes

Hashes for smunger-0.0.27.tar.gz
Algorithm Hash digest
SHA256 4710264f1df211f48e475419f657e7b06406d98c1c7a649e6c25ecfad5c66761
MD5 fac05abad75eb5266e2d6646a59b1ec2
BLAKE2b-256 d1ab04ae1c6b6596ecf9ac6d41a98e36070650501c6763e17c94a423a9bd74bf

See more details on using hashes here.

File details

Details for the file smunger-0.0.27-py3-none-any.whl.

File metadata

  • Download URL: smunger-0.0.27-py3-none-any.whl
  • Upload date:
  • Size: 18.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.4

File hashes

Hashes for smunger-0.0.27-py3-none-any.whl
Algorithm Hash digest
SHA256 6e1bd3e2f24b9f45d1dfddc1f0124e57325c2dc607b28326046488ff0b7155f5
MD5 d9ce005a6f421b3e71676f28eeeac8eb
BLAKE2b-256 90e847ee0e28cca0f2fd80d026da9533f045b5a3f58a0e197866798bd15e22c8

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page