From 758003a4389d9c07b2529e36eb4dfe7017f7d244 Mon Sep 17 00:00:00 2001 From: Glenn Hickey Date: Thu, 30 Oct 2025 10:58:12 -0400 Subject: [PATCH 1/3] add -a to bcftools concat --- src/cactus/refmap/cactus_graphmap_join.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cactus/refmap/cactus_graphmap_join.py b/src/cactus/refmap/cactus_graphmap_join.py index 84de4e53e..47f34c8af 100644 --- a/src/cactus/refmap/cactus_graphmap_join.py +++ b/src/cactus/refmap/cactus_graphmap_join.py @@ -1478,7 +1478,7 @@ def vcf_cat(job, vcf_tbi_ids, tag, sort=False, fix_ploidies=True): vcf_paths[i] = updated_vcf_path cat_vcf_path = os.path.join(work_dir, '{}vcf.gz'.format(tag)) - cactus_call(parameters=['bcftools', 'concat', '-O', 'z', '--threads', str(job.cores)] + \ + cactus_call(parameters=['bcftools', 'concat', '-a', '-O', 'z', '--threads', str(job.cores)] + \ [os.path.basename(vcf_path) for vcf_path in vcf_paths], work_dir=work_dir, outfile=cat_vcf_path) From ab0542eb6bc691e3a8796ee6c622e878ebe9b715 Mon Sep 17 00:00:00 2001 From: Glenn Hickey Date: Thu, 30 Oct 2025 13:47:58 -0400 Subject: [PATCH 2/3] try again to fix ci --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 1c49d3e27..6e6874abe 100644 --- a/Dockerfile +++ b/Dockerfile @@ -53,7 +53,7 @@ RUN cd /home/cactus && rm -rf cactus_env && \ . cactus_env/bin/activate && \ python3 -m pip install -U setuptools pip && \ python3 -m pip install -U -r ./toil-requirement.txt && \ - python3 -m pip install -U . + python3 -m pip install -U --no-build-isolation . # prep the hal python install which is not part of the setup RUN rm -rf /home/cactus/hal_lib && \ From 05def955b63a7c7b8f7e2bbb86d8497ea8d9fb68 Mon Sep 17 00:00:00 2001 From: Glenn Hickey Date: Fri, 31 Oct 2025 10:39:56 -0400 Subject: [PATCH 3/3] index before cat --- src/cactus/refmap/cactus_graphmap_join.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/cactus/refmap/cactus_graphmap_join.py b/src/cactus/refmap/cactus_graphmap_join.py index 47f34c8af..f0a80872b 100644 --- a/src/cactus/refmap/cactus_graphmap_join.py +++ b/src/cactus/refmap/cactus_graphmap_join.py @@ -1476,6 +1476,13 @@ def vcf_cat(job, vcf_tbi_ids, tag, sort=False, fix_ploidies=True): ['bcftools', 'view', '-S', all_sample_list_path, '-O', 'z']], outfile=updated_vcf_path) vcf_paths[i] = updated_vcf_path + + # -a below requires indexes + for vcf_path in vcf_paths: + try: + cactus_call(parameters=['tabix', '-fp', 'vcf', vcf_path]) + except: + cactus_call(parameters=['bcftools', 'index', '-c', vcf_path]) cat_vcf_path = os.path.join(work_dir, '{}vcf.gz'.format(tag)) cactus_call(parameters=['bcftools', 'concat', '-a', '-O', 'z', '--threads', str(job.cores)] + \