File: sjdbLoadFromStream.cpp

package info (click to toggle)
rna-star 2.7.8a%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 3,076 kB
  • sloc: cpp: 20,429; awk: 483; ansic: 470; makefile: 181; sh: 31
file content (29 lines) | stat: -rw-r--r-- 896 bytes parent folder | download | duplicates (6)
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
27
28
29
#include "sjdbLoadFromStream.h"
void sjdbLoadFromStream(ifstream &sjdbStreamIn, SjdbClass &sjdbLoci) {
    while (sjdbStreamIn.good()) {
        string oneLine,chr1;
        uint u1,u2;
        char str1;
        getline(sjdbStreamIn,oneLine);
        istringstream oneLineStream (oneLine);
        oneLineStream >> chr1 >> u1 >> u2 >> str1;
        if (chr1!="") {
            sjdbLoci.chr.push_back(chr1);
            sjdbLoci.start.push_back(u1);
            sjdbLoci.end.push_back(u2);
            switch (str1) {//convert numbers to symbols
                case '1':
                case '+':
                    str1='+';
                    break;
                case '2':
                case '-':
                    str1='-';
                    break;
                default:
                    str1='.';
            };
            sjdbLoci.str.push_back(str1);
        };
    };
};