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

problems for loading gz files #2

Open
tuxette opened this issue Feb 22, 2024 · 1 comment
Open

problems for loading gz files #2

tuxette opened this issue Feb 22, 2024 · 1 comment

Comments

@tuxette
Copy link

tuxette commented Feb 22, 2024

Using your example data, python ACCOST.py 40000 example/bins_chr.txt example/info.tab hIMR90 hESC, I run into the problem when trying to load gz files:

Welcome. Starting ACCOST.
Output will be written to output_dir
/usr/lib/python3/dist-packages/scipy/__init__.py:146: UserWarning: A NumPy version >=1.17.3 and <1.25.0 is required for this version of SciPy (detected version 1.26.3
  warnings.warn(f"A NumPy version >={np_minversion} and <{np_maxversion}"
temp directory currently set to: /tmp/tmpq18rbxs0
Reading bin midpoints and mappability from example/bins_chr.txt
Found 3347 bins, including 113 low mappability bins.
Read 1 pairs of files from example/info.tab.
Loading data
Loading biases from example/hIMR90_chr12_r1.biases.gz
Traceback (most recent call last):
  File "/home/nathalie/Downloads/ACCOST/ACCOST_internal.py", line 463, in <module>
    main()
  File "/home/nathalie/Downloads/ACCOST/ACCOST_internal.py", line 341, in main
    matrixA.load_biases(biasfile_A)
  File "/home/nathalie/Downloads/ACCOST/contact_counts.py", line 823, in load_biases
    if '\t' in line or ',' in line:
TypeError: a bytes-like object is required, not 'str'
/usr/lib/python3/dist-packages/scipy/__init__.py:146: UserWarning: A NumPy version >=1.17.3 and <1.25.0 is required for this version of SciPy (detected version 1.26.3
  warnings.warn(f"A NumPy version >={np_minversion} and <{np_maxversion}"
Traceback (most recent call last):
  File "/home/nathalie/Downloads/ACCOST/annotate_pvals.py", line 51, in <module>
    main()
  File "/home/nathalie/Downloads/ACCOST/annotate_pvals.py", line 22, in main
    pvalfh = open(pval_file,'r')
FileNotFoundError: [Errno 2] No such file or directory: 'output_dir/_ln_pvals.txt'
ACCOST Done!

In this precise example, replacing line by line.decode() after lieng 819 of contact_count.py (when relevant) solves the problem but I struggle more with a similar problem due to the use of csv.Sniffer line 106.

@tuxette
Copy link
Author

tuxette commented Feb 22, 2024

python --version
3.10.12

(I can also provide the versions of the loaded module if needed)

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