Browse Source

pipe metrics

Thomas 1 week ago
parent
commit
901d8e4963
9 changed files with 2312 additions and 632 deletions
  1. 833 0
      slurm-2536604.out
  2. 737 0
      slurm-2536605.out
  3. 418 0
      slurm-2536606.out
  4. 120 0
      slurm-2536607.out
  5. 7 6
      src/callers/clairs.rs
  6. 1 1
      src/callers/deep_variant.rs
  7. 1 1
      src/collection/bam_stats.rs
  8. 191 624
      src/collection/prom_run.rs
  9. 4 0
      src/helpers.rs

+ 833 - 0
slurm-2536604.out

@@ -0,0 +1,833 @@
+
+[COMMAND] /opt/bin/run_clairs --tumor_bam_fn /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/DUMCO_diag_hs1.bam --normal_bam_fn /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/norm/DUMCO_norm_hs1.bam --ref_fn /home/t_steimle/ref/hs1/chm13v2.0.fa --threads 40 --platform ont_r10_dorado_sup_5khz_ssrs --output_dir /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part4 --region chr10:63341881-134758134 --sample_name DUMCO_diag --include_all_ctgs --print_germline_calls --enable_indel_calling --enable_clair3_germline_output --use_longphase_for_intermediate_haplotagging True 
+
+[INFO] Create folder /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part4/logs
+[INFO] Create folder /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part4/tmp
+[INFO] Create folder /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part4/tmp/split_beds
+[INFO] Create folder /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part4/tmp/candidates
+[INFO] Create folder /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part4/tmp/pileup_tensor_can
+[INFO] Create folder /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part4/tmp/fa_tensor_can
+[INFO] Create folder /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part4/tmp/vcf_output
+[INFO] Create folder /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part4/tmp/tmp_vcf_output
+[INFO] Create folder /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part4/logs/clair3_log
+[INFO] Create folder /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part4/tmp/clair3_output/phased_output
+[INFO] Create folder /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part4/tmp/clair3_output/vcf
+[INFO] --include_all_ctgs enabled
+[INFO] Call variants in contigs: chr10
+[INFO] Number of chunks for each contig: 27
+
+[INFO] CALLER VERSION: 0.4.4
+[INFO] NORMAL BAM FILE PATH: /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/norm/DUMCO_norm_hs1.bam
+[INFO] TUMOR BAM FILE PATH: /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/DUMCO_diag_hs1.bam
+[INFO] REFERENCE FILE PATH: /home/t_steimle/ref/hs1/chm13v2.0.fa
+[INFO] PLATFORM: ont_r10_dorado_sup_5khz_ssrs
+[INFO] THREADS: 40
+[INFO] OUTPUT FOLDER: /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part4
+[INFO] OUTPUT VCF PATH: /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part4/output.vcf.gz
+[INFO] PILEUP MODEL PATH: /opt/conda/envs/clairs/bin/clairs_models/ont_r10_dorado_sup_5khz_ssrs/pileup.pkl
+[INFO] FULL-ALIGNMENT MODEL PATH: /opt/conda/envs/clairs/bin/clairs_models/ont_r10_dorado_sup_5khz_ssrs/full_alignment.pkl
+[INFO] BED FILE PATH: /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part4/tmp/region.bed
+[INFO] GENOTYPING MODE VCF FILE PATH: None
+[INFO] HYBRID MODE VCF FILE PATH: None
+[INFO] REGION FOR CALLING: chr10:63341881-134758134
+[INFO] CONTIGS FOR CALLING: None
+[INFO] CONDA BINARY PREFIX: /opt/conda/envs/clairs
+[INFO] SAMTOOLS BINARY PATH: samtools
+[INFO] PYTHON BINARY PATH: python3
+[INFO] PYPY BINARY PATH: pypy3
+[INFO] PARALLEL BINARY PATH: parallel
+[INFO] LONGPHASE BINARY PATH: /opt/conda/envs/clairs/bin/longphase
+[INFO] CHUNK SIZE: 5000000
+[INFO] SNV MINIMUM AF: 0.05
+[INFO] SNV MINIMUM QUAL: 8
+[INFO] INDEL MINIMUM AF: 0.1
+[INFO] INDEL PILEUP MODEL PATH: /opt/conda/envs/clairs/bin/clairs_models/ont_r10_dorado_sup_5khz_ssrs/indel/pileup.pkl
+[INFO] INDEL FULL-ALIGNMENT MODEL PATH: /opt/conda/envs/clairs/bin/clairs_models/ont_r10_dorado_sup_5khz_ssrs/indel/full_alignment.pkl
+[INFO] INDEL MINIMUM QUAL: 8
+[INFO] NORMAL VCF FILE PATH: None
+[INFO] DISABLE PHASING: False
+[INFO] ENABLE DRY RUN: False
+[INFO] ENABLE INDEL CALLING: True
+[INFO] ENABLE PRINTING REFERENCE CALLS: False
+[INFO] ENABLE PRINTING GERMLINE CALLS: True
+[INFO] ENABLE INCLUDING ALL CTGS FOR CALLING: True
+[INFO] ENABLE REMOVING INTERMEDIATE FILES: False
+
+[INFO] Call Germline Variants in Normal BAM using Clair3
+[INFO] RUN THE FOLLOWING COMMAND:
+( /opt/conda/envs/clairs/bin/run_clair3.sh --bam_fn /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/norm/DUMCO_norm_hs1.bam --ref_fn /home/t_steimle/ref/hs1/chm13v2.0.fa --model_path /opt/conda/envs/clairs/bin/clairs_models/clair3_models/r1041_e82_400bps_sup_v420 --platform ont --threads 40 --output /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part4/tmp/clair3_output/clair3_normal_output --ctg_name=chr10 --samtools=samtools --pypy=pypy3 --python=python3 --min_coverage=4 --snp_min_af=0.08 --indel_min_af=0.15 --longphase_for_phasing  ) 2>&1 | tee /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part4/logs/clair3_log/1_CLAIR3_NORMAL.log
+
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+[INFO] CLAIR3 VERSION: v1.0.8
+[INFO] BAM FILE PATH: /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/norm/DUMCO_norm_hs1.bam
+[INFO] REFERENCE FILE PATH: /home/t_steimle/ref/hs1/chm13v2.0.fa
+[INFO] MODEL PATH: /opt/conda/envs/clairs/bin/clairs_models/clair3_models/r1041_e82_400bps_sup_v420
+[INFO] OUTPUT FOLDER: /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part4/tmp/clair3_output/clair3_normal_output
+[INFO] PLATFORM: ont
+[INFO] THREADS: 40
+[INFO] BED FILE PATH: EMPTY
+[INFO] VCF FILE PATH: EMPTY
+[INFO] CONTIGS: chr10
+[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: /opt/conda/envs/clairs/bin/longphase
+[INFO] CHUNK SIZE: 5000000
+[INFO] FULL ALIGN PROPORTION: 0.7
+[INFO] FULL ALIGN REFERENCE PROPORTION: 0.1
+[INFO] PHASING PROPORTION: 0.7
+[INFO] MINIMUM MQ: 5
+[INFO] MINIMUM COVERAGE: 4
+[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: False
+[INFO] ENABLE HAPLOID SENSITIVE MODE: False
+[INFO] ENABLE INCLUDE ALL CTGS CALLING: False
+[INFO] ENABLE NO PHASING FOR FULL ALIGNMENT: False
+[INFO] ENABLE REMOVING INTERMEDIATE FILES: False
+[INFO] ENABLE LONGPHASE FOR INTERMEDIATE VCF PHASING: True
+[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
+
++ /opt/conda/envs/clairs/bin/scripts/clair3_c_impl.sh --bam_fn /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/norm/DUMCO_norm_hs1.bam --ref_fn /home/t_steimle/ref/hs1/chm13v2.0.fa --threads 40 --model_path /opt/conda/envs/clairs/bin/clairs_models/clair3_models/r1041_e82_400bps_sup_v420 --platform ont --output /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part4/tmp/clair3_output/clair3_normal_output --bed_fn=EMPTY --vcf_fn=EMPTY --ctg_name=chr10 --sample_name=SAMPLE --chunk_num=0 --chunk_size=5000000 --samtools=samtools --python=python3 --pypy=pypy3 --parallel=parallel --whatshap=whatshap --qual=2 --var_pct_full=0.7 --ref_pct_full=0.1 --var_pct_phasing=0.7 --snp_min_af=0.08 --indel_min_af=0.15 --min_mq=5 --min_coverage=4 --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=False --haploid_sensitive=False --include_all_ctgs=False --no_phasing_for_fa=False --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=True --longphase=/opt/conda/envs/clairs/bin/longphase --use_whatshap_for_intermediate_phasing=True --use_longphase_for_intermediate_phasing=True --use_whatshap_for_final_output_phasing=False --use_longphase_for_final_output_phasing=False --use_whatshap_for_final_output_haplotagging=False
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+
+[INFO] Check environment variables
+[INFO] Create folder /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part4/tmp/clair3_output/clair3_normal_output/log
+[INFO] Create folder /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part4/tmp/clair3_output/clair3_normal_output/tmp/pileup_output
+[INFO] Create folder /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part4/tmp/clair3_output/clair3_normal_output/tmp/merge_output
+[INFO] Create folder /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part4/tmp/clair3_output/clair3_normal_output/tmp/phase_output
+[INFO] Create folder /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part4/tmp/clair3_output/clair3_normal_output/tmp/gvcf_tmp_output
+[INFO] Create folder /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part4/tmp/clair3_output/clair3_normal_output/tmp/full_alignment_output
+[INFO] Create folder /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part4/tmp/clair3_output/clair3_normal_output/tmp/phase_output/phase_vcf
+[INFO] Create folder /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part4/tmp/clair3_output/clair3_normal_output/tmp/phase_output/phase_bam
+[INFO] Create folder /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part4/tmp/clair3_output/clair3_normal_output/tmp/full_alignment_output/candidate_bed
+[INFO] Call variant in contigs: chr10
+[INFO] Chunk number for each contig: 27
+[INFO] 1/7 Call variants using pileup model
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr10 (chunk 8/27) : 45826
+Total time elapsed: 104.02 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr10 (chunk 13/27) : 46506
+Total time elapsed: 114.35 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr10 (chunk 14/27) : 48034
+Total time elapsed: 115.67 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr10 (chunk 12/27) : 48340
+Total time elapsed: 116.09 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr10 (chunk 17/27) : 50227
+Total time elapsed: 116.94 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr10 (chunk 22/27) : 49884
+Total time elapsed: 117.63 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr10 (chunk 10/27) : 54843
+Total time elapsed: 119.86 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr10 (chunk 24/27) : 53181
+Total time elapsed: 121.26 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr10 (chunk 23/27) : 51547
+Total time elapsed: 122.53 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr10 (chunk 4/27) : 53706
+Total time elapsed: 122.44 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr10 (chunk 19/27) : 52944
+Total time elapsed: 124.83 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr10 (chunk 5/27) : 56433
+Total time elapsed: 127.15 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr10 (chunk 16/27) : 56555
+Total time elapsed: 127.94 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr10 (chunk 18/27) : 50434
+Total time elapsed: 103.09 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr10 (chunk 6/27) : 56922
+Total time elapsed: 131.36 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr10 (chunk 15/27) : 60420
+Total time elapsed: 133.49 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr10 (chunk 25/27) : 56153
+Total time elapsed: 133.36 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr10 (chunk 1/27) : 60078
+Total time elapsed: 134.57 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr10 (chunk 20/27) : 50606
+Total time elapsed: 108.22 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr10 (chunk 7/27) : 52716
+Total time elapsed: 109.48 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr10 (chunk 11/27) : 50928
+Total time elapsed: 110.13 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr10 (chunk 27/27) : 64119
+Total time elapsed: 138.75 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr10 (chunk 9/27) : 62446
+Total time elapsed: 139.40 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr10 (chunk 2/27) : 56222
+Total time elapsed: 113.42 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr10 (chunk 3/27) : 58962
+Total time elapsed: 118.98 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr10 (chunk 21/27) : 59650
+Total time elapsed: 119.24 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr10 (chunk 26/27) : 61242
+Total time elapsed: 120.26 s
+
+real	2m35.699s
+user	49m49.438s
+sys	5m19.265s
+
+[INFO] 2/7 Select heterozygous SNP variants for Whatshap phasing and haplotagging
+[INFO] Select heterozygous pileup variants exceeding phasing quality cutoff 18
+[INFO] Total heterozygous SNP positions selected: chr10: 110588
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+
+real	0m4.020s
+user	0m3.715s
+sys	0m0.222s
+
+[INFO] 3/7 Phase VCF file using LongPhase
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+LongPhase Ver 1.7
+
+--- File Parameter --- 
+SNP File      : /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part4/tmp/clair3_output/clair3_normal_output/tmp/phase_output/phase_vcf/chr10.vcf
+SV  File      : 
+MOD File      : 
+REF File      : /home/t_steimle/ref/hs1/chm13v2.0.fa
+Output Prefix : /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part4/tmp/clair3_output/clair3_normal_output/tmp/phase_output/phase_vcf/phased_chr10
+Generate Dot  : False
+BAM File      : /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/norm/DUMCO_norm_hs1.bam 
+
+--- Phasing Parameter --- 
+Seq Platform       : ONT
+Phase Indel        : False
+Distance Threshold : 300000
+Connect Adjacent   : 20
+Edge Threshold     : 0.7
+Mapping Quality    : 1
+Variant Confidence : 0.75
+ReadTag Confidence : 0.65
+
+parsing VCF ... 0s
+parsing SV VCF ... 0s
+parsing Meth VCF ... 0s
+reading reference ... 2s
+(chr10,12s)
+parsing total:  12s
+merge results ... 0s
+writeResult SNP ... 1s
+
+total process: 15s
+
+real	0m15.388s
+user	0m29.173s
+sys	0m1.943s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+
+[INFO] 5/7 Select candidates for full-alignment calling
+[INFO] Set variants quality cutoff 21.0
+[INFO] Set reference calls quality cutoff 14.0
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+[INFO] Low quality reference calls to be processed in chr10: 118735
+[INFO] Low quality variants to be processed in chr10: 196574
+
+real	0m4.194s
+user	0m3.841s
+sys	0m0.267s
+
+[INFO] 6/7 Call low-quality variants using full-alignment model
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr10 (chunk 14/32) : 10000
+Total time elapsed: 103.73 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr10 (chunk 22/32) : 10000
+Total time elapsed: 105.81 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr10 (chunk 21/32) : 10000
+Total time elapsed: 109.43 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr10 (chunk 25/32) : 10000
+Total time elapsed: 109.97 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr10 (chunk 9/32) : 10000
+Total time elapsed: 110.82 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr10 (chunk 6/32) : 10000
+Total time elapsed: 111.30 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr10 (chunk 12/32) : 10000
+Total time elapsed: 111.57 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr10 (chunk 20/32) : 10000
+Total time elapsed: 112.54 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr10 (chunk 19/32) : 10000
+Total time elapsed: 112.27 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr10 (chunk 11/32) : 10000
+Total time elapsed: 112.56 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr10 (chunk 16/32) : 10000
+Total time elapsed: 113.47 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr10 (chunk 18/32) : 10000
+Total time elapsed: 113.41 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr10 (chunk 24/32) : 10000
+Total time elapsed: 114.29 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr10 (chunk 13/32) : 10000
+Total time elapsed: 114.42 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr10 (chunk 23/32) : 10000
+Total time elapsed: 114.13 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr10 (chunk 8/32) : 10000
+Total time elapsed: 114.16 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr10 (chunk 4/32) : 10000
+Total time elapsed: 114.52 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr10 (chunk 29/32) : 10000
+Total time elapsed: 114.46 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr10 (chunk 28/32) : 10000
+Total time elapsed: 116.02 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr10 (chunk 26/32) : 10000
+Total time elapsed: 116.08 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr10 (chunk 30/32) : 10000
+Total time elapsed: 115.50 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr10 (chunk 15/32) : 10000
+Total time elapsed: 116.81 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr10 (chunk 27/32) : 10000
+Total time elapsed: 116.33 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr10 (chunk 7/32) : 10000
+Total time elapsed: 117.18 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr10 (chunk 3/32) : 10000
+Total time elapsed: 117.48 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr10 (chunk 2/32) : 10000
+Total time elapsed: 118.46 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr10 (chunk 17/32) : 10000
+Total time elapsed: 117.81 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr10 (chunk 5/32) : 10000
+Total time elapsed: 119.33 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr10 (chunk 1/32) : 10000
+Total time elapsed: 119.57 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr10 (chunk 10/32) : 10000
+Total time elapsed: 120.78 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr10 (chunk 32/32) : 5309
+Total time elapsed: 49.62 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr10 (chunk 31/32) : 10000
+Total time elapsed: 86.49 s
+
+real	3m19.572s
+user	57m4.441s
+sys	3m27.409s
+
+[INFO] 7/7 Merge pileup VCF and full-alignment VCF
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+[INFO] Pileup variants processed in chr10: 84279
+[INFO] Full-alignment variants processed in chr10: 203368
+
+real	0m5.865s
+user	0m6.249s
+sys	0m0.277s
+
+[INFO] Finish calling, output file: /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part4/tmp/clair3_output/clair3_normal_output/merge_output.vcf.gz
+
+real	6m46.315s
+user	107m56.463s
+sys	8m51.260s
+
+[INFO] Call Germline Variant in Tumor BAM using Clair3
+[INFO] RUN THE FOLLOWING COMMAND:
+( /opt/conda/envs/clairs/bin/run_clair3.sh --bam_fn /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/DUMCO_diag_hs1.bam --ref_fn /home/t_steimle/ref/hs1/chm13v2.0.fa --model_path /opt/conda/envs/clairs/bin/clairs_models/clair3_models/r1041_e82_400bps_sup_v420 --platform ont --threads 40 --output /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part4/tmp/clair3_output/clair3_tumor_output --ctg_name=chr10 --samtools=samtools --pypy=pypy3 --python=python3 --min_coverage=4 --snp_min_af=0.08 --indel_min_af=0.15 --longphase_for_phasing  ) 2>&1 | tee /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part4/logs/clair3_log/2_CLAIR3_TUMOR.log
+
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+[INFO] CLAIR3 VERSION: v1.0.8
+[INFO] BAM FILE PATH: /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/DUMCO_diag_hs1.bam
+[INFO] REFERENCE FILE PATH: /home/t_steimle/ref/hs1/chm13v2.0.fa
+[INFO] MODEL PATH: /opt/conda/envs/clairs/bin/clairs_models/clair3_models/r1041_e82_400bps_sup_v420
+[INFO] OUTPUT FOLDER: /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part4/tmp/clair3_output/clair3_tumor_output
+[INFO] PLATFORM: ont
+[INFO] THREADS: 40
+[INFO] BED FILE PATH: EMPTY
+[INFO] VCF FILE PATH: EMPTY
+[INFO] CONTIGS: chr10
+[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: /opt/conda/envs/clairs/bin/longphase
+[INFO] CHUNK SIZE: 5000000
+[INFO] FULL ALIGN PROPORTION: 0.7
+[INFO] FULL ALIGN REFERENCE PROPORTION: 0.1
+[INFO] PHASING PROPORTION: 0.7
+[INFO] MINIMUM MQ: 5
+[INFO] MINIMUM COVERAGE: 4
+[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: False
+[INFO] ENABLE HAPLOID SENSITIVE MODE: False
+[INFO] ENABLE INCLUDE ALL CTGS CALLING: False
+[INFO] ENABLE NO PHASING FOR FULL ALIGNMENT: False
+[INFO] ENABLE REMOVING INTERMEDIATE FILES: False
+[INFO] ENABLE LONGPHASE FOR INTERMEDIATE VCF PHASING: True
+[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
+
++ /opt/conda/envs/clairs/bin/scripts/clair3_c_impl.sh --bam_fn /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/DUMCO_diag_hs1.bam --ref_fn /home/t_steimle/ref/hs1/chm13v2.0.fa --threads 40 --model_path /opt/conda/envs/clairs/bin/clairs_models/clair3_models/r1041_e82_400bps_sup_v420 --platform ont --output /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part4/tmp/clair3_output/clair3_tumor_output --bed_fn=EMPTY --vcf_fn=EMPTY --ctg_name=chr10 --sample_name=SAMPLE --chunk_num=0 --chunk_size=5000000 --samtools=samtools --python=python3 --pypy=pypy3 --parallel=parallel --whatshap=whatshap --qual=2 --var_pct_full=0.7 --ref_pct_full=0.1 --var_pct_phasing=0.7 --snp_min_af=0.08 --indel_min_af=0.15 --min_mq=5 --min_coverage=4 --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=False --haploid_sensitive=False --include_all_ctgs=False --no_phasing_for_fa=False --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=True --longphase=/opt/conda/envs/clairs/bin/longphase --use_whatshap_for_intermediate_phasing=True --use_longphase_for_intermediate_phasing=True --use_whatshap_for_final_output_phasing=False --use_longphase_for_final_output_phasing=False --use_whatshap_for_final_output_haplotagging=False
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+
+[INFO] Check environment variables
+[INFO] Create folder /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part4/tmp/clair3_output/clair3_tumor_output/log
+[INFO] Create folder /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part4/tmp/clair3_output/clair3_tumor_output/tmp/pileup_output
+[INFO] Create folder /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part4/tmp/clair3_output/clair3_tumor_output/tmp/merge_output
+[INFO] Create folder /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part4/tmp/clair3_output/clair3_tumor_output/tmp/phase_output
+[INFO] Create folder /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part4/tmp/clair3_output/clair3_tumor_output/tmp/gvcf_tmp_output
+[INFO] Create folder /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part4/tmp/clair3_output/clair3_tumor_output/tmp/full_alignment_output
+[INFO] Create folder /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part4/tmp/clair3_output/clair3_tumor_output/tmp/phase_output/phase_vcf
+[INFO] Create folder /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part4/tmp/clair3_output/clair3_tumor_output/tmp/phase_output/phase_bam
+[INFO] Create folder /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part4/tmp/clair3_output/clair3_tumor_output/tmp/full_alignment_output/candidate_bed
+[INFO] Call variant in contigs: chr10
+[INFO] Chunk number for each contig: 27
+[INFO] 1/7 Call variants using pileup model
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr10 (chunk 18/27) : 11051
+Total time elapsed: 105.59 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr10 (chunk 23/27) : 11192
+Total time elapsed: 106.77 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr10 (chunk 21/27) : 11362
+Total time elapsed: 106.82 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr10 (chunk 17/27) : 11922
+Total time elapsed: 107.36 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr10 (chunk 14/27) : 13677
+Total time elapsed: 110.36 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr10 (chunk 2/27) : 15217
+Total time elapsed: 112.66 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr10 (chunk 24/27) : 8754
+Total time elapsed: 72.39 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr10 (chunk 15/27) : 11427
+Total time elapsed: 73.80 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr10 (chunk 20/27) : 10846
+Total time elapsed: 74.03 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr10 (chunk 12/27) : 12345
+Total time elapsed: 76.32 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr10 (chunk 13/27) : 10935
+Total time elapsed: 77.12 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr10 (chunk 22/27) : 10696
+Total time elapsed: 75.58 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr10 (chunk 7/27) : 12351
+Total time elapsed: 75.81 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr10 (chunk 11/27) : 13324
+Total time elapsed: 79.17 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr10 (chunk 26/27) : 14623
+Total time elapsed: 80.54 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr10 (chunk 25/27) : 14602
+Total time elapsed: 82.14 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr10 (chunk 6/27) : 17479
+Total time elapsed: 84.72 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr10 (chunk 27/27) : 17701
+Total time elapsed: 86.03 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr10 (chunk 16/27) : 8751
+Total time elapsed: 58.17 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr10 (chunk 4/27) : 12459
+Total time elapsed: 61.01 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr10 (chunk 19/27) : 11053
+Total time elapsed: 65.79 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr10 (chunk 1/27) : 16613
+Total time elapsed: 66.04 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr10 (chunk 5/27) : 11341
+Total time elapsed: 51.41 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr10 (chunk 10/27) : 15398
+Total time elapsed: 72.51 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr10 (chunk 3/27) : 14619
+Total time elapsed: 50.54 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr10 (chunk 8/27) : 21116
+Total time elapsed: 57.86 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr10 (chunk 9/27) : 71597
+Total time elapsed: 154.81 s
+
+real	4m30.245s
+user	30m10.643s
+sys	4m30.118s
+
+[INFO] 2/7 Select heterozygous SNP variants for Whatshap phasing and haplotagging
+[INFO] Select heterozygous pileup variants exceeding phasing quality cutoff 20
+[INFO] Total heterozygous SNP positions selected: chr10: 114549
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+
+real	0m1.928s
+user	0m1.668s
+sys	0m0.180s
+
+[INFO] 3/7 Phase VCF file using LongPhase
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+LongPhase Ver 1.7
+
+--- File Parameter --- 
+SNP File      : /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part4/tmp/clair3_output/clair3_tumor_output/tmp/phase_output/phase_vcf/chr10.vcf
+SV  File      : 
+MOD File      : 
+REF File      : /home/t_steimle/ref/hs1/chm13v2.0.fa
+Output Prefix : /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part4/tmp/clair3_output/clair3_tumor_output/tmp/phase_output/phase_vcf/phased_chr10
+Generate Dot  : False
+BAM File      : /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/DUMCO_diag_hs1.bam 
+
+--- Phasing Parameter --- 
+Seq Platform       : ONT
+Phase Indel        : False
+Distance Threshold : 300000
+Connect Adjacent   : 20
+Edge Threshold     : 0.7
+Mapping Quality    : 1
+Variant Confidence : 0.75
+ReadTag Confidence : 0.65
+
+parsing VCF ... 0s
+parsing SV VCF ... 0s
+parsing Meth VCF ... 0s
+reading reference ... 2s
+(chr10,54s)
+parsing total:  54s
+merge results ... 0s
+writeResult SNP ... 1s
+
+total process: 57s
+
+real	0m57.409s
+user	2m3.634s
+sys	0m8.114s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+
+[INFO] 5/7 Select candidates for full-alignment calling
+[INFO] Set variants quality cutoff 21.0
+[INFO] Set reference calls quality cutoff 7.0
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+[INFO] Low quality reference calls to be processed in chr10: 12658
+[INFO] Low quality variants to be processed in chr10: 199885
+
+real	0m1.785s
+user	0m1.545s
+sys	0m0.190s
+
+[INFO] 6/7 Call low-quality variants using full-alignment model
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr10 (chunk 22/22) : 2543
+Total time elapsed: 31.87 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr10 (chunk 7/22) : 10000
+Total time elapsed: 101.21 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr10 (chunk 8/22) : 10000
+Total time elapsed: 109.22 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr10 (chunk 5/22) : 10000
+Total time elapsed: 114.37 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr10 (chunk 9/22) : 10000
+Total time elapsed: 115.27 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr10 (chunk 2/22) : 10000
+Total time elapsed: 117.07 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr10 (chunk 13/22) : 10000
+Total time elapsed: 117.79 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr10 (chunk 3/22) : 10000
+Total time elapsed: 118.03 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr10 (chunk 1/22) : 10000
+Total time elapsed: 118.85 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr10 (chunk 11/22) : 10000
+Total time elapsed: 120.41 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr10 (chunk 18/22) : 10000
+Total time elapsed: 122.32 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr10 (chunk 20/22) : 10000
+Total time elapsed: 122.68 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr10 (chunk 10/22) : 10000
+Total time elapsed: 123.28 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr10 (chunk 19/22) : 10000
+Total time elapsed: 123.74 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr10 (chunk 16/22) : 10000
+Total time elapsed: 124.21 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr10 (chunk 15/22) : 10000
+Total time elapsed: 125.40 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr10 (chunk 4/22) : 10000
+Total time elapsed: 127.23 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr10 (chunk 12/22) : 10000
+Total time elapsed: 127.26 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr10 (chunk 21/22) : 10000
+Total time elapsed: 128.78 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr10 (chunk 6/22) : 10000
+Total time elapsed: 129.25 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr10 (chunk 17/22) : 10000
+Total time elapsed: 129.52 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr10 (chunk 14/22) : 10000
+Total time elapsed: 133.03 s
+
+real	2m16.589s
+user	40m23.948s
+sys	2m13.182s
+
+[INFO] 7/7 Merge pileup VCF and full-alignment VCF
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+[INFO] Pileup variants processed in chr10: 85952
+[INFO] Full-alignment variants processed in chr10: 189193
+
+real	0m3.285s
+user	0m3.344s
+sys	0m0.202s
+
+[INFO] Finish calling, output file: /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part4/tmp/clair3_output/clair3_tumor_output/merge_output.vcf.gz
+
+real	8m2.537s
+user	72m53.947s
+sys	6m53.306s
+
+[INFO] Select Heterozygous SNP for Phasing
+[INFO] RUN THE FOLLOWING COMMAND:
+( parallel --joblog /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part4/logs/clair3_log/parallel_1_select_hetero_snp_for_phasing.log -j 40 pypy3 /opt/bin/clairs.py select_hetero_snp_for_phasing --tumor_vcf_fn /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part4/tmp/clair3_output/clair3_tumor_output/merge_output.vcf.gz --normal_vcf_fn /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part4/tmp/clair3_output/clair3_normal_output/merge_output.vcf.gz --output_folder /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part4/tmp/clair3_output/vcf --ctg_name {1} --use_heterozygous_snp_in_normal_sample_for_intermediate_phasing True :::: /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part4/tmp/CONTIGS ) 2>&1 | tee /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part4/logs/clair3_log/1_select_hetero_snp_for_phasing.log
+
+[INFO] Total HET SNP calls selected: chr10: 154989, not found:991, not match:82, low_qual_count:0. Total normal:154772 Total tumor:156062, pro: 0.9931
+
+[INFO] Phase the Tumor BAM
+[INFO] RUN THE FOLLOWING COMMAND:
+( parallel --joblog /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part4/logs/clair3_log/parallel_4_phase_tumor.log -j 40 /opt/conda/envs/clairs/bin/longphase phase  -s /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part4/tmp/clair3_output/vcf/{1}.vcf -b /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/DUMCO_diag_hs1.bam -r /home/t_steimle/ref/hs1/chm13v2.0.fa -t 40 -o /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part4/tmp/clair3_output/phased_output/tumor_phased_{1} --ont :::: /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part4/tmp/CONTIGS && parallel -j 40 bgzip -f /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part4/tmp/clair3_output/phased_output/tumor_phased_{1}.vcf :::: /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part4/tmp/CONTIGS ) 2>&1 | tee /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part4/logs/clair3_log/4_phase_tumor.log && parallel -j 40 tabix -f -p vcf /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part4/tmp/clair3_output/phased_output/tumor_phased_{1}.vcf.gz :::: /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part4/tmp/CONTIGS
+
+LongPhase Ver 1.7
+
+--- File Parameter --- 
+SNP File      : /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part4/tmp/clair3_output/vcf/chr10.vcf
+SV  File      : 
+MOD File      : 
+REF File      : /home/t_steimle/ref/hs1/chm13v2.0.fa
+Output Prefix : /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part4/tmp/clair3_output/phased_output/tumor_phased_chr10
+Generate Dot  : False
+BAM File      : /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/DUMCO_diag_hs1.bam 
+
+--- Phasing Parameter --- 
+Seq Platform       : ONT
+Phase Indel        : False
+Distance Threshold : 300000
+Connect Adjacent   : 20
+Edge Threshold     : 0.7
+Mapping Quality    : 1
+Variant Confidence : 0.75
+ReadTag Confidence : 0.65
+
+parsing VCF ... 0s
+parsing SV VCF ... 0s
+parsing Meth VCF ... 0s
+reading reference ... 2s
+(chr10,78s)
+parsing total:  78s
+merge results ... 0s
+writeResult SNP ... 1s
+
+total process: 81s
+
+[INFO] Haplotag the Tumor BAM
+[INFO] RUN THE FOLLOWING COMMAND:
+( parallel --joblog /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part4/logs/clair3_log/parallel_5_haplotag_tumor.log -j 40 /opt/conda/envs/clairs/bin/longphase haplotag -o /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part4/tmp/clair3_output/phased_output/tumor_{1} --reference /home/t_steimle/ref/hs1/chm13v2.0.fa --region {1}  -s /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part4/tmp/clair3_output/phased_output/tumor_phased_{1}.vcf.gz -b /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/DUMCO_diag_hs1.bam :::: /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part4/tmp/CONTIGS ) 2>&1 | tee /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part4/logs/clair3_log/5_tumor_haplotag.log && parallel -j 40 samtools index  -@40 /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part4/tmp/clair3_output/phased_output/tumor_{1}.bam :::: /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part4/tmp/CONTIGS
+

+ 737 - 0
slurm-2536605.out

@@ -0,0 +1,737 @@
+
+[COMMAND] /opt/bin/run_clairs --tumor_bam_fn /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/DUMCO_diag_hs1.bam --normal_bam_fn /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/norm/DUMCO_norm_hs1.bam --ref_fn /home/t_steimle/ref/hs1/chm13v2.0.fa --threads 40 --platform ont_r10_dorado_sup_5khz_ssrs --output_dir /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part10 --region chr14:1-14158555 --sample_name DUMCO_diag --include_all_ctgs --print_germline_calls --enable_indel_calling --enable_clair3_germline_output --use_longphase_for_intermediate_haplotagging True 
+
+[INFO] Create folder /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part10/logs
+[INFO] Create folder /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part10/tmp
+[INFO] Create folder /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part10/tmp/split_beds
+[INFO] Create folder /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part10/tmp/candidates
+[INFO] Create folder /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part10/tmp/pileup_tensor_can
+[INFO] Create folder /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part10/tmp/fa_tensor_can
+[INFO] Create folder /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part10/tmp/vcf_output
+[INFO] Create folder /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part10/tmp/tmp_vcf_output
+[INFO] Create folder /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part10/logs/clair3_log
+[INFO] Create folder /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part10/tmp/clair3_output/phased_output
+[INFO] Create folder /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part10/tmp/clair3_output/vcf
+[INFO] --include_all_ctgs enabled
+[INFO] Call variants in contigs: chr14
+[INFO] Number of chunks for each contig: 21
+
+[INFO] CALLER VERSION: 0.4.4
+[INFO] NORMAL BAM FILE PATH: /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/norm/DUMCO_norm_hs1.bam
+[INFO] TUMOR BAM FILE PATH: /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/DUMCO_diag_hs1.bam
+[INFO] REFERENCE FILE PATH: /home/t_steimle/ref/hs1/chm13v2.0.fa
+[INFO] PLATFORM: ont_r10_dorado_sup_5khz_ssrs
+[INFO] THREADS: 40
+[INFO] OUTPUT FOLDER: /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part10
+[INFO] OUTPUT VCF PATH: /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part10/output.vcf.gz
+[INFO] PILEUP MODEL PATH: /opt/conda/envs/clairs/bin/clairs_models/ont_r10_dorado_sup_5khz_ssrs/pileup.pkl
+[INFO] FULL-ALIGNMENT MODEL PATH: /opt/conda/envs/clairs/bin/clairs_models/ont_r10_dorado_sup_5khz_ssrs/full_alignment.pkl
+[INFO] BED FILE PATH: /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part10/tmp/region.bed
+[INFO] GENOTYPING MODE VCF FILE PATH: None
+[INFO] HYBRID MODE VCF FILE PATH: None
+[INFO] REGION FOR CALLING: chr14:1-14158555
+[INFO] CONTIGS FOR CALLING: None
+[INFO] CONDA BINARY PREFIX: /opt/conda/envs/clairs
+[INFO] SAMTOOLS BINARY PATH: samtools
+[INFO] PYTHON BINARY PATH: python3
+[INFO] PYPY BINARY PATH: pypy3
+[INFO] PARALLEL BINARY PATH: parallel
+[INFO] LONGPHASE BINARY PATH: /opt/conda/envs/clairs/bin/longphase
+[INFO] CHUNK SIZE: 5000000
+[INFO] SNV MINIMUM AF: 0.05
+[INFO] SNV MINIMUM QUAL: 8
+[INFO] INDEL MINIMUM AF: 0.1
+[INFO] INDEL PILEUP MODEL PATH: /opt/conda/envs/clairs/bin/clairs_models/ont_r10_dorado_sup_5khz_ssrs/indel/pileup.pkl
+[INFO] INDEL FULL-ALIGNMENT MODEL PATH: /opt/conda/envs/clairs/bin/clairs_models/ont_r10_dorado_sup_5khz_ssrs/indel/full_alignment.pkl
+[INFO] INDEL MINIMUM QUAL: 8
+[INFO] NORMAL VCF FILE PATH: None
+[INFO] DISABLE PHASING: False
+[INFO] ENABLE DRY RUN: False
+[INFO] ENABLE INDEL CALLING: True
+[INFO] ENABLE PRINTING REFERENCE CALLS: False
+[INFO] ENABLE PRINTING GERMLINE CALLS: True
+[INFO] ENABLE INCLUDING ALL CTGS FOR CALLING: True
+[INFO] ENABLE REMOVING INTERMEDIATE FILES: False
+
+[INFO] Call Germline Variants in Normal BAM using Clair3
+[INFO] RUN THE FOLLOWING COMMAND:
+( /opt/conda/envs/clairs/bin/run_clair3.sh --bam_fn /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/norm/DUMCO_norm_hs1.bam --ref_fn /home/t_steimle/ref/hs1/chm13v2.0.fa --model_path /opt/conda/envs/clairs/bin/clairs_models/clair3_models/r1041_e82_400bps_sup_v420 --platform ont --threads 40 --output /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part10/tmp/clair3_output/clair3_normal_output --ctg_name=chr14 --samtools=samtools --pypy=pypy3 --python=python3 --min_coverage=4 --snp_min_af=0.08 --indel_min_af=0.15 --longphase_for_phasing  ) 2>&1 | tee /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part10/logs/clair3_log/1_CLAIR3_NORMAL.log
+
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+[INFO] CLAIR3 VERSION: v1.0.8
+[INFO] BAM FILE PATH: /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/norm/DUMCO_norm_hs1.bam
+[INFO] REFERENCE FILE PATH: /home/t_steimle/ref/hs1/chm13v2.0.fa
+[INFO] MODEL PATH: /opt/conda/envs/clairs/bin/clairs_models/clair3_models/r1041_e82_400bps_sup_v420
+[INFO] OUTPUT FOLDER: /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part10/tmp/clair3_output/clair3_normal_output
+[INFO] PLATFORM: ont
+[INFO] THREADS: 40
+[INFO] BED FILE PATH: EMPTY
+[INFO] VCF FILE PATH: EMPTY
+[INFO] CONTIGS: chr14
+[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: /opt/conda/envs/clairs/bin/longphase
+[INFO] CHUNK SIZE: 5000000
+[INFO] FULL ALIGN PROPORTION: 0.7
+[INFO] FULL ALIGN REFERENCE PROPORTION: 0.1
+[INFO] PHASING PROPORTION: 0.7
+[INFO] MINIMUM MQ: 5
+[INFO] MINIMUM COVERAGE: 4
+[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: False
+[INFO] ENABLE HAPLOID SENSITIVE MODE: False
+[INFO] ENABLE INCLUDE ALL CTGS CALLING: False
+[INFO] ENABLE NO PHASING FOR FULL ALIGNMENT: False
+[INFO] ENABLE REMOVING INTERMEDIATE FILES: False
+[INFO] ENABLE LONGPHASE FOR INTERMEDIATE VCF PHASING: True
+[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
+
++ /opt/conda/envs/clairs/bin/scripts/clair3_c_impl.sh --bam_fn /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/norm/DUMCO_norm_hs1.bam --ref_fn /home/t_steimle/ref/hs1/chm13v2.0.fa --threads 40 --model_path /opt/conda/envs/clairs/bin/clairs_models/clair3_models/r1041_e82_400bps_sup_v420 --platform ont --output /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part10/tmp/clair3_output/clair3_normal_output --bed_fn=EMPTY --vcf_fn=EMPTY --ctg_name=chr14 --sample_name=SAMPLE --chunk_num=0 --chunk_size=5000000 --samtools=samtools --python=python3 --pypy=pypy3 --parallel=parallel --whatshap=whatshap --qual=2 --var_pct_full=0.7 --ref_pct_full=0.1 --var_pct_phasing=0.7 --snp_min_af=0.08 --indel_min_af=0.15 --min_mq=5 --min_coverage=4 --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=False --haploid_sensitive=False --include_all_ctgs=False --no_phasing_for_fa=False --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=True --longphase=/opt/conda/envs/clairs/bin/longphase --use_whatshap_for_intermediate_phasing=True --use_longphase_for_intermediate_phasing=True --use_whatshap_for_final_output_phasing=False --use_longphase_for_final_output_phasing=False --use_whatshap_for_final_output_haplotagging=False
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+
+[INFO] Check environment variables
+[INFO] Create folder /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part10/tmp/clair3_output/clair3_normal_output/log
+[INFO] Create folder /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part10/tmp/clair3_output/clair3_normal_output/tmp/pileup_output
+[INFO] Create folder /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part10/tmp/clair3_output/clair3_normal_output/tmp/merge_output
+[INFO] Create folder /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part10/tmp/clair3_output/clair3_normal_output/tmp/phase_output
+[INFO] Create folder /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part10/tmp/clair3_output/clair3_normal_output/tmp/gvcf_tmp_output
+[INFO] Create folder /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part10/tmp/clair3_output/clair3_normal_output/tmp/full_alignment_output
+[INFO] Create folder /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part10/tmp/clair3_output/clair3_normal_output/tmp/phase_output/phase_vcf
+[INFO] Create folder /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part10/tmp/clair3_output/clair3_normal_output/tmp/phase_output/phase_bam
+[INFO] Create folder /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part10/tmp/clair3_output/clair3_normal_output/tmp/full_alignment_output/candidate_bed
+[INFO] Call variant in contigs: chr14
+[INFO] Chunk number for each contig: 21
+[INFO] 1/7 Call variants using pileup model
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr14 (chunk 3/21) : 27087
+Total time elapsed: 67.49 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr14 (chunk 17/21) : 45594
+Total time elapsed: 100.19 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr14 (chunk 8/21) : 44012
+Total time elapsed: 100.23 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr14 (chunk 9/21) : 45077
+Total time elapsed: 103.05 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr14 (chunk 6/21) : 46771
+Total time elapsed: 106.08 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr14 (chunk 13/21) : 48523
+Total time elapsed: 107.31 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr14 (chunk 10/21) : 48629
+Total time elapsed: 107.79 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr14 (chunk 7/21) : 46998
+Total time elapsed: 110.66 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr14 (chunk 5/21) : 46930
+Total time elapsed: 111.19 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr14 (chunk 12/21) : 48751
+Total time elapsed: 112.04 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr14 (chunk 11/21) : 49628
+Total time elapsed: 112.84 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr14 (chunk 16/21) : 48404
+Total time elapsed: 113.65 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr14 (chunk 14/21) : 52138
+Total time elapsed: 114.64 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr14 (chunk 18/21) : 51792
+Total time elapsed: 116.28 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr14 (chunk 19/21) : 52771
+Total time elapsed: 117.06 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr14 (chunk 4/21) : 55960
+Total time elapsed: 119.54 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr14 (chunk 15/21) : 58588
+Total time elapsed: 120.64 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr14 (chunk 20/21) : 56358
+Total time elapsed: 124.53 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr14 (chunk 2/21) : 71708
+Total time elapsed: 137.35 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr14 (chunk 21/21) : 74382
+Total time elapsed: 139.88 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr14 (chunk 1/21) : 75522
+Total time elapsed: 148.63 s
+
+real	2m36.411s
+user	36m19.108s
+sys	3m11.518s
+
+[INFO] 2/7 Select heterozygous SNP variants for Whatshap phasing and haplotagging
+[INFO] Select heterozygous pileup variants exceeding phasing quality cutoff 17
+[INFO] Total heterozygous SNP positions selected: chr14: 98793
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+
+real	0m3.189s
+user	0m3.007s
+sys	0m0.160s
+
+[INFO] 3/7 Phase VCF file using LongPhase
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+LongPhase Ver 1.7
+
+--- File Parameter --- 
+SNP File      : /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part10/tmp/clair3_output/clair3_normal_output/tmp/phase_output/phase_vcf/chr14.vcf
+SV  File      : 
+MOD File      : 
+REF File      : /home/t_steimle/ref/hs1/chm13v2.0.fa
+Output Prefix : /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part10/tmp/clair3_output/clair3_normal_output/tmp/phase_output/phase_vcf/phased_chr14
+Generate Dot  : False
+BAM File      : /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/norm/DUMCO_norm_hs1.bam 
+
+--- Phasing Parameter --- 
+Seq Platform       : ONT
+Phase Indel        : False
+Distance Threshold : 300000
+Connect Adjacent   : 20
+Edge Threshold     : 0.7
+Mapping Quality    : 1
+Variant Confidence : 0.75
+ReadTag Confidence : 0.65
+
+parsing VCF ... 0s
+parsing SV VCF ... 0s
+parsing Meth VCF ... 0s
+reading reference ... 2s
+(chr14,11s)
+parsing total:  11s
+merge results ... 0s
+writeResult SNP ... 1s
+
+total process: 14s
+
+real	0m14.363s
+user	0m28.692s
+sys	0m2.098s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+
+[INFO] 5/7 Select candidates for full-alignment calling
+[INFO] Set variants quality cutoff 21.0
+[INFO] Set reference calls quality cutoff 14.0
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+[INFO] Low quality reference calls to be processed in chr14: 87036
+[INFO] Low quality variants to be processed in chr14: 156699
+
+real	0m3.580s
+user	0m3.267s
+sys	0m0.249s
+
+[INFO] 6/7 Call low-quality variants using full-alignment model
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr14 (chunk 25/25) : 3735
+Total time elapsed: 40.53 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr14 (chunk 3/25) : 10000
+Total time elapsed: 91.52 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr14 (chunk 5/25) : 10000
+Total time elapsed: 93.21 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr14 (chunk 6/25) : 10000
+Total time elapsed: 95.77 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr14 (chunk 1/25) : 10000
+Total time elapsed: 99.10 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr14 (chunk 19/25) : 10000
+Total time elapsed: 102.41 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr14 (chunk 2/25) : 10000
+Total time elapsed: 103.49 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr14 (chunk 22/25) : 10000
+Total time elapsed: 103.63 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr14 (chunk 7/25) : 10000
+Total time elapsed: 104.57 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr14 (chunk 14/25) : 10000
+Total time elapsed: 105.63 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr14 (chunk 4/25) : 10000
+Total time elapsed: 105.90 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr14 (chunk 23/25) : 10000
+Total time elapsed: 105.80 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr14 (chunk 15/25) : 10000
+Total time elapsed: 106.78 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr14 (chunk 8/25) : 10000
+Total time elapsed: 108.01 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr14 (chunk 21/25) : 10000
+Total time elapsed: 108.26 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr14 (chunk 18/25) : 10000
+Total time elapsed: 108.66 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr14 (chunk 12/25) : 10000
+Total time elapsed: 109.06 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr14 (chunk 17/25) : 10000
+Total time elapsed: 109.26 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr14 (chunk 10/25) : 10000
+Total time elapsed: 110.99 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr14 (chunk 20/25) : 10000
+Total time elapsed: 112.31 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr14 (chunk 9/25) : 10000
+Total time elapsed: 113.59 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr14 (chunk 11/25) : 10000
+Total time elapsed: 113.18 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr14 (chunk 24/25) : 10000
+Total time elapsed: 113.74 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr14 (chunk 13/25) : 10000
+Total time elapsed: 114.75 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr14 (chunk 16/25) : 10000
+Total time elapsed: 117.89 s
+
+real	2m2.215s
+user	41m45.362s
+sys	2m39.606s
+
+[INFO] 7/7 Merge pileup VCF and full-alignment VCF
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+[INFO] Pileup variants processed in chr14: 67189
+[INFO] Full-alignment variants processed in chr14: 152188
+
+real	0m4.735s
+user	0m4.953s
+sys	0m0.275s
+
+[INFO] Finish calling, output file: /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part10/tmp/clair3_output/clair3_normal_output/merge_output.vcf.gz
+
+real	5m21.522s
+user	78m59.878s
+sys	5m55.410s
+
+[INFO] Call Germline Variant in Tumor BAM using Clair3
+[INFO] RUN THE FOLLOWING COMMAND:
+( /opt/conda/envs/clairs/bin/run_clair3.sh --bam_fn /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/DUMCO_diag_hs1.bam --ref_fn /home/t_steimle/ref/hs1/chm13v2.0.fa --model_path /opt/conda/envs/clairs/bin/clairs_models/clair3_models/r1041_e82_400bps_sup_v420 --platform ont --threads 40 --output /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part10/tmp/clair3_output/clair3_tumor_output --ctg_name=chr14 --samtools=samtools --pypy=pypy3 --python=python3 --min_coverage=4 --snp_min_af=0.08 --indel_min_af=0.15 --longphase_for_phasing  ) 2>&1 | tee /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part10/logs/clair3_log/2_CLAIR3_TUMOR.log
+
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+[INFO] CLAIR3 VERSION: v1.0.8
+[INFO] BAM FILE PATH: /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/DUMCO_diag_hs1.bam
+[INFO] REFERENCE FILE PATH: /home/t_steimle/ref/hs1/chm13v2.0.fa
+[INFO] MODEL PATH: /opt/conda/envs/clairs/bin/clairs_models/clair3_models/r1041_e82_400bps_sup_v420
+[INFO] OUTPUT FOLDER: /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part10/tmp/clair3_output/clair3_tumor_output
+[INFO] PLATFORM: ont
+[INFO] THREADS: 40
+[INFO] BED FILE PATH: EMPTY
+[INFO] VCF FILE PATH: EMPTY
+[INFO] CONTIGS: chr14
+[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: /opt/conda/envs/clairs/bin/longphase
+[INFO] CHUNK SIZE: 5000000
+[INFO] FULL ALIGN PROPORTION: 0.7
+[INFO] FULL ALIGN REFERENCE PROPORTION: 0.1
+[INFO] PHASING PROPORTION: 0.7
+[INFO] MINIMUM MQ: 5
+[INFO] MINIMUM COVERAGE: 4
+[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: False
+[INFO] ENABLE HAPLOID SENSITIVE MODE: False
+[INFO] ENABLE INCLUDE ALL CTGS CALLING: False
+[INFO] ENABLE NO PHASING FOR FULL ALIGNMENT: False
+[INFO] ENABLE REMOVING INTERMEDIATE FILES: False
+[INFO] ENABLE LONGPHASE FOR INTERMEDIATE VCF PHASING: True
+[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
+
++ /opt/conda/envs/clairs/bin/scripts/clair3_c_impl.sh --bam_fn /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/DUMCO_diag_hs1.bam --ref_fn /home/t_steimle/ref/hs1/chm13v2.0.fa --threads 40 --model_path /opt/conda/envs/clairs/bin/clairs_models/clair3_models/r1041_e82_400bps_sup_v420 --platform ont --output /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part10/tmp/clair3_output/clair3_tumor_output --bed_fn=EMPTY --vcf_fn=EMPTY --ctg_name=chr14 --sample_name=SAMPLE --chunk_num=0 --chunk_size=5000000 --samtools=samtools --python=python3 --pypy=pypy3 --parallel=parallel --whatshap=whatshap --qual=2 --var_pct_full=0.7 --ref_pct_full=0.1 --var_pct_phasing=0.7 --snp_min_af=0.08 --indel_min_af=0.15 --min_mq=5 --min_coverage=4 --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=False --haploid_sensitive=False --include_all_ctgs=False --no_phasing_for_fa=False --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=True --longphase=/opt/conda/envs/clairs/bin/longphase --use_whatshap_for_intermediate_phasing=True --use_longphase_for_intermediate_phasing=True --use_whatshap_for_final_output_phasing=False --use_longphase_for_final_output_phasing=False --use_whatshap_for_final_output_haplotagging=False
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+
+[INFO] Check environment variables
+[INFO] Create folder /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part10/tmp/clair3_output/clair3_tumor_output/log
+[INFO] Create folder /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part10/tmp/clair3_output/clair3_tumor_output/tmp/pileup_output
+[INFO] Create folder /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part10/tmp/clair3_output/clair3_tumor_output/tmp/merge_output
+[INFO] Create folder /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part10/tmp/clair3_output/clair3_tumor_output/tmp/phase_output
+[INFO] Create folder /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part10/tmp/clair3_output/clair3_tumor_output/tmp/gvcf_tmp_output
+[INFO] Create folder /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part10/tmp/clair3_output/clair3_tumor_output/tmp/full_alignment_output
+[INFO] Create folder /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part10/tmp/clair3_output/clair3_tumor_output/tmp/phase_output/phase_vcf
+[INFO] Create folder /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part10/tmp/clair3_output/clair3_tumor_output/tmp/phase_output/phase_bam
+[INFO] Create folder /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part10/tmp/clair3_output/clair3_tumor_output/tmp/full_alignment_output/candidate_bed
+[INFO] Call variant in contigs: chr14
+[INFO] Chunk number for each contig: 21
+[INFO] 1/7 Call variants using pileup model
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr14 (chunk 13/21) : 9272
+Total time elapsed: 83.25 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr14 (chunk 16/21) : 10505
+Total time elapsed: 83.09 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr14 (chunk 9/21) : 9874
+Total time elapsed: 83.84 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr14 (chunk 12/21) : 10329
+Total time elapsed: 84.85 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr14 (chunk 10/21) : 10784
+Total time elapsed: 84.83 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr14 (chunk 11/21) : 10970
+Total time elapsed: 85.64 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr14 (chunk 8/21) : 11132
+Total time elapsed: 85.34 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr14 (chunk 5/21) : 10500
+Total time elapsed: 86.17 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr14 (chunk 7/21) : 11262
+Total time elapsed: 86.28 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr14 (chunk 15/21) : 11428
+Total time elapsed: 88.28 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr14 (chunk 3/21) : 24051
+Total time elapsed: 107.75 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr14 (chunk 14/21) : 9848
+Total time elapsed: 54.85 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr14 (chunk 20/21) : 10535
+Total time elapsed: 56.16 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr14 (chunk 18/21) : 10561
+Total time elapsed: 56.64 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr14 (chunk 6/21) : 11505
+Total time elapsed: 57.66 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr14 (chunk 17/21) : 10878
+Total time elapsed: 59.43 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr14 (chunk 19/21) : 10682
+Total time elapsed: 59.99 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr14 (chunk 4/21) : 13820
+Total time elapsed: 60.94 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr14 (chunk 21/21) : 21301
+Total time elapsed: 70.54 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr14 (chunk 2/21) : 49177
+Total time elapsed: 151.29 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr14 (chunk 1/21) : 56135
+Total time elapsed: 123.51 s
+
+real	3m36.782s
+user	21m31.870s
+sys	2m35.445s
+
+[INFO] 2/7 Select heterozygous SNP variants for Whatshap phasing and haplotagging
+[INFO] Select heterozygous pileup variants exceeding phasing quality cutoff 19
+[INFO] Total heterozygous SNP positions selected: chr14: 92503
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+
+real	0m1.739s
+user	0m1.463s
+sys	0m0.206s
+
+[INFO] 3/7 Phase VCF file using LongPhase
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+LongPhase Ver 1.7
+
+--- File Parameter --- 
+SNP File      : /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part10/tmp/clair3_output/clair3_tumor_output/tmp/phase_output/phase_vcf/chr14.vcf
+SV  File      : 
+MOD File      : 
+REF File      : /home/t_steimle/ref/hs1/chm13v2.0.fa
+Output Prefix : /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part10/tmp/clair3_output/clair3_tumor_output/tmp/phase_output/phase_vcf/phased_chr14
+Generate Dot  : False
+BAM File      : /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/DUMCO_diag_hs1.bam 
+
+--- Phasing Parameter --- 
+Seq Platform       : ONT
+Phase Indel        : False
+Distance Threshold : 300000
+Connect Adjacent   : 20
+Edge Threshold     : 0.7
+Mapping Quality    : 1
+Variant Confidence : 0.75
+ReadTag Confidence : 0.65
+
+parsing VCF ... 0s
+parsing SV VCF ... 0s
+parsing Meth VCF ... 0s
+reading reference ... 2s
+(chr14,46s)
+parsing total:  46s
+merge results ... 0s
+writeResult SNP ... 1s
+
+total process: 49s
+
+real	0m49.025s
+user	1m52.723s
+sys	0m7.403s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+
+[INFO] 5/7 Select candidates for full-alignment calling
+[INFO] Set variants quality cutoff 21.0
+[INFO] Set reference calls quality cutoff 8.0
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+[INFO] Low quality reference calls to be processed in chr14: 12071
+[INFO] Low quality variants to be processed in chr14: 149419
+
+real	0m1.560s
+user	0m1.344s
+sys	0m0.181s
+
+[INFO] 6/7 Call low-quality variants using full-alignment model
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr14 (chunk 17/17) : 1490
+Total time elapsed: 17.69 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr14 (chunk 2/17) : 10000
+Total time elapsed: 77.45 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr14 (chunk 3/17) : 10000
+Total time elapsed: 85.49 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr14 (chunk 4/17) : 10000
+Total time elapsed: 108.69 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr14 (chunk 16/17) : 10000
+Total time elapsed: 111.72 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr14 (chunk 5/17) : 10000
+Total time elapsed: 111.92 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr14 (chunk 6/17) : 10000
+Total time elapsed: 113.19 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr14 (chunk 1/17) : 10000
+Total time elapsed: 116.51 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr14 (chunk 7/17) : 10000
+Total time elapsed: 118.51 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr14 (chunk 9/17) : 10000
+Total time elapsed: 120.23 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr14 (chunk 8/17) : 10000
+Total time elapsed: 120.33 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr14 (chunk 15/17) : 10000
+Total time elapsed: 120.91 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr14 (chunk 12/17) : 10000
+Total time elapsed: 121.70 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr14 (chunk 10/17) : 10000
+Total time elapsed: 125.60 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr14 (chunk 11/17) : 10000
+Total time elapsed: 132.71 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr14 (chunk 13/17) : 10000
+Total time elapsed: 133.62 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr14 (chunk 14/17) : 10000
+Total time elapsed: 137.02 s
+
+real	2m20.809s
+user	29m25.734s
+sys	1m36.544s
+
+[INFO] 7/7 Merge pileup VCF and full-alignment VCF
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+[INFO] Pileup variants processed in chr14: 64294
+[INFO] Full-alignment variants processed in chr14: 125164
+
+real	0m2.550s
+user	0m2.580s
+sys	0m0.179s
+
+[INFO] Finish calling, output file: /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part10/tmp/clair3_output/clair3_tumor_output/merge_output.vcf.gz
+
+real	7m1.826s
+user	53m3.431s
+sys	4m21.166s
+
+[INFO] Select Heterozygous SNP for Phasing
+[INFO] RUN THE FOLLOWING COMMAND:
+( parallel --joblog /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part10/logs/clair3_log/parallel_1_select_hetero_snp_for_phasing.log -j 40 pypy3 /opt/bin/clairs.py select_hetero_snp_for_phasing --tumor_vcf_fn /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part10/tmp/clair3_output/clair3_tumor_output/merge_output.vcf.gz --normal_vcf_fn /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part10/tmp/clair3_output/clair3_normal_output/merge_output.vcf.gz --output_folder /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part10/tmp/clair3_output/vcf --ctg_name {1} --use_heterozygous_snp_in_normal_sample_for_intermediate_phasing True :::: /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part10/tmp/CONTIGS ) 2>&1 | tee /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part10/logs/clair3_log/1_select_hetero_snp_for_phasing.log
+
+[INFO] Total HET SNP calls selected: chr14: 109551, not found:498, not match:37, low_qual_count:0. Total normal:129319 Total tumor:110086, pro: 0.9951
+
+[INFO] Phase the Tumor BAM
+[INFO] RUN THE FOLLOWING COMMAND:
+( parallel --joblog /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part10/logs/clair3_log/parallel_4_phase_tumor.log -j 40 /opt/conda/envs/clairs/bin/longphase phase  -s /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part10/tmp/clair3_output/vcf/{1}.vcf -b /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/DUMCO_diag_hs1.bam -r /home/t_steimle/ref/hs1/chm13v2.0.fa -t 40 -o /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part10/tmp/clair3_output/phased_output/tumor_phased_{1} --ont :::: /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part10/tmp/CONTIGS && parallel -j 40 bgzip -f /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part10/tmp/clair3_output/phased_output/tumor_phased_{1}.vcf :::: /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part10/tmp/CONTIGS ) 2>&1 | tee /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part10/logs/clair3_log/4_phase_tumor.log && parallel -j 40 tabix -f -p vcf /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part10/tmp/clair3_output/phased_output/tumor_phased_{1}.vcf.gz :::: /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part10/tmp/CONTIGS
+
+LongPhase Ver 1.7
+
+--- File Parameter --- 
+SNP File      : /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part10/tmp/clair3_output/vcf/chr14.vcf
+SV  File      : 
+MOD File      : 
+REF File      : /home/t_steimle/ref/hs1/chm13v2.0.fa
+Output Prefix : /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part10/tmp/clair3_output/phased_output/tumor_phased_chr14
+Generate Dot  : False
+BAM File      : /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/DUMCO_diag_hs1.bam 
+
+--- Phasing Parameter --- 
+Seq Platform       : ONT
+Phase Indel        : False
+Distance Threshold : 300000
+Connect Adjacent   : 20
+Edge Threshold     : 0.7
+Mapping Quality    : 1
+Variant Confidence : 0.75
+ReadTag Confidence : 0.65
+
+parsing VCF ... 1s
+parsing SV VCF ... 0s
+parsing Meth VCF ... 0s
+reading reference ... 1s
+(chr14,62s)
+parsing total:  62s
+merge results ... 0s
+writeResult SNP ... 1s
+
+total process: 65s
+
+[INFO] Haplotag the Tumor BAM
+[INFO] RUN THE FOLLOWING COMMAND:
+( parallel --joblog /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part10/logs/clair3_log/parallel_5_haplotag_tumor.log -j 40 /opt/conda/envs/clairs/bin/longphase haplotag -o /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part10/tmp/clair3_output/phased_output/tumor_{1} --reference /home/t_steimle/ref/hs1/chm13v2.0.fa --region {1}  -s /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part10/tmp/clair3_output/phased_output/tumor_phased_{1}.vcf.gz -b /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/DUMCO_diag_hs1.bam :::: /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part10/tmp/CONTIGS ) 2>&1 | tee /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part10/logs/clair3_log/5_tumor_haplotag.log && parallel -j 40 samtools index  -@40 /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part10/tmp/clair3_output/phased_output/tumor_{1}.bam :::: /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part10/tmp/CONTIGS
+

+ 418 - 0
slurm-2536606.out

@@ -0,0 +1,418 @@
+
+[COMMAND] /opt/bin/run_clairs --tumor_bam_fn /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/DUMCO_diag_hs1.bam --normal_bam_fn /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/norm/DUMCO_norm_hs1.bam --ref_fn /home/t_steimle/ref/hs1/chm13v2.0.fa --threads 40 --platform ont_r10_dorado_sup_5khz_ssrs --output_dir /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part15 --region chr17:1-28642702 --sample_name DUMCO_diag --include_all_ctgs --print_germline_calls --enable_indel_calling --enable_clair3_germline_output --use_longphase_for_intermediate_haplotagging True 
+
+[INFO] Create folder /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part15/logs
+[INFO] Create folder /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part15/tmp
+[INFO] Create folder /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part15/tmp/split_beds
+[INFO] Create folder /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part15/tmp/candidates
+[INFO] Create folder /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part15/tmp/pileup_tensor_can
+[INFO] Create folder /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part15/tmp/fa_tensor_can
+[INFO] Create folder /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part15/tmp/vcf_output
+[INFO] Create folder /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part15/tmp/tmp_vcf_output
+[INFO] Create folder /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part15/logs/clair3_log
+[INFO] Create folder /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part15/tmp/clair3_output/phased_output
+[INFO] Create folder /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part15/tmp/clair3_output/vcf
+[INFO] --include_all_ctgs enabled
+[INFO] Call variants in contigs: chr17
+[INFO] Number of chunks for each contig: 17
+
+[INFO] CALLER VERSION: 0.4.4
+[INFO] NORMAL BAM FILE PATH: /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/norm/DUMCO_norm_hs1.bam
+[INFO] TUMOR BAM FILE PATH: /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/DUMCO_diag_hs1.bam
+[INFO] REFERENCE FILE PATH: /home/t_steimle/ref/hs1/chm13v2.0.fa
+[INFO] PLATFORM: ont_r10_dorado_sup_5khz_ssrs
+[INFO] THREADS: 40
+[INFO] OUTPUT FOLDER: /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part15
+[INFO] OUTPUT VCF PATH: /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part15/output.vcf.gz
+[INFO] PILEUP MODEL PATH: /opt/conda/envs/clairs/bin/clairs_models/ont_r10_dorado_sup_5khz_ssrs/pileup.pkl
+[INFO] FULL-ALIGNMENT MODEL PATH: /opt/conda/envs/clairs/bin/clairs_models/ont_r10_dorado_sup_5khz_ssrs/full_alignment.pkl
+[INFO] BED FILE PATH: /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part15/tmp/region.bed
+[INFO] GENOTYPING MODE VCF FILE PATH: None
+[INFO] HYBRID MODE VCF FILE PATH: None
+[INFO] REGION FOR CALLING: chr17:1-28642702
+[INFO] CONTIGS FOR CALLING: None
+[INFO] CONDA BINARY PREFIX: /opt/conda/envs/clairs
+[INFO] SAMTOOLS BINARY PATH: samtools
+[INFO] PYTHON BINARY PATH: python3
+[INFO] PYPY BINARY PATH: pypy3
+[INFO] PARALLEL BINARY PATH: parallel
+[INFO] LONGPHASE BINARY PATH: /opt/conda/envs/clairs/bin/longphase
+[INFO] CHUNK SIZE: 5000000
+[INFO] SNV MINIMUM AF: 0.05
+[INFO] SNV MINIMUM QUAL: 8
+[INFO] INDEL MINIMUM AF: 0.1
+[INFO] INDEL PILEUP MODEL PATH: /opt/conda/envs/clairs/bin/clairs_models/ont_r10_dorado_sup_5khz_ssrs/indel/pileup.pkl
+[INFO] INDEL FULL-ALIGNMENT MODEL PATH: /opt/conda/envs/clairs/bin/clairs_models/ont_r10_dorado_sup_5khz_ssrs/indel/full_alignment.pkl
+[INFO] INDEL MINIMUM QUAL: 8
+[INFO] NORMAL VCF FILE PATH: None
+[INFO] DISABLE PHASING: False
+[INFO] ENABLE DRY RUN: False
+[INFO] ENABLE INDEL CALLING: True
+[INFO] ENABLE PRINTING REFERENCE CALLS: False
+[INFO] ENABLE PRINTING GERMLINE CALLS: True
+[INFO] ENABLE INCLUDING ALL CTGS FOR CALLING: True
+[INFO] ENABLE REMOVING INTERMEDIATE FILES: False
+
+[INFO] Call Germline Variants in Normal BAM using Clair3
+[INFO] RUN THE FOLLOWING COMMAND:
+( /opt/conda/envs/clairs/bin/run_clair3.sh --bam_fn /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/norm/DUMCO_norm_hs1.bam --ref_fn /home/t_steimle/ref/hs1/chm13v2.0.fa --model_path /opt/conda/envs/clairs/bin/clairs_models/clair3_models/r1041_e82_400bps_sup_v420 --platform ont --threads 40 --output /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part15/tmp/clair3_output/clair3_normal_output --ctg_name=chr17 --samtools=samtools --pypy=pypy3 --python=python3 --min_coverage=4 --snp_min_af=0.08 --indel_min_af=0.15 --longphase_for_phasing  ) 2>&1 | tee /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part15/logs/clair3_log/1_CLAIR3_NORMAL.log
+
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+[INFO] CLAIR3 VERSION: v1.0.8
+[INFO] BAM FILE PATH: /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/norm/DUMCO_norm_hs1.bam
+[INFO] REFERENCE FILE PATH: /home/t_steimle/ref/hs1/chm13v2.0.fa
+[INFO] MODEL PATH: /opt/conda/envs/clairs/bin/clairs_models/clair3_models/r1041_e82_400bps_sup_v420
+[INFO] OUTPUT FOLDER: /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part15/tmp/clair3_output/clair3_normal_output
+[INFO] PLATFORM: ont
+[INFO] THREADS: 40
+[INFO] BED FILE PATH: EMPTY
+[INFO] VCF FILE PATH: EMPTY
+[INFO] CONTIGS: chr17
+[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: /opt/conda/envs/clairs/bin/longphase
+[INFO] CHUNK SIZE: 5000000
+[INFO] FULL ALIGN PROPORTION: 0.7
+[INFO] FULL ALIGN REFERENCE PROPORTION: 0.1
+[INFO] PHASING PROPORTION: 0.7
+[INFO] MINIMUM MQ: 5
+[INFO] MINIMUM COVERAGE: 4
+[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: False
+[INFO] ENABLE HAPLOID SENSITIVE MODE: False
+[INFO] ENABLE INCLUDE ALL CTGS CALLING: False
+[INFO] ENABLE NO PHASING FOR FULL ALIGNMENT: False
+[INFO] ENABLE REMOVING INTERMEDIATE FILES: False
+[INFO] ENABLE LONGPHASE FOR INTERMEDIATE VCF PHASING: True
+[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
+
++ /opt/conda/envs/clairs/bin/scripts/clair3_c_impl.sh --bam_fn /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/norm/DUMCO_norm_hs1.bam --ref_fn /home/t_steimle/ref/hs1/chm13v2.0.fa --threads 40 --model_path /opt/conda/envs/clairs/bin/clairs_models/clair3_models/r1041_e82_400bps_sup_v420 --platform ont --output /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part15/tmp/clair3_output/clair3_normal_output --bed_fn=EMPTY --vcf_fn=EMPTY --ctg_name=chr17 --sample_name=SAMPLE --chunk_num=0 --chunk_size=5000000 --samtools=samtools --python=python3 --pypy=pypy3 --parallel=parallel --whatshap=whatshap --qual=2 --var_pct_full=0.7 --ref_pct_full=0.1 --var_pct_phasing=0.7 --snp_min_af=0.08 --indel_min_af=0.15 --min_mq=5 --min_coverage=4 --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=False --haploid_sensitive=False --include_all_ctgs=False --no_phasing_for_fa=False --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=True --longphase=/opt/conda/envs/clairs/bin/longphase --use_whatshap_for_intermediate_phasing=True --use_longphase_for_intermediate_phasing=True --use_whatshap_for_final_output_phasing=False --use_longphase_for_final_output_phasing=False --use_whatshap_for_final_output_haplotagging=False
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+
+[INFO] Check environment variables
+[INFO] Create folder /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part15/tmp/clair3_output/clair3_normal_output/log
+[INFO] Create folder /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part15/tmp/clair3_output/clair3_normal_output/tmp/pileup_output
+[INFO] Create folder /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part15/tmp/clair3_output/clair3_normal_output/tmp/merge_output
+[INFO] Create folder /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part15/tmp/clair3_output/clair3_normal_output/tmp/phase_output
+[INFO] Create folder /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part15/tmp/clair3_output/clair3_normal_output/tmp/gvcf_tmp_output
+[INFO] Create folder /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part15/tmp/clair3_output/clair3_normal_output/tmp/full_alignment_output
+[INFO] Create folder /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part15/tmp/clair3_output/clair3_normal_output/tmp/phase_output/phase_vcf
+[INFO] Create folder /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part15/tmp/clair3_output/clair3_normal_output/tmp/phase_output/phase_bam
+[INFO] Create folder /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part15/tmp/clair3_output/clair3_normal_output/tmp/full_alignment_output/candidate_bed
+[INFO] Call variant in contigs: chr17
+[INFO] Chunk number for each contig: 17
+[INFO] 1/7 Call variants using pileup model
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr17 (chunk 6/17) : 27914
+Total time elapsed: 56.65 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr17 (chunk 13/17) : 50335
+Total time elapsed: 84.56 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr17 (chunk 15/17) : 51403
+Total time elapsed: 90.68 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr17 (chunk 5/17) : 55409
+Total time elapsed: 96.01 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr17 (chunk 4/17) : 58603
+Total time elapsed: 98.13 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr17 (chunk 7/17) : 54606
+Total time elapsed: 98.11 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr17 (chunk 8/17) : 59803
+Total time elapsed: 98.55 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr17 (chunk 14/17) : 55106
+Total time elapsed: 100.54 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr17 (chunk 3/17) : 57778
+Total time elapsed: 100.70 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr17 (chunk 11/17) : 57487
+Total time elapsed: 102.90 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr17 (chunk 12/17) : 57337
+Total time elapsed: 103.47 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr17 (chunk 10/17) : 57826
+Total time elapsed: 104.26 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr17 (chunk 2/17) : 59536
+Total time elapsed: 105.58 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr17 (chunk 16/17) : 65379
+Total time elapsed: 111.75 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr17 (chunk 1/17) : 66124
+Total time elapsed: 112.58 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr17 (chunk 9/17) : 65558
+Total time elapsed: 114.98 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr17 (chunk 17/17) : 74166
+Total time elapsed: 122.34 s
+
+real	2m9.004s
+user	26m3.068s
+sys	2m5.460s
+
+[INFO] 2/7 Select heterozygous SNP variants for Whatshap phasing and haplotagging
+[INFO] Select heterozygous pileup variants exceeding phasing quality cutoff 18
+[INFO] Total heterozygous SNP positions selected: chr17: 61710
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+
+real	0m2.565s
+user	0m2.421s
+sys	0m0.123s
+
+[INFO] 3/7 Phase VCF file using LongPhase
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+LongPhase Ver 1.7
+
+--- File Parameter --- 
+SNP File      : /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part15/tmp/clair3_output/clair3_normal_output/tmp/phase_output/phase_vcf/chr17.vcf
+SV  File      : 
+MOD File      : 
+REF File      : /home/t_steimle/ref/hs1/chm13v2.0.fa
+Output Prefix : /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part15/tmp/clair3_output/clair3_normal_output/tmp/phase_output/phase_vcf/phased_chr17
+Generate Dot  : False
+BAM File      : /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/norm/DUMCO_norm_hs1.bam 
+
+--- Phasing Parameter --- 
+Seq Platform       : ONT
+Phase Indel        : False
+Distance Threshold : 300000
+Connect Adjacent   : 20
+Edge Threshold     : 0.7
+Mapping Quality    : 1
+Variant Confidence : 0.75
+ReadTag Confidence : 0.65
+
+parsing VCF ... 0s
+parsing SV VCF ... 0s
+parsing Meth VCF ... 0s
+reading reference ... 1s
+(chr17,7s)
+parsing total:  7s
+merge results ... 0s
+writeResult SNP ... 0s
+
+total process: 8s
+
+real	0m8.670s
+user	0m18.510s
+sys	0m1.250s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+
+[INFO] 5/7 Select candidates for full-alignment calling
+[INFO] Set variants quality cutoff 21.0
+[INFO] Set reference calls quality cutoff 14.0
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+[INFO] Low quality reference calls to be processed in chr17: 80349
+[INFO] Low quality variants to be processed in chr17: 119468
+
+real	0m2.724s
+user	0m2.475s
+sys	0m0.198s
+
+[INFO] 6/7 Call low-quality variants using full-alignment model
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr17 (chunk 10/20) : 10000
+Total time elapsed: 82.58 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr17 (chunk 13/20) : 10000
+Total time elapsed: 82.82 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr17 (chunk 11/20) : 10000
+Total time elapsed: 82.94 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr17 (chunk 7/20) : 10000
+Total time elapsed: 84.01 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr17 (chunk 5/20) : 10000
+Total time elapsed: 84.06 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr17 (chunk 14/20) : 10000
+Total time elapsed: 84.91 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr17 (chunk 12/20) : 10000
+Total time elapsed: 85.09 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr17 (chunk 8/20) : 10000
+Total time elapsed: 85.29 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr17 (chunk 2/20) : 10000
+Total time elapsed: 86.07 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr17 (chunk 6/20) : 10000
+Total time elapsed: 86.76 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr17 (chunk 15/20) : 10000
+Total time elapsed: 87.23 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr17 (chunk 18/20) : 10000
+Total time elapsed: 87.28 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr17 (chunk 3/20) : 10000
+Total time elapsed: 87.72 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr17 (chunk 4/20) : 10000
+Total time elapsed: 87.77 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr17 (chunk 17/20) : 10000
+Total time elapsed: 87.96 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr17 (chunk 9/20) : 10000
+Total time elapsed: 88.04 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr17 (chunk 16/20) : 10000
+Total time elapsed: 88.27 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr17 (chunk 19/20) : 10000
+Total time elapsed: 90.27 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr17 (chunk 1/20) : 10000
+Total time elapsed: 90.39 s
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+Calling variants ...
+Total processed positions in chr17 (chunk 20/20) : 9817
+Total time elapsed: 93.15 s
+
+real	1m36.429s
+user	27m51.849s
+sys	1m41.958s
+
+[INFO] 7/7 Merge pileup VCF and full-alignment VCF
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+[INFO] Pileup variants processed in chr17: 51317
+[INFO] Full-alignment variants processed in chr17: 125849
+
+real	0m3.646s
+user	0m3.834s
+sys	0m0.179s
+
+[INFO] Finish calling, output file: /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part15/tmp/clair3_output/clair3_normal_output/merge_output.vcf.gz
+
+real	4m17.319s
+user	54m35.144s
+sys	3m50.375s
+
+[INFO] Call Germline Variant in Tumor BAM using Clair3
+[INFO] RUN THE FOLLOWING COMMAND:
+( /opt/conda/envs/clairs/bin/run_clair3.sh --bam_fn /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/DUMCO_diag_hs1.bam --ref_fn /home/t_steimle/ref/hs1/chm13v2.0.fa --model_path /opt/conda/envs/clairs/bin/clairs_models/clair3_models/r1041_e82_400bps_sup_v420 --platform ont --threads 40 --output /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part15/tmp/clair3_output/clair3_tumor_output --ctg_name=chr17 --samtools=samtools --pypy=pypy3 --python=python3 --min_coverage=4 --snp_min_af=0.08 --indel_min_af=0.15 --longphase_for_phasing  ) 2>&1 | tee /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part15/logs/clair3_log/2_CLAIR3_TUMOR.log
+
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+[INFO] CLAIR3 VERSION: v1.0.8
+[INFO] BAM FILE PATH: /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/DUMCO_diag_hs1.bam
+[INFO] REFERENCE FILE PATH: /home/t_steimle/ref/hs1/chm13v2.0.fa
+[INFO] MODEL PATH: /opt/conda/envs/clairs/bin/clairs_models/clair3_models/r1041_e82_400bps_sup_v420
+[INFO] OUTPUT FOLDER: /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part15/tmp/clair3_output/clair3_tumor_output
+[INFO] PLATFORM: ont
+[INFO] THREADS: 40
+[INFO] BED FILE PATH: EMPTY
+[INFO] VCF FILE PATH: EMPTY
+[INFO] CONTIGS: chr17
+[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: /opt/conda/envs/clairs/bin/longphase
+[INFO] CHUNK SIZE: 5000000
+[INFO] FULL ALIGN PROPORTION: 0.7
+[INFO] FULL ALIGN REFERENCE PROPORTION: 0.1
+[INFO] PHASING PROPORTION: 0.7
+[INFO] MINIMUM MQ: 5
+[INFO] MINIMUM COVERAGE: 4
+[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: False
+[INFO] ENABLE HAPLOID SENSITIVE MODE: False
+[INFO] ENABLE INCLUDE ALL CTGS CALLING: False
+[INFO] ENABLE NO PHASING FOR FULL ALIGNMENT: False
+[INFO] ENABLE REMOVING INTERMEDIATE FILES: False
+[INFO] ENABLE LONGPHASE FOR INTERMEDIATE VCF PHASING: True
+[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
+
++ /opt/conda/envs/clairs/bin/scripts/clair3_c_impl.sh --bam_fn /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/DUMCO_diag_hs1.bam --ref_fn /home/t_steimle/ref/hs1/chm13v2.0.fa --threads 40 --model_path /opt/conda/envs/clairs/bin/clairs_models/clair3_models/r1041_e82_400bps_sup_v420 --platform ont --output /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part15/tmp/clair3_output/clair3_tumor_output --bed_fn=EMPTY --vcf_fn=EMPTY --ctg_name=chr17 --sample_name=SAMPLE --chunk_num=0 --chunk_size=5000000 --samtools=samtools --python=python3 --pypy=pypy3 --parallel=parallel --whatshap=whatshap --qual=2 --var_pct_full=0.7 --ref_pct_full=0.1 --var_pct_phasing=0.7 --snp_min_af=0.08 --indel_min_af=0.15 --min_mq=5 --min_coverage=4 --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=False --haploid_sensitive=False --include_all_ctgs=False --no_phasing_for_fa=False --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=True --longphase=/opt/conda/envs/clairs/bin/longphase --use_whatshap_for_intermediate_phasing=True --use_longphase_for_intermediate_phasing=True --use_whatshap_for_final_output_phasing=False --use_longphase_for_final_output_phasing=False --use_whatshap_for_final_output_haplotagging=False
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+
+[INFO] Check environment variables
+[INFO] Create folder /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part15/tmp/clair3_output/clair3_tumor_output/log
+[INFO] Create folder /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part15/tmp/clair3_output/clair3_tumor_output/tmp/pileup_output
+[INFO] Create folder /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part15/tmp/clair3_output/clair3_tumor_output/tmp/merge_output
+[INFO] Create folder /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part15/tmp/clair3_output/clair3_tumor_output/tmp/phase_output
+[INFO] Create folder /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part15/tmp/clair3_output/clair3_tumor_output/tmp/gvcf_tmp_output
+[INFO] Create folder /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part15/tmp/clair3_output/clair3_tumor_output/tmp/full_alignment_output
+[INFO] Create folder /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part15/tmp/clair3_output/clair3_tumor_output/tmp/phase_output/phase_vcf
+[INFO] Create folder /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part15/tmp/clair3_output/clair3_tumor_output/tmp/phase_output/phase_bam
+[INFO] Create folder /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part15/tmp/clair3_output/clair3_tumor_output/tmp/full_alignment_output/candidate_bed
+[INFO] Call variant in contigs: chr17
+[INFO] Chunk number for each contig: 17
+[INFO] 1/7 Call variants using pileup model

+ 120 - 0
slurm-2536607.out

@@ -0,0 +1,120 @@
+
+[COMMAND] /opt/bin/run_clairs --tumor_bam_fn /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/DUMCO_diag_hs1.bam --normal_bam_fn /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/norm/DUMCO_norm_hs1.bam --ref_fn /home/t_steimle/ref/hs1/chm13v2.0.fa --threads 40 --platform ont_r10_dorado_sup_5khz_ssrs --output_dir /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part26 --region chr3:1-20251703 --sample_name DUMCO_diag --include_all_ctgs --print_germline_calls --enable_indel_calling --enable_clair3_germline_output --use_longphase_for_intermediate_haplotagging True 
+
+[INFO] Create folder /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part26/logs
+[INFO] Create folder /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part26/tmp
+[INFO] Create folder /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part26/tmp/split_beds
+[INFO] Create folder /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part26/tmp/candidates
+[INFO] Create folder /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part26/tmp/pileup_tensor_can
+[INFO] Create folder /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part26/tmp/fa_tensor_can
+[INFO] Create folder /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part26/tmp/vcf_output
+[INFO] Create folder /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part26/tmp/tmp_vcf_output
+[INFO] Create folder /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part26/logs/clair3_log
+[INFO] Create folder /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part26/tmp/clair3_output/phased_output
+[INFO] Create folder /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part26/tmp/clair3_output/vcf
+[INFO] --include_all_ctgs enabled
+[INFO] Call variants in contigs: chr3
+[INFO] Number of chunks for each contig: 41
+
+[INFO] CALLER VERSION: 0.4.4
+[INFO] NORMAL BAM FILE PATH: /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/norm/DUMCO_norm_hs1.bam
+[INFO] TUMOR BAM FILE PATH: /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/DUMCO_diag_hs1.bam
+[INFO] REFERENCE FILE PATH: /home/t_steimle/ref/hs1/chm13v2.0.fa
+[INFO] PLATFORM: ont_r10_dorado_sup_5khz_ssrs
+[INFO] THREADS: 40
+[INFO] OUTPUT FOLDER: /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part26
+[INFO] OUTPUT VCF PATH: /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part26/output.vcf.gz
+[INFO] PILEUP MODEL PATH: /opt/conda/envs/clairs/bin/clairs_models/ont_r10_dorado_sup_5khz_ssrs/pileup.pkl
+[INFO] FULL-ALIGNMENT MODEL PATH: /opt/conda/envs/clairs/bin/clairs_models/ont_r10_dorado_sup_5khz_ssrs/full_alignment.pkl
+[INFO] BED FILE PATH: /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part26/tmp/region.bed
+[INFO] GENOTYPING MODE VCF FILE PATH: None
+[INFO] HYBRID MODE VCF FILE PATH: None
+[INFO] REGION FOR CALLING: chr3:1-20251703
+[INFO] CONTIGS FOR CALLING: None
+[INFO] CONDA BINARY PREFIX: /opt/conda/envs/clairs
+[INFO] SAMTOOLS BINARY PATH: samtools
+[INFO] PYTHON BINARY PATH: python3
+[INFO] PYPY BINARY PATH: pypy3
+[INFO] PARALLEL BINARY PATH: parallel
+[INFO] LONGPHASE BINARY PATH: /opt/conda/envs/clairs/bin/longphase
+[INFO] CHUNK SIZE: 5000000
+[INFO] SNV MINIMUM AF: 0.05
+[INFO] SNV MINIMUM QUAL: 8
+[INFO] INDEL MINIMUM AF: 0.1
+[INFO] INDEL PILEUP MODEL PATH: /opt/conda/envs/clairs/bin/clairs_models/ont_r10_dorado_sup_5khz_ssrs/indel/pileup.pkl
+[INFO] INDEL FULL-ALIGNMENT MODEL PATH: /opt/conda/envs/clairs/bin/clairs_models/ont_r10_dorado_sup_5khz_ssrs/indel/full_alignment.pkl
+[INFO] INDEL MINIMUM QUAL: 8
+[INFO] NORMAL VCF FILE PATH: None
+[INFO] DISABLE PHASING: False
+[INFO] ENABLE DRY RUN: False
+[INFO] ENABLE INDEL CALLING: True
+[INFO] ENABLE PRINTING REFERENCE CALLS: False
+[INFO] ENABLE PRINTING GERMLINE CALLS: True
+[INFO] ENABLE INCLUDING ALL CTGS FOR CALLING: True
+[INFO] ENABLE REMOVING INTERMEDIATE FILES: False
+
+[INFO] Call Germline Variants in Normal BAM using Clair3
+[INFO] RUN THE FOLLOWING COMMAND:
+( /opt/conda/envs/clairs/bin/run_clair3.sh --bam_fn /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/norm/DUMCO_norm_hs1.bam --ref_fn /home/t_steimle/ref/hs1/chm13v2.0.fa --model_path /opt/conda/envs/clairs/bin/clairs_models/clair3_models/r1041_e82_400bps_sup_v420 --platform ont --threads 40 --output /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part26/tmp/clair3_output/clair3_normal_output --ctg_name=chr3 --samtools=samtools --pypy=pypy3 --python=python3 --min_coverage=4 --snp_min_af=0.08 --indel_min_af=0.15 --longphase_for_phasing  ) 2>&1 | tee /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part26/logs/clair3_log/1_CLAIR3_NORMAL.log
+
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+[INFO] CLAIR3 VERSION: v1.0.8
+[INFO] BAM FILE PATH: /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/norm/DUMCO_norm_hs1.bam
+[INFO] REFERENCE FILE PATH: /home/t_steimle/ref/hs1/chm13v2.0.fa
+[INFO] MODEL PATH: /opt/conda/envs/clairs/bin/clairs_models/clair3_models/r1041_e82_400bps_sup_v420
+[INFO] OUTPUT FOLDER: /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part26/tmp/clair3_output/clair3_normal_output
+[INFO] PLATFORM: ont
+[INFO] THREADS: 40
+[INFO] BED FILE PATH: EMPTY
+[INFO] VCF FILE PATH: EMPTY
+[INFO] CONTIGS: chr3
+[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: /opt/conda/envs/clairs/bin/longphase
+[INFO] CHUNK SIZE: 5000000
+[INFO] FULL ALIGN PROPORTION: 0.7
+[INFO] FULL ALIGN REFERENCE PROPORTION: 0.1
+[INFO] PHASING PROPORTION: 0.7
+[INFO] MINIMUM MQ: 5
+[INFO] MINIMUM COVERAGE: 4
+[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: False
+[INFO] ENABLE HAPLOID SENSITIVE MODE: False
+[INFO] ENABLE INCLUDE ALL CTGS CALLING: False
+[INFO] ENABLE NO PHASING FOR FULL ALIGNMENT: False
+[INFO] ENABLE REMOVING INTERMEDIATE FILES: False
+[INFO] ENABLE LONGPHASE FOR INTERMEDIATE VCF PHASING: True
+[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
+
++ /opt/conda/envs/clairs/bin/scripts/clair3_c_impl.sh --bam_fn /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/norm/DUMCO_norm_hs1.bam --ref_fn /home/t_steimle/ref/hs1/chm13v2.0.fa --threads 40 --model_path /opt/conda/envs/clairs/bin/clairs_models/clair3_models/r1041_e82_400bps_sup_v420 --platform ont --output /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part26/tmp/clair3_output/clair3_normal_output --bed_fn=EMPTY --vcf_fn=EMPTY --ctg_name=chr3 --sample_name=SAMPLE --chunk_num=0 --chunk_size=5000000 --samtools=samtools --python=python3 --pypy=pypy3 --parallel=parallel --whatshap=whatshap --qual=2 --var_pct_full=0.7 --ref_pct_full=0.1 --var_pct_phasing=0.7 --snp_min_af=0.08 --indel_min_af=0.15 --min_mq=5 --min_coverage=4 --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=False --haploid_sensitive=False --include_all_ctgs=False --no_phasing_for_fa=False --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=True --longphase=/opt/conda/envs/clairs/bin/longphase --use_whatshap_for_intermediate_phasing=True --use_longphase_for_intermediate_phasing=True --use_whatshap_for_final_output_phasing=False --use_longphase_for_final_output_phasing=False --use_whatshap_for_final_output_haplotagging=False
+/mnt/beegfs02/software/tools/modules/4.6.1/init/bash: line 37: /usr/bin/tclsh: No such file or directory
+
+[INFO] Check environment variables
+[INFO] Create folder /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part26/tmp/clair3_output/clair3_normal_output/log
+[INFO] Create folder /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part26/tmp/clair3_output/clair3_normal_output/tmp/pileup_output
+[INFO] Create folder /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part26/tmp/clair3_output/clair3_normal_output/tmp/merge_output
+[INFO] Create folder /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part26/tmp/clair3_output/clair3_normal_output/tmp/phase_output
+[INFO] Create folder /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part26/tmp/clair3_output/clair3_normal_output/tmp/gvcf_tmp_output
+[INFO] Create folder /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part26/tmp/clair3_output/clair3_normal_output/tmp/full_alignment_output
+[INFO] Create folder /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part26/tmp/clair3_output/clair3_normal_output/tmp/phase_output/phase_vcf
+[INFO] Create folder /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part26/tmp/clair3_output/clair3_normal_output/tmp/phase_output/phase_bam
+[INFO] Create folder /mnt/beegfs02/scratch/t_steimle/data/wgs/DUMCO/diag/ClairS/part26/tmp/clair3_output/clair3_normal_output/tmp/full_alignment_output/candidate_bed
+[INFO] Call variant in contigs: chr3
+[INFO] Chunk number for each contig: 41
+[INFO] 1/7 Call variants using pileup model

+ 7 - 6
src/callers/clairs.rs

@@ -303,7 +303,8 @@ impl JobCommand for ClairS {
 
         format!(
             "{singularity_bin} exec \
-             --bind /data:/data \
+             --bind /mnt:/mnt \
+             --bind /home/t_steimle:/home/t_steimle \
              --bind {output_dir}:{output_dir} \
              {image} \
              /opt/bin/run_clairs \
@@ -342,8 +343,8 @@ impl SlurmRunner for ClairS {
         SlurmParams {
             job_name: Some(format!("clairs_{}", self.id)),
             cpus_per_task: Some(self.config.clairs_threads as u32),
-            mem: Some("60G".into()),
-            partition: Some("batch".into()),
+            mem: Some("40G".into()),
+            partition: Some("shortq".into()),
             gres: None,
         }
         .to_args()
@@ -355,8 +356,8 @@ impl SbatchRunner for ClairS {
         SlurmParams {
             job_name: Some(format!("clairs_{}", self.id)),
             cpus_per_task: Some(self.config.clairs_threads as u32),
-            mem: Some("60G".into()),
-            partition: Some("batch".into()),
+            mem: Some("40G".into()),
+            partition: Some("shortq".into()),
             gres: None,
         }
     }
@@ -852,7 +853,7 @@ mod tests {
         // let clairs = ClairS::initialize("34528", &config)?;
         // info!("{clairs}");
 
-        let outputs = run_clairs_chunked_with_merge("34528", &config, 20)?;
+        let outputs = run_clairs_chunked_with_merge("DUMCO", &config, 20)?;
         info!("Completed with {} job outputs", outputs.len());
 
         Ok(())

+ 1 - 1
src/callers/deep_variant.rs

@@ -754,7 +754,7 @@ mod tests {
         test_init();
         let config = Config::default();
 
-        for id in ["35650"] {
+        for id in ["DUMCO", "CHAHA"] {
             let _ = run_deepvariant_chunked_with_merge(id, "diag", &config, 30)?;
         }
         Ok(())

+ 1 - 1
src/collection/bam_stats.rs

@@ -1359,7 +1359,7 @@ mod tests {
         // println!("{stats}");
         // let stats = WGSBamStats::open("36434", "norm", &config)?;
         // println!("{stats}");
-        let stats = WGSBamStats::open("35650", "diag", &config)?;
+        let stats = WGSBamStats::open("33519", "diag", &config)?;
         println!("{stats}");
 
         Ok(())

+ 191 - 624
src/collection/prom_run.rs

@@ -1,7 +1,54 @@
 //! # PromRun Module
 //!
-//! Handles the import, parsing, and processing of Oxford Nanopore (ONT) PromethION sequencing runs.
-//! This module orchestrates the workflow from raw data ingestion (BAM/POD5) to alignment execution.
+//! Import, validation, and processing pipeline for Oxford Nanopore PromethION sequencing runs.
+//!
+//! This module provides the [`PromRun`] struct which orchestrates the complete workflow from
+//! raw MinKNOW output ingestion through alignment, sorting, and per-case BAM finalization.
+//!
+//! ## Supported Kit Types
+//!
+//! - **Multiplexed** (`SQK-NBD114-24`, `SQK-NBD112`, `RBK`): BAMs demultiplexed by barcode
+//! - **Non-multiplexed** (`SQK-LSK114`, `SQK-LSK109`): Single-sample runs
+//!
+//! ## Pipeline Stages
+//!
+//! 1. **Import** — Recursive directory scan for BAM, POD5, sample sheets, pore activity logs
+//! 2. **Validation** — Verify BAMs are unaligned (no reference sequences in header)
+//! 3. **Case mapping** — Associate BAMs with cases via barcode extraction or single-case assignment
+//! 4. **Alignment** — Parallel Dorado alignment against reference genome
+//! 5. **Sort/Index** — Coordinate sort and index via samtools (Slurm batch)
+//! 6. **Finalize** — Merge chunks per case, atomic replacement of existing outputs
+//!
+//! ## Directory Structure
+//!
+//! Files are discovered recursively; typical MinKNOW layouts:
+//!
+//! ```text
+//! run_dir/
+//! ├── sample_sheet_*.csv          # Required
+//! ├── pore_activity_*.csv         # Optional
+//! ├── pod5_pass/barcode*/*.pod5   # Multiplexed
+//! ├── bam_pass/barcode*/*.bam     # Multiplexed
+//! ├── pod5/*.pod5                 # Non-multiplexed
+//! └── bam/*.bam                   # Non-multiplexed
+//! ```
+//!
+//! ## Example
+//!
+//! ```rust,ignore
+//! use crate::config::Config;
+//! use crate::collection::promrun::PromRun;
+//!
+//! let config = Config::default();
+//!
+//! // Import and process
+//! let mut run = PromRun::from_dir("/data/prom/20240101_run", &config)?;
+//! run.cases.push(IdInput { case_id: "CASE001".into(), sample_type: "TUM".into(), barcode: "barcode01".into() });
+//! run.process_bams(&config)?;
+//!
+//! // Or load cached
+//! let run = PromRun::open("protocol_run_id", &config)?;
+//! ```
 
 use std::{
     collections::{BTreeMap, HashMap},
@@ -9,6 +56,7 @@ use std::{
     fs::{self, File},
     io::{BufReader, BufWriter},
     path::{Path, PathBuf},
+    time::{Duration, Instant},
 };
 
 use anyhow::{bail, Context};
@@ -24,13 +72,19 @@ use uuid::Uuid;
 
 use crate::{
     collection::{
-        bam_stats::WGSBamStats, flowcells::IdInput, minknow::{MinKnowSampleSheet, PoreStateEntry, parse_pore_activity_from_reader}, pod5::Pod5
+        bam_stats::WGSBamStats,
+        flowcells::IdInput,
+        minknow::{parse_pore_activity_from_reader, MinKnowSampleSheet, PoreStateEntry},
+        pod5::Pod5,
     },
     commands::{
-        SlurmRunner, dorado::DoradoAlign, run_many_sbatch, samtools::{SamtoolsIndex, SamtoolsMerge, SamtoolsMergeMany, SamtoolsSort}
+        dorado::DoradoAlign,
+        run_many_sbatch,
+        samtools::{SamtoolsIndex, SamtoolsMergeMany, SamtoolsSort},
+        SlurmRunner,
     },
     config::Config,
-    helpers::{TempFileGuard, get_genome_sizes, list_files_recursive, remove_bam_with_index},
+    helpers::{get_genome_sizes, list_files_recursive, remove_bam_with_index, TempFileGuard},
     run, run_many,
 };
 
@@ -422,6 +476,9 @@ impl PromRun {
     /// - BAM files are already aligned
     /// - External commands fail (Dorado, samtools, Slurm)
     pub fn process_bams(&self, config: &Config) -> anyhow::Result<()> {
+        let pipeline_start = Timer::start();
+        let mut metrics = PipelineMetrics::default();
+
         let tmp_dir = PathBuf::from(&config.tmp_dir);
         let mut temp_guard = TempFileGuard::new();
 
@@ -460,6 +517,7 @@ impl PromRun {
         // Step 2: Filter and validate BAMs
         // =====================================================================
 
+        let validation_start = Timer::start();
         let pass_bams = self.filter_pass_bams();
 
         if pass_bams.is_empty() {
@@ -475,6 +533,11 @@ impl PromRun {
 
         info!("Step 1/6: Validating BAMs are unaligned");
         self.validate_bams_unaligned(&pass_bams, &pool)?;
+
+        metrics.validation_duration = validation_start.elapsed();
+        metrics.bams_processed = pass_bams.len();
+        metrics.bytes_input = pass_bams.iter().map(|b| b.bam_size).sum();
+
         info!("✅ All {} BAM files are unaligned", pass_bams.len());
 
         // =====================================================================
@@ -503,6 +566,7 @@ impl PromRun {
         // =====================================================================
 
         info!("Step 3/6: Preparing alignment jobs");
+        let align_start = Timer::start();
         let (align_jobs, case_bam_map) = prepare_alignment_jobs(&bam_to_case, &tmp_dir, config)?;
 
         // Track temp files for cleanup
@@ -511,9 +575,12 @@ impl PromRun {
         }
 
         info!("Step 4/6: Running {} alignment jobs", align_jobs.len());
-        run_many_sbatch(align_jobs).context("Alignment batch failed")?;
+        run_many!(config, align_jobs).context("Alignment batch failed")?;
 
         self.verify_outputs_exist(&case_bam_map, "alignment")?;
+
+        metrics.alignment_duration = align_start.elapsed();
+
         info!("✅ Alignments completed");
 
         // =====================================================================
@@ -521,7 +588,17 @@ impl PromRun {
         // =====================================================================
 
         info!("Step 5/6: Sorting and indexing chunks");
+        let sort_start = Timer::start();
         let sorted_bam_map = sort_and_index_chunks(&case_bam_map, config)?;
+
+        // Update guard to track sorted files instead
+        temp_guard.clear();
+        for bams in sorted_bam_map.values() {
+            temp_guard.track_many(bams.clone());
+        }
+
+        metrics.sort_index_duration = sort_start.elapsed();
+
         info!("✅ Sorted {} chunk BAMs", sorted_bam_map.len());
 
         // =====================================================================
@@ -529,11 +606,25 @@ impl PromRun {
         // =====================================================================
 
         info!("Step 6/6: Finalizing per-case BAMs");
-        finalize_case_bams(&self.cases, &sorted_bam_map, &tmp_dir, config)?;
+        let finalize_start = Timer::start();
+
+        let finalized = finalize_case_bams(&self.cases, &sorted_bam_map, &tmp_dir, config)?;
+
+        metrics.finalize_duration = finalize_start.elapsed();
+        metrics.cases_finalized = finalized.len();
+        metrics.bytes_output = finalized
+            .iter()
+            .filter_map(|p| fs::metadata(p).ok())
+            .map(|m| m.len())
+            .sum();
 
         // Success — disarm cleanup
         temp_guard.disarm();
 
+        metrics.total_duration = pipeline_start.elapsed();
+        info!("{metrics}");
+
+        // TODO: save metrics
         info!(
             "🎉 Pipeline completed for run: {} (flowcell: {})",
             self.protocol_run_id, self.flow_cell_id
@@ -565,602 +656,6 @@ impl PromRun {
         Ok(())
     }
 
-    pub fn process_bams_old(&self, config: &Config) -> anyhow::Result<()> {
-        let tmp_dir = PathBuf::from(&config.tmp_dir);
-
-        // =====================================================================
-        // Step 1: Validate cases and determine kit type
-        // =====================================================================
-
-        if self.cases.is_empty() {
-            bail!(
-                "Run {} (flowcell: {}) has no associated cases. Please add cases before processing.",
-                self.protocol_run_id,
-                self.flow_cell_id
-            );
-        }
-
-        info!(
-            "Processing PromRun: {} (flowcell: {}, kit: {}, {} BAM files, {} cases)",
-            self.protocol_run_id,
-            self.flow_cell_id,
-            self.kit,
-            self.bams.len(),
-            self.cases.len()
-        );
-
-        // Filter BAMs to only include those from bam_pass directories (exclude bam_fail)
-        let pass_bams: Vec<&PromBam> = self
-            .bams
-            .iter()
-            .filter(|bam| {
-                let path_str = bam.path.to_string_lossy();
-                let is_pass = path_str.contains("bam_pass");
-                let is_fail = path_str.contains("bam_fail");
-
-                if is_fail {
-                    info!("  Skipping failed read BAM: {}", bam.path.display());
-                    false
-                } else if is_pass {
-                    true
-                } else {
-                    // If neither pass nor fail, be conservative and include it
-                    warn!(
-                        "  BAM path ambiguous (not in bam_pass or bam_fail), including: {}",
-                        bam.path.display()
-                    );
-                    true
-                }
-            })
-            // .take(2)
-            .collect();
-
-        if pass_bams.is_empty() {
-            bail!(
-                "No BAM files found in bam_pass directories for run {}",
-                self.protocol_run_id
-            );
-        }
-
-        info!(
-            "Filtered to {} BAM files from bam_pass (excluded {} from bam_fail)",
-            pass_bams.len(),
-            self.bams.len() - pass_bams.len()
-        );
-
-        // Determine if multiplexed based on kit name
-        let is_multiplexed = self.kit.to_uppercase().contains("NBD114");
-        let is_non_multiplexed = self.kit.to_uppercase().contains("LSK114");
-
-        if !is_multiplexed && !is_non_multiplexed {
-            warn!(
-                "Kit '{}' is not recognized as SQK-NBD114-24 or SQK-LSK114. Attempting to detect from directory structure.",
-                self.kit
-            );
-        }
-
-        // Validate case count for non-multiplexed runs
-        if is_non_multiplexed && self.cases.len() != 1 {
-            bail!(
-                "Non-multiplexed run (kit: {}) must have exactly 1 case, found {}",
-                self.kit,
-                self.cases.len()
-            );
-        }
-
-        // Log cases
-        for case in &self.cases {
-            info!(
-                "  Case: {} ({}) - barcode: {}",
-                case.case_id,
-                case.sample_type,
-                if case.barcode.is_empty() {
-                    "none"
-                } else {
-                    &case.barcode
-                }
-            );
-        }
-
-        // =====================================================================
-        // Step 2: Validate BAMs are unaligned
-        // =====================================================================
-
-        info!("Step 1/5: Validating BAM files are unaligned");
-
-        // Build thread pool for parallel validation
-        let pool = ThreadPoolBuilder::new()
-            .num_threads(config.threads.into())
-            .build()
-            .context("Failed to build Rayon thread pool")?;
-
-        // Check in parallel if any BAM appears to be aligned using safe header parsing
-        let aligned_bams: Vec<_> = pool.install(|| {
-            pass_bams
-                .par_iter()
-                .filter_map(|bam| {
-                    // Check if BAM has alignment info by looking for reference sequences in header
-                    match bam::Reader::from_path(&bam.path) {
-                        Ok(reader) => {
-                            let header = bam::Header::from_template(reader.header());
-                            // Use safe header parsing to check for reference sequences
-                            match get_genome_sizes(&header) {
-                                Ok(sizes) => {
-                                    if !sizes.is_empty() {
-                                        Some(bam.path.clone())
-                                    } else {
-                                        None
-                                    }
-                                }
-                                Err(_) => {
-                                    warn!(
-                                        "Failed to parse header for {}, assuming unaligned",
-                                        bam.path.display()
-                                    );
-                                    None
-                                }
-                            }
-                        }
-                        Err(e) => {
-                            warn!("Failed to open BAM {}: {}", bam.path.display(), e);
-                            None
-                        }
-                    }
-                })
-                .collect()
-        });
-
-        if !aligned_bams.is_empty() {
-            bail!(
-                "Found {} BAM file(s) that appear to be already aligned. This method only processes unaligned BAMs. First aligned BAM: {}",
-                aligned_bams.len(),
-                aligned_bams[0].display()
-            );
-        }
-
-        info!("✅ All {} BAM files are unaligned", pass_bams.len());
-
-        // =====================================================================
-        // Step 3: Map BAMs to cases
-        // =====================================================================
-
-        info!("Step 2/5: Mapping BAM files to cases");
-
-        let mut bam_to_case_map: HashMap<PathBuf, &IdInput> = HashMap::new();
-        let mut unmatched_bams = Vec::new();
-
-        if is_non_multiplexed {
-            // Non-multiplexed: assign all BAMs to the single case
-            let single_case = &self.cases[0];
-
-            info!(
-                "Non-multiplexed run: assigning all {} BAMs to case {}",
-                pass_bams.len(),
-                single_case.case_id
-            );
-
-            for bam in &pass_bams {
-                bam_to_case_map.insert(bam.path.clone(), single_case);
-            }
-        } else {
-            // Multiplexed: map by barcode
-            info!("Multiplexed run: mapping BAMs by barcode");
-
-            // Create normalized barcode → case mapping
-            let mut barcode_to_case: HashMap<String, &IdInput> = HashMap::new();
-
-            for case in &self.cases {
-                if case.barcode.is_empty() {
-                    warn!(
-                        "Case {} has no barcode in multiplexed run - will not be matched",
-                        case.case_id
-                    );
-                    continue;
-                }
-
-                let normalized = normalize_barcode(&case.barcode);
-                barcode_to_case.insert(normalized.clone(), case);
-                info!(
-                    "  Barcode mapping: '{}' → '{}' (case: {})",
-                    case.barcode, normalized, case.case_id
-                );
-            }
-
-            // Match BAMs to cases by barcode
-            for bam in &pass_bams {
-                let bam_file_name =
-                    bam.path
-                        .file_name()
-                        .and_then(|n| n.to_str())
-                        .ok_or_else(|| {
-                            anyhow::anyhow!("Invalid BAM filename: {}", bam.path.display())
-                        })?;
-
-                // Try to extract barcode from filename or parent directory
-                let barcode_opt = extract_and_normalize_barcode(bam_file_name).or_else(|| {
-                    bam.path
-                        .parent()
-                        .and_then(|p| p.file_name())
-                        .and_then(|n| n.to_str())
-                        .and_then(extract_and_normalize_barcode)
-                });
-
-                if let Some(barcode_str) = barcode_opt {
-                    if let Some(case) = barcode_to_case.get(&barcode_str) {
-                        bam_to_case_map.insert(bam.path.clone(), case);
-                        info!(
-                            "  Matched: {} → barcode {} → case {}",
-                            bam.path.file_name().unwrap().to_str().unwrap(),
-                            barcode_str,
-                            case.case_id
-                        );
-                    } else {
-                        warn!(
-                            "Barcode {} found in {} but no matching case",
-                            barcode_str,
-                            bam.path.display()
-                        );
-                        unmatched_bams.push(&bam.path);
-                    }
-                } else {
-                    warn!("No barcode extracted from: {}", bam.path.display());
-                    unmatched_bams.push(&bam.path);
-                }
-            }
-        }
-
-        if bam_to_case_map.is_empty() {
-            bail!("No BAMs were successfully mapped to cases");
-        }
-
-        info!(
-            "✅ Mapped {} BAMs to cases ({} unmatched)",
-            bam_to_case_map.len(),
-            unmatched_bams.len()
-        );
-
-        // =====================================================================
-        // Step 4: Prepare alignment jobs (in parallel)
-        // =====================================================================
-
-        info!(
-            "Step 3/5: Preparing alignment jobs for {} BAM files",
-            bam_to_case_map.len()
-        );
-
-        let mut align_jobs = Vec::new();
-        let mut case_bam_map: HashMap<String, Vec<PathBuf>> = HashMap::new();
-
-        for (bam_path, case) in bam_to_case_map {
-            let sample_type_dir = map_sample_type_to_dir(&case.sample_type, config);
-
-            // Create output directory structure
-            let case_output_dir = PathBuf::from(&config.result_dir)
-                .join(&case.case_id)
-                .join(&sample_type_dir);
-
-            fs::create_dir_all(&case_output_dir).context(format!(
-                "Failed to create directory: {}",
-                case_output_dir.display()
-            ))?;
-
-            // Temporary aligned BAM path
-            let aligned_bam = tmp_dir.join(format!(
-                "{}_{}_{}_{}.bam",
-                Uuid::new_v4(),
-                case.case_id,
-                sample_type_dir,
-                bam_path.file_stem().unwrap().to_str().unwrap()
-            ));
-
-            let job = DoradoAlign::from_config(config, &bam_path, aligned_bam.clone());
-            align_jobs.push(job);
-
-            // Track for later merging
-            case_bam_map
-                .entry(format!("{}_{}", case.case_id, sample_type_dir))
-                .or_default()
-                .push(aligned_bam);
-        }
-
-        info!("✅ Prepared {} alignment jobs", align_jobs.len());
-
-        // =====================================================================
-        // Step 5: Run alignment in parallel
-        // =====================================================================
-
-        info!(
-            "Step 4/5: Running alignment of {} BAM files in parallel",
-            align_jobs.len()
-        );
-
-        run_many!(config, align_jobs).context(format!(
-            "Failed to run alignment batch for run {}",
-            self.protocol_run_id
-        ))?;
-
-        // run_many_sbatch(align_jobs).context(format!(
-        //     "Failed to run alignment batch for run {}",
-        //     self.protocol_run_id
-        // ))?;
-
-        // Verify all aligned BAMs were created
-        let mut missing_aligned = Vec::new();
-        for bams in case_bam_map.values() {
-            for bam in bams {
-                if !bam.exists() {
-                    missing_aligned.push(bam.clone());
-                }
-            }
-        }
-
-        if !missing_aligned.is_empty() {
-            bail!(
-                "Alignment failed: {} output BAM file(s) were not created. First missing: {}",
-                missing_aligned.len(),
-                missing_aligned[0].display()
-            );
-        }
-
-        info!("✅ Alignments completed");
-
-        // =====================================================================
-        // Step 6: Sort aligned chunks using Slurm batch jobs
-        // =====================================================================
-
-        info!("Step 5/5: Sorting and indexing aligned chunks using Slurm");
-
-        // Flatten all aligned BAMs from case_bam_map and prepare sort jobs
-        let mut sort_jobs = Vec::new();
-        let mut bam_to_sorted: HashMap<PathBuf, PathBuf> = HashMap::new();
-
-        for (_key, bams) in case_bam_map.iter() {
-            for bam in bams {
-                let sorted_bam = bam.with_extension("sorted.bam");
-                bam_to_sorted.insert(bam.clone(), sorted_bam.clone());
-
-                let sort_cmd = SamtoolsSort::from_config(config, bam, &sorted_bam);
-                sort_jobs.push(sort_cmd);
-            }
-        }
-
-        info!("Submitting {} sort jobs in parallel", sort_jobs.len());
-
-        run_many_sbatch(sort_jobs).context(format!(
-            "Failed to run sorting batch for run {}",
-            self.protocol_run_id
-        ))?;
-
-        // Verify all sorted BAMs were created
-        let mut missing_sorted = Vec::new();
-        for sorted_bam in bam_to_sorted.values() {
-            if !sorted_bam.exists() {
-                missing_sorted.push(sorted_bam.clone());
-            }
-        }
-
-        if !missing_sorted.is_empty() {
-            bail!(
-                "Sorting failed: {} sorted BAM file(s) were not created. First missing: {}",
-                missing_sorted.len(),
-                missing_sorted[0].display()
-            );
-        }
-
-        info!(
-            "✅ Sorting completed for {} chunk BAMs",
-            bam_to_sorted.len()
-        );
-
-        // Index sorted chunks in parallel using Slurm
-        let mut index_jobs = Vec::new();
-
-        for sorted_bam in bam_to_sorted.values() {
-            let index_cmd = SamtoolsIndex {
-                bin: config.align.samtools_bin.clone(),
-                threads: config.align.samtools_view_threads,
-                bam: sorted_bam.to_string_lossy().to_string(),
-            };
-            index_jobs.push(index_cmd);
-        }
-
-        info!("Submitting {} index jobs in parallel", index_jobs.len());
-
-        run_many_sbatch(index_jobs).context(format!(
-            "Failed to run indexing batch for run {}",
-            self.protocol_run_id
-        ))?;
-
-        // Verify all index files (.bai) were created
-        let mut missing_indices = Vec::new();
-        for sorted_bam in bam_to_sorted.values() {
-            let index_path = PathBuf::from(format!("{}.bai", sorted_bam.display()));
-            if !index_path.exists() {
-                missing_indices.push(index_path);
-            }
-        }
-
-        if !missing_indices.is_empty() {
-            bail!(
-                "Indexing failed: {} index file(s) were not created. First missing: {}",
-                missing_indices.len(),
-                missing_indices[0].display()
-            );
-        }
-
-        info!("✅ Indexed {} chunk BAMs", bam_to_sorted.len());
-
-        // Remove unsorted BAMs and update case_bam_map with sorted paths
-        for (original, _sorted) in bam_to_sorted.iter() {
-            fs::remove_file(original).with_context(|| {
-                format!("Failed to remove unsorted BAM: {}", original.display())
-            })?;
-        }
-
-        // Update case_bam_map with sorted paths
-        for bams in case_bam_map.values_mut() {
-            for bam in bams.iter_mut() {
-                if let Some(sorted) = bam_to_sorted.get(bam) {
-                    *bam = sorted.clone();
-                }
-            }
-        }
-
-        // =====================================================================
-        // Step 7: Merge and finalize per case
-        // =====================================================================
-
-        info!("Step 6/5: Merging, sorting, and indexing final BAM files per case");
-
-        for case in &self.cases {
-            let sample_type_dir = map_sample_type_to_dir(&case.sample_type, config);
-            let key = format!("{}_{}", case.case_id, sample_type_dir);
-
-            let Some(aligned_bams) = case_bam_map.get(&key) else {
-                info!("No aligned BAMs found for case {} - skipping", case.case_id);
-                continue;
-            };
-
-            if aligned_bams.is_empty() {
-                continue;
-            }
-
-            let final_bam_path = PathBuf::from(&config.result_dir)
-                .join(&case.case_id)
-                .join(&sample_type_dir)
-                .join(format!(
-                    "{}_{}_{}.bam",
-                    case.case_id, sample_type_dir, config.reference_name
-                ));
-
-            fs::create_dir_all(final_bam_path.parent().unwrap())?;
-
-            // -----------------------------------------------------------------
-            // Merge all chunk BAMs for this case into a single per-case BAM
-            // -----------------------------------------------------------------
-
-            let case_merged_bam: PathBuf = if aligned_bams.len() == 1 {
-                // Only one chunk: use it directly
-                aligned_bams[0].clone()
-            } else {
-                let tmp_merged = tmp_dir.join(format!(
-                    "{}_{}_{}_merged.bam",
-                    Uuid::new_v4(),
-                    case.case_id,
-                    sample_type_dir
-                ));
-
-                info!(
-                    "  Merging {} chunk BAMs for case {} → {}",
-                    aligned_bams.len(),
-                    case.case_id,
-                    tmp_merged.display()
-                );
-
-                let mut merge_many_cmd = SamtoolsMergeMany::from_config(
-                    tmp_merged.clone(),
-                    aligned_bams.clone(),
-                    config,
-                );
-                SlurmRunner::run(&mut merge_many_cmd)?;
-
-                // Remove chunk BAMs and their indices
-                for bam in aligned_bams {
-                    if bam != &tmp_merged {
-                        remove_bam_with_index(bam).ok();
-                    }
-                }
-
-                tmp_merged
-            };
-
-            // -----------------------------------------------------------------
-            // Merge the per-case BAM into the final BAM (if it already exists)
-            // -----------------------------------------------------------------
-
-            if final_bam_path.exists() {
-                info!(
-                    "  Final BAM already exists for case {}, merging into existing: {}",
-                    case.case_id,
-                    final_bam_path.display()
-                );
-
-                // Index both source and destination BAMs
-                let mut index_cmd = SamtoolsIndex {
-                    bin: config.align.samtools_bin.clone(),
-                    threads: config.align.samtools_view_threads,
-                    bam: case_merged_bam.to_string_lossy().to_string(),
-                };
-                SlurmRunner::run(&mut index_cmd)?;
-
-                let mut index_cmd = SamtoolsIndex {
-                    bin: config.align.samtools_bin.clone(),
-                    threads: config.align.samtools_view_threads,
-                    bam: final_bam_path.to_string_lossy().to_string(),
-                };
-                SlurmRunner::run(&mut index_cmd)?;
-
-                // Merge into existing final BAM
-                let mut merge_cmd =
-                    SamtoolsMerge::from_config(config, &case_merged_bam, &final_bam_path);
-                SlurmRunner::run(&mut merge_cmd)?;
-            } else {
-                info!(
-                    "  Creating new final BAM for case {} → {}",
-                    case.case_id,
-                    final_bam_path.display()
-                );
-
-                // Merged per-case BAM becomes the base final BAM
-                fs::rename(&case_merged_bam, &final_bam_path)?;
-            }
-
-            // -----------------------------------------------------------------
-            // Sort and index the final BAM
-            // -----------------------------------------------------------------
-
-            let sorted_tmp = final_bam_path.with_extension("sorted.bam");
-
-            info!(
-                "  Sorting final BAM for case {} → {}",
-                case.case_id,
-                final_bam_path.display()
-            );
-
-            let mut sort_cmd = SamtoolsSort::from_config(config, &final_bam_path, &sorted_tmp);
-            SlurmRunner::run(&mut sort_cmd)?;
-
-            // Replace unsorted BAM with sorted BAM
-            fs::rename(&sorted_tmp, &final_bam_path)?;
-
-            // Index the sorted final BAM
-            let mut index_cmd = SamtoolsIndex {
-                bin: config.align.samtools_bin.clone(),
-                threads: config.align.samtools_view_threads,
-                bam: final_bam_path.to_string_lossy().to_string(),
-            };
-            SlurmRunner::run(&mut index_cmd)?;
-
-            info!("  ✅ Output: {}", final_bam_path.display());
-        }
-
-        // =====================================================================
-        // Final summary
-        // =====================================================================
-
-        info!(
-            "🎉 Pipeline completed for run: {} (flowcell: {})",
-            self.protocol_run_id, self.flow_cell_id
-        );
-        info!(
-            "  Processed {} cases with {} final BAM files",
-            self.cases.len(),
-            case_bam_map.len()
-        );
-
-        Ok(())
-    }
-
     /// Serializes this run to a JSON file.
     ///
     /// # Arguments
@@ -1637,10 +1132,7 @@ impl fmt::Display for PromBam {
 }
 
 /// Builds the final BAM path for a case.
-fn build_final_bam_path(
-    case: &IdInput,
-    config: &Config,
-) -> anyhow::Result<PathBuf> {
+fn build_final_bam_path(case: &IdInput, config: &Config) -> anyhow::Result<PathBuf> {
     let final_bam_path = PathBuf::from(config.solo_bam(&case.case_id, &case.sample_type));
 
     if let Some(parent) = final_bam_path.parent() {
@@ -1709,25 +1201,37 @@ fn atomic_replace(source: &Path, destination: &Path) -> anyhow::Result<()> {
         let backup = destination.with_extension("bam.backup");
 
         fs::rename(destination, &backup).with_context(|| {
-            format!("Failed to backup existing file: {}", destination.display())
+            format!(
+                "Failed to backup {} to {}",
+                destination.display(),
+                backup.display()
+            )
         })?;
 
         if let Err(e) = fs::rename(source, destination) {
-            fs::rename(&backup, destination).ok();
+            // Attempt restore, but propagate original error regardless
+            if let Err(restore_err) = fs::rename(&backup, destination) {
+                warn!(
+                    "Failed to restore backup {} after failed replacement: {}",
+                    backup.display(),
+                    restore_err
+                );
+            }
             return Err(e).with_context(|| {
                 format!(
-                    "Failed to rename {} to {}",
-                    source.display(),
-                    destination.display()
+                    "Failed to replace {} with {}",
+                    destination.display(),
+                    source.display()
                 )
             });
         }
 
+        // Remove backup and its orphaned index
         remove_bam_with_index(&backup).ok();
     } else {
         fs::rename(source, destination).with_context(|| {
             format!(
-                "Failed to rename {} to {}",
+                "Failed to move {} to {}",
                 source.display(),
                 destination.display()
             )
@@ -1736,7 +1240,6 @@ fn atomic_replace(source: &Path, destination: &Path) -> anyhow::Result<()> {
 
     Ok(())
 }
-
 /// Indexes a BAM file using samtools.
 fn index_bam(bam: &Path, config: &Config) -> anyhow::Result<()> {
     let mut index_cmd = SamtoolsIndex {
@@ -1784,7 +1287,7 @@ fn merge_into_existing_final(
     let input_bams = vec![source.to_path_buf(), destination.to_path_buf()];
     let mut merge_cmd = SamtoolsMergeMany::from_config(temp_merged.clone(), input_bams, config);
 
-    SlurmRunner::run(&mut merge_cmd)
+    run!(config, &mut merge_cmd)
         .with_context(|| "Failed to merge source into existing final BAM")?;
 
     // No sort needed — merge preserves coordinate order from sorted inputs
@@ -1803,11 +1306,7 @@ fn merge_into_existing_final(
 ///
 /// Source is already sorted (from sort_and_index_chunks), so only
 /// move and index are needed.
-fn create_new_final(
-    source: &Path,
-    destination: &Path,
-    config: &Config,
-) -> anyhow::Result<()> {
+fn create_new_final(source: &Path, destination: &Path, config: &Config) -> anyhow::Result<()> {
     info!("  Creating new final BAM: {}", destination.display());
 
     // Source already sorted — just move and index
@@ -1943,7 +1442,8 @@ fn finalize_case_bams(
     sorted_bam_map: &HashMap<String, Vec<PathBuf>>,
     tmp_dir: &Path,
     config: &Config,
-) -> anyhow::Result<()> {
+) -> anyhow::Result<Vec<PathBuf>> {
+    let mut finalized = Vec::new();
     for case in cases {
         let sample_type_dir = map_sample_type_to_dir(&case.sample_type, config);
         let key = format!("{}_{}", case.case_id, sample_type_dir);
@@ -1985,12 +1485,12 @@ fn finalize_case_bams(
             }
         }
 
-
         let stats = WGSBamStats::open(&case.case_id, &case.sample_type, config)?;
-        info!("  ✅ Output: {}\n{stats}", final_bam_path.display());
+        info!("✅ Output: {}\n{stats}", final_bam_path.display());
+        finalized.push(final_bam_path);
     }
 
-    Ok(())
+    Ok(finalized)
 }
 
 /// Normalize barcode strings for matching.
@@ -2048,6 +1548,73 @@ fn extract_and_normalize_barcode(text: &str) -> Option<String> {
     None
 }
 
+#[derive(Debug, Clone, Default, Serialize, Deserialize)]
+pub struct PipelineMetrics {
+    pub validation_duration: Duration,
+    pub alignment_duration: Duration,
+    pub sort_index_duration: Duration,
+    pub finalize_duration: Duration,
+    pub total_duration: Duration,
+
+    pub bams_processed: usize,
+    pub cases_finalized: usize,
+    pub bytes_input: u64,
+    pub bytes_output: u64,
+}
+
+impl PipelineMetrics {
+    pub fn throughput_mbps(&self) -> f64 {
+        if self.total_duration.as_secs_f64() == 0.0 {
+            return 0.0;
+        }
+        (self.bytes_input as f64 / 1_000_000.0) / self.total_duration.as_secs_f64()
+    }
+
+    pub fn save(&self, path: impl AsRef<Path>) -> anyhow::Result<()> {
+        let file = BufWriter::new(File::create(path.as_ref())?);
+        serde_json::to_writer_pretty(file, self)?;
+        Ok(())
+    }
+}
+
+impl std::fmt::Display for PipelineMetrics {
+    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
+        writeln!(f, "📊 Pipeline Metrics")?;
+        writeln!(f, "  Validation:    {:>8.2?}", self.validation_duration)?;
+        writeln!(f, "  Alignment:     {:>8.2?}", self.alignment_duration)?;
+        writeln!(f, "  Sort/Index:    {:>8.2?}", self.sort_index_duration)?;
+        writeln!(f, "  Finalize:      {:>8.2?}", self.finalize_duration)?;
+        writeln!(f, "  ─────────────────────")?;
+        writeln!(f, "  Total:         {:>8.2?}", self.total_duration)?;
+        writeln!(f)?;
+        writeln!(f, "  BAMs processed:   {:>6}", self.bams_processed)?;
+        writeln!(f, "  Cases finalized:  {:>6}", self.cases_finalized)?;
+        writeln!(
+            f,
+            "  Input:         {:>8.2} GiB",
+            self.bytes_input as f64 / 1024.0_f64.powi(3)
+        )?;
+        writeln!(
+            f,
+            "  Output:        {:>8.2} GiB",
+            self.bytes_output as f64 / 1024.0_f64.powi(3)
+        )?;
+        writeln!(f, "  Throughput:    {:>8.2} MB/s", self.throughput_mbps())
+    }
+}
+
+struct Timer(Instant);
+
+impl Timer {
+    fn start() -> Self {
+        Self(Instant::now())
+    }
+
+    fn elapsed(&self) -> Duration {
+        self.0.elapsed()
+    }
+}
+
 #[cfg(test)]
 mod tests {
     use super::*;

+ 4 - 0
src/helpers.rs

@@ -834,6 +834,10 @@ impl TempFileGuard {
             }
         }
     }
+
+    pub fn clear(&mut self) {
+        self.files.clear();
+    }
 }
 
 impl Drop for TempFileGuard {