tanlongzhi / dip-c

Tools to analyze Dip-C (or other 3C/Hi-C) data
61 stars 18 forks source link

remove repetitive (contact-less) regions encountered a problem #54

Open LHXqwq opened 1 year ago

LHXqwq commented 1 year ago

I want to remove repetitive (contact-less) regions, so I run the following command:

for rep in seq 1 3 do /home/lihaoxing/dip-c-master/scripts/hickit_3dg_to_3dg_rescale_unit.sh 20k.${rep}.3dg /home/lihaoxing/dip-c-master/dip-c clean3 -c 4-262-1.impute.con.gz 20k.${rep}.dip-c.3dg > 20k.${rep}.clean.3dg # remove repetitive (contact-less) regions done

and then there is a problem, how should I solve it?

Traceback (most recent call last): File "/home/lihaoxing/dip-c-master/dip-c", line 130, in main() File "/home/lihaoxing/dip-c-master/dip-c", line 65, in main import clean3 File "/home/lihaoxing/dip-c-master/clean3.py", line 5, in from classes import Haplotypes, LegData, ConData, file_to_con_data, Leg, Par, ParData, G3dData, file_to_g3d_data File "/home/lihaoxing/dip-c-master/classes.py", line 6, in from scipy import interpolate File "/home/lihaoxing/miniconda3/lib/python3.9/site-packages/scipy/init.py", line 131 raise ImportError(msg) from e ^ SyntaxError: invalid syntax

tanlongzhi commented 1 year ago

Thank you @LHXqwq for your interest. Currently this repo only runs on Python 2

LHXqwq commented 1 year ago

Thank you very much for your reply. Since the scipy module is not installed in python2, calling the python3 module causes an error. Currently this problem is solved, but another error appears:

[M::clean3] read a 3D structure with 235052 particles at 20000 bp resolution [M::clean3] read 2144 contacts (99.72% intra-chromosomal, 100.0% legs phased) [M::clean3] sorted 4288 legs Traceback (most recent call last): File "/home/lihaoxing/dip-c-master/dip-c", line 130, in main() File "/home/lihaoxing/dip-c-master/dip-c", line 66, in main return_value = clean3.clean3(sys.argv[1:]) File "/home/lihaoxing/dip-c-master/clean3.py", line 59, in clean3 leg_counts = g3d_data.leg_counts(leg_data, max_clean_distance) File "/home/lihaoxing/dip-c-master/classes.py", line 1383, in leg_counts leg_counts.extend(g3d_list.leg_counts(leg_data, max_distance)) File "/home/lihaoxing/dip-c-master/classes.py", line 1283, in leg_counts return [leg_data.num_legs_near_g3d_particle(g3d_particle, max_distance) for g3d_particle in self.g3d_particles] File "/home/lihaoxing/dip-c-master/classes.py", line 428, in num_legs_near_g3d_particle return self.leg_lists[g3d_particle.get_ref_name()].num_legs_near_g3d_particle(g3d_particle, max_distance) KeyError: '15'