ComparativeGenomicsToolkit / taffy

This is a library C/Python/CLI for working with TAF (.taf,.taf.gz) and MAF (.maf) alignment files
MIT License
23 stars 3 forks source link

get_column_iterator SEGV #66

Open diekhans opened 3 weeks ago

diekhans commented 3 weeks ago
  1. get https://hgwdev.gi.ucsc.edu/~markd/cactus/bugs/taffy-column_iterator.tar.gz
  2. untar
  3. python taffyplay.py
  4. Segmentation fault

meg9.taf was built with:

  taffy view -i output/meg9.maf -o output/meg9.taf                                
  taffy index -i output/meg9.taf                                                  
glennhickey commented 3 weeks ago

Yeah, looks like there are still some issues regarding errors in the input. The script has two problems:

The first one is triggering the segfault. I guess it's related to a bug in AlignmentReader() where when the taf_index parameter is not set, it's somehow opening the index of test_taf_file[:-1] + '.tai' (which exists) but failing after.

Your work-around is to follw the examples, where the index is passed in via

taf_index = TafIndex(test_taf_file + ".tai", is_maf=False)
with AlignmentReader(test_taf_file, taf_index=taf_index, ...

This way you can give it correct paths for both the taf and .tai file and get an exception for your invalid coordinate.

diekhans commented 3 weeks ago

Thanks. It was a quick yank and put experiment, but wanted to report the bug before I managed to aboid it.

Glenn Hickey @.***> writes:

Yeah, looks like there are still some issues regarding errors in the input. The script has two problems:

  • incorrect input file name: meg9.tafy instead of meg9.taf
  • invalid coordinate range:1010643617 + 100. (the range in the file from taffy stats -b is hg38.chr14 101064367 101072358

The first one is triggering the segfault. I guess it's related to a bug in AlignmentReader() where when the taf_index parameter is not set, it's somehow opening the index of test_taf_file[:-1] + '.tai' (which exists) but failing after.

Your work-around is to follw the examples, where the index is passed in via

taf_index = TafIndex(test_taf_file + ".tai", is_maf=False)
with AlignmentReader(test_taf_file, taf_index=taf_index, ...

This way you can give it correct paths for both the taf and .tai file and get an exception for your invalid coordinate.

-- Reply to this email directly or view it on GitHub: https://github.com/ComparativeGenomicsToolkit/taffy/issues/66#issuecomment-2307103343 You are receiving this because you authored the thread.

Message ID: @.***>