crimBubble / ECCsplorer

The ECCsplorer is a bioinformatics pipeline for the automated detection of extrachromosomal circular DNA (eccDNA) from paired-end read data of amplified circular DNA.
GNU General Public License v3.0
18 stars 5 forks source link

Error in Calculating Peaks in TR_map-all.COVERAGE Step #9

Closed liu-zhiyang closed 1 year ago

liu-zhiyang commented 2 years ago

When I run ECCsplorer using my own data, I got an error when the pipeline calculating peaks in TR_map-all.COVERAGE. I have no idea why this error happened, because I have successfully ran the test data.

Calculating peaks in TR_map-all.COVERAGE (ProcessID 2136)
multiprocessing.pool.RemoteTraceback:
"""
Traceback (most recent call last):
  File "/home/user/anaconda3/envs/eccsplorer/lib/python3.7/multiprocessing/pool.py", line 121, in worker
    result = (True, func(*args, **kwds))
  File "/home/user/anaconda3/envs/eccsplorer/lib/python3.7/multiprocessing/pool.py", line 44, in mapstar
    return list(map(*args))
  File "/home/user/software/ECCsplorer/lib/eccMapper.py", line 58, in get_rough_coverage
    win_cov_bed = subp_bedtools_to_arr(region, mapping)
  File "/home/user/software/ECCsplorer/lib/eccMapper.py", line 39, in subp_bedtools_to_arr
    win_cov_bed = win_cov_bed.reshape((win_cov_bed.shape[0] // 4), 4)  # list to table
ValueError: cannot reshape array of size 3450815 into shape (862703,4)
"""

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

Traceback (most recent call last):
  File "ECCsplorer.py", line 815, in <module>
    main()
  File "ECCsplorer.py", line 775, in main
    sum_mapper_win_coverage, sum_mapper_candidate_fas, analysis_errors = obj_mapper.mapper_coordinator()
  File "/home/user/software/ECCsplorer/lib/eccMapper.py", line 697, in mapper_coordinator
    tuples_coverages = pool.map(func, window_file_parts)  # part info, array with coverage info
  File "/home/user/anaconda3/envs/eccsplorer/lib/python3.7/multiprocessing/pool.py", line 268, in map
    return self._map_async(func, iterable, mapstar, chunksize).get()
  File "/home/user/anaconda3/envs/eccsplorer/lib/python3.7/multiprocessing/pool.py", line 657, in get
    raise self._value
ValueError: cannot reshape array of size 3450815 into shape (862703,4)
2022-08-24 15:29:47,901 - [r_shutdown] INFO: Shutting down Rserve.
2022-08-24 15:29:47,936 - [exit_err] ERROR: Sorry, something went wrong.
crimBubble commented 2 years ago

Hi @liu-zhiyang did this error occur after re-running the pipeline? Have some parameters been changed from one run to another? It looks like the core-count setting was changed and the reference-genome file was not reprocessed correctly.

liu-zhiyang commented 1 year ago

@crimBubble, thank you very much for your reply! I apologize for my late reply, because I was really busy and forgot it during the past period. The error above should be an error caused by re-running the pipeline. I completely made a fresh running of the pipeline and it disappeared. But I got another error, and here is the stdout.

Traceback (most recent call last):
  File "/home/user/software/ECCsplorer/ECCsplorer.py", line 815, in `<module>`
    main()
  File "/home/user/software/ECCsplorer/ECCsplorer.py", line 775, in main
    sum_mapper_win_coverage, sum_mapper_candidate_fas, analysis_errors = obj_mapper.mapper_coordinator()
  File "/home/user/software/ECCsplorer/lib/eccMapper.py", line 748, in mapper_coordinator
    axis=1)
  File "<__array_function__ internals>", line 6, in concatenate
ValueError: all the input array dimensions for the concatenation axis must match exactly, but along dimension 0, the array at index 0 has size 30882712 and the array at index 1 has size 1301671
2022-10-22 12:55:00,903 - [r_shutdown] INFO: Shutting down Rserve.
2022-10-22 12:55:00,992 - [exit_err] ERROR: Sorry, something went wrong.