schneebergerlab / syri

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

Issue with alignment #161

Closed diyasen2021 closed 1 year ago

diyasen2021 commented 1 year ago

Hello,

I am a new user of Syri. I am working on some whole genome assemblies of bacterial chromosomes and would like to make synteny plots in plotsr. I have 4 genomes, A, B, C,D all having 1 chromosome and all chromosomes are named contig.1.pillon. I got no errors with the A-B syri output, I am running into errors with all other pairs. Here is one of the warning /error messages.

Reading Coords - WARNING - Reference chromosome contig_1_pilon has high fraction of inverted alignments with its homologous chromosome in the query genome (contig_1_pilon). Ensure that same chromosome-strands are being compared in the two genomes, as different strand can result in unexpected errors. Traceback (most recent call last): File "/home/sendiy/.conda/envs/syri/bin/syri", line 6, in main(sys.argv[1:]) File "/home/sendiy/.conda/envs/syri/lib/python3.9/site-packages/syri/scripts/syri.py", line 319, in main syri(args) File "/home/sendiy/.conda/envs/syri/lib/python3.9/site-packages/syri/scripts/syri.py", line 159, in syri logger.error('Length of reference sequence of ' + id + ' is less than the maximum coordinate of its aligned regions. Exiting.') TypeError: can only concatenate str (not "builtin_function_or_method") to str

Does this mean that the sequnces need to be inverted?

Many thanks for your time.

mnshgl0110 commented 1 year ago

Hi Diya,

Yes, you are correct, inverting chromosomes might help. You can try fixchr to ensure that the same strands of chromosomes are being compared.

However, the error here suggests that the alignment coordinates and the reference sequence size are inconsistent. For example, the reference chromosome size is 1MB but there is an alignment with an alignment coordinate of 1.1MB. I think you need to check that the alignments files and genome files are consistent.

Best Manish

diyasen2021 commented 1 year ago

Hi Manish,

Sorry for not replying. The problem was resolved once I turned the chromosomes around.

Thanks for the help!

Diya

On Fri, Oct 7, 2022 at 6:23 PM Manish Goel @.***> wrote:

Hi Diya,

Yes, you are correct, inverting chromosomes might help. You can try fixchr https://github.com/schneebergerlab/fixchr to ensure that the same strands of chromosomes are being compared.

However, the error here suggests that the alignment coordinates and the reference sequence size are inconsistent. For example, the reference chromosome size is 1MB but there is an alignment with an alignment coordinate of 1.1MB. I think you need to check that the alignments files and genome files are consistent.

Best Manish

— Reply to this email directly, view it on GitHub https://github.com/schneebergerlab/syri/issues/161#issuecomment-1271798136, or unsubscribe https://github.com/notifications/unsubscribe-auth/AU2LPXFL573TYOG2NNLBAITWCBE7HANCNFSM6AAAAAAQ7R46F4 . You are receiving this because you authored the thread.Message ID: @.***>

-- Diya Sen, Ph.D.

ShirelyI commented 8 months ago

Hi Diya, It showed 'Reading BAM/SAM file - ERROR - CIGAR string is not present in PAF at line 2364 8479 37257382 37251209 6116 6174 95.73 1 -1 chr01 chr22. Exiting.' wrong message when I run fixchr,do you know how to solve it? my command is 'fixchr -c S.P.filter.coords -r S.genome.fa -q P.genome.fa -F P' ,the input file I used is the output of 'show-coords -THrd S.P.filter.delta > S.P.filter.coords ', How do you get your alignment.paf file and can you share your alignment.paf file? I wonder what's the type of alignment.paf file is. Best, Lily