Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ValueError: cannot set null allele #32

Open
wwood opened this issue Apr 24, 2023 · 0 comments
Open

ValueError: cannot set null allele #32

wwood opened this issue Apr 24, 2023 · 0 comments

Comments

@wwood
Copy link

wwood commented Apr 24, 2023

Hi,

Been running strangr on some genomes, feeding in bam files from bwa, and getting stuff like this - any ideas?

$ straingr  view --vcf /tmp/a.vcf data/straingr-out/per-sample/mock1/GCA_000156375.1.fna.output
2023-04-24 16:08:12,971 - INFO:root:Loading data from HDF5 file data/straingr-out/per-sample/mock1/GCA_000156375.1.fna.output
ref     name    length  coverage        uReads  abundance       median  callable        callablePct     confirmed       confirmedPct    snps    snpPct  multi   multiPct        lowmq   lowmqPct        high    highPct  gapCount        gapLength
na      GCA_000156375.1.fna$DS996351.1  382994  5.100   13950   0.034   5       354594  92.585  347205  97.916  7389    2.084   5       0.001   0       0.000   0       0.000   0       0
na      GCA_000156375.1.fna$DS996352.1  6862    0.204   13      0.000   0       379     5.523   374     98.681  5       1.319   0       0.000   0       0.000   0       0.000   0       0
na      GCA_000156375.1.fna$DS996353.1  121189  4.785   4162    0.010   5       111067  91.648  108736  97.901  2331    2.099   2       0.002   0       0.000   0       0.000   0       0
na      GCA_000156375.1.fna$DS996354.1  239511  4.598   7836    0.019   4       220277  91.969  215703  97.924  4574    2.077   11      0.005   0       0.000   0       0.000   0       0
na      GCA_000156375.1.fna$DS996355.1  491996  4.419   15446   0.037   4       448637  91.187  439306  97.920  9326    2.079   20      0.004   0       0.000   0       0.000   0       0

... (snip)

2023-04-24 16:08:15,381 - INFO:root:Generating VCF file...
Traceback (most recent call last):
  File ".snakemake/conda/16aa680dd00c9d5a6169055bdad760d4_/bin/straingr", line 11, in <module>
    sys.exit(straingr_cli())
  File ".snakemake/conda/16aa680dd00c9d5a6169055bdad760d4_/lib/python3.10/site-packages/strainge/cli/main.py", line 110, in __call__
    self.run(args)
  File ".snakemake/conda/16aa680dd00c9d5a6169055bdad760d4_/lib/python3.10/site-packages/strainge/cli/registry.py", line 83, in run
    rc = subcommand_func(**args_dict)
  File ".snakemake/conda/16aa680dd00c9d5a6169055bdad760d4_/lib/python3.10/site-packages/strainge/cli/straingr.py", line 582, in __call__
    write_vcf(call_data, vcf, verbose_vcf)
  File ".snakemake/conda/16aa680dd00c9d5a6169055bdad760d4_/lib/python3.10/site-packages/strainge/io/variants.py", line 478, in write_vcf
    for record in record_iter:
  File ".snakemake/conda/16aa680dd00c9d5a6169055bdad760d4_/lib/python3.10/site-packages/strainge/io/variants.py", line 422, in vcf_records_for_scaffold
    record = writer.new_record(
  File "pysam/libcbcf.pyx", line 4480, in pysam.libcbcf.VariantFile.new_record
  File "pysam/libcbcf.pyx", line 2101, in pysam.libcbcf.VariantHeader.new_record
  File "pysam/libcbcf.pyx", line 3250, in pysam.libcbcf.VariantRecord.alleles.__set__
ValueError: cannot set null allele

I've attached the file, using conda version:

$ straingr --version
1.3.7

Thanks in advance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant