File: CigarString.h

package info (click to toggle)
pbseqlib 5.3.1%2Bdfsg-2.1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 7,136 kB
  • sloc: cpp: 77,246; python: 570; makefile: 312; sh: 111; ansic: 9
file content (26 lines) | stat: -rw-r--r-- 538 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#ifndef _BLASR_SAM_CIGAR_STRING_HPP_
#define _BLASR_SAM_CIGAR_STRING_HPP_

#include <sstream>
#include <string>
#include <vector>

class CigarString : public std::string
{
public:
    void Vectorize(std::vector<int> &lengths, std::vector<char> &operations)
    {
        std::stringstream strm;
        strm.str(*this);
        while (strm) {
            int l;
            char o;
            if ((strm >> l >> o)) {
                lengths.push_back(l);
                operations.push_back(o);
            }
        }
    }
};

#endif