diff --git a/pangolin/scripts/usher.smk b/pangolin/scripts/usher.smk index 53b9aad..3adffc7 100644 --- a/pangolin/scripts/usher.smk +++ b/pangolin/scripts/usher.smk @@ -94,9 +94,20 @@ rule usher_inference: if [ -s {input.fasta:q} ]; then cat {input.reference:q} > {params.ref_fa:q} echo >> {params.ref_fa:q} + usher=usher + threads={workflow.cores} + if usher-sampled --help >& /dev/null; then + usher="usher-sampled --optimization_radius 0" + else + echo "" + echo "*** usher-sampled is not installed -- please upgrade usher to at least v0.6.1 ***" + echo "*** If you used conda to install usher, run 'conda update --no-pin usher' ***" + echo "*** Alternatively if mamba is installed, run 'mamba update --no-pin usher' ***" + echo "" + fi cat {input.fasta:q} >> {params.ref_fa:q} faToVcf -includeNoAltN {params.ref_fa:q} {params.vcf:q} - usher -n -D -i {input.usher_protobuf:q} -v {params.vcf:q} -T {workflow.cores} -d '{config[tempdir]}' &> {log} + $usher -n -D -i {input.usher_protobuf:q} -v {params.vcf:q} -T $threads -d '{config[tempdir]}' &> {log} else rm -f {output.txt:q} touch {output.txt:q}