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

Out of range #66

Open
Lucas446 opened this issue Apr 11, 2023 · 8 comments
Open

Out of range #66

Lucas446 opened this issue Apr 11, 2023 · 8 comments

Comments

@Lucas446
Copy link

Hi

I have an out of range issue even using the output of hicpro2fithic

bash /Users/tlucas/.pyenv/shims/fithic -i DifferentialResult/diff_analysis/fithic_run/NB_esc_20Kb_fithic/interactions.txt.gz -f DifferentialResult/diff_analysis/fithic_run/NB_esc_20Kb_fithic/fragments.txt.gz -t /Users/tlucas/dcHiC/RESULTS/biases/NB_esc_20Kb.biases.gz -U 10000000 -o DifferentialResult/diff_analysis/fithic_run/NB_esc_20Kb_fithic/fithic_result -r 20000 


GIVEN FIT-HI-C ARGUMENTS
=========================
Reading fragments file from: DifferentialResult/diff_analysis/fithic_run/NB_esc_20Kb_fithic/fragments.txt.gz
Reading interactions file from: DifferentialResult/diff_analysis/fithic_run/NB_esc_20Kb_fithic/interactions.txt.gz
Output path created DifferentialResult/diff_analysis/fithic_run/NB_esc_20Kb_fithic/fithic_result
Fixed size option detected... Fast version of FitHiC will be used
Resolution is 20.0 kb
Reading bias file from: /Users/tlucas/dcHiC/RESULTS/biases/NB_esc_20Kb.biases.gz
The number of spline passes is 1
The number of bins is 100
The number of reads required to consider an interaction is 1
The name of the library for outputted files will be FitHiC
Upper Distance threshold is 10000000
Lower Distance threshold is 0
Only intra-chromosomal regions will be analyzed
Lower bound of bias values is 0.5
Upper bound of bias values is 2
All arguments processed. Running FitHiC now...
=========================


Reading the contact counts file to generate bins...
Interactions file read. Time took 4.374690055847168
Fragments file read. Time took 0.01379704475402832
Traceback (most recent call last):
  File "/Users/tlucas/.pyenv/versions/3.7.3/bin/fithic", line 11, in <module>
    load_entry_point('fithic==2.0.8', 'console_scripts', 'fithic')()
  File "/Users/tlucas/.pyenv/versions/3.7.3/lib/python3.7/site-packages/fithic/fithic.py", line 327, in main
    biasDic = read_biases(biasFile)
  File "/Users/tlucas/.pyenv/versions/3.7.3/lib/python3.7/site-packages/fithic/fithic.py", line 808, in read_biases
    chrom=words[0]; midPoint=int(words[1]); bias=float(words[2])
IndexError: list index out of range
[1] 1
Taking input= as a system command ('gzip -dc DifferentialResult/diff_analysis/fithic_run/NB_St14_r1_20Kb_fithic/fithic_result/FitHiC.spline_pass1.res20000.significances.txt.gz') and a variable has been used in the expression passed to `input=`. Please use fread(cmd=...). There is a security concern if you are creating an app, and the app could have a malicious user, and the app is not running in a secure environment; e.g. the app is running as root. Please read item 5 in the NEWS file for v1.11.6 for more information and for the option to suppress this message.
gzip: can't stat: DifferentialResult/diff_analysis/fithic_run/NB_St14_r1_20Kb_fithic/fithic_result/FitHiC.spline_pass1.res20000.significances.txt.gz (DifferentialResult/diff_analysis/fithic_run/NB_St14_r1_20Kb_fithic/fithic_result/FitHiC.spline_pass1.res20000.significances.txt.gz.gz): No such file or directory
Error in setnames(x, value) : 
  Can't assign 7 names to a 0 column data.table
Calls: fithicformat ... colnames<- -> names<- -> names<-.data.table -> setnames
In addition: Warning message:
In data.table::fread(paste0("gzip -dc ", diffdir, "/fithic_run/",  :
  File '/var/folders/0h/h1zqy6251n1dq_nw_050nmdc0000gn/T//RtmpuHmiEu/filee5fa48801a2c' has size 0. Returning a NULL data.table.
Execution halted

Thanks a lot !

@rrdai77
Copy link

rrdai77 commented Nov 22, 2023

Hi! I've encountered the same issue. Have you resolved this issue?

@ay-lab
Copy link
Owner

ay-lab commented Nov 23, 2023

Hi, this is generally about file formatting and having wrong number of fields in one of the input files. I could help best if you paste a few of the lines from each input file.

@rrdai77
Copy link

rrdai77 commented Nov 24, 2023

I have an error while running fithic:

Command:
fithic -f 02_hicpro2fithic/fithic.fragmentMappability.gz -i 02_hicpro2fithic/fithic.interactionCounts.gz -t 02_hicpro2fithic/fithic.biases.gz -r 10000 -o 02_fithic_outputs

My input files are created by the hicpro2fithic.py of HiC-Pro_3.1.0 (version), and the output biases file (fithic.biases.gz) is blank every other line, but not in HiC-Pro_2.11.1 (versions). So I wonder if it's the version issue of subscripts (hicpro2fithic.py)?

input files: (hicpro2fithic.py of HiC-Pro_3.1.0)
zcat fithic.biases.gz | head

chr1 5000 -1

chr1 15000 -1

chr1 25000 -1

chr1 35000 -1

chr1 45000 -1

chr1 55000 -1

zcat fithic.fragmentMappability.gz | head
chr1 0 5000 0 0
chr1 10000 15000 0 0
chr1 20000 25000 0 0
chr1 30000 35000 0 0
chr1 40000 45000 0 0
chr1 50000 55000 0 0

zcat fithic.interactionCounts.gz | head
chr1 3005000 chr1 3005000 166
chr1 3005000 chr1 3015000 142
chr1 3005000 chr1 3025000 90
chr1 3005000 chr1 3035000 42
chr1 3005000 chr1 3045000 15
chr1 3005000 chr1 3055000 51

The following input files for fithic are error-free!

input files: (hicpro2fithic.py of HiC-Pro_2.11.1)
zcat fithic.biases.gz | head

chr1 5000 -1
chr1 15000 -1
chr1 25000 -1
chr1 35000 -1
chr1 45000 -1
chr1 55000 -1

So is it because of the version issue?

@ay-lab
Copy link
Owner

ay-lab commented Nov 24, 2023

Blank lines will do it. Please remove all the blank lines and try. I will get in touch with HiCPro developers about this. Or you can post this on their github issues if you don't mind.

@rrdai77
Copy link

rrdai77 commented Nov 25, 2023

Thanks! It is error-free after removing all the blank lines, but how to avoid the blank lines in the output biases file (fithic.biases.gz) of hicpro2fithic.py from HiC-Pro_3.1.0 (python3)? That's what needs to be resolved.

@ay-lab
Copy link
Owner

ay-lab commented Nov 25, 2023

I posted it on HiCpro github. They should take care of it soon, an extra \n in Line 87 of the script. Likely got introduced during Python 3 conversion.

@rrdai77
Copy link

rrdai77 commented Nov 25, 2023

Thanks! That's great!

@thekingofall
Copy link

thanks."zcat fithic.biases.gz | grep -v '^$' | gzip > fithic.biases2.gz"

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

4 participants