Skip to content

ValueError: The specified BB file does not exist! #236

@rtasakis

Description

@rtasakis

Hi! I'm using HATCHet for the first time and I'm encountering the following error that my specified BB file does not exist. I'm not sure what is the issue, but from my understanding this is something that upstream steps of running HATCHet should produce? Any help would be greatly appreciated!

Here's the content of my .ini file

# What individual steps of HATCHet should we run in the pipeline?
# Valid values are True or False
download_panel = False
count_reads = True
genotype_snps = True
phase_snps = False
fixed_width = False  # True uses older fixed-width versions of some commands
count_alleles = True
combine_counts = False
cluster_bins = True
loc_clust = True  # True uses new locality-aware clustering
plot_bins = True
compute_cn = True
plot_cn = True

# What chromosome(s) do we wish to process in the pipeline? Leave unspecified to process
# all chromosomes found in the normal/tumor bam files
chromosomes = "22"

# Path to reference genome
# Make sure you have also generated the reference dictionary as /path/to/reference.dict
reference = /path/to/ref/human_g1k_v37.fasta

# Make sure you have generated the .bam.bai files at the same locations as these bam files
normal = /path/to/normal/Normal.dedup.recal.bam

# Space-delimited list of tumor BAM locations
bams = /path/to/tumor/Tumor.dedup.recal.bam

# Space-delimited list of tumor names
samples = TumorTest

# Output path of the run script
output = /path/to/HatchetOut/TumorTest_out

# How many cores to use for the end-end pipeline?
# This parameter, if specified, will override corresponding 'processes' parameters in individual <step> sections below.
processes = 2

[genotype_snps]
# Reference version used to select list of known germline SNPs;
# Possible values are "hg19" or "hg38", or leave blank "" if you wish for all positions to be genotyped by bcftools
reference_version = hg19
# Does your reference name chromosomes with "chr" prefix?; True or False
chr_notation = False

# Use 8 for WGS with >30x and 20 for WES with ~100x
mincov = 8
# Use 300 for WGS with >30x and Use 1000 for WES with ~100x
maxcov = 300
# Path to SNP list
#   If unspecified, HATCHet selects a list of known germline SNPs based on <run.reference_version> and <run.chr_notation>
#   If not, please provide full path to a locally stored list (.vcf.gz) here.
snps = /path/to/vcf/tmpTestHatchet/00-All.vcf.gz

[combine_counts]
# Minimum number of SNP-covering reads per bin and sample
msr = 5000
# Minimum number of total reads per bin and sample
mtr = 5000

[cluster_bins]
diploidbaf = 0.08
# Minimum and maximum number of clusters to infer
# (using silhouette score for model selection)
minK = 2
maxK = 30
# You can instead specify an exact number of clusters:
# exactK = 15

[plot_bins]
sizethreshold = 0.01
figsize = "6,3"

[compute_cn]
clones = 2,6
seeds = 400
minprop = 0.03
diploidcmax = 6
tetraploidcmax = 12
ghostprop = 0.35
limitinc = 0.6

I run it with:

hatchet run new_hatchet.ini 

And the output is:

[2025-Feb-18 14:12:57]('# Parsing the input arguments, checking the consistency of given files, and extracting required ', 'information\n')
        normal: ('/path/to/normal/Normal.dedup.recal.bam', 'Normal')
        chromosomes: ['22']
        samtools: /opt/samtools-1.7/samtools
        bcftools: /opt/bcftools-1.7/bcftools
        snps: /path/to/vcf/tmpTestHatchet/00-All.vcf.gz
        reference: /path/to/ref/human_g1k_v37.fasta
        j: 2
        q: 0
        Q: 11
        E: False
        mincov: 8
        maxcov: 300
        outputsnps: /path/to/HatchetOut/TumorTest_out/snps
        verbose: False
[2025-Feb-18 14:13:25]# Inferring SNPs from the normal sample
Progress: |----------------------------------------| 0.0% Complete [[2025-Feb-18 14:13:25]Caller-1 starts on Normal for 22)]
Progress: |████████████████████████████████████████| 100.0% Complete [[2025-Feb-18 14:21:44]Caller-1 ends on Normal for 22)]
[2025-Feb-18 14:21:44]# Counting number of identified SNPs
3945 SNPs have been identified in total
[2025-Feb-18 14:21:44]# SNP Calling is concluded
## Called SNPs have been written per chromosome in:
/path/to/HatchetOut/TumorTest_out/snps/22.vcf.gz
[2025-Feb-18 14:21:44]# Parsing the input arguments, checking the consistency of given files, and extracting required information

        normal: ('/path/to/normal/Normal.dedup.recal.bam', 'normal')
        samples: {('/path/to/tumor/Tumor.dedup.recal.bam', 'TumorTest')}
        chromosomes: ['22']
        samtools: /opt/samtools-1.7/samtools
        bcftools: /opt/bcftools-1.7/bcftools
        snps: {'22': ' /path/to/HatchetOut/TumorTest_out/snps/22.vcf.gz'}
        reference: /path/to/ref/human_g1k_v37.fasta
        j: 2
        q: 0
        Q: 11
        qual: 11
        E: False
        gamma: 0.05
        maxshift: 0.5
        mincov: 0
        maxcov: 1000
        outputNormal: /path/to/HatchetOut/TumorTest_out/baf/normal.1bed
        outputTumors: /path/to/HatchetOut/TumorTest_out/baf/tumor.1bed
        outputSnps: /path/to/HatchetOut/TumorTest_out
        verbose: False
[2025-Feb-18 14:22:10]# Counting SNPs alleles from the matched-normal sample
[2025-Feb-18 14:27:29]
Progress: |████████████████████████████████████████| 100.0% Complete
[2025-Feb-18 14:27:29]# Selecting heterozygous SNPs
[2025-Feb-18 14:27:30]# Writing the list of selected SNPs, covered and heterozygous in the normal sample
[2025-Feb-18 14:27:30]# Writing the allele counts of the normal sample for selected SNPs
[2025-Feb-18 14:27:30]# Counting SNPs alleles from tumour samples
[2025-Feb-18 14:40:58]
Progress: |████████████████████████████████████████| 100.0% Complete
[2025-Feb-18 14:40:58]# Writing the allele counts of tumor samples for selected SNPs
[2025-Feb-18 14:40:58]# Parsing and checking input arguments

        bams: ['/path/to/normal/Normal.dedup.recal.bam', '/path/to/tumor/Tumor.dedup.recal.bam']
        names: ['normal', 'TumorTest']
        chromosomes: ['22']
        samtools: /opt/samtools-1.7/samtools
        mosdepth: mosdepth
        tabix: tabix
        j: 2
        outdir: /path/to/HatchetOut/TumorTest_out/rdr
        use_chr: False
        refversion: hg19
        baf_file: /path/to/HatchetOut/TumorTest_out/baf/tumor.1bed
        readquality: 11
[2025-Feb-18 14:40:58]Sample normal -- Starting chromosome 22
[2025-Feb-18 14:40:58]Sample TumorTest -- Starting chromosome 22
[2025-Feb-18 14:41:18]Sample normal -- Done chromosome 22
[2025-Feb-18 14:41:39]Sample TumorTest -- Done chromosome 22
[2025-Feb-18 14:41:39]Starting mosdepth on sample normal with 1 threads
[2025-Feb-18 14:41:39]Starting mosdepth on sample TumorTest with 1 threads
[2025-Feb-18 14:48:49]Done mosdepth on sample normal
[2025-Feb-18 14:56:49]Done mosdepth on sample TumorTest
Loading chromosome 22
Reading SNPs file for chromosome 22
Loading counts for chromosome 22
[W::tbx_parse1] Coordinate <= 0 detected. Did you forget to use the -0 option?
[W::tbx_parse1] Coordinate <= 0 detected. Did you forget to use the -0 option?
Done chromosome 22
[2025-Feb-18 14:58:40]# Array forming completed successfully, removing intermediate count files. 
[2025-Feb-18 14:58:41]# Counting total number of reads for normal and tumor samples
Progress: |----------------------------------------| 0.0% Complete [[2025-Feb-18 14:58:41
Progress: |----------------------------------------| 0.0% Complete [[2025-Feb-18 14:58:41
Progress: |████████████████████--------------------| 50.0% Complete [[2025-Feb-18 14:58:4
Progress: |████████████████████████████████████████| 100.0% Complete [[2025-Feb-18 14:58:58]TotalCounter-10 ends on TumorTest for 22]
[2025-Feb-18 14:58:58]# Writing the total read counts for all samples in /path/to/HatchetOut/TumorTest_out/rdr/total.tsv
[2025-Feb-18 14:58:58]# Parsing and checking input arguments
The specified BB file does not exist!Traceback (most recent call last):
  File "/usr/local/bin/hatchet", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.8/site-packages/hatchet/__main__.py", line 60, in main
    globals()[command](args)
  File "/usr/local/lib/python3.8/site-packages/hatchet/utils/run.py", line 327, in main
    cluster_bins(
  File "/usr/local/lib/python3.8/site-packages/hatchet/utils/cluster_bins.py", line 17, in main
    args = parse_cluster_bins_args(args)
  File "/usr/local/lib/python3.8/site-packages/hatchet/utils/ArgParsing.py", line 382, in parse_cluster_bins_args
    ensure(isfile(args.BBFILE), "The specified BB file does not exist!")
  File "/usr/local/lib/python3.8/site-packages/hatchet/utils/Supporting.py", line 147, in ensure
    return error(msg, raise_exception=True, exception_class=exception_class)
  File "/usr/local/lib/python3.8/site-packages/hatchet/utils/Supporting.py", line 137, in error
    return log(
  File "/usr/local/lib/python3.8/site-packages/hatchet/utils/Supporting.py", line 124, in log
    raise exception_class(msg)
ValueError: The specified BB file does not exist!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions