Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
** BAM/CRAM indexing ***
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
Free a SAM iterator @param iter Iterator to free
@param htsfp Htsfile pointer for the input file @param itr Iterator @param r Pointer to a bam1_t struct @return >= 0 on success; -1 when there is no more data; < -1 on error
** SAM I/O ***
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
@param s Pointer to the tag data, as returned by bam_aux_get(). @return The value, or 0 if the tag was not a character ('A') type If the tag is not a character type, errno is set to EINVAL.
@param s Pointer to the tag data, as returned by bam_aux_get(). @return Pointer to the string, or NULL if the tag was not a string type If the tag is not a string type ('Z' or 'H'), errno is set to EINVAL.
@param s Pointer to the tag data, as returned by bam_aux_get() @return The value, or 0 if the tag was not an integer type If the tag is not an numeric type, errno is set to EINVAL. The value of integer flags will be returned cast to a double.
@param s Pointer to the tag data, as returned by bam_aux_get() @return The value, or 0 if the tag was not an integer type If the tag is not an integer type, errno is set to EINVAL. This function will not return the value of floating-point tags.
@param s Pointer to the tag data, as returned by bam_aux_get(). @param idx 0-based Index into the array @return The idx'th value, or 0.0 on error. If the array is not a numeric type, errno is set to EINVAL. This can only actually happen if the input record has an invalid type field. If idx is greater than or equal to the value returned by bam_auxB_len(s), errno is set to ERANGE. In both cases, 0.0 will be returned.
@param s Pointer to the tag data, as returned by bam_aux_get(). @param idx 0-based Index into the array @return The idx'th value, or 0 on error. If the array is not an integer type, errno is set to EINVAL. If idx is greater than or equal to the value returned by bam_auxB_len(s), errno is set to ERANGE. In both cases, 0 will be returned.
@param s Pointer to the tag data, as returned by bam_aux_get(). @return The length of the array, or 0 if the tag is not an array type. If the tag is not an array type, errno is set to EINVAL.
Append tag data to a bam record
Delete tag data from a bam record
@param b Pointer to the bam record @param tag Desired aux tag @return Pointer to the tag data, or NULL if tag is not present or on error If the tag is not present, this function returns NULL and sets errno to ENOENT. If the bam record's aux data is corrupt (either a tag has an invalid type, or the last record is incomplete) then errno is set to EINVAL and NULL is returned.
Update or add an array tag
Update or add a floating-point tag
Update or add an integer tag
Update or add a string-type tag
@param n_cigar Number of items in @p cigar @param cigar CIGAR data @return Query length
@param n_cigar Number of items in @p cigar @param cigar CIGAR data @return Reference length
Undocumented in source. Be warned that the author may not have intended to support it.
Undocumented in source. Be warned that the author may not have intended to support it.
Undocumented in source. Be warned that the author may not have intended to support it.
Undocumented in source. Be warned that the author may not have intended to support it.
@param bdst Destination alignment record @param bsrc Source alignment record @return bdst on success; NULL on failure
@param b structure to destroy
@param bsrc Source alignment record @return Pointer to a new alignment record on success; NULL on failure
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
Undocumented in source. Be warned that the author may not have intended to support it.
Undocumented in source. Be warned that the author may not have intended to support it.
Undocumented in source. Be warned that the author may not have intended to support it.
@param b Alignment record
Undocumented in source. Be warned that the author may not have intended to support it.
Undocumented in source. Be warned that the author may not have intended to support it.
Undocumented in source. Be warned that the author may not have intended to support it.
Undocumented in source. Be warned that the author may not have intended to support it.
Undocumented in source. Be warned that the author may not have intended to support it.
Undocumented in source. Be warned that the author may not have intended to support it.
Read the header from a BAM compressed file.
Writes the header to a BAM file.
Undocumented in source. Be warned that the author may not have intended to support it.
Undocumented in source. Be warned that the author may not have intended to support it.
@return An empty bam1_t structure on success, NULL on failure
Undocumented in source. Be warned that the author may not have intended to support it.
Undocumented in source. Be warned that the author may not have intended to support it.
Undocumented in source. Be warned that the author may not have intended to support it.
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
The struct returned by a successful call should be freed via bam_mplp_destroy() when it is no longer needed.
@param iter mpileup iterator @return 0 on success; a negative value on error
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
Alias of sam_hdr_name2tid(), for backwards compatibility.
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
bam_plp_constructor() - sets a callback to initialise any per-pileup1_t fields. @plp: The bam_plp_t initialised using bam_plp_init. @func: The callback function itself. When called, it is given the data argument (specified in bam_plp_init), the bam structure and a pointer to a locally allocated bam_pileup_cd union. This union will also be present in each bam_pileup1_t created.
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
bam_plp_init() - sets an iterator over multiple @func: see mplp_func in bam_plcmd.c in samtools for an example. Expected return status: 0 on success, -1 on end, < -1 on non-recoverable errors @data: user data to pass to @func
@param p pileup data @param ins the kstring where the insertion sequence will be written @param del_len location for deletion length @return the length of insertion string on success; -1 on failure.
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
@param fp BGZF file being read @param b Destination for the alignment data @return number of bytes read on success -1 at end of file < -1 on failure
Undocumented in source. Be warned that the author may not have intended to support it.
@param b Alignment record @param policy Desired policy
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
@param fp BGZF file being written @param b Alignment record to write @return number of bytes written on success -1 on error
BAQ calculation and realignment *
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
Adds a single line to an existing header.
Add formatted lines to an existing header.
Add an \@PG line.
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
Count the number of lines for a given header type
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
Duplicate a header structure.
Returns the SAM formatted text of the \@HD header line
Returns a complete line of formatted text for a given type and ID.
Returns a complete line of formatted text for a given type and index.
Returns the value associated with a given \@HD line tag
Return the value associated with a key for a header line identified by ID_key:ID_val
Return the value associated with a key for a header line identified by position
Increments the reference count on a header
** BAM I/O *** Generates a new unpopulated header structure.
Returns the current length of the header text.
Index of the line for the types that have dedicated look-up tables (SQ, RG, PG)
Id key of the line for the types that have dedicated look-up tables (SQ, RG, PG)
Get the target id for a given reference sequence name
Returns the number of references in the header.
Create a header from existing text.
Generate a unique \@PG ID: value
Read a header from a SAM, BAM or CRAM file.
Remove all lines of a given type from a header, except the one matching an ID
Remove a line with given type / id from a header
Remove nth line of a given type from a header
Remove header lines of a given type, except those in a given ID set
Removes the \@HD line tag with the given key
Remove the key from the line identified by type, ID_key and ID_value.
Returns the text representation of the header.
Get the reference sequence length from a target index
Get the reference sequence name from a target index
Adds or updates tags on the header \@HD line
Add or update tag key,value pairs in a header line.
Write a header to a SAM, BAM or CRAM file.
@param fp File handle for the data file being written. @param h Bam header structured (needed for BAI and CSI). @param min_shift 0 for BAI, or larger for CSI (CSI defaults to 14). @param fnidx Filename to write index to. This pointer must remain valid until after sam_idx_save is called. @return 0 on success, <0 on failure.
@param fp File handle for the data file being written. @return 0 on success, <0 on filaure.
@param fn Input BAM/etc filename, to which .csi/etc will be added @param min_shift Positive to generate CSI, or 0 to generate BAI @return 0 if successful, or negative if an error occurred (usually -1; or -2: opening fn failed; -3: format not indexable; -4: failed to create and/or save the index)
@param fn Input BAM/CRAM/etc filename @param fnidx Output filename, or NULL to add .bai/.csi/etc to @a fn @param min_shift Positive to generate CSI, or 0 to generate BAI @return 0 if successful, or negative if an error occurred (see sam_index_build for error codes)
@param fn Input BAM/CRAM/etc filename @param fnidx Output filename, or NULL to add .bai/.csi/etc to @a fn @param min_shift Positive to generate CSI, or 0 to generate BAI @param nthreads Number of threads to use when building the index @return 0 if successful, or negative if an error occurred (see sam_index_build for error codes)
@param fp File handle of the data file whose index is being opened @param fn BAM/CRAM/etc filename to search alongside for the index file @return The index, or NULL if an error occurred.
@param fp File handle of the data file whose index is being opened @param fn BAM/CRAM/etc data file filename @param fnidx Index filename, or NULL to search alongside @a fn @return The index, or NULL if an error occurred.
@param fp File handle of the data file whose index is being opened @param fn BAM/CRAM/etc data file filename @param fnidx Index filename, or NULL to search alongside @a fn @param flags Flags to alter behaviour (see description) @return The index, or NULL if an error occurred.
@param htsfp Htsfile pointer for the input file @param itr Iterator @param r Pointer to a bam1_t struct @return >= 0 on success; -1 when there is no more data; < -1 on error
@param idx Index @param tid Target id @param beg Start position in target @param end End position in target @return An iterator on success; NULL on failure
@param idx Index @param hdr Header @param region Region specification @return An iterator on success; NULL on failure
@param idx Index @param hdr Header @param regarray Array of ref:interval region specifiers @param regcount Number of items in regarray
@param idx Index @param hdr Header @param reglist Array of regions to iterate over @param regcount Number of items in reglist
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
@param b BAM record @param ref Reference sequence @param ref_len Reference sequence length @param flag Flags, see description @return 0 on success \n -1 if the read was unmapped, zero length, had no quality values, did not have at least one M, X or = CIGAR operator, or included a reference skip. \n -3 if BAQ alignment has already been done and does not need to be applied, or has already been applied. \n -4 if alignment failed (most likely due to running out of memory)
@param fp Pointer to the source file @param h Pointer to the header previously read (fully or partially) @param b Pointer to the record placeholder @return >= 0 on successfully reading a new record, -1 on end of stream, < -1 on error
@param fp Pointer to the destination file @param h Pointer to the header structure previously read @param b Pointer to the record to be written @return >= 0 on successfully writing the record, -1 on error
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
** CIGAR related macros ***
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
Highest SAM format version supported by this library
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
** Alignment records ***
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
** SAM/BAM/CRAM header ***
** Pileup and Mpileup ***
@file htslib/sam.h High-level SAM/BAM/CRAM sequence file operations.