File: SpliceGraph.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 (33 lines) | stat: -rwxr-xr-x 1,087 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
28
29
30
31
32
33
/*
 * Created by Fahimeh Mirhaj on 6/10/19.
*/
using namespace std;

#include "SpliceGraph.h"
#include "GTF.h"
SpliceGraph::SpliceGraph (SuperTranscriptome &superTrome, Parameters &P, ReadAlign *RA) : superTrome(superTrome), P(P), RA(RA)
{
    //find candidate superTr
    superTrSeedCount = new typeSuperTrSeedCount[2*superTrome.N];//TODO: for stranded data, do not need 2nd strand
    
    //Smith-Waterman
    scoringMatrix = new typeAlignScore*[superTrome.sjDonorNmax+2];
    scoreTwoColumns[0] = new typeAlignScore[maxSeqLength];
    scoreTwoColumns[1] = new typeAlignScore[maxSeqLength];
    for(uint32 ii = 0; ii < superTrome.sjDonorNmax+2; ii++) {
        scoringMatrix[ii] = new typeAlignScore[maxSeqLength];//TODO make it a user parameter
    };
    sjDindex = new uint32[superTrome.sjDonorNmax];
    
    //rowCol.reserve(100000);
    //rowSJ.reserve(100000);
    //blockCoord.reserve(100000);
    //blockSJ.reserve(10000);
};

SpliceGraph::~SpliceGraph() {
    for(uint i = 0; i < maxSeqLength; i++) {
        delete[] scoringMatrix[i];
    };
    delete[] scoringMatrix;
};