Thanks for building this exciting new tool! I am running into another issue which seems to stem from plotting purity/ploidy. Wakhan is crashing for some of my samples with this error message:
[2025-11-05 12:31:13] INFO: Generating BAFs for chr21
[2025-11-05 12:31:15] INFO: Generating BAFs for chr22
[2025-11-05 12:31:17] INFO: Generating BAFs for chrX
[2025-11-05 12:31:27] INFO: Generating BAFs for chrY
Traceback (most recent call last):
File "/opt/wakhan/Wakhan/wakhan.py", line 28, in <module>
main()
File "/opt/wakhan/Wakhan/wakhan.py", line 24, in main
sys.exit(main())
File "/opt/wakhan/Wakhan/src/main.py", line 357, in main
wakhan_all(args) #hapcorrect + cna
File "/opt/wakhan/Wakhan/src/main.py", line 373, in wakhan_all
cna_process(args) #cna
File "/opt/wakhan/Wakhan/src/main.py", line 595, in cna_process
copy_numbers_assignment_haplotypes(args, tumor_cov, max_limit, single_copy_cov, centers, subclonals, df_hp1, df_hp2, df_segs_hp1, df_segs_hp2, snps_cpd_means_df, csv_df_snps_mean, df_snps_in_csv, df_unphased, x_axis, observed_hist, False)
File "/opt/wakhan/Wakhan/src/main.py", line 114, in copy_numbers_assignment_haplotypes
plot_ploidy_purity_p_values(args, [data[n][0] for n in range(len(data))], [data[n][1] for n in range(len(data))], [data[n][3] for n in range(len(data))])
File "/opt/wakhan/Wakhan/src/plots.py", line 5500, in plot_ploidy_purity_p_values
if (purity_values[0] < float(args.purity_range.split('-')[0]) or purity_values[0] > float(args.purity_range.split('-')[1])) or (
IndexError: list index out of range
wakhan \
--bin-size 50000 --contigs chr1-22,chrX,chrY --phaseblocks-enable --loh-enable --copynumbers-subclonal-enable \
--use-sv-haplotypes \
--user-input-genes /data1/shahs3/reference/ref-sarcoma/GRCh38/grch38_genes.tsv \
\
--threads 24 \
--reference GRCh38.primary_assembly.genome.fa \
--target-bam SHAH_H004080_T01_01_WG01.tumor.haplotagged.bam \
--normal-phased-vcf SHAH_H004080_T01_01_WG01.vcf.gz \
--genome-name SHAH_H004080_T01_01_WG01 \
--breakpoints severus_somatic.vcf \
--out-dir-plots .
Thanks for your time and help.
Hi,
Thanks for building this exciting new tool! I am running into another issue which seems to stem from plotting purity/ploidy. Wakhan is crashing for some of my samples with this error message:
my run command is:
Any clues to what is going on here?
Thanks for your time and help.
Best,
Asher