GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
bl_sam_fopen(3) FreeBSD Library Functions Manual bl_sam_fopen(3)

bl_sam_fopen() - Open a SAM/BAM/CRAM file

#include <xtend/file.h>
-lxtend

FILE    *bl_sam_fopen(const char *filename, const char *mode,
char *samtools_args)

filename:       Name of the file to be opened
mode:           "r" or "w", passed to fopen() or popen()
samtools_args   Flags to pass to samtools view

Open a raw SAM file using fopen() or a compressed SAM file, or BAM or CRAM file using popen(). If the file extension is .bam or .cram, or samtools_args is not NULL or "", data will be piped through "samtools view" with the given samtools_args as arguments. The flag --with-header is always added for consistency with the case of reading a raw SAM file without piping through samtools. Programs that don't want the header can filter it out by other means, such as bl_sam_skip_header(3).

bl_sam_fopen() must be used in conjunction with bl_sam_fclose() to ensure that fclose() or pclose() is called where appropriate.

A pointer to the FILE structure or NULL if open failed

fopen(3), popen(3), gzip(1), bzip2(1), xz(1)


Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.