lh3 / minigraph

Sequence-to-graph mapper and graph generator
https://lh3.github.io/minigraph
MIT License
419 stars 38 forks source link

conversion to stableGaf incorrectly assigns forward orientation #83

Open tobiasrausch opened 2 years ago

tobiasrausch commented 2 years ago

Hi Heng,

Thanks for pointing out the stableGaf conversion script! When reverse orientation reads align to a single segment (stable sequence), such a GAF line is reduced to PAF (which assumes forward orientation). Here's a script and a single read that reproduces the error:

minigraph --vc -k 15 -w 10 -t 32 -cx lr GRCh38-90c.r518.gfa.gz read.fa > read.vc.gaf
minigraph -k 15 -w 10 -t 32 -cx lr GRCh38-90c.r518.gfa.gz read.fa > read.sq.gaf
mgutils.js stableGaf GRCh38-90c.r518.gfa.gz read.vc.gaf > read.converted.gaf
diff read.sq.gaf read.converted.gaf

>read GGAACTCTCTGCATGTGCTTCTACGTTCAGTTACGTGTGCTCTGGCCCTGGCCTGGCCTGGCCTGGCCTGGCCTGGCCTGGCCTGGCCTGGCCTGGCCTGGCCTGGCCTGGCCTGGCCTGGCCTGGCCTGGCCTGGCCTGGCCTGGCCTGGCCTGGCCTGGCCTGGCCTGGCCTGGCCTGGCCTGGCCTGGCCTGGCCTGGCCTGGCCTGGCCTGGCCTGGCCTGGCCTGGCCTGGCCTGGCCTGGCCTGGCCTGGCCTGGCCTGGCCTGGCCTGGCCTGGCCTGGCCTGGCCTGGCCTGGCCTGGCCTGGCCTGGCCTGGCCTGGCCTGGCCTGGCCTGGCCTGGCCTGGCCTGGCCTGGCCTGGCCTGGCCTGGCCTGGCCTGGCCTGGCTGGCCTGGCCTGGCCTGGCCTGGCCTGGCCTGGCCTGGCCTGGCCTGGCCTGGCCTGGCCTGGCCTGGCCTGGCCTGGCCTGGCCTGGCCTGGCCTGGCCTGGCCTGGCCTGGCCTGGCCTGGCCTGGCCTGGCCTGGCCTGGCTGGCCTGGCCTGGCCTGGCCTGGCCTGGCCTGGCCTGGGCCTGGCCTGGCCTGGCCTGGCCTGGCCTGGCCTGGCCTGGCCTGGCCTGGCCTGGCCT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GGCTGGCCTGGCCTGGCCTGGCCACTGAGCTGGCCTGGCCTGGCCCCGGCGGCCTGGCCTGGCCTGGCCTGGCCTGGCTGGCCTGGCCTGGCCTGGCCTGGCCCTGGCCCTGGCCCTGGCCTGGCCTGGCCTGGCCTGGCCTGGCCCTGGCACTGGCCGCTGACCGCCCAGCCCCTTGGCCTGGCCTGGCCTGGCCTGGCCTGGCCCTGGCCTAGCCCACAGCCCCAGCCCCAGCCCCAGCCCCAGCCCCAGCCCCAGCCCTGGCCCTGGCCCTGGCCCTGGCCTGGCCTGGCCTGGCCTGGCCTGGCCCTGGCCTAGCCTGGCCCTGGCCTGGCCTGGCCTAGCCCAGCCTAGCCTAGCCTAGCCTAGCCTAACCCTAGCCCCAGCCCCAGCCCCAGCCCCAGCCCCAGCCCCAGCCCCAGCCCCAACCCCACTAGCCCCAACCCCAACCCCCAACCCCAACCCCAACCCCAACCCCAACCCCAACCCTAACCCTAACCCTTAACCCTAACCCTAACCCTAACCCTAACCCTAACCCTAACCCTAACCCTAACCCTAACCCCTAACCCTAACCCTAACCCTAACCCTAACCTAACCCTAACCCTAACCCCAAACCCCAAACCCTAACCCTAAACCCTAACCCTAACCCTAACCCTAGCCCTAGCCCTAACCCTAACCCTAAACCCTAACCCTAAACCCTAAACCTAACCCTAAACCCTAACCCTAACCCTAACCCTAACCCTAACCCTAACCCTTAACCCTAACCCTAACCCTAACCCTAACCCTAACCCTAACCCTAACCCTAACCCTAACCCCTACCCCTAACCCTAACCCTAACCCTAACCCTAACCCTTACCCTAACCCTAACCCTTAACCCTTACCCTAACCCTAACCCTAACCCTAACCCTAACCCTAACCCTAAAACCCTAACCCTAACCCTAACCTAACCCTAACCCTAACCCTAACCCTTACCCCTACCCCAACCCCAACCCCAACCCCAACCCCAACCCCAACCCTAACCCTAACCCTAACCCTAACCCTAACCCTAACCCTAACCCTTAACCCTAACCCTTAACCTAACCCTAACCTAACCCTAACCCTAACCCTAACCCTAACCCTAACCCTAACCCTACCCTAACCCTAAC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szhiha commented 1 year ago

Could you use the commands above to generate a .gaf file with contents(not empty)?