NVBIO
|
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.
Definition at line 183 of file sam_header.h.
#include <sam_header.h>
Public Methods | |
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 Members | |
kstring_t | text |
concatenated text, indexed by SAM_hdr_tag More... | |
string_alloc_t * | str_pool |
Pool of SAM_hdr_tag->str strings. More... | |
pool_alloc_t * | type_pool |
Pool of SAM_hdr_type structs. More... | |
pool_alloc_t * | tag_pool |
Pool of SAM_hdr_tag structs. More... | |
int | nref |
Number of @SQ lines. More... | |
SAM_SQ * | ref |
Array of parsed @SQ lines. More... | |
int | nrg |
Number of @RG lines. More... | |
SAM_RG * | rg |
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_PG * | pg |
Array of parsed @PG lines. More... | |
int * | pg_end |
@PG chain termination IDs More... | |
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.
int SAM_hdr::npg |
Number of @PG lines.
Definition at line 201 of file sam_header.h.
int SAM_hdr::npg_end |
Number of terminating @PG lines.
Definition at line 202 of file sam_header.h.
int SAM_hdr::npg_end_alloc |
Size of pg_end field.
Definition at line 203 of file sam_header.h.
int SAM_hdr::nref |
Number of @SQ lines.
Definition at line 191 of file sam_header.h.
int SAM_hdr::nrg |
Number of @RG lines.
Definition at line 196 of file sam_header.h.
SAM_PG* SAM_hdr::pg |
Array of parsed @PG lines.
Definition at line 204 of file sam_header.h.
int* SAM_hdr::pg_end |
@PG chain termination IDs
Definition at line 206 of file sam_header.h.
SAM_SQ* SAM_hdr::ref |
Array of parsed @SQ lines.
Definition at line 192 of file sam_header.h.
SAM_RG* SAM_hdr::rg |
Array of parsed @RG lines.
Definition at line 197 of file sam_header.h.
string_alloc_t* SAM_hdr::str_pool |
Pool of SAM_hdr_tag->str strings.
Definition at line 186 of file sam_header.h.
pool_alloc_t* SAM_hdr::tag_pool |
Pool of SAM_hdr_tag structs.
Definition at line 188 of file sam_header.h.
kstring_t SAM_hdr::text |
concatenated text, indexed by SAM_hdr_tag
Definition at line 184 of file sam_header.h.
pool_alloc_t* SAM_hdr::type_pool |
Pool of SAM_hdr_type structs.
Definition at line 187 of file sam_header.h.