diff --git a/CHANGELOG.md b/CHANGELOG.md index d2b281a..09fd397 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [v0.18.2] +### Fixed +- 'run_id' instead of 'basecaller' as column name in bamstats basecaller summary output header line. + ## [v0.18.1] ### Fixed - 'run_id' instead of 'basecaller' as column name in basecaller summary output header line. diff --git a/src/bamstats/main.c b/src/bamstats/main.c index 2f0f35d..cedacbe 100644 --- a/src/bamstats/main.c +++ b/src/bamstats/main.c @@ -51,11 +51,11 @@ static inline void write_stats(size_t *stats, const char* chr, const char* sampl } } -static inline void write_counter(const char* fname, kh_counter_t *counter, const char* sample, const char* bam_fname) { +static inline void write_counter(const char* fname, kh_counter_t *counter, const char* sample, const char* bam_fname, const char* column_name) { FILE* stats_fp = fopen(fname, "w"); fprintf(stats_fp, "filename\t"); if (sample != NULL) fprintf(stats_fp, "sample_name\t"); - fprintf(stats_fp, "run_id\tcount\n"); + fprintf(stats_fp, "%s\tcount\n", column_name); for (khiter_t k = 0; k < kh_end(counter); ++k) { if (kh_exist(counter, k)) { fprintf(stats_fp, "%s\t", bam_fname); @@ -232,11 +232,11 @@ int main(int argc, char *argv[]) { // write runids summary if (args.runids != NULL) { - write_counter(args.runids, run_ids, args.sample, args.bam[0]); + write_counter(args.runids, run_ids, args.sample, args.bam[0], "run_id"); } // write basecallers summary if (args.basecallers != NULL) { - write_counter(args.basecallers, basecallers, args.sample, args.bam[0]); + write_counter(args.basecallers, basecallers, args.sample, args.bam[0], "basecaller"); } destroy_length_stats(length_stats); diff --git a/src/version.h b/src/version.h index 1bb4872..03ceb1c 100644 --- a/src/version.h +++ b/src/version.h @@ -1,2 +1,2 @@ -const char *argp_program_version = "0.18.1"; +const char *argp_program_version = "0.18.2";