theislab / hadge

Comprehensive pipeline for donor demultiplexing in single cell
https://hadge.readthedocs.io/en/latest/
MIT License
23 stars 6 forks source link

freebayes could not parse maxComplexGap #50

Open bednarsky opened 1 month ago

bednarsky commented 1 month ago

Hi again, and thanks again for all the help with the great pipeline!

Now this error:

ERROR ~ Error executing process > 'HADGE:run_multi:gene_demultiplexing:variant_freebayes:freebayes (sid456)'

Caused by: Process HADGE:run_multi:gene_demultiplexing:variant_freebayes:freebayes (sid456) terminated with an error exit status (1)

Command executed:

freebayes sid456__filtered_bam_file.bam -f path/to/projectresources/demultiplexing/refdata-gex-GRCh38-2020-A/fasta/genome.fa --region 1 -v sid456_1_vcf_freebayes_output.vcf --pvar 0.0 --theta 0.001 --ploidy 2 --reference-quality 100,60 --no-indels --no-mnps --no-complex --use-best-n-alleles 0 --haplotype-length --haplotype-length --haplotype-length --haplotype-length 3 --min-repeat-size 5 --min-repeat-entropy 1 --min-mapping-quality 1 --min-base-quality 1 --min-supporting-allele-qsum 0 --min-supporting-mapping-qsum 0 --mismatch-base-quality-threshold 10 --read-max-mismatch-fraction 1.0 --min-alternate-fraction 0.05 --min-alternate-count 2 --min-alternate-qsum 0 --min-alternate-total 1 --min-coverage 0 --prob-contamination 1E-9 --genotyping-max-iterations 1000 --genotyping-max-banddepth 6 --posterior-integration-limits 1,3 --read-dependence-factor 0.9 ln -s sid456_1_vcf_freebayes_output.vcf out_sid456_1_vcf_freebayes_output.vcf

Command exit status: 1

Command output: (empty)

Command error: could not parse maxComplexGap

Googling around a bit I think it might be the --no-complex flag. https://github.com/freebayes/freebayes/issues/516. Not sure yet. Update: Removing the --no-complex flag did not make a difference Update: Adding --max-complex-gap 3 explicitly did not make a difference

bednarsky commented 1 month ago

in the error (also the one above), the --haplotype-length flag is repeated four times in a row, which could cause an issue. I tried to fix the source code like so and it seems to have worked:

- def haplotype_length = haplotype_length_freebayes = "--haplotype-length ${haplotype_length_freebayes}"
+ def haplotype_length = "--haplotype-length ${haplotype_length_freebayes}"
wxicu commented 1 month ago

Thanks for looking into this! Have merged in #55. Also just to mention, if you still have similar issues, it might be the case that the installed freebayes is not in the correct version. We are using freebayes v1.2.