maxplanck-ie / HiCAssembler

Software to assemble contigs/scaffolds into chromosomes using Hi-C data
27 stars 4 forks source link

TypeError: object of type 'int' has no len() #10

Open xinwang-bio opened 5 years ago

xinwang-bio commented 5 years ago

Hi When I used this tool, I got an error as below. How can I fix it ?

Thanks

Hub-hub contact for bin_id:30767 scaffold: tig00000201_arrow_pilon/5_0 degree: 8 with bin_id: 30766 scaffold: tig00000201_arrow_pilon/4_58 degree:23

############## these cases could introduce problems in the assembly. Thus, node is being removed from the graph. ##############

Traceback (most recent call last): File "/home/xinwang/local/miniconda2/bin/assemble", line 312, in main(args) File "/home/xinwang/local/miniconda2/bin/assemble", line 306, in main super_contigs = assembl.assemble_contigs() File "/home/xinwang/local/miniconda2/lib/python2.7/site-packages/hicassembler/HiCAssembler.py", line 201, in assemble_contigs hub_solving_method='remove weakest') File "/home/xinwang/local/miniconda2/lib/python2.7/site-packages/hicassembler/Scaffolds.py", line 27, in wrapper f_result = func(*args, **kwds) File "/home/xinwang/local/miniconda2/lib/python2.7/site-packages/hicassembler/Scaffolds.py", line 1803, in join_paths_max_span_tree self._remove_weakest(nxG) File "/home/xinwang/local/miniconda2/lib/python2.7/site-packages/hicassembler/Scaffolds.py", line 2002, in _remove_weakest if len(path) < 5: TypeError: object of type 'int' has no len()

fidelram commented 5 years ago

do you have the latest version of HiCExplorer? The .h5 matrix that you are trying to load does not have some information, namely 'correction_factors`

On Sun, Mar 3, 2019 at 4:33 AM Xin Wang notifications@github.com wrote:

Hi When I used this tool, I got an error as below. How can I fix it ?

Thanks

INFO:HiCAssembler:Using previously computed scores: Pimp_10kb_corrected/misassembly_score.txt Pimp_10kb_corrected/zscore_matrix.h5 Traceback (most recent call last): File "/home/xinwang/local/miniconda2/bin/assemble", line 312, in main(args) File "/home/xinwang/local/miniconda2/bin/assemble", line 304, in main scaffolds_to_ignore=args.scaffolds_to_ignore) File "/home/xinwang/local/miniconda2/lib/python2.7/site-packages/hicassembler/HiCAssembler.py", line 88, in init self.load_hic_matrix(hic_file_name, split_misassemblies, split_positions_file, matrix_bin_size) File "/home/xinwang/local/miniconda2/lib/python2.7/site-packages/hicassembler/HiCAssembler.py", line 141, in load_hic_matrix self.split_misassemblies(hic_file_name, split_positions_file) File "/home/xinwang/local/miniconda2/lib/python2.7/site-packages/hicassembler/HiCAssembler.py", line 857, in split_misassemblies ft.hic_ma = HiCMatrix.hiCMatrix(zscore_matrix_file) File "/home/xinwang/local/miniconda2/lib/python2.7/site-packages/hicexplorer/HiCMatrix.py", line 85, in init hiCMatrix.load_h5(matrixFile) File "/home/xinwang/local/miniconda2/lib/python2.7/site-packages/hicexplorer/HiCMatrix.py", line 288, in load_h5 distance_counts = f.root.correction_factors.read() File "/home/xinwang/local/miniconda2/lib/python2.7/site-packages/tables/group.py", line 840, in getattr return self._f_get_child(name) File "/home/xinwang/local/miniconda2/lib/python2.7/site-packages/tables/group.py", line 712, in _f_get_child self._g_check_has_child(childname) File "/home/xinwang/local/miniconda2/lib/python2.7/site-packages/tables/group.py", line 399, in _g_check_has_child % (self._v_pathname, name)) tables.exceptions.NoSuchNodeError: group / does not have a child named correction_factors

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/maxplanck-ie/HiCAssembler/issues/10, or mute the thread https://github.com/notifications/unsubscribe-auth/AEu_1TyBHk_fG7CZSihwVs7C0cX3aDggks5vS0KkgaJpZM4baw7X .

xinwang-bio commented 5 years ago

@fidelram Now. I faced another problem like below. Hub-hub contact for bin_id:30767 scaffold: tig00000201_arrow_pilon/5_0 degree: 8 with bin_id: 30766 scaffold: tig00000201_arrow_pilon/4_58 degree:23

############## these cases could introduce problems in the assembly. Thus, node is being removed from the graph. ##############

Traceback (most recent call last): File "/home/xinwang/local/miniconda2/bin/assemble", line 312, in main(args) File "/home/xinwang/local/miniconda2/bin/assemble", line 306, in main super_contigs = assembl.assemble_contigs() File "/home/xinwang/local/miniconda2/lib/python2.7/site-packages/hicassembler/HiCAssembler.py", line 201, in assemble_contigs hub_solving_method='remove weakest') File "/home/xinwang/local/miniconda2/lib/python2.7/site-packages/hicassembler/Scaffolds.py", line 27, in wrapper f_result = func(*args, **kwds) File "/home/xinwang/local/miniconda2/lib/python2.7/site-packages/hicassembler/Scaffolds.py", line 1803, in join_paths_max_span_tree self._remove_weakest(nxG) File "/home/xinwang/local/miniconda2/lib/python2.7/site-packages/hicassembler/Scaffolds.py", line 2002, in _remove_weakest if len(path) < 5: TypeError: object of type 'int' has no len()

Karimi-81 commented 3 years ago

Hi There, I also encountered with the same issue: WARNING:Scaffolds:

Hub-hub contact for bin_id:9590 scaffold: ptg000031l/8_0 degree: 3 with bin_id: 9921 scaffold: ptg000031l/25_116 degree:4

############## these cases could introduce problems in the assembly. Thus, node is being removed from the graph. ##############

Traceback (most recent call last): File "/home/karimi81/env_HiCAssembler_p27/bin/assemble", line 312, in main(args) File "/home/karimi81/env_HiCAssembler_p27/bin/assemble", line 306, in main super_contigs = assembl.assemble_contigs() File "/home/karimi81/env_HiCAssembler_p27/lib/python2.7/site-packages/hicassembler/HiCAssembler.py", line 201, in assemble_contigs hub_solving_method='remove weakest') File "/home/karimi81/env_HiCAssembler_p27/lib/python2.7/site-packages/hicassembler/Scaffolds.py", line 27, in wrapper f_result = func(*args, **kwds) File "/home/karimi81/env_HiCAssembler_p27/lib/python2.7/site-packages/hicassembler/Scaffolds.py", line 1803, in join_paths_max_span_tree self._remove_weakest(nxG) File "/home/karimi81/env_HiCAssembler_p27/lib/python2.7/site-packages/hicassembler/Scaffolds.py", line 2002, in _remove_weakest if len(path) < 5: TypeError: object of type 'int' has no len()

Did you solve this problem. Can you please guide me to solve it.

grpiccoli commented 1 year ago

I am having the same issue, has anyone solved it?