Skip to content

Add -N/--disable-automatic-newline option#261

Merged
jeromekelleher merged 2 commits intosgkit-dev:mainfrom
tomwhite:disable-automatic-newline-option
Feb 16, 2026
Merged

Add -N/--disable-automatic-newline option#261
jeromekelleher merged 2 commits intosgkit-dev:mainfrom
tomwhite:disable-automatic-newline-option

Conversation

@tomwhite
Copy link
Copy Markdown
Member

Fixes #238

Copy link
Copy Markdown
Member

@jeromekelleher jeromekelleher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor query

Comment thread vcztools/query.py
contigs = root["contig_id"][:]
filters = root["filter_id"][:]

if "\\n" not in query_format and not disable_automatic_newline:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should it not be query_format.endswith("\\n")? What's the exact bcftools semantics?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From samtools/bcftools@c7cbe0b:

if the formatting expression contains a newline character

@jeromekelleher jeromekelleher added this pull request to the merge queue Feb 16, 2026
Merged via the queue into sgkit-dev:main with commit 3b0312a Feb 16, 2026
14 checks passed
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.

Force newline when not present in query format

2 participants