Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with HESS: pandas.errors.ParserError #38

Open
DaXuanGarden opened this issue Jul 24, 2024 · 1 comment
Open

Issue with HESS: pandas.errors.ParserError #38

DaXuanGarden opened this issue Jul 24, 2024 · 1 comment

Comments

@DaXuanGarden
Copy link

Subject: Issue with HESS: pandas.errors.ParserError

Email Body:

Dear HESS Development Team,

I hope this email finds you well.

I am currently experiencing an issue while using the HESS software and would appreciate your assistance. Below are the command I used and the error message I encountered:

Command:

python ./hess.py \
    --bfile 1kg_eur_1pct \
    --local-rhog RA_Fin.txt Depression_UKB.txt \
    --partition ldetect-data/EUR \
    --out step1 \
    --chrom 22

Full Error Message:

[INFO] @----------------------------------------------------------@
       |         HESS       |      v0.5      |    9/October/2017  |
       |----------------------------------------------------------|
       |  (C) 2017 Huwenbo Shi, GNU General Public License, v3    |
       |----------------------------------------------------------|
       |  For documentation, citation & bug-report instructions:  |
       |   http://bogdan.bioinformatics.ucla.edu/software/hess/   |
       @----------------------------------------------------------@
[INFO] Command started at: Wed, 24 Jul 2024 18:47:01
[INFO] Command issued:
    ./hess.py \
        --bfile 1kg_eur_1pct \
        --local-rhog RA_Fin.txt Depression_UKB.txt \
        --partition ldetect-data/EUR \
        --out step1 \
        --chrom 22
/mnt/data/home/daxuan03/fusion_twas-master/hess-0.5.3-beta/src/refpanel.py:13: FutureWarning: read_table is deprecated, use read_csv instead, passing sep='\t'.
  partition = pd.read_table(filename, delim_whitespace=True)
Traceback (most recent call last):
  File "./hess.py", line 217, in <module>
    main()
  File "./hess.py", line 45, in main
    argmap['out'])
  File "/mnt/data/home/daxuan03/fusion_twas-master/hess-0.5.3-beta/src/estimation.py", line 394, in local_rhog_step1
    partition = load_partition(partition_fnm, chrom)
  File "/mnt/data/home/daxuan03/fusion_twas-master/hess-0.5.3-beta/src/refpanel.py", line 13, in load_partition
    partition = pd.read_table(filename, delim_whitespace=True)
  File "/mnt/data/home/daxuan03/miniconda3/envs/hess_env/lib/python2.7/site-packages/pandas/io/parsers.py", line 702, in parser_f
    return _read(filepath_or_buffer, kwds)
  File "/mnt/data/home/daxuan03/miniconda3/envs/hess_env/lib/python2.7/site-packages/pandas/io/parsers.py", line 429, in _read
    parser = TextFileReader(filepath_or_buffer, **kwds)
  File "/mnt/data/home/daxuan03/miniconda3/envs/hess_env/lib/python2.7/site-packages/pandas/io/parsers.py", line 895, in __init__
    self._make_engine(self.engine)
  File "/mnt/data/home/daxuan03/miniconda3/envs/hess_env/lib/python2.7/site-packages/pandas/io/parsers.py", line 1122, in _make_engine
    self._engine = CParserWrapper(self.f, **self.options)
  File "/mnt/data/home/daxuan03/miniconda3/envs/hess_env/lib/python2.7/site-packages/pandas/io/parsers.py", line 1853, in __init__
    self._reader = parsers.TextReader(src, **kwds)
  File "pandas/_libs/parsers.pyx", line 542, in pandas._libs.parsers.TextReader.__cinit__
  File "pandas/_libs/parsers.pyx", line 751, in pandas._libs.parsers.TextReader._get_header
  File "pandas/_libs/parsers.pyx", line 955, in pandas._libs.parsers.TextReader._tokenize_rows
  File "pandas/_libs/parsers.pyx", line 2172, in pandas._libs.parsers.raise_parser_error
pandas.errors.ParserError: Error tokenizing data. C error: Calling read(nbytes) on source failed. Try engine='python'.

Environment Information:

  • Operating System: Ubuntu 20.04
  • Python Version: 2.7
  • Conda Environment: hess_env
  • HESS Version: 0.5.3-beta
  • Pandas Version: 0.24.2

Input Files:

  • RA_Fin.txt and Depression_UKB.txt are two files containing local genetic correlation data.
  • ldetect-data/EUR is a directory containing the partition information.

Problem Description:
When running the above command, I encountered a pandas.errors.ParserError with the message Error tokenizing data. C error: Calling read(nbytes) on source failed. Try engine='python'..

I have checked the format of the input files and tried different versions of Pandas, but the issue persists. Could you please provide some suggestions or a solution to this problem?

Thank you very much for your assistance!

Best regards,

Daxuan

@DaXuanGarden
Copy link
Author

I've fixed this issue, thank you very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant