tanlongzhi / dip-c

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

Error with dip-c color #19

Closed bioyuyang closed 5 years ago

bioyuyang commented 5 years ago

Hi @tanlongzhi ,

I just want to make the pipeline work in my server, so I tested following code with the file you provided (tab-delimited).

dip-c color -c color/hg19.cpg.20k.txt cell.3dg | dip-c vis -M -c /dev/stdin cell.3dg > cell.cpg.cif

However, it threw an error like:

[M::color] read a 3D structure with 10 particles at 20000 bp resolution [M::vis] read a 3D structure with 10 particles at 20000 bp resolution Traceback (most recent call last): File "./dip-c", line 130, in main() File "./dip-c", line 75, in main return_value = color.color(sys.argv[1:]) File "/home/XShenLab/DAILY_WORK/LYY/dip-c-master/color.py", line 186, in color color = ref_name_ref_locus_colors[(g3d_particle.get_ref_name(), g3d_particle.get_ref_locus())] File "/home/XShenLab/DAILY_WORK/LYY/dip-c-master/classes.py", line 1181, in get_ref_name return hom_name_to_ref_name_haplotype(self.hom_name)[0] File "/home/XShenLab/DAILY_WORK/LYY/dip-c-master/classes.py", line 40, in hom_name_to_ref_name_haplotype ref_name, haplotype = hom_name.split("(") ValueError: need more than 1 value to unpack [M::main] command: ./dip-c vis -M -c /dev/stdin cell.3dg [M::main] finished in 0.8 sec

cell.3dg:

1 1420000 0.791377837 10.99472914 -13.18828977 1 1440000 -0.268241284 10.52008759 -13.08962573 1 1460000 -1.385307524 10.55137875 -13.14401422 1 1480000 -1.559841017 11.43408291 -13.60263012 1 1500000 -0.770991778 11.47584885 -14.58811372 1 1520000 -0.084824511 12.26246908 -14.35428963 1 1540000 -0.458643807 12.59857918 -13.47011493 1 1560000 -0.810322906 12.2461644 -12.31729334 1 1580000 -2.08211172 12.88868387 -12.87420078 1 1600000 -3.520939482 13.18509354 -12.41186844

Thanks for your help.

tanlongzhi commented 5 years ago

Hi Yuyang,

Thank you for your interest in our work.

Your cell.3dg file seems haploid, because your chromosome names are 1 instead of 1(mat) and 1(pat). This repo can still work on your data if you simply replace all your 1 with for example 1(mat).

bioyuyang commented 5 years ago

Thanks!! It works now~~

tanlongzhi commented 5 years ago

Great. I just updated the README to clarify this (99a56d9).