Skip to content

svimmer --join-mode crashes with TypeError #15

@RegnDai

Description

@RegnDai

Hi,

I ran into a crash when using svimmer --join-mode on three per-sample SV VCFs (Manta first, then Delly and Smoove), using bgzip-compressed and tabix-indexed VCF inputs.

Environment

  • svimmer checked out from source
  • pixi environment:
[workspace]
channels = ["conda-forge", "bioconda"]
name = "svimmer"
platforms = ["linux-64"]
version = "0.1.0"

[tasks]

[dependencies]
python = ">=3.13.12,<3.14"
pysam = ">=0.23.3,<0.24"
samtools = ">=1.23.1,<2"
bcftools = ">=1.23.1,<2"
  • run as python src/svimmer
  • input files are bgzip-compressed and tabix-indexed VCFs

Command

pixi run python src/svimmer.patch \
  --threads "${SLURM_CPUS_PER_TASK}" \
  --join-mode \
  --ignore-bnd \
  --output "${RAW_OUT}" \
  "${JOIN_LIST}" \
  "${AUTOSOMES[@]}"

ERR

Traceback (most recent call last):
  File "/env/svimmer/src/svimmer", line 232, in <module>
    all_svs = append_svs_from_vcf(line_in, chrom)
  File "/env/svimmer/src/svimmer", line 97, in append_svs_from_vcf
    if new_sv.is_sv and new_sv.begin >= start:
TypeError: '>=' not supported between instances of 'int' and 'NoneType'

What I observed

The crash happens in --join-mode.
It looks like start becomes None for at least some calls to append_svs_from_vcf().

I changed the --join-mode loop so that region_start / region_end are also passed for the later input VCFs, not only the first one.

Before:

for line_in in lines[1:]:
    all_svs = append_svs_from_vcf(line_in, chrom)

After:

for line_in in lines[1:]:
    all_svs = append_svs_from_vcf(line_in, chrom, args.region_start, args.region_end)

After this change, the script no longer throws the TypeError.

This makes me suspect that in --join-mode, the first VCF is read with explicit region bounds, but subsequent VCFs are not, which leaves start=None and eventually causes the comparison new_sv.begin >= start to fail.

Please let me know if this matches the intended behavior.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions