CPhasing icon indicating copy to clipboard operation
CPhasing copied to clipboard

ERROR Couldn't run first cluster.

Open linguoliang opened this issue 9 months ago • 5 comments

您好!我们最近在用你们的软件进行组装具体参数如下 cphasing pipeline -f asm.hic.p_utg.fa -hic1 fastq/merge_R1.fastq.gz -hic2 fastq/merge_R1.fastq.gz -t 10 -n 0:0 -hic-mapper-k 27 -hic-mapper-w 14 在聚类的时候报了如下错误: ERROR Couldn't run first cluster. cli.py:1180 ╭───── Traceback (most recent call last) ──────╮ │ /public/home/lgl_xy/software/CPhasing/cphasi │ │ ng/cli.py:1113 in pipeline │ │ │ │ 1110 │ │ │ 1111 │ today = datetime.now().strftime(" │ │ 1112 │ try: │ │ ❱ 1113 │ │ run(fasta, │ │ 1114 │ │ │ ul_data, │ │ 1115 │ │ │ porec_data, │ │ 1116 │ │ │ porectable, pairs, │ │ │ │ /public/home/lgl_xy/software/CPhasing/cphasi │ │ ng/pipeline/pipeline.py:1061 in run │ │ │ │ 1058 │ │ │ out_sh.write("\n") │ │ 1059 │ │ │ │ 1060 │ │ try: │ │ ❱ 1061 │ │ │ hyperpartition.main(args= │ │ 1062 │ │ │ │ │ │ │ prog_name │ │ 1063 │ │ except SystemExit as e: │ │ 1064 │ │ │ exc_info = sys.exc_info() │ │ │ │ /public/home/lgl_xy/software/CPhasing/.pixi/ │ │ envs/default/lib/python3.12/site-packages/ri │ │ ch_click/rich_command.py:126 in main │ │ │ │ 123 │ │ try: │ │ 124 │ │ │ try: │ │ 125 │ │ │ │ with self.make_context │ │ ❱ 126 │ │ │ │ │ rv = self.invoke(c │ │ 127 │ │ │ │ │ if not standalone │ │ 128 │ │ │ │ │ │ return rv │ │ 129 │ │ │ │ │ # it's not safe to │ │ │ │ /public/home/lgl_xy/software/CPhasing/.pixi/ │ │ envs/default/lib/python3.12/site-packages/cl │ │ ick/core.py:1443 in invoke │ │ │ │ 1440 │ │ │ echo(style(message, fg="r │ │ 1441 │ │ │ │ 1442 │ │ if self.callback is not None: │ │ ❱ 1443 │ │ │ return ctx.invoke(self.ca │ │ 1444 │ │ │ 1445 │ def shell_complete(self, ctx: Con │ │ 1446 │ │ """Return a list of completio │ │ │ │ /public/home/lgl_xy/software/CPhasing/.pixi/ │ │ envs/default/lib/python3.12/site-packages/cl │ │ ick/core.py:788 in invoke │ │ │ │ 785 │ │ │ │ 786 │ │ with augment_usage_errors(__s │ │ 787 │ │ │ with ctx: │ │ ❱ 788 │ │ │ │ return __callback(*ar │ │ 789 │ │ │ 790 │ def forward(__self, _cmd: "Comma │ │ 791 │ │ """Similar to :meth:invoke │ │ │ │ /public/home/lgl_xy/software/CPhasing/cphasi │ │ ng/cli.py:4126 in hyperpartition │ │ │ │ 4123 │ │ │ sys.exit(-1) │ │ 4124 │ │ │ hp.phased_merge_cluster( │ │ 4125 │ │ else: │ │ ❱ 4126 │ │ │ hp.incremental_partition( │ │ 4127 │ else: │ │ 4128 │ │ if merge_cluster: │ │ 4129 │ │ │ groups = list(_merge_clus │ │ │ │ /public/home/lgl_xy/software/CPhasing/cphasi │ │ ng/hyperpartition.py:1068 in │ │ incremental_partition │ │ │ │ 1065 │ │ │ │ │ │ 1066 │ │ │ │ self.K = list(filter( │ │ 1067 │ │ │ │ │ ❱ 1068 │ │ │ assert len(self.K) > 0, " │ │ 1069 │ │ │ self.to_cluster(f'first.c │ │ 1070 │ │ │ first_cluster_file = f'fi │ │ 1071 │ ╰──────────────────────────────────────────────╯ AssertionError: Couldn't run first cluster. 请帮忙看看是什么导致的?谢谢

linguoliang avatar Apr 10 '25 06:04 linguoliang

你好,不好意思,这是我们编辑文档的时候编辑错了。 应该改成分别输入Hi-C数据的R1和R2:

cphasing pipeline -f asm.hic.p_utg.fa -hic1 fastq/merge_R1.fastq.gz -hic2 fastq/merge_R2.fastq.gz -t 10 -n 0:0 -hic-mapper-k 27 -hic-mapper-w 14

wangyibin avatar Apr 10 '25 07:04 wangyibin

你好,不好意思,这是我们编辑文档的时候编辑错了。 应该改成分别输入Hi-C数据的R1和R2:

cphasing pipeline -f asm.hic.p_utg.fa -hic1 fastq/merge_R1.fastq.gz -hic2 fastq/merge_R2.fastq.gz -t 10 -n 0:0 -hic-mapper-k 27 -hic-mapper-w 14

好的,谢谢

linguoliang avatar Apr 11 '25 06:04 linguoliang

[09:03:23] ERROR Duplicate key "Chr01g3" cli.py:1180 RemoteTraceback: """ Traceback (most recent call last): File "/public/home/lgl_xy/software/CPhasing/.pixi/env s/default/lib/python3.12/site-packages/joblib/ex ternals/loky/process_executor.py", line 463, in process_worker r = call_item() ^^^^^^^^^^^ File "/public/home/lgl_xy/software/CPhasing/.pixi/env s/default/lib/python3.12/site-packages/joblib/ex ternals/loky/process_executor.py", line 291, in call return self.fn(*self.args, **self.kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/public/home/lgl_xy/software/CPhasing/.pixi/env s/default/lib/python3.12/site-packages/joblib/pa rallel.py", line 598, in call return [func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/public/home/lgl_xy/software/CPhasing/cphasing/ cli.py", line 2664, in func pa.run() File "/public/home/lgl_xy/software/CPhasing/cphasing/ alleles.py", line 368, in run self.is_split = self.split_contig() ^^^^^^^^^^^^^^^^^^^ File "/public/home/lgl_xy/software/CPhasing/cphasing/ alleles.py", line 267, in split_contig contigsize = get_contig_length(self.fasta) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/public/home/lgl_xy/software/CPhasing/cphasing/ utilities.py", line 583, in get_contig_length fasta = Fasta(fasta) ^^^^^^^^^^^^ File "/public/home/lgl_xy/software/CPhasing/.pixi/env s/default/lib/python3.12/site-packages/pyfaidx/ init.py", line 1090, in init self.faidx = Faidx( ^^^^^^ File "/public/home/lgl_xy/software/CPhasing/.pixi/env s/default/lib/python3.12/site-packages/pyfaidx/_ init_.py", line 511, in init self.read_fai() File "/public/home/lgl_xy/software/CPhasing/.pixi/env s/default/lib/python3.12/site-packages/pyfaidx/_ init_.py", line 567, in read_fai raise ValueError('Duplicate key "%s"' % key) ValueError: Duplicate key "Chr01g3" """

                The above exception was the direct cause of the
                following exception:

                ╭───── Traceback (most recent call last) ──────╮
                │ /public/home/lgl_xy/software/CPhasing/cphasi │
                │ ng/cli.py:1113 in pipeline                   │
                │                                              │
                │   1110 │                                     │
                │   1111 │   today = datetime.now().strftime(" │
                │   1112 │   try:                              │
                │ ❱ 1113 │   │   run(fasta,                    │
                │   1114 │   │   │   ul_data,                  │
                │   1115 │   │   │   porec_data,               │
                │   1116 │   │   │   porectable, pairs,        │
                │                                              │
                │ /public/home/lgl_xy/software/CPhasing/cphasi │
                │ ng/pipeline/pipeline.py:1061 in run          │
                │                                              │
                │   1058 │   │   │   _out_sh.write("\n")       │
                │   1059 │   │                                 │
                │   1060 │   │   try:                          │
                │ ❱ 1061 │   │   │   hyperpartition.main(args= │
                │   1062 │   │   │   │   │   │   │   prog_name │
                │   1063 │   │   except SystemExit as e:       │
                │   1064 │   │   │   exc_info = sys.exc_info() │
                │                                              │
                │ /public/home/lgl_xy/software/CPhasing/.pixi/ │
                │ envs/default/lib/python3.12/site-packages/ri │
                │ ch_click/rich_command.py:126 in main         │
                │                                              │
                │   123 │   │   try:                           │
                │   124 │   │   │   try:                       │
                │   125 │   │   │   │   with self.make_context │
                │ ❱ 126 │   │   │   │   │   rv = self.invoke(c │
                │   127 │   │   │   │   │   if not standalone_ │
                │   128 │   │   │   │   │   │   return rv      │
                │   129 │   │   │   │   │   # it's not safe to │
                │                                              │
                │ /public/home/lgl_xy/software/CPhasing/.pixi/ │
                │ envs/default/lib/python3.12/site-packages/cl │
                │ ick/core.py:1443 in invoke                   │
                │                                              │
                │   1440 │   │   │   echo(style(message, fg="r │
                │   1441 │   │                                 │
                │   1442 │   │   if self.callback is not None: │
                │ ❱ 1443 │   │   │   return ctx.invoke(self.ca │
                │   1444 │                                     │
                │   1445 │   def shell_complete(self, ctx: Con │
                │   1446 │   │   """Return a list of completio │
                │                                              │
                │ /public/home/lgl_xy/software/CPhasing/.pixi/ │
                │ envs/default/lib/python3.12/site-packages/cl │
                │ ick/core.py:788 in invoke                    │
                │                                              │
                │    785 │   │                                 │
                │    786 │   │   with augment_usage_errors(__s │
                │    787 │   │   │   with ctx:                 │
                │ ❱  788 │   │   │   │   return __callback(*ar │
                │    789 │                                     │
                │    790 │   def forward(__self, __cmd: "Comma │
                │    791 │   │   """Similar to :meth:`invoke`  │
                │                                              │
                │ /public/home/lgl_xy/software/CPhasing/cphasi │
                │ ng/cli.py:4126 in hyperpartition             │
                │                                              │
                │   4123 │   │   │   sys.exit(-1)              │
                │   4124 │   │   │   hp.phased_merge_cluster(_ │
                │   4125 │   │   else:                         │
                │ ❱ 4126 │   │   │   hp.incremental_partition( │
                │   4127 │   else:                             │
                │   4128 │   │   if merge_cluster:             │
                │   4129 │   │   │   groups = list(_merge_clus │
                │                                              │
                │ /public/home/lgl_xy/software/CPhasing/cphasi │
                │ ng/hyperpartition.py:1175 in                 │
                │ incremental_partition                        │
                │                                              │
                │   1172 │   │   │   #     c = 5 * k[1]        │
                │   1173 │   │   │   # else:                   │
                │   1174 │   │   │   #     c = 60              │
                │ ❱ 1175 │   │   │   self.alleletable = str(Pa │
                │   1176 │   │   │   │   │   │   │   │   │   │ │
                │   1177 │   │   │   │   │   │   │   │   │   │ │
                │   1178 │   │   │   │   │   │   │   │   │   │ │
                │                                              │
                │ /public/home/lgl_xy/software/CPhasing/cphasi │
                │ ng/hyperpartition.py:920 in alleles          │
                │                                              │
                │    917 │   │   │   │   tl=25000, threads=4): │
                │    918 │   │   from .cli import alleles      │
                │    919 │   │   try:                          │
                │ ❱  920 │   │   │   alleles.main(             │
                │    921 │   │   │   │   args=[                │
                │    922 │   │   │   │   │   "-f",             │
                │    923 │   │   │   │   │   str(fasta),       │
                │                                              │
                │ /public/home/lgl_xy/software/CPhasing/.pixi/ │
                │ envs/default/lib/python3.12/site-packages/ri │
                │ ch_click/rich_command.py:126 in main         │
                │                                              │
                │   123 │   │   try:                           │
                │   124 │   │   │   try:                       │
                │   125 │   │   │   │   with self.make_context │
                │ ❱ 126 │   │   │   │   │   rv = self.invoke(c │
                │   127 │   │   │   │   │   if not standalone_ │
                │   128 │   │   │   │   │   │   return rv      │
                │   129 │   │   │   │   │   # it's not safe to │
                │                                              │
                │ /public/home/lgl_xy/software/CPhasing/.pixi/ │
                │ envs/default/lib/python3.12/site-packages/cl │
                │ ick/core.py:1443 in invoke                   │
                │                                              │
                │   1440 │   │   │   echo(style(message, fg="r │
                │   1441 │   │                                 │
                │   1442 │   │   if self.callback is not None: │
                │ ❱ 1443 │   │   │   return ctx.invoke(self.ca │
                │   1444 │                                     │
                │   1445 │   def shell_complete(self, ctx: Con │
                │   1446 │   │   """Return a list of completio │
                │                                              │
                │ /public/home/lgl_xy/software/CPhasing/.pixi/ │
                │ envs/default/lib/python3.12/site-packages/cl │
                │ ick/core.py:788 in invoke                    │
                │                                              │
                │    785 │   │                                 │
                │    786 │   │   with augment_usage_errors(__s │
                │    787 │   │   │   with ctx:                 │
                │ ❱  788 │   │   │   │   return __callback(*ar │
                │    789 │                                     │
                │    790 │   def forward(__self, __cmd: "Comma │
                │    791 │   │   """Similar to :meth:`invoke`  │
                │                                              │
                │ /public/home/lgl_xy/software/CPhasing/cphasi │
                │ ng/cli.py:2671 in alleles                    │
                │                                              │
                │   2668 │   │   logger.info("Identifing allel │
                │   2669 │   │   if len(args) > 0:             │
                │   2670 │   │   │   with parallel_backend('lo │
                │ ❱ 2671 │   │   │   │   Parallel(n_jobs=min(t │
                │        args)                                 │
                │   2672 │   │                                 │
                │   2673 │   │   else:                         │
                │   2674 │   │   │   logger.info("Load existin │
                │                                              │
                │ /public/home/lgl_xy/software/CPhasing/.pixi/ │
                │ envs/default/lib/python3.12/site-packages/jo │
                │ blib/parallel.py:2007 in __call__            │
                │                                              │
                │   2004 │   │   # dispatch of the tasks to th │
                │   2005 │   │   next(output)                  │
                │   2006 │   │                                 │
                │ ❱ 2007 │   │   return output if self.return_ │
                │   2008 │                                     │
                │   2009 │   def __repr__(self):               │
                │   2010 │   │   return '%s(n_jobs=%s)' % (sel │
                │                                              │
                │ /public/home/lgl_xy/software/CPhasing/.pixi/ │
                │ envs/default/lib/python3.12/site-packages/jo │
                │ blib/parallel.py:1650 in _get_outputs        │
                │                                              │
                │   1647 │   │   │   yield                     │
                │   1648 │   │   │                             │
                │   1649 │   │   │   with self._backend.retrie │
                │ ❱ 1650 │   │   │   │   yield from self._retr │
                │   1651 │   │                                 │
                │   1652 │   │   except GeneratorExit:         │
                │   1653 │   │   │   # The generator has been  │
                │                                              │
                │ /public/home/lgl_xy/software/CPhasing/.pixi/ │
                │ envs/default/lib/python3.12/site-packages/jo │
                │ blib/parallel.py:1754 in _retrieve           │
                │                                              │
                │   1751 │   │   │   # exception (e.g. `Genera │
                │   1752 │   │   │   # worker traceback.       │
                │   1753 │   │   │   if self._aborting:        │
                │ ❱ 1754 │   │   │   │   self._raise_error_fas │
                │   1755 │   │   │   │   break                 │
                │   1756 │   │   │                             │
                │   1757 │   │   │   # If the next job is not  │
                │                                              │
                │ /public/home/lgl_xy/software/CPhasing/.pixi/ │
                │ envs/default/lib/python3.12/site-packages/jo │
                │ blib/parallel.py:1789 in _raise_error_fast   │
                │                                              │
                │   1786 │   │   # calling get_result. This jo │
                │   1787 │   │   # called directly or if the g │
                │   1788 │   │   if error_job is not None:     │
                │ ❱ 1789 │   │   │   error_job.get_result(self │
                │   1790 │                                     │
                │   1791 │   def _warn_exit_early(self):       │
                │   1792 │   │   """Warn the user if the gener │
                │                                              │
                │ /public/home/lgl_xy/software/CPhasing/.pixi/ │
                │ envs/default/lib/python3.12/site-packages/jo │
                │ blib/parallel.py:745 in get_result           │
                │                                              │
                │    742 │   │   │   # We assume that the resu │
                │    743 │   │   │   # callback thread, and is │
                │    744 │   │   │   # be returned.            │
                │ ❱  745 │   │   │   return self._return_or_ra │
                │    746 │   │                                 │
                │    747 │   │   # For other backends, the mai │
                │    748 │   │   try:                          │
                │                                              │
                │ /public/home/lgl_xy/software/CPhasing/.pixi/ │
                │ envs/default/lib/python3.12/site-packages/jo │
                │ blib/parallel.py:763 in _return_or_raise     │
                │                                              │
                │    760 │   def _return_or_raise(self):       │
                │    761 │   │   try:                          │
                │    762 │   │   │   if self.status == TASK_ER │
                │ ❱  763 │   │   │   │   raise self._result    │
                │    764 │   │   │   return self._result       │
                │    765 │   │   finally:                      │
                │    766 │   │   │   del self._result          │
                ╰──────────────────────────────────────────────╯
                ValueError: Duplicate key "Chr01g3"

现在又有一个新的问题了

linguoliang avatar Apr 13 '25 04:04 linguoliang

你好,这个问题就是需要你们检查一下输入的fasta有没有重复的ID,还有就是你们输入的是用其它软件组装到染色体的fasta 吗?

wangyibin avatar Apr 13 '25 13:04 wangyibin

你好,这个问题就是需要你们检查一下输入的fasta有没有重复的ID,还有就是你们输入的是用其它软件组装到染色体的fasta 吗?

谢谢,是的有重复ID,我们是根据组装效果,拆分成好几部分,使用了几个组装软件组装的结果。

linguoliang avatar Apr 15 '25 07:04 linguoliang