Hi @tanlongzhi
Thanks for your powerful hickit and dip-c package. It is great. I met the same problem as issue3 when I tried to convert my .3dg file to a cif file using this code
dip-c color -n color/hg19.chr.txt cell.3dg | dip-c vis -c /dev/stdin cell.3dg > cell.n.cif
And get an error like
python ./dip-c/dip-c color -n hg19.chr.txt clear_pbmc.3dg
Traceback (most recent call last):
File ".../dip-c", line 130, in <module>
main()
File ".../dip-c/dip-c", line 75, in main
return_value = color.color(sys.argv[1:])
File ".../dip-c/color.py", line 218, in color
g3d_data = file_to_g3d_data(open(args[0], "rb"))
File ".../dip-c/classes.py", line 1427, in file_to_g3d_data
g3d_data.add_g3d_particle(string_to_g3d_particle(g3d_file_line.strip()))
File ".../dip-c/classes.py", line 1214, in string_to_g3d_particle
hom_name, ref_locus, x, y, z = g3d_particle_string.split("\t")
TypeError: a bytes-like object is required, not 'str'
I have already used the grep -v "^#" hickit.3dg ' > dip-c.3dg code to delete the headers and I am using diploid data.
I try to use NXT-43.250kb.hickit.3dg.zip from tarak77 to figure out the problem. After using his file and grep -v "^#" hickit.3dg | awk -F'[\t,]' -v OFS='\t' '{print $1 "(pat)",$2,$3,$4,$5}' > dip-c.3dg. I still get the same error.
I also download the Dip-c original dataset from GSM3271347 and process the "GSM3271347_gm12878_01.impute3.round4.clean.3dg.txt.gz" file to figure out the issue and the problem still exists when I want to convert this file to a cif file.
python ./dip-c/dip-c color -n hg19.chr.txt impute3.round4.clean.3dg.txt
Traceback (most recent call last):
File "../dip-c/dip-c", line 130, in <module>
main()
File ".../dip-c/dip-c", line 75, in main
return_value = color.color(sys.argv[1:])
File ".../dip-c/color.py", line 218, in color
g3d_data = file_to_g3d_data(open(args[0], "rb"))
File ".../dip-c/classes.py", line 1427, in file_to_g3d_data
g3d_data.add_g3d_particle(string_to_g3d_particle(g3d_file_line.strip()))
File ".../dip-c/classes.py", line 1214, in string_to_g3d_particle
hom_name, ref_locus, x, y, z = g3d_particle_string.split("\t")
TypeError: a bytes-like object is required, not 'str'
Could you please help me with that? Any kind of help is really appreciated.
Wish you a great day.
Hi @tanlongzhi
Thanks for your powerful hickit and dip-c package. It is great. I met the same problem as issue3 when I tried to convert my .3dg file to a cif file using this code
dip-c color -n color/hg19.chr.txt cell.3dg | dip-c vis -c /dev/stdin cell.3dg > cell.n.cif
And get an error likeI have already used the
grep -v "^#" hickit.3dg ' > dip-c.3dg
code to delete the headers and I am using diploid data. I try to use NXT-43.250kb.hickit.3dg.zip from tarak77 to figure out the problem. After using his file andgrep -v "^#" hickit.3dg | awk -F'[\t,]' -v OFS='\t' '{print $1 "(pat)",$2,$3,$4,$5}' > dip-c.3dg
. I still get the same error. I also download the Dip-c original dataset from GSM3271347 and process the "GSM3271347_gm12878_01.impute3.round4.clean.3dg.txt.gz" file to figure out the issue and the problem still exists when I want to convert this file to a cif file.Could you please help me with that? Any kind of help is really appreciated. Wish you a great day.