Skip to content

feat(utils): Ensure reference first in alignment#31

Merged
gp201 merged 3 commits into
andersen-lab:mainfrom
gp201:feat/check_reference_aln
Jun 11, 2026
Merged

feat(utils): Ensure reference first in alignment#31
gp201 merged 3 commits into
andersen-lab:mainfrom
gp201:feat/check_reference_aln

Conversation

@gp201

@gp201 gp201 commented Jun 10, 2026

Copy link
Copy Markdown
Collaborator

This pull request adds robust handling to ensure that the reference genome is always the first sequence in the alignment FASTA file, which is required by the faToVcf tool. It introduces a new utility function.

fixes #30

Core functionality and CLI integration:

  • Added a new function ensure_reference_is_first_in_alignment in barcodeforge/utils.py to guarantee the reference genome is the first sequence in the alignment. This function checks, prepends, or deduplicates as needed, and handles errors for empty alignments or length mismatches.
  • Integrated ensure_reference_is_first_in_alignment into the barcode CLI command to ensure downstream tools always receive a correctly ordered alignment. [1] [2]

@gp201 gp201 enabled auto-merge (squash) June 10, 2026 22:34
@gp201 gp201 disabled auto-merge June 10, 2026 22:34
@gp201 gp201 merged commit 63ecd4f into andersen-lab:main Jun 11, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

BarcodeForge should require that the first sequence in the alignment FASTA matches the reference FASTA

1 participant