Coder Social home page Coder Social logo

hare's People

Contributors

ossmith avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

briannaflynn

hare's Issues

KeyError: 'P' in pandas when running test data with HARE

Dear author,

Firstly, thank you for developing this wonderful tool. I encountered an issue while testing it using the provided code, which is the same as in your tutorial. Here is the code:

hare intersect -g example_files/exampleGWAS.tsv -e reference_assets/harsRichard2020.GRCh37.bed -r reference_assets/UCSC.GRCh37.autosomes.annotation.bed -n 100 --cache_dir /gpfs/home/zhangyue/.vep --cache_version 105 -o hare.test

However, I encountered the following error:

 ----------------------------------------------------------------------
|                                                                      |
|      Welcome to the HARE genetic feature enrichment pipeline.        |
|  Please contact Olivia Smith at [email protected] to report issues.  |
|                                                                      |
 ----------------------------------------------------------------------

-----Workflow started at 2023-12-22 12:39:25.885827.

[args] GWAS summary statistics file: 'example_files/exampleGWAS.tsv'
[args] P-value significance threshold: 1e-06
[args] Minor allele frequency (MAF) threshold: 0.01
[args] VEP cache directory: '/gpfs/home/zhangyue/.vep', version 105
[args] Annotation max distance: 5000
[args] Biotypes included in analysis: protein_all
[args] Reference genome annotation file: 'reference_assets/UCSC.GRCh37.autosomes.annotation.bed'
[args] Reference genome build: GRCh37
[args] Element of interest BED file: 'reference_assets/harsRichard2020.GRCh37.bed'
[args] Simulation draws to be performed: 100
[args] Results will be written to hare.test.*
Loading GWAS summary statistics...OK
OK
Filtering SNPs for analysis...Traceback (most recent call last):
  File "/gpfs/home/zhangyue/anaconda3/envs/hare-env/lib/python3.11/site-packages/pandas/core/indexes/base.py", line 3791, in get_loc
    return self._engine.get_loc(casted_key)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "index.pyx", line 152, in pandas._libs.index.IndexEngine.get_loc
  File "index.pyx", line 181, in pandas._libs.index.IndexEngine.get_loc
  File "pandas/_libs/hashtable_class_helper.pxi", line 7080, in pandas._libs.hashtable.PyObjectHashTable.get_item
  File "pandas/_libs/hashtable_class_helper.pxi", line 7088, in pandas._libs.hashtable.PyObjectHashTable.get_item
KeyError: 'P'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/gpfs/home/zhangyue/anaconda3/envs/hare-env/bin/hare", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/gpfs/home/zhangyue/anaconda3/envs/hare-env/lib/python3.11/site-packages/hare.py", line 83, in main
    run_intersect(intargs)
  File "/gpfs/home/zhangyue/anaconda3/envs/hare-env/lib/python3.11/site-packages/hare.py", line 30, in run_intersect
    intersect.main(**intersect_args)
  File "/gpfs/home/zhangyue/anaconda3/envs/hare-env/lib/python3.11/site-packages/intersect.py", line 591, in main
    snps_filepath = gwas_import(hareParameters, hareSettings)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/gpfs/home/zhangyue/anaconda3/envs/hare-env/lib/python3.11/site-packages/intersect.py", line 231, in gwas_import
    gwas_df[argumentClass.p_col] = gwas_df[argumentClass.p_col].replace(to_replace=list([NaN,"-"]),value=1)
                                   ~~~~~~~^^^^^^^^^^^^^^^^^^^^^
  File "/gpfs/home/zhangyue/anaconda3/envs/hare-env/lib/python3.11/site-packages/pandas/core/frame.py", line 3893, in __getitem__
    indexer = self.columns.get_loc(key)
              ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/gpfs/home/zhangyue/anaconda3/envs/hare-env/lib/python3.11/site-packages/pandas/core/indexes/base.py", line 3798, in get_loc
    raise KeyError(key) from err
KeyError: 'P'

It seems like there is an issue with the 'P' key. Could you please help me understand what is happening?

Thanks in advance, and I hope to receive your early reply.

Gemma

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.