aboutsummaryrefslogtreecommitdiff
path: root/kmer_utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'kmer_utils.c')
-rw-r--r--kmer_utils.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/kmer_utils.c b/kmer_utils.c
index a8589c5..587404d 100644
--- a/kmer_utils.c
+++ b/kmer_utils.c
@@ -229,3 +229,14 @@ unsigned long long * get_kmer_counts_from_file(FILE *fh, const unsigned int kmer
return counts;
}
+
+unsigned long long * get_kmer_counts_from_filename(const char *fn, const unsigned int kmer) {
+ FILE *fh = fopen(fn, "r");
+ if(fh == NULL) {
+ fprintf(stderr, "Could not open %s - %s\n", fn, strerror(errno));
+ return 0;
+ }
+
+ return get_kmer_counts_from_file(fh, kmer);
+}
+