4 //////////////////////////////////////////////////////////////////
5 // set pysam standard error to point to stream
6 FILE * pysam_set_stderr( FILE * f );
8 //////////////////////////////////////////////////////////////////
9 //////////////////////////////////////////////////////////////////
10 //////////////////////////////////////////////////////////////////
11 // various helper functions
13 // fill pileup buffer for next position.
15 int pysam_pileup_next(const bam1_t *b,
22 int pysam_dispatch(int argc, char *argv[] );
25 @abstract Update the variable length data within a bam1_t entry
27 Old data is deleted and the data within b are re-arranged to
28 make place for new data.
33 @param nbytes_old size of old data
34 @param nbytes_new size of new data
35 @param pos position of data
37 bam1_t * pysam_bam_update( bam1_t * b,
38 const size_t nbytes_old,
39 const size_t nbytes_new,
42 // translate a nucleotide character to binary code
43 unsigned char pysam_translate_sequence( const unsigned char s );
45 // defined in bam_import.c
46 extern unsigned char bam_nt16_table[256];
48 // translate a reference string *s* to a tid
49 int pysam_reference2tid( bam_header_t *header, const char * s );
51 // return number of mapped reads for tid
52 uint32_t pysam_get_mapped( const bam_index_t *idx, const int tid );
54 // return number of unmapped reads for tid
55 uint32_t pysam_get_unmapped( const bam_index_t *idx, const int tid );
57 // debugging functions
58 /* #include "glf.h" */
59 /* uint32_t pysam_glf_depth( glf1_t * g); */
61 /* #include "bam_maqcns.h" */
62 /* void pysam_dump_glf( glf1_t * g, bam_maqcns_t * c ); */