Skip to content

reference statistics in stats output (fixes #2139)#2224

Merged
whitwham merged 2 commits into
samtools:developfrom
vasudeva8:rs2
Jun 12, 2025
Merged

reference statistics in stats output (fixes #2139)#2224
whitwham merged 2 commits into
samtools:developfrom
vasudeva8:rs2

Conversation

@vasudeva8

@vasudeva8 vasudeva8 commented May 22, 2025

Copy link
Copy Markdown
Contributor

Fixes #2139.
Reference statistics is calculated and added to stats output.
It calculates the length from header and region specifications and doesn't need reference file for it.
GC content and unknown base counts are calculated when ref. file is provided and will have -1 when it is not provided.

1st line in RFS section gives the total sequence count in input file, count of regions in status, average GC, min, max, average and total counts.
2nd line onwards gives regions, lengths, GC and unknown base count.

Regions are selected based on options, it is given by target when -t is used and given by region specification when -t is not there. All targets in input file is used when neither -t and region spec are present.

@vasudeva8 vasudeva8 changed the title reference status in to stats output (fixes #2139) reference status in stats output (fixes #2139) May 22, 2025
@vasudeva8 vasudeva8 changed the title reference status in stats output (fixes #2139) reference statistics in stats output (fixes #2139) May 22, 2025
@vasudeva8

Copy link
Copy Markdown
Contributor Author

Based on review, removed the unnecessary option argument in ref-stats.
Also removed the gap in test output names.

@vasudeva8

vasudeva8 commented Jun 11, 2025

Copy link
Copy Markdown
Contributor Author

Updated man page based on review suggestions.
Added thread pool to fai file handling, to improve performance.
Updated base counting in GC calc. based on discussions.

@whitwham whitwham merged commit a45f03b into samtools:develop Jun 12, 2025
6 checks passed
@vasudeva8 vasudeva8 deleted the rs2 branch June 23, 2025 15:46
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.

samtools stats reference information

2 participants