EichlerLab / pav

Phased assembly variant caller
97 stars 8 forks source link

Unrecognized strategy: nrsnv:exact #14

Closed esrice closed 2 years ago

esrice commented 2 years ago

I'm getting the following error in the call_merge_haplotypes_chrom step:

[Tue Jul 19 18:49:15 2022]
rule call_merge_haplotypes_chrom:
    input: temp/Molino/bed/integrated/h1/snv_snv.bed.gz, temp/Molino/bed/integrated/h2/snv_snv.bed.gz, results/Molino/callable/callable_regions_h1_500.bed.gz, results/Molino/callable/callable_regions_h2_500.bed.gz
    output: temp/Molino/bed/bychrom/snv_snv/JALAHU010000026.1.bed.gz
    jobid: 0
    reason: Forced execution
    wildcards: asm_name=Molino, vartype_svtype=snv_snv, chrom=JALAHU010000026.1
    resources: mem_mb=100000, disk_mb=1000000, tmpdir=/tmp, runtime=2-00:00:00

Merging with def: nrsnv:exact
[Tue Jul 19 18:49:15 2022]
Error in rule call_merge_haplotypes_chrom:
    jobid: 0
    output: temp/Molino/bed/bychrom/snv_snv/JALAHU010000026.1.bed.gz

RuleException:
RuntimeError in line 166 of /storage/htc/warrenlab/users/esrbhb/software/pav/pav/rules/call.snakefile:
Unrecognized strategy: nrsnv:exact
  File "/storage/htc/warrenlab/users/esrbhb/software/pav/pav/rules/call.snakefile", line 166, in __rule_call_merge_haplotypes_chrom
  File "/storage/htc/warrenlab/users/esrbhb/software/pav/pav/pavlib/call.py", line 264, in merge_haplotypes
  File "/storage/htc/warrenlab/users/esrbhb/software/pav/pav/dep/svpop/svpoplib/svmerge.py", line 93, in merge_variants
  File "/storage/hpc/group/warrenlab/users/esrbhb/mambaforge/envs/pav/lib/python3.8/concurrent/futures/thread.py", line 57, in run

The problem appears to be that the default merging configuration string set here: https://github.com/EichlerLab/pav/blob/f4a648b6ee4677e6ee8638ed1f3360ecce5defe6/pavlib/constants.py#L28

Is not compatible with the function in poplib it gets passed to: https://github.com/EichlerLab/svpop/blob/8f084907170d9bb804cbc02202de085dcc7101d4/svpoplib/svmerge.py#L61

It looks like in the latter function, the strategy string has to start with "nr:" but this one starts with "nrsnv:" so it crashes.

I would fix it myself but I don't understand the merge strategies well enough to know what the correct thing to do here is.

paudano commented 2 years ago

Some new features crept into the main branch before they were complete, my apologies. Pull the latest commit (v2.0.0), be sure it recurses (submodule dep/svpop changed).

Changes reduce haplotype merging errors (some multi-allelic sites were not handled well). I have tested these changes, but have not fully tested integration. I am out this coming week, but I'll monitor and try to address this if you still have issues completing the PAV runs.

esrice commented 2 years ago

Looks like commit d355f88 fixed it, thanks!