HKU-BAL / Clair3

Clair3 - Symphonizing pileup and full-alignment for high-performance long-read variant calling
244 stars 26 forks source link

Segmentation fault in full_alignment #341

Open chris-cheshire opened 3 days ago

chris-cheshire commented 3 days ago

Hey there, I am running the containerised version of clair3 with 32GB of mem. Its running on a small viral genome so shouldnt be too taxing. The seg fault happens and then the merged vcf is just the pileup vcf instead of the true merged. Any ideas?


[INFO] BAM FILE PATH: /Users/cheshic/dev/repos/pipelines-tech/wic-viral-assembler/work/9c/7bfa116a33775c60e7dc6c3b2a0065/FAY66992_BC23.primertrimmed.rg.sorted.bam
[INFO] REFERENCE FILE PATH: /Users/cheshic/dev/repos/pipelines-tech/wic-viral-assembler/work/9c/7bfa116a33775c60e7dc6c3b2a0065/SARS-CoV-2.fasta
[INFO] MODEL PATH: /opt/models/r941_prom_hac_g360+g422
[INFO] OUTPUT FOLDER: /Users/cheshic/dev/repos/pipelines-tech/wic-viral-assembler/work/9c/7bfa116a33775c60e7dc6c3b2a0065/.
[INFO] PLATFORM: ont
[INFO] THREADS: 10
[INFO] BED FILE PATH: EMPTY
[INFO] VCF FILE PATH: EMPTY
[INFO] CONTIGS: EMPTY
[INFO] CONDA PREFIX: 
[INFO] SAMTOOLS PATH: samtools
[INFO] PYTHON PATH: python3
[INFO] PYPY PATH: pypy3
[INFO] PARALLEL PATH: parallel
[INFO] WHATSHAP PATH: whatshap
[INFO] LONGPHASE PATH: EMPTY
[INFO] CHUNK SIZE: 800
[INFO] FULL ALIGN PROPORTION: 1.0
[INFO] FULL ALIGN REFERENCE PROPORTION: 1.0
[INFO] PHASING PROPORTION: 0.7
[INFO] MINIMUM MQ: 5
[INFO] MINIMUM COVERAGE: 2
[INFO] SNP AF THRESHOLD: 0.08
[INFO] INDEL AF THRESHOLD: 0.15
[INFO] BASE ERROR IN GVCF: 0.001
[INFO] GQ BIN SIZE IN GVCF: 5
[INFO] ENABLE FILEUP ONLY CALLING: False
[INFO] ENABLE FAST MODE CALLING: False
[INFO] ENABLE CALLING SNP CANDIDATES ONLY: False
[INFO] ENABLE PRINTING REFERENCE CALLS: False
[INFO] ENABLE OUTPUT GVCF: False
[INFO] ENABLE HAPLOID PRECISE MODE: True
[INFO] ENABLE HAPLOID SENSITIVE MODE: False
[INFO] ENABLE INCLUDE ALL CTGS CALLING: True
[INFO] ENABLE NO PHASING FOR FULL ALIGNMENT: True
[INFO] ENABLE REMOVING INTERMEDIATE FILES: False
[INFO] ENABLE LONGPHASE FOR INTERMEDIATE VCF PHASING: False
[INFO] ENABLE PHASING FINAL VCF OUTPUT USING WHATSHAP: False
[INFO] ENABLE PHASING FINAL VCF OUTPUT USING LONGPHASE: False
[INFO] ENABLE HAPLOTAGGING FINAL BAM: False
[INFO] ENABLE LONG INDEL CALLING: False
[INFO] ENABLE C_IMPLEMENT: True

[WARNING] Threads setting exceeds maximum available threads 4, set threads=4
+ /opt/bin/scripts/clair3_c_impl.sh --bam_fn /Users/cheshic/dev/repos/pipelines-tech/wic-viral-assembler/work/9c/7bfa116a33775c60e7dc6c3b2a0065/FAY66992_BC23.primertrimmed.rg.sorted.bam --ref_fn /Users/cheshic/dev/repos/pipelines-tech/wic-viral-assembler/work/9c/7bfa116a33775c60e7dc6c3b2a0065/SARS-CoV-2.fasta --threads 4 --model_path /opt/models/r941_prom_hac_g360+g422 --platform ont --output /Users/cheshic/dev/repos/pipelines-tech/wic-viral-assembler/work/9c/7bfa116a33775c60e7dc6c3b2a0065/. --bed_fn=EMPTY --vcf_fn=EMPTY --ctg_name=EMPTY --sample_name=FAY66992_BC23 --chunk_num=0 --chunk_size=800 --samtools=samtools --python=python3 --pypy=pypy3 --parallel=parallel --whatshap=whatshap --qual=2 --var_pct_full=1.0 --ref_pct_full=1.0 --var_pct_phasing=0.7 --snp_min_af=0.08 --indel_min_af=0.15 --min_mq=5 --min_coverage=2 --min_contig_size=0 --pileup_only=False --gvcf=False --base_err=0.001 --gq_bin_size=5 --fast_mode=False --call_snp_only=False --print_ref_calls=False --haploid_precise=True --haploid_sensitive=False --include_all_ctgs=True --no_phasing_for_fa=True --pileup_model_prefix=pileup --fa_model_prefix=full_alignment --remove_intermediate_dir=False --enable_phasing=False --enable_long_indel=False --keep_iupac_bases=False --use_gpu=False --longphase_for_phasing=False --longphase=EMPTY --use_whatshap_for_intermediate_phasing=True --use_longphase_for_intermediate_phasing=False --use_whatshap_for_final_output_phasing=False --use_longphase_for_final_output_phasing=False --use_whatshap_for_final_output_haplotagging=False

[INFO] Check environment variables
[INFO] Create folder /Users/cheshic/dev/repos/pipelines-tech/wic-viral-assembler/work/9c/7bfa116a33775c60e7dc6c3b2a0065/log
[INFO] Create folder /Users/cheshic/dev/repos/pipelines-tech/wic-viral-assembler/work/9c/7bfa116a33775c60e7dc6c3b2a0065/tmp/pileup_output
[INFO] Create folder /Users/cheshic/dev/repos/pipelines-tech/wic-viral-assembler/work/9c/7bfa116a33775c60e7dc6c3b2a0065/tmp/merge_output
[INFO] Create folder /Users/cheshic/dev/repos/pipelines-tech/wic-viral-assembler/work/9c/7bfa116a33775c60e7dc6c3b2a0065/tmp/phase_output
[INFO] Create folder /Users/cheshic/dev/repos/pipelines-tech/wic-viral-assembler/work/9c/7bfa116a33775c60e7dc6c3b2a0065/tmp/gvcf_tmp_output
[INFO] Create folder /Users/cheshic/dev/repos/pipelines-tech/wic-viral-assembler/work/9c/7bfa116a33775c60e7dc6c3b2a0065/tmp/full_alignment_output
[INFO] Create folder /Users/cheshic/dev/repos/pipelines-tech/wic-viral-assembler/work/9c/7bfa116a33775c60e7dc6c3b2a0065/tmp/phase_output/phase_vcf
[INFO] Create folder /Users/cheshic/dev/repos/pipelines-tech/wic-viral-assembler/work/9c/7bfa116a33775c60e7dc6c3b2a0065/tmp/phase_output/phase_bam
[INFO] Create folder /Users/cheshic/dev/repos/pipelines-tech/wic-viral-assembler/work/9c/7bfa116a33775c60e7dc6c3b2a0065/tmp/full_alignment_output/candidate_bed
Warning: cannot find your CPU L2 cache size in /proc/cpuinfo
[INFO] --include_all_ctgs enabled
[WARNING] For efficiency, we use a maximum 30% reference candidates for full-alignment calling
[INFO] Call variant in contigs: NC_045512.2
[INFO] Chunk number for each contig: 38
[INFO] 1/7 Call variants using pileup model
Calling variants ...
Total processed positions in NC_045512.2 (chunk 1/38) : 100
Total time elapsed: 1.77 s
Calling variants ...
Total processed positions in NC_045512.2 (chunk 3/38) : 72
Total time elapsed: 1.73 s
Calling variants ...
Total processed positions in NC_045512.2 (chunk 2/38) : 112
Total time elapsed: 2.10 s
Calling variants ...
Total processed positions in NC_045512.2 (chunk 4/38) : 63
Total time elapsed: 1.71 s
Calling variants ...
Total processed positions in NC_045512.2 (chunk 5/38) : 73
Total time elapsed: 1.70 s
Calling variants ...
Total processed positions in NC_045512.2 (chunk 6/38) : 82
Total time elapsed: 1.74 s
Calling variants ...
Total processed positions in NC_045512.2 (chunk 8/38) : 60
Total time elapsed: 1.69 s
Calling variants ...
Total processed positions in NC_045512.2 (chunk 7/38) : 62
Total time elapsed: 1.68 s
Calling variants ...
Total processed positions in NC_045512.2 (chunk 9/38) : 76
Total time elapsed: 1.66 s
Calling variants ...
Total processed positions in NC_045512.2 (chunk 10/38) : 69
Total time elapsed: 1.68 s
Calling variants ...
Total processed positions in NC_045512.2 (chunk 11/38) : 47
Total time elapsed: 1.67 s
Calling variants ...
Total processed positions in NC_045512.2 (chunk 12/38) : 48
Total time elapsed: 1.61 s
Calling variants ...
Total processed positions in NC_045512.2 (chunk 14/38) : 44
Total time elapsed: 1.62 s
Calling variants ...
Total processed positions in NC_045512.2 (chunk 13/38) : 67
Total time elapsed: 1.71 s
Calling variants ...
Total processed positions in NC_045512.2 (chunk 15/38) : 57
Total time elapsed: 1.68 s
Calling variants ...
Total processed positions in NC_045512.2 (chunk 16/38) : 51
Total time elapsed: 1.70 s
Calling variants ...
Total processed positions in NC_045512.2 (chunk 17/38) : 61
Total time elapsed: 1.68 s
Calling variants ...
Total processed positions in NC_045512.2 (chunk 18/38) : 58
Total time elapsed: 1.63 s
Calling variants ...
Total processed positions in NC_045512.2 (chunk 19/38) : 51
Total time elapsed: 1.64 s
Calling variants ...
Total processed positions in NC_045512.2 (chunk 21/38) : 63
Total time elapsed: 1.67 s
Calling variants ...
Total processed positions in NC_045512.2 (chunk 20/38) : 78
Total time elapsed: 2.02 s
Calling variants ...
Total processed positions in NC_045512.2 (chunk 22/38) : 61
Total time elapsed: 1.67 s
Calling variants ...
Total processed positions in NC_045512.2 (chunk 23/38) : 56
Total time elapsed: 1.67 s
Calling variants ...
Total processed positions in NC_045512.2 (chunk 24/38) : 54
Total time elapsed: 1.72 s
Calling variants ...
Total processed positions in NC_045512.2 (chunk 25/38) : 56
Total time elapsed: 1.71 s
Calling variants ...
Total processed positions in NC_045512.2 (chunk 26/38) : 55
Total time elapsed: 1.71 s
Calling variants ...
Total processed positions in NC_045512.2 (chunk 27/38) : 61
Total time elapsed: 1.70 s
Calling variants ...
Total processed positions in NC_045512.2 (chunk 28/38) : 74
Total time elapsed: 1.76 s
Calling variants ...
Total processed positions in NC_045512.2 (chunk 29/38) : 100
Total time elapsed: 1.74 s
Calling variants ...
Total processed positions in NC_045512.2 (chunk 30/38) : 78
Total time elapsed: 1.68 s
Calling variants ...
Total processed positions in NC_045512.2 (chunk 31/38) : 61
Total time elapsed: 1.70 s
Calling variants ...
Total processed positions in NC_045512.2 (chunk 32/38) : 67
Total time elapsed: 1.65 s
Calling variants ...
Total processed positions in NC_045512.2 (chunk 33/38) : 71
Total time elapsed: 1.64 s
Calling variants ...
Total processed positions in NC_045512.2 (chunk 34/38) : 72
Total time elapsed: 1.73 s
Calling variants ...
Total processed positions in NC_045512.2 (chunk 35/38) : 57
Total time elapsed: 1.74 s
Calling variants ...
Total processed positions in NC_045512.2 (chunk 36/38) : 68
Total time elapsed: 1.73 s
Calling variants ...
Total processed positions in NC_045512.2 (chunk 37/38) : 81
Total time elapsed: 1.59 s
Calling variants ...
Total processed positions in NC_045512.2 (chunk 38/38) : 69
Total time elapsed: 1.57 s

real    0m46.009s
user    2m2.892s
sys 0m4.457s
Warning: cannot find your CPU L2 cache size in /proc/cpuinfo
[INFO] 2/7 No phasing for full alignment calling

[INFO] 5/7 Select candidates for full-alignment calling
Warning: cannot find your CPU L2 cache size in /proc/cpuinfo
[INFO] Set variants quality cutoff 28.0
[INFO] Set reference calls quality cutoff 32.0
Warning: cannot find your CPU L2 cache size in /proc/cpuinfo
[INFO] Low quality reference calls to be processed in NC_045512.2: 2268
[INFO] Low quality variants to be processed in NC_045512.2: 156

real    0m0.945s
user    0m0.893s
sys 0m0.058s

[INFO] 6/7 Call low-quality variants using full-alignment model
Calling variants ...
Segmentation fault

real    0m7.052s
user    0m6.251s
sys 0m0.473s
Warning: cannot find your CPU L2 cache size in /proc/cpuinfo
[WARNING] No vcf file found, output empty vcf file
[WARNING] Copying pileup.vcf.gz to /Users/cheshic/dev/repos/pipelines-tech/wic-viral-assembler/work/9c/7bfa116a33775c60e7dc6c3b2a0065/./merge_output.vcf.gz
[INFO] Exit in full-alignment variant calling

real    0m57.367s
user    2m13.145s
sys 0m5.249s
chris-cheshire commented 3 days ago

I should also say I am running on an ARM M3 mac and that I have 2 samples, one of which runs fine and the other produces this error