cbg-ethz / V-pipe

V-pipe is a pipeline designed for analysing NGS data of short viral genomes
https://cbg-ethz.github.io/V-pipe/
Apache License 2.0
129 stars 43 forks source link

hiv-tutorial works with haploclique, but fails with predicthaplo #136

Open Masterxilo opened 1 year ago

Masterxilo commented 1 year ago
Removing output files of failed job predicthaplo since they might be corrupted:
samples/CAP188/4/variants/global/REF_aln.sam
After parsing the reads in file samples/CAP217/4390/variants/global/REF_aln.sam: average read length= -nan 0
First read considered in the analysis starts at position 100000. Last read ends at position 0
There are 0 reads
/usr/bin/bash: line 3:  1586 Segmentation fault      predicthaplo --sam samples/CAP217/4390/variants/global/REF_aln.sam --reference samples/cohort_consensus.fasta --prefix samples/CAP217/4390/variants/global/predicthaplo/ --have_true_haplotypes 0 --min_length 0 2> >(tee -a samples/CAP217/4390/variants/global/predicthaplo.err.log >&2)
[Fri Nov 18 12:35:01 2022]
Error in rule predicthaplo:
    jobid: 41
    input: samples/CAP217/4390/alignments/REF_aln.bam, samples/cohort_consensus.fasta
    output: samples/CAP217/4390/variants/global/REF_aln.sam, samples/CAP217/4390/variants/global/predicthaplo_haplotypes.fasta
    log: samples/CAP217/4390/variants/global/predicthaplo.out.log, samples/CAP217/4390/variants/global/predicthaplo.err.log (check log file(s) for error message)
    conda-env: /home/ubuntu/new-vpipe-haplotype-recon-experiments/work-hiv-example/.snakemake/conda/2bf4df4a26b143afa975c4ca179e069b_
    shell:

            samtools sort -n samples/CAP217/4390/alignments/REF_aln.bam -o samples/CAP217/4390/variants/global/REF_aln.sam 2> >(tee samples/CAP217/4390/variants/global/predicthaplo.err.log >&2)

            predicthaplo                 --sam samples/CAP217/4390/variants/global/REF_aln.sam                 --reference samples/cohort_consensus.fasta                 --prefix samples/CAP217/4390/variants/global/predicthaplo/                 --have_true_haplotypes 0                 --min_length 0                 2> >(tee -a samples/CAP217/4390/variants/global/predicthaplo.err.log >&2)

            # TODO: copy over actual haplotypes
            touch samples/CAP217/4390/variants/global/predicthaplo_haplotypes.fasta

        (one of the commands exited with non-zero exit code; note that snakemake uses bash strict mode!)

Removing output files of failed job predicthaplo since they might be corrupted:
samples/CAP217/4390/variants/global/REF_aln.sam
Shutting down, this might take some time.
Exiting because a job execution failed. Look above for error message
Complete log: .snakemake/log/2022-11-18T121401.627778.snakemake.log

I followed https://github.com/cbg-ethz/V-pipe/blob/master/docs/tutorial_hiv.md and then configured the following:

general:
    virus_base_config: 'hiv'
    # e.g: 'hiv', 'sars-cov-2', or absent

    # enable hyplotype reconstruction

    # this failed:
    haplotype_reconstruction: predicthaplo

    # this worked:
    #haplotype_reconstruction: haploclique

input:
    samples_file: samples.tsv

output:
    datadir: samples/

    trim_primers: false
    # see: config/README.md#amplicon-protocols
    snv: false
    local: false

    # enable hyplotype reconstruction
    global: true

    visualization: false
    diversity: false
    QA: false
    upload: false
    dehumanized_raw_reads: false