-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCIA.H
84 lines (78 loc) · 3.07 KB
/
CIA.H
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
/****************************************************************
GeneZilla-CIA
Copyright (C)2015 William H. Majoros ([email protected]).
This is OPEN SOURCE SOFTWARE governed by the Gnu General Public
License (GPL) version 3, as described at www.opensource.org.
****************************************************************/
#ifndef INCL_CIA_H
#include "cia.H"
#include "GZilla.H"
#include "SignalLabelingProfile.H"
#include "VariantEvents.H"
#include "ReferenceAnnotation.H"
#include "SignalStream.H"
#include "ConstraintIntervals.H"
#include "PriorMask.H"
/****************************************************************
class CIA
****************************************************************/
class CIA : public GeneZilla {
public:
CIA(const BOOM::String &PROGRAM_NAME,const BOOM::String &VERSION,
EdgeFactory &,int &transcriptId,VariantEvents &,const String &
projectedGFFfile,const String &labelFile);
virtual ~CIA();
//virtual int main(int argc,char *argv[]);
virtual BOOM::Stack<SignalPtr> * processChunk(const Sequence &seq,
const BOOM::String &seqStr,
const BOOM::String &isoFilename,
const BOOM::String &substrateId,
ostream &osGraph,
bool dumpGraph,
String psaFilename);
protected:
ReferenceAnnotation *refAnno;
VariantEvents &events;
SignalStream signalStream;
ConstraintIntervals *constraints;
String projectedGFF, labelFile; // filenames
float priorWeight;
bool shouldReweight; // whether to use the prior
Array1D<SignalLabelingProfile> signalLabelingProfiles;
Set<Signal*> newSignals;
virtual BOOM::Stack<SignalPtr> * mainAlgorithm(const Sequence &,
const BOOM::String &,
ostream &osGraph,
bool dumpGraph,
String psaFilename);
/*
virtual void updateAccumulators(const Sequence &,const BOOM::String &,
int pos,Symbol,char);
*/
void scoreSignalPrior(SignalPtr);
void initSignalLabelingProfiles();
void buildParseGraph(const Sequence &seq,const BOOM::String &str);
void enforceConstraints(SignalPtr);
void purgeQueues();
void reweightGraph();
void reweight(Edge &);
void makePriorMask(PriorMask &,const Edge &,bool leftIsNew,
bool rightIsNew,const Set<const VariantEvent*>
&coveredEvents);
void maskLeft(PriorMask &,const Edge &);
void maskLeftGT(PriorMask &mask,Signal *,const Edge &);
void maskLeftAG(PriorMask &mask,Signal *,const Edge &);
void maskLeftATG(PriorMask &mask,Signal *,const Edge &);
void maskRight(PriorMask &,const Edge &);
void maskRightGT(PriorMask &mask,Signal *,const Edge &);
void maskRightAG(PriorMask &mask,Signal *,const Edge &);
void maskEvents(PriorMask &,const Edge &,
const Set<const VariantEvent*> &coveredEvents);
void regionOverlapping(int pos,ContentType &,Interval &);
void mask(const Interval &,PriorMask &);
void computePrior(Edge &,const PriorMask &mask);
float computePrior(const Labeling &altLabels,int offset,const PriorMask &mask);
void initLabeling(const Edge &,Labeling &);
void initExonLabeling(int startingPhase,Labeling &);
};
#endif