schneebergerlab / syri

Synteny and Rearrangement Identifier
https://schneebergerlab.github.io/syri/
MIT License
305 stars 36 forks source link

IndexError: list index out of range #184

Closed DiegoSafian closed 1 year ago

DiegoSafian commented 1 year ago

Hi,

I am running syri with an alignment of two closely related species using minima2. I am getting this error:

multiprocessing.pool.RemoteTraceback: 
"""
Traceback (most recent call last):
  File "/camp/home/safiand/home/users/safiand/.conda/envs/syri_env/lib/python3.8/multiprocessing/pool.py", line 125, in worker
    result = (True, func(*args, **kwds))
  File "/camp/home/safiand/home/users/safiand/.conda/envs/syri_env/lib/python3.8/multiprocessing/pool.py", line 48, in mapstar
    return list(map(*args))
  File "syri/pyxFiles/synsearchFunctions.pyx", line 803, in syri.synsearchFunctions.syri
IndexError: list index out of range
"""

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

Traceback (most recent call last):
  File "/camp/home/safiand/home/users/safiand/.conda/envs/syri_env/bin/syri", line 6, in <module>
    main(sys.argv[1:])
  File "/camp/home/safiand/home/users/safiand/.conda/envs/syri_env/lib/python3.8/site-packages/syri/scripts/syri.py", line 326, in main
    syri(args)
  File "/camp/home/safiand/home/users/safiand/.conda/envs/syri_env/lib/python3.8/site-packages/syri/scripts/syri.py", line 214, in syri
    startSyri(args, coords[["aStart", "aEnd", "bStart", "bEnd", "aLen", "bLen", "iden", "aDir", "bDir", "aChr", "bChr"]])
  File "syri/pyxFiles/synsearchFunctions.pyx", line 505, in syri.synsearchFunctions.startSyri
  File "syri/pyxFiles/synsearchFunctions.pyx", line 506, in syri.synsearchFunctions.startSyri
  File "/camp/home/safiand/home/users/safiand/.conda/envs/syri_env/lib/python3.8/multiprocessing/pool.py", line 364, in map
    return self._map_async(func, iterable, mapstar, chunksize).get()
  File "/camp/home/safiand/home/users/safiand/.conda/envs/syri_env/lib/python3.8/multiprocessing/pool.py", line 771, in get
    raise self._value
IndexError: list index out of range

Any way to solve this issue?? Thanks, Diego

mnshgl0110 commented 1 year ago

Duplicate https://github.com/schneebergerlab/syri/issues/48 https://github.com/schneebergerlab/syri/issues/176

Try using https://github.com/schneebergerlab/fixchr

InfiniteLaugh commented 1 year ago

Duplicate #48 #176

Try using https://github.com/schneebergerlab/fixchr

Hi, I have met the same problem as Diego. So I try to use fixchr to solve my problem, however, I met new problem like this: Snipaste_2023-04-17_15-21-11

I use the code as follow: fixchr -c a1.THrd.txt -r /172.16.0.2/NFSSharedFiles/01.genome_seq/no_CTG/12.mgy.genome.chr.fasta -q /172.16.0.2/NFSSharedFiles/01.genome_seq/no_CTG/a1.genome.chr.fasta -F T --prefix a1 --nc 10

the first 5 columns of a1.THrd.coords is provided as below: a1.THrd.txt

I got the file a1.THrd.txt using mummer, function ncmer,delta-filter and show-coords -THrd. I think the main problem is the chromosomes from different strands of two genome I use. But I am not sure where my problem is when I try to use fixchr, it seems I lack one column? Any way to solve this issue?? Thanks, Zhou

mnshgl0110 commented 1 year ago

Solved: https://github.com/schneebergerlab/fixchr/issues/6

InfiniteLaugh commented 1 year ago

Solved: schneebergerlab/fixchr#6

Thank you so much for your effort, your revision works well, and i can got result from syri using following code. syri -c ../01.108.i90_l100_m.filter.THrd.coords -d ../01.108.i90_l100_m.filter.delta -r ../ref.filtered.fa -q ../qry.filtered.fa --prefix 108 --nc 10 Snipaste_2023-04-17_23-25-50

But please forgive me, i still got some questions which i was quite confused.

  1. when i use the code above it seems to get this WARNING. Does this means that the chromosome is still not reversed or i use the wrong file? Snipaste_2023-04-17_23-28-00

  2. In order to solve this problem, i replaced input file of -c -r -q with original and the new one generated by fixchr, but the warning still exsist. Following are the result generate from fixchr. Is there any ideas which file should i use? Which should be original one, which should be new file produced by fixchr? Snipaste_2023-04-17_23-26-02

Thanks again for your reply. Zhou

mnshgl0110 commented 1 year ago

As this issue is not related to the original issue here, I am starting a new issue. Please, start new issues for different questions.