X-Git-Url: http://woldlab.caltech.edu/gitweb/?p=samtools.git;a=blobdiff_plain;f=sam.h;h=0b87194e05670ba287c9debe6e22c4d79a54e353;hp=970cf2daee7ca49a95280bcf1431ae35ba8f223f;hb=4a17fa7e1f91b2fe04ad334a63fc2b0d5e859d8a;hpb=b27e00385f41769d03a8cca4dbd71275fc9fa906 diff --git a/sam.h b/sam.h index 970cf2d..0b87194 100644 --- a/sam.h +++ b/sam.h @@ -15,7 +15,7 @@ /*! @typedef @abstract SAM/BAM file handler - @field type type of the handler; bit 1 for BAM and bit 2 for reading + @field type type of the handler; bit 1 for BAM, 2 for reading and bit 3-4 for flag format @field bam BAM file handler; valid if (type&1) == 1 @field tamr SAM file handler for reading; valid if type == 2 @field tamw SAM file handler for writing; valid if type == 0 @@ -41,16 +41,18 @@ extern "C" { @param fn SAM/BAM file name; "-" is recognized as stdin (for reading) or stdout (for writing). - @param mode open mode /[rw](b?)(u?)(h?)/: 'r' for reading, 'w' for - writing, 'b' for BAM I/O, 'u' for uncompressed BAM output and 'h' - for outputing header in SAM. If 'b' present, it must immediately - follow 'r' or 'w'. Valid modes are "r", "w", "wh", "rb", "wb" and - "wbu" exclusively. + @param mode open mode /[rw](b?)(u?)(h?)([xX]?)/: 'r' for reading, + 'w' for writing, 'b' for BAM I/O, 'u' for uncompressed BAM output, + 'h' for outputing header in SAM, 'x' for HEX flag and 'X' for + string flag. If 'b' present, it must immediately follow 'r' or + 'w'. Valid modes are "r", "w", "wh", "wx", "whx", "wX", "whX", + "rb", "wb" and "wbu" exclusively. @param aux auxiliary data; if mode[0]=='w', aux points to - bam_header_t; if strcmp(mode, "rb")==0 and @SQ header lines in SAM + bam_header_t; if strcmp(mode, "rb")!=0 and @SQ header lines in SAM are absent, aux points the file name of the list of the reference; - aux is not used otherwise. + aux is not used otherwise. If @SQ header lines are present in SAM, + aux is not used, either. @return SAM/BAM file handler */ @@ -87,6 +89,8 @@ extern "C" { */ int sampileup(samfile_t *fp, int mask, bam_pileup_f func, void *data); + char *samfaipath(const char *fn_ref); + #ifdef __cplusplus } #endif