Skip to content

Using LOGP as P-Val #243

Description

@C-Burden
  • PheWeb 1.3.16
  • I am running Pheweb Process for a single file, and it results in an assertion error since I am using LOGP
  • config.py:
hg_build_number = 38
pval_is_neglog10 = True
field_aliases = {'LOGP': 'pval'}
  • Error Message:
Traceback (most recent call last):
  File "/app001/.local/lib/python3.9/site-packages/pheweb/load/parse_input_files.py", line 70, in convert
    writer.write_all(variants)
  File "/app001/.local/lib/python3.9/site-packages/pheweb/file_utils.py", line 378, in write_all
    for v in variants:
  File "/app001/.local/lib/python3.9/site-packages/pheweb/load/read_input_file.py", line 26, in get_variants
    yield from self._order_refalt_lexicographically(
  File "/app001/.local/lib/python3.9/site-packages/pheweb/load/read_input_file.py", line 59, in _order_refalt_lexicographically
    for v in sorted(tied_variants, key=lambda v:(v['ref'], v['alt'])):
  File "/app001/.local/lib/python3.9/site-packages/pheweb/load/read_input_file.py", line 141, in get_variants
    variant = self._parse_variant(values, colnames, colidx_for_field)
  File "/app001/.local/lib/python3.9/site-packages/pheweb/load/read_input_file.py", line 201, in _parse_variant
    raise PheWebError(
pheweb.utils.PheWebError: failed on field 'pval' attempting to convert value '1.00752' to type <class 'float'> with constraints {'aliases': ['PVALUE', 'P', 'P.VALUE'], 'required': True, 'type': <class 'float'>, 'nullable': True, 'range': [0, 1], 'sigfigs': 2, 'tooltip_lztemplate': {'condition': False, 'template': '{{#if pvalue|is_numeric}}P-value: <strong>{{pvalue|scinotation}}</strong><br>{{/if}}\n{{#if pval|is_numeric}}P-value: <strong>{{pval|scinotation}}</strong><br>{{/if}}'}, 'display': 'P-value', 'from_assoc_files': True} in '/app001/data/008.tsv.gz' on line with values ['1', '783125', 'A', 'G', '0.035415', '85589', '0.128243', '0.0775708', '1.00752'] given colnames ['chrom', 'pos', 'ref', 'alt', 'maf', 'n', 'beta', 'se', 'logp'] and field mapping {'chrom': 0, 'pos': 1, 'ref': 2, 'alt': 3, 'maf': 4, 'beta': 6, 'sebeta': 7, 'pval': 8}
  • Sample of the GWAS file being used
    008.tsv

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions