Ejemplo n.º 1
0
extern eventq_t
get_sendq(tcconf_section_t *cf, char *q)
{
    eventq_t eq = eventq_new(NULL);
    char *qname = get_qname(cf);
    attachq(eq, qname, q, EVENTQ_SEND);
    free(qname);
    return eq;
}
Ejemplo n.º 2
0
std::string record_to_string(const bam_hdr_t* header, const bam1_t* record) {
    std::string reference_name(record->core.tid >= 0 ? header->target_name[record->core.tid] : "*");
    std::string mate_reference_name(record->core.mtid >= 0 ? header->target_name[record->core.mtid] : "*");

    std::stringstream s;
    s << get_qname(record)
      << "\t" << record->core.flag
      << "\t" << reference_name
      << "\t" << record->core.pos + 1
      << "\t" << mate_reference_name
      << "\t" << record->core.mpos + 1
      << "\t" << record->core.isize;
    return s.str();
}
Ejemplo n.º 3
0
extern eventq_t
get_recvq(tcconf_section_t *cf, ...)
{
    eventq_t eq = eventq_new(tcref);
    char *qname = get_qname(cf), *q;
    va_list args;

    va_start(args, cf);
    while((q = va_arg(args, char *)) != NULL)
        attachq(eq, qname, q, EVENTQ_RECV);
    va_end(args);

    free(qname);
    return eq;
}