File: RefSeqPolicy.h

package info (click to toggle)
rsem 1.3.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 37,588 kB
  • sloc: cpp: 19,202; perl: 1,259; python: 1,245; ansic: 547; makefile: 186; sh: 154
file content (22 lines) | stat: -rw-r--r-- 457 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
#ifndef REFSEQPOLICY
#define REFSEQPOLICY

#include<string>

/**
Convert reference sequences to RSEM format
 */
class RefSeqPolicy {
 public:
  std::string convert(const std::string& rawseq) {
    int size = (int)rawseq.size();
    std::string seq = rawseq;
    for (int i = 0; i < size; i++) {
      seq[i] = toupper(rawseq[i]);
      if (seq[i] != 'A' && seq[i] != 'C' && seq[i] != 'G' && seq[i] != 'T') seq[i] = 'N';
    }
    return seq;
  }
};

#endif