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

autocalculate max_distance from chromsize #8

Open
SooLee opened this issue Feb 11, 2019 · 5 comments
Open

autocalculate max_distance from chromsize #8

SooLee opened this issue Feb 11, 2019 · 5 comments
Assignees

Comments

@SooLee
Copy link
Member

SooLee commented Feb 11, 2019

To avoid this kind of error

Traceback (most recent call last):
  File "/usr/local/bin/pairsqc//pairsqc.py", line 372, in <module>
    distance_histogram (args.pairs, args.chrsize, outfilename=PLOT_TABLE_OUT_FILE_PATH, cols = cols, orientation_list = orientation_list, max_logdistance = max_logdist)
  File "/usr/local/bin/pairsqc//pairsqc.py", line 310, in distance_histogram
    ss[bin_number].calculate_contact_probability(bin_mid, bin_size)
  File "/usr/local/bin/pairsqc//pairsqc.py", line 146, in calculate_contact_probability
    self.prob = self.sumcount / self.allpossible_sumcount / bin_size
ZeroDivisionError: division by zero
@SooLee SooLee self-assigned this Feb 11, 2019
@hzjsxu
Copy link

hzjsxu commented Feb 22, 2021

Hi, how can i solve the problem as follows?

Traceback (most recent call last):
  File "/store/jsxu/biosoft/pairsqc/pairsqc.py", line 372, in <module>
    distance_histogram (args.pairs, args.chrsize, outfilename=PLOT_TABLE_OUT_FILE_PATH, cols = cols, orientation_list = orientation_list, max_logdistance = max_logdist)
  File "/store/jsxu/biosoft/pairsqc/pairsqc.py", line 310, in distance_histogram
    ss[bin_number].calculate_contact_probability(bin_mid, bin_size)
  File "/store/jsxu/biosoft/pairsqc/pairsqc.py", line 146, in calculate_contact_probability
    self.prob = self.sumcount / self.allpossible_sumcount / bin_size
ZeroDivisionError: division by zero

@SooLee
Copy link
Member Author

SooLee commented Feb 22, 2021

Hi, are you using it on human data or some other species?

@hzjsxu
Copy link

hzjsxu commented Feb 22, 2021

I'm using X.tropicalis data,and I tried to set the the parameter -M (from 8.4 to 8.3) to be smaller, It works fine.

The largest chromosome for X.tropicalis (X_v10) is 217,471,166bp, log10(217471166) = 8.337402. Can I use 8.3 ?

@SooLee
Copy link
Member Author

SooLee commented Feb 22, 2021

Yes!

@hzjsxu
Copy link

hzjsxu commented Feb 22, 2021

OK! Thanks.

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

2 participants