uio-bmi / graph_peak_caller

ChIP-seq peak caller for reads mapped to a graph-based reference genome
BSD 3-Clause "New" or "Revised" License
19 stars 8 forks source link

Skip paths for which path.to_obg() returns False. #7

Open cgroza opened 5 years ago

cgroza commented 5 years ago

Hi, I am using graph peak caller on a haplotype indexed whole genome graph. My vg files contain many paths corresponding to the haplotypes, including the reference path (chr1, chr2, etc). When using graph_peak_caller find_linear_path to retrieve the reference interval, for some paths obg_interval is assigned to False by path.to_obg(). This results in an error when assigning obg_interval.name to path.name. Therefore, I added a check that skip such paths.

All the instances of this bug involves haplotype paths and not the reference path. This fix allowed me to retrieve my reference intervals without any problems.