Exemple #1
0
def six_records_sam_header(six_records_sam):
    hts_file = hts_internal._hts_open(
        str(six_records_sam).encode('utf-8'), 'r')
    hdr = bam_internal._sam_hdr_read(hts_file)
    yield hdr
    bam_internal._bam_hdr_destroy(hdr)
    hts_internal._hts_close(hts_file)
Exemple #2
0
def header_only_sam_gz_header(header_only_sam_gz):
    hts_file = hts_internal._hts_open(
        str(header_only_sam_gz).encode('utf-8'), 'r')
    hdr = bam_internal._sam_hdr_read(hts_file)
    yield hdr
    bam_internal._bam_hdr_destroy(hdr)
    hts_internal._hts_close(hts_file)