Gamgee
You miserable little maggot. I'll stove your head in!
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Public Attributes | List of all members
SAM_hdr Struct Reference

#include <sam_header.h>

Public Member Functions

 khash_t (sam_hdr)*h
 
 khash_t (m_s2i)*ref_hash
 Maps SQ SN field to sq[] index. More...
 
 khash_t (m_s2i)*rg_hash
 Maps RG ID field to rg[] index. More...
 
 khash_t (m_s2i)*pg_hash
 Maps PG ID field to pg[] index. More...
 

Public Attributes

kstring_t text
 concatenated text, indexed by SAM_hdr_tag More...
 
string_alloc_tstr_pool
 Pool of SAM_hdr_tag->str strings. More...
 
pool_alloc_ttype_pool
 Pool of SAM_hdr_type structs. More...
 
pool_alloc_ttag_pool
 Pool of SAM_hdr_tag structs. More...
 
int nref
 Number of @SQ lines. More...
 
SAM_SQref
 Array of parsed @SQ lines. More...
 
int nrg
 Number of @RG lines. More...
 
SAM_RGrg
 Array of parsed @RG lines. More...
 
int npg
 Number of @PG lines. More...
 
int npg_end
 Number of terminating @PG lines. More...
 
int npg_end_alloc
 Size of pg_end field. More...
 
SAM_PGpg
 Array of parsed @PG lines. More...
 
int * pg_end
 @PG chain termination IDs More...
 

Detailed Description

Primary structure for header manipulation

The initial header text is held in the text kstring_t, but is also parsed out into SQ, RG and PG arrays. These have a hash table associated with each to allow lookup by ID or SN fields instead of their numeric array indices. Additionally PG has an array to hold the linked list start points (the last in a PP chain).

Use the appropriate sam_hdr_* functions to edit the header, and call sam_hdr_rebuild() any time the textual form needs to be updated again.

Member Function Documentation

SAM_hdr::khash_t ( sam_hdr  )
SAM_hdr::khash_t ( m_s2i  )

Maps SQ SN field to sq[] index.

SAM_hdr::khash_t ( m_s2i  )

Maps RG ID field to rg[] index.

SAM_hdr::khash_t ( m_s2i  )

Maps PG ID field to pg[] index.

Member Data Documentation

int SAM_hdr::npg

Number of @PG lines.

int SAM_hdr::npg_end

Number of terminating @PG lines.

int SAM_hdr::npg_end_alloc

Size of pg_end field.

int SAM_hdr::nref

Number of @SQ lines.

int SAM_hdr::nrg

Number of @RG lines.

SAM_PG* SAM_hdr::pg

Array of parsed @PG lines.

int* SAM_hdr::pg_end

@PG chain termination IDs

SAM_SQ* SAM_hdr::ref

Array of parsed @SQ lines.

SAM_RG* SAM_hdr::rg

Array of parsed @RG lines.

string_alloc_t* SAM_hdr::str_pool

Pool of SAM_hdr_tag->str strings.

pool_alloc_t* SAM_hdr::tag_pool

Pool of SAM_hdr_tag structs.

kstring_t SAM_hdr::text

concatenated text, indexed by SAM_hdr_tag

pool_alloc_t* SAM_hdr::type_pool

Pool of SAM_hdr_type structs.


The documentation for this struct was generated from the following file: