Skip to content

Instantly share code, notes, and snippets.

View dpryan79's full-sized avatar

Devon Ryan dpryan79

  • Genedata AG
  • Basel, Switzerland / Freiburg, Germany
View GitHub Profile
@dpryan79
dpryan79 / example.sam
Created May 14, 2015 08:10
An example alignment that will be assigned an incorrect bin
@HD VN:1.0
@SQ SN:1 LN:195471971
39V34V1:69:D265MACXX:3:1213:20484:44810 133 1 11042802 0 35M15S = 11042802 0 CTCCCCCCTCCCCCCCCCCCCACCTCTTTGCCCTGGGGTCCCCCCTTTGT <'7BBB############################################ XC:i:35
#include "htslib/sam.h"
#include "htslib/bgzf.h"
#include <stdlib.h>
#include <stdio.h>
#include <inttypes.h>
#include <string.h>
void process_alignment(bam1_t *b, bam_hdr_t *hdr, FILE *of, int length) {
int32_t pos = b->core.pos, apos = 0;
int i, j, op, op_len;