-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathCoverageHistogram.h
76 lines (60 loc) · 2.5 KB
/
CoverageHistogram.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
//
// CoverageHistogram.h
// iGenomics
//
// Created by Stuckinaboot Inc. on 7/2/14.
//
//
#import <UIKit/UIKit.h>
#import "RGB.h"
#import "DNAColors.h"
#import "GlobalVars.h"
#import "BWT_MutationFilter.h"
#import "IPhonePopoverHandler.h"
#define kGenomeLengthLblStart @"Genome Len: "
#define kReadLengthLblStart @"First Read Len: "
#define kNumOfReadsLblStart @"Num Reads: "
#define kCoverageHistogramPopoverWidth 600
#define kCoverageHistogramPopoverHeight 600
#define kCoverageHistogramNoReadsAlignedAlertMsg @"No reads aligned"
#define kCoverageHistogramAxisWidth 2
#define kCoverageHistogramAxisFontSize 15
#define kCoverageHistogramAxisXTitle @"Coverage"
#define kCoverageHistogramAxisYTitle @"Frequency of Reads Aligned"
#define kCoverageHistogram0IntervalTxt @"0"
#define kCoverageHistogramLblWidth 250
#define kCoverageHistogramLblHeight 30
#define kCoverageHistogramNumOfIntervalLblsPerAxis 3
#define kCoverageHistogramIntervalLblWidth 80
#define kCoverageHistogramIntervalLblHeight 20
#define kCoverageHistogramIntervalLblFontSize 13
#define kCoverageHistogramSDDefault 2.0f //Set to this when the mean is 0
#define kCoverageHistogramNumOfSDDecreaseFactor 2.0f
#define kCoverageHistogramThinLineWidth 2.0f
#define kCoverageHistogramDashLength 10.0f
#define kCoverageHistogramXAxisDistFromScreenBottom 50
#define kCoverageHistogramYAxisDistFromScreenLeft 60
#define kCoverageHistogramXAxisTitleDistFromScreenEdge 20
#define kCoverageHistogramYAxisTitleDistFromScreenEdge 19
#define kCoverageHistogramNormalCurveLinesPerBox 4
#define kCoverageHistogramTitleInIPhoneHandlerPopover @"Coverage Histogram"
@interface CoverageHistogram : UIViewController {
UIImageView *imgView;
DNAColors *dnaColors;
int maxCoverageVal;
int highestFrequency;
int posOfHighestFrequency;
int freqAtPosOfHighestFrequency;
float xValOfPosOfHighestFrequency;
int boxWidth;
}
- (void)createHistogramWithMaxCovVal:(int)maxCovVal andNumOfReads:(int)numOfReads andReadLen:(int)readLen andGenomeLen:(int)genomeLen;
- (void)drawNormalCurveInRect:(CGRect)rect;
- (float)normalCurveFormulaValueForPos:(float)x;
- (void)drawAxisesInRect:(CGRect)rect;
- (void)drawPlotInRect:(CGRect)rect;
- (void)drawAxisLblsInRect:(CGRect)rect withCovFreqArr:(int[])covFreqArr andCovFreqArrMax:(int)covFreqArrMax;
- (void)drawDashedLineOnHighestFreqOccInRect:(CGRect)rect;
- (void)drawSideInformationWithNumOfReads:(int)numOfReads andReadLen:(int)readLen andGenomeLen:(int)genomeLen;
- (void)drawRectangle:(CGRect)rect withRGB:(double[3])rgb;
@end