aboutsummaryrefslogtreecommitdiff
path: root/htslib-add-cram_to_bam.patch
blob: c90f7aae283a1414d4ca7fa58b2dede67bf66e73 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
This patch adds the cram_to_bam function to the public interface of htslib,
because it is used by code in Sambamba.

by Roel Janssen <roel@gnu.org>
--- a/cram/cram_decode.c	2015-12-15 17:34:33.000000000 +0100
+++ b/cram/cram_decode.c	2016-02-24 11:16:10.491808702 +0100
@@ -2730,7 +2730,7 @@
  * Returns the used size of the bam record on success
  *         -1 on failure.
  */
-static int cram_to_bam(SAM_hdr *bfd, cram_fd *fd, cram_slice *s,
+int cram_to_bam(SAM_hdr *bfd, cram_fd *fd, cram_slice *s,
 		       cram_record *cr, int rec, bam_seq_t **bam) {
     int bam_idx, rg_len;
     char name_a[1024], *name;
diff -Naur htslib-1.3/cram/cram_decode.h htslib-1.3-patched/cram/cram_decode.h
--- a/cram/cram_decode.h	2015-12-15 17:34:33.000000000 +0100
+++ b/cram/cram_decode.h	2016-02-24 11:15:04.556809864 +0100
@@ -104,6 +104,8 @@
 int cram_decode_slice(cram_fd *fd, cram_container *c, cram_slice *s,
 		      SAM_hdr *hdr);
 
+int cram_to_bam(SAM_hdr *bfd, cram_fd *fd, cram_slice *s,
+                cram_record *cr, int rec, bam_seq_t **bam);
 
 #ifdef __cplusplus
 }