Skip to content

Commit

Permalink
fix(call): vcf output crash
Browse files Browse the repository at this point in the history
  • Loading branch information
davidlougheed committed Jun 13, 2024
1 parent 9e6a0bf commit ca03313
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion strkit/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.15.0a22
0.15.0a23
3 changes: 2 additions & 1 deletion strkit/call/output/vcf.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from strkit.utils import cat_strs, is_none
from ..allele import get_n_alleles
from ..params import CallParams
from ..utils import idx_0_getter

__all__ = [
"build_vcf_header",
Expand Down Expand Up @@ -107,7 +108,7 @@ def output_contig_vcf_lines(
n_alleles: int = get_n_alleles(2, params.sex_chroms, contig) or 2

res_peaks = result["peaks"] or {}
peak_seqs = res_peaks.get("seqs", ())
peak_seqs: list[str] = list(map(idx_0_getter, res_peaks.get("seqs", [])))
if any(map(is_none, peak_seqs)): # Occurs when no consensus for one of the peaks
logger.error(f"Encountered None in results[{result_idx}].peaks.seqs: {peak_seqs}")
continue
Expand Down

0 comments on commit ca03313

Please sign in to comment.