Opened 9 years ago

Closed 8 years ago

#785 closed request (fixed)

CIGAR functionality

Reported by: Peter Owned by: Peter
Priority: major Milestone: yat 0.12
Component: omic Version: 0.11.1
Keywords: Cc:

Description (last modified by Peter)

I've already implemented this twice elsewhere now, which suggests it might be features that belong within yat.

It's a couple of things:

  1. Create a CIGAR from an aligned Aligner.
  2. Output a CIGAR (see BamRead::cigar_str(void))
  3. Set the CIGAR of BamRead (which already possible via BamRead::cigar(const std::vector<uint32_t >&) )
  4. Modify the CIGAR, possible restrict modification to clear, pop_back, and push_back or if possible mimic std::vector (depends on implementation details).

The question is whether we should keep storing this information in a vector<uint32_t> as suggested by 3) or if should create a new class. Either way I think the functionality should be available also when configure --without-samtools, so even if we use some #defines from bam.h we can port them [conditionally] to a yat header. New class, Cigar, or keep on with the vector? The latter implies free functions (C-style) where the former means member functions.

Another question: which namespace? omic like BamRead or utility with Aligner?

Change History (7)

comment:1 Changed 9 years ago by Peter

Status: newassigned

comment:2 Changed 9 years ago by Peter

I think this belongs as a [public] class within utility::Aligner class.

comment:3 Changed 8 years ago by Peter

Description: modified (diff)

comment:4 Changed 8 years ago by Peter

(In [3195]) add first thin documentation for Aligner::Cigar. refs #785

comment:5 Changed 8 years ago by Peter

(In [3200]) implement first version of CIGAR (refs #785). Note, this revision does not compile without samtools (should be fixed shortly).

comment:6 Changed 8 years ago by Peter

(In [3202]) make Cigar work also without bam.h, refs #785. #define YAT_CIGAR_ etc if not available from bam.h

comment:7 Changed 8 years ago by Peter

Resolution: fixed
Status: assignedclosed

(In [3203]) improve docs of CIGAR. closes #785

Note: See TracTickets for help on using tickets.