nf-core / nf-core/eager

[test data] Human aligned bam testdataset still has SQ tags for non-existant fasta indices in corresponding fasta used

Open
#1,127 0 comments 0 reactions 1 assignee View on GitHub

@TCLamnidis is already working on this.

Since Mar 26, 2025.

bug needs upstream fix
Dominant language
Nextflow
Stars
215
Forks
91
Avg merge
5m
Merged PRs (30d)
1

Description

Description of the bug

The reduced size human bam file (Ch21-X) still has the @SQ tags for all contigs on the human reference genome. This causes issues for any tool which checks to ensure correspondence between supplied fasta.fai/fasta.dict/fasta files and the @SQ fields of the bam file.

Steps to reproduce

On eager dev branch:
nextflow run main.nf --outdir out_test_sq_errors/ -profile test_multiref,docker --run_genotyping --genotyping_tool 'ug' -resume

`-[nf-core/eager] Pipeline completed with errors-
ERROR ~ Error executing process > 'NFCORE_EAGER:EAGER:GENOTYPE:GATK_REALIGNERTARGETCREATOR (hs37d5_chr21-MT|JK2067)'

Caused by:
Process NFCORE_EAGER:EAGER:GENOTYPE:GATK_REALIGNERTARGETCREATOR (hs37d5_chr21-MT|JK2067) terminated with an error exit status (1)

Command executed:

gatk3
-Xmx3276M
-T RealignerTargetCreator
-nt 2
-I JK2067_hs37d5_chr21-MT.bam
-R hs37d5_chr21-MT.fa
-o JK2067_hs37d5_chr21-MT_realigntarget.intervals
\

cat <<-END_VERSIONS > versions.yml
"NFCORE_EAGER:EAGER:GENOTYPE:GATK_REALIGNERTARGETCREATOR":
gatk: $(echo $(gatk3 --version))
END_VERSIONS

Command exit status:
1

Command output:
(empty)

Command error:
INFO 10:50:46,455 HelpFormatter - --------------------------------------------------------------------------------
INFO 10:50:46,470 HelpFormatter - The Genome Analysis Toolkit (GATK) v3.5-0-g36282e4, Compiled 2015/11/25 04:03:56
INFO 10:50:46,470 HelpFormatter - Copyright (c) 2010 The Broad Institute
INFO 10:50:46,538 HelpFormatter - For support and documentation go to http://www.broadinstitute.org/gatk
INFO 10:50:46,543 HelpFormatter - Program Args: -T RealignerTargetCreator -nt 2 -I JK2067_hs37d5_chr21-MT.bam -R hs37d5_chr21-MT.fa -o JK2067_hs37d5_chr21-MT_realigntarget.intervals
INFO 10:50:46,641 HelpFormatter - Executing as ?@5a8a7083c3d8 on Linux 6.1.91-060191-generic amd64; OpenJDK 64-Bit Server VM 1.8.0_282-b08.
INFO 10:50:46,642 HelpFormatter - Date/Time: 2025/03/26 10:50:46
INFO 10:50:46,645 HelpFormatter - --------------------------------------------------------------------------------
INFO 10:50:46,646 HelpFormatter - --------------------------------------------------------------------------------
INFO 10:50:47,442 GenomeAnalysisEngine - Strictness is SILENT
INFO 10:50:47,676 GenomeAnalysisEngine - Downsampling Settings: Method: BY_SAMPLE, Target Coverage: 1000
INFO 10:50:47,748 SAMDataSource$SAMReaders - Initializing SAMRecords in serial
INFO 10:50:47,855 SAMDataSource$SAMReaders - Done initializing BAM readers: total time 0.10
INFO 10:50:47,971 MicroScheduler - Running the GATK in parallel mode with 2 total threads, 1 CPU thread(s) for each of 2 data thread(s), of 16 processors available on this machine
INFO 10:50:49,574 GenomeAnalysisEngine - Preparing for traversal over 1 BAM files
INFO 10:50:50,074 GenomeAnalysisEngine - Done preparing for traversal
INFO 10:50:50,075 ProgressMeter - [INITIALIZATION COMPLETE; STARTING PROCESSING]
INFO 10:50:50,075 ProgressMeter - | processed | time | per 1M | | total | remaining
INFO 10:50:50,075 ProgressMeter - Location | sites | elapsed | sites | completed | runtime | runtime
INFO 10:50:50,243 SAMDataSource$SAMReaders - Initializing SAMRecords in serial
INFO 10:50:50,261 SAMDataSource$SAMReaders - Done initializing BAM readers: total time 0.02
INFO 10:50:57,862 GATKRunReport - Uploaded run statistics report to AWS S3

ERROR ------------------------------------------------------------------------------------------
ERROR A USER ERROR has occurred (version 3.5-0-g36282e4):
ERROR
ERROR This means that one or more arguments or inputs in your command are incorrect.
ERROR The error message below tells you what is the problem.
ERROR
ERROR If the problem is an invalid argument, please check the online documentation guide
ERROR (or rerun your command with --help) to view allowable command-line arguments for this tool.
ERROR
ERROR Visit our website and forum for extensive documentation and answers to
ERROR commonly asked questions http://www.broadinstitute.org/gatk
ERROR
ERROR Please do NOT post this error to the GATK forum unless you have really tried to fix it yourself.
ERROR
ERROR MESSAGE: Badly formed genome location: Contig 1 given as location, but this contig isn't present in the Fasta sequence dictionary
ERROR ------------------------------------------------------------------------------------------

Work dir:
/workspace/eager/work/1b/bbb0d6e405b4be7e46a9721a8be139

Container:
quay.io/biocontainers/gatk:3.5--hdfd78af_11

Tip: view the complete command output by changing to the process work dir and entering the command cat .command.out

-- Check '.nextflow.log' file for details
ERROR ~ Pipeline failed. Please refer to troubleshooting docs: https://nf-co.re/docs/usage/troubleshooting

-- Check '.nextflow.log' file for details`

Expected behaviour

.bam input for test data should have the same @SQ fields as what is in the test data .fasta file

Solution:

Recreate aligned .bam input file from mapping without full fasta. 1-to-1 correspondence of fasta used for alignment and fasta provided as input to eager.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.