void short_read_copy(short_read_t* dest, const short_read_t* src) { str_copy(&dest->id, &src->id); str_copy(&dest->seq, &src->seq); str_copy(&dest->qual, &src->qual); str_copy(&dest->seqname, &src->seqname); str_copy(&dest->mate_seqname, &src->mate_seqname); samopt_table_copy(dest->aux, src->aux); cigar_copy(&dest->cigar, &src->cigar); dest->flags = src->flags; dest->strand = src->strand; dest->pos = src->pos; dest->map_qual = src->map_qual; dest->mate_pos = src->mate_pos; dest->tlen = src->tlen; }
void update_seed_left(alig_out_t *alig_out, seed_t *seed, seed_cal_t *cal) { if (alig_out->match > 0) { // update seed seed->num_mismatches += alig_out->mismatch; seed->num_open_gaps += alig_out->gap_open; seed->num_extend_gaps += alig_out->gap_extend; seed->read_start -= alig_out->map_len1; seed->genome_start -= alig_out->map_len2; // update cigar with the sw output if (alig_out->cigar.num_ops > 0) { cigar_t cigar; cigar_init(&cigar); cigar_concat(&seed->cigar, &alig_out->cigar); cigar_init(&seed->cigar); cigar_copy(&seed->cigar, &alig_out->cigar); } } }