Skip to content

Fix export_fasta_from_regions to output one header per region#259

Open
nsheff wants to merge 1 commit into
devfrom
fix/export-fasta-per-region
Open

Fix export_fasta_from_regions to output one header per region#259
nsheff wants to merge 1 commit into
devfrom
fix/export-fasta-per-region

Conversation

@nsheff
Copy link
Copy Markdown
Member

@nsheff nsheff commented May 13, 2026

Summary

  • Fixes a bug where export_fasta_from_regions was outputting one header per chromosome, concatenating sequences from multiple regions without separators
  • Now correctly outputs standard FASTA with one header per BED region in format >chr:start-end

The bug

Before this fix, extracting 5 regions from 2 chromosomes would produce output like:

>chr1
<seq1><seq2><seq3>
>chr2
<seq4><seq5>

After this fix:

>chr1:10000-10100
<seq1>
>chr1:20000-20100
<seq2>
...

Test plan

  • Verified on 5-region test BED file: outputs 5 separate FASTA entries
  • Each entry has correct coordinates in header
  • Sequences match expected regions

Previously wrote one header per chromosome and concatenated region
sequences without separators. Now correctly outputs standard FASTA
with one header per BED region in the format >chr:start-end.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant