File: sjdbLoadFromFiles.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 (27 lines) | stat: -rw-r--r-- 1,167 bytes parent folder | download | duplicates (3)
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
#include "sjdbLoadFromFiles.h"
#include "sjdbLoadFromStream.h"
#include "ErrorWarning.h"
#include "TimeFunctions.h"

void sjdbLoadFromFiles(Parameters &P, SjdbClass &sjdbLoci) {

    if (P.pGe.sjdbFileChrStartEnd.at(0)!="-") {
        for (uint ifile=0;ifile<P.pGe.sjdbFileChrStartEnd.size(); ifile++) {
            ifstream sjdbStreamIn ( P.pGe.sjdbFileChrStartEnd.at(ifile).c_str() );
            if (sjdbStreamIn.fail()) {
                ostringstream errOut;
                errOut << "FATAL INPUT error, could not open input file pGe.sjdbFileChrStartEnd=" << P.pGe.sjdbFileChrStartEnd.at(ifile) <<"\n";
                exitWithError(errOut.str(),std::cerr, P.inOut->logMain, EXIT_CODE_INPUT_FILES, P);
            };

            sjdbLoadFromStream(sjdbStreamIn, sjdbLoci);

            sjdbLoci.priority.resize(sjdbLoci.chr.size(),10);
            
            time_t rawtime;
            time ( &rawtime );
            P.inOut->logMain << timeMonthDayTime(rawtime) << "   Loaded database junctions from the pGe.sjdbFileChrStartEnd file(s), total number of junctions:" << sjdbLoci.chr.size()<<"\n\n";
        };
    }; //if (P.pGe.sjdbFileChrStartEnd!="-")

};