@@ -23,6 +23,11 @@ parser = getHagfishOptparser()
23
23
parser .add_option ('-S' , dest = 'score' , action = 'store_true' ,
24
24
help = 'plot the hagfish score' )
25
25
26
+ #parser.add_option('--pe', dest='pairedends', action='store_true',
27
+ # help='plot only based on paired ends')
28
+ #parser.add_option('--pe', dest='pairedends', action='store_true',
29
+ # help='plot only based on paired ends')
30
+
26
31
addPlotParameters (parser )
27
32
options , args = parser .parse_args ()
28
33
@@ -46,165 +51,56 @@ class plotter(hagfishPlotBand):
46
51
self .l .debug ("Start plotting" )
47
52
yc = self .yCorrection
48
53
49
- ## print lightly colored high/low/good
50
- ## to server a background
51
- #self.l.debug("Plot background")
52
-
53
- # if PLOTHIGH:
54
- # ## bg high
55
- # self.ax.fill_between(
56
- # self.locx,
57
- # self.okh + yc,
58
- # self.okh + self.high + yc,
59
- # alpha = 1,
60
- # zorder = 0,
61
- # color=COLOR2)
62
-
63
- # if PLOTLOW:
64
- # ### bg low
65
- # self.ax.fill_between(
66
- # self.locx,
67
- # -self.okh + yc,
68
- # (-self.okh - self.low) + yc,
69
- # alpha=1,
70
- # color=COLOR3,
71
- # zorder=0)
72
-
73
- # if PLOTOK:
74
- # ### bg ok
75
- # self.ax.fill_between(
76
- # self.locx,
77
- # -self.okh + yc,
78
- # self.okh + yc,
79
- # alpha=1,
80
- # color=COLOR1,
81
- # zorder=0)
82
-
83
- # if PLOTHIGH:
84
- # ## outlines
85
- # self.ax.plot(
86
- # self.locx,
87
- # self.okh + self.high + yc,
88
- # color = 'black', linewidth=0.5,
89
- # zorder=0)
90
- # if PLOTLOW:
91
- # self.ax.plot(
92
- # self.locx,
93
- # -(self.okh + self.low) + yc,
94
- # color = 'black',
95
- # linewidth=0.5,
96
- # zorder=0)
97
-
98
- ## Reprint High/ok/low - now with a cutof to stay
99
- ## in the band
100
-
101
- if PLOTHIGH :
102
- #high
103
- self .ax .fill_between (
104
- self .locx ,
105
- np .minimum (self .bandTop , self .okh + yc ),
106
- np .minimum (self .bandTop , self .okh + self .high + yc ),
107
- alpha = 0.8 ,\
108
- zorder = 1 ,
109
- color = COLOR2 )
110
-
111
- if PLOTLOW :
112
- #low
113
- self .ax .fill_between (
114
- self .locx ,
115
- np .maximum (self .bandBottom , - self .okh + yc ),
116
- np .maximum (self .bandBottom , (- self .okh - self .low ) + yc ),
117
- alpha = 0.8 ,
118
- color = COLOR3 ,
119
- zorder = 1 )
120
- #low
121
- self .ax .fill_between (
122
- self .locx ,
123
- np .maximum (self .bandBottom , yc ),
124
- np .maximum (self .bandBottom , - self .low_ends + yc ),
125
- alpha = 0.8 ,
126
- color = "black" ,
127
- zorder = 12 )
128
-
129
- if PLOTOK :
130
- #ok
131
- self .ax .fill_between (
132
- self .locx ,
133
- np .minimum (self .bandTop , self .okh + yc ),
134
- np .maximum (self .bandBottom , - self .okh + yc ),
135
- alpha = 0.8 ,
136
- color = COLOR1 ,
137
- zorder = 1 )
138
-
54
+ #print 'high'
55
+ self .ax .fill_between (
56
+ self .locx ,
57
+ np .minimum (self .bandTop , self .okh + yc ),
58
+ np .minimum (self .bandTop , self .okh + self .high + yc ),
59
+ zorder = 1 ,
60
+ color = COLDARKRED )
61
+ #print 'ok'
62
+ self .ax .fill_between (
63
+ self .locx ,
64
+ np .minimum (self .bandTop , self .okh + yc ),
65
+ np .maximum (self .bandBottom , - self .okh + yc ),
66
+ color = COLDARKGREEN ,
67
+ zorder = 1 )
68
+
69
+ #low
70
+ self .ax .fill_between (
71
+ self .locx ,
72
+ np .maximum (self .bandBottom , - self .okh + yc ),
73
+ np .maximum (self .bandBottom , - (self .okh + self .low ) + yc ),
74
+ color = COLDARKBLUE ,
75
+ zorder = 1 )
76
+
77
+
78
+ #ok_ends
139
79
# self.ax.fill_between(
140
80
# self.locx,
141
- # self.okh_ends + yc,
142
- # -self.okh_ends + yc,
143
- # alpha=0.3,
144
- # color=COLOR4,
145
- # zorder=2)
146
-
147
- # self.ax.fill_between(self.locx,
148
- # self.okh + self.high + yc,
149
- # self.okh + self.high + self.high_ends + yc,
150
- # color=COLOR4,
151
- # linewidth=1,
152
- # zorder=4)
153
-
154
- # self.ax.fill_between(self.locx,
155
- # -self.okh - self.low + yc,
156
- # -self.okh - self.low - self.low_ends + yc,
157
- # color=COLOR4,
158
- # linewidth=1,
159
- # zorder=4)
160
- #self.ax.plot(self.locx, -self.low_ends + yc, color=COLOR3,
161
- # linewidth=0.5, zorder=12, alpha=0.5)
81
+ # np.minimum(self.bandTop, self.okh_ends + yc),
82
+ # np.maximum(self.bandBottom, -self.okh_ends + yc),
83
+ # color=COLDARKGREEN,
84
+ # zorder=1)
85
+
86
+ # #print 'high'
162
87
# self.ax.fill_between(
163
- # self.locx,
164
- # self.okh_ends + yc,
165
- # self.okh_ends + self.high_ends + yc,
166
- # alpha=0.3,
167
- # color='black',
168
- # zorder=2)
169
-
170
- #plot new outlines
171
- #filter them, so that we only have outlines where the
172
- #plot remains inside the band
173
-
174
- # if PLOTHIGH:
175
- # self.ax.plot(
176
- # self.locx,
177
- # self.okh + self.high + yc,
178
- # color = 'black', linewidth = 0.5,
179
- # zorder =5,
180
- # clip_path=self.patch
181
- # )
182
-
183
- # if PLOTOK:
184
- # self.ax.plot(
185
- # self.locx,
186
- # self.okh + yc,
187
- # color = 'black', linewidth = 0.5,
188
- # zorder =5,
189
- # clip_path=self.patch
190
- # )
191
-
192
- # self.ax.plot(
193
- # self.locx,
194
- # -self.okh + yc,
195
- # color = 'black',
196
- # linewidth=0.5,
197
- # clip_path=self.patch,
198
- # zorder=5)
199
-
200
- # if PLOTLOW:
201
- # self.ax.plot(
202
- # self.locx,
203
- # -(self.okh + self.low) + yc,
204
- # color = 'black',
205
- # linewidth=0.5,
206
- # clip_path=self.patch,
207
- # zorder=5)
88
+ # self.locx,
89
+ # np.minimum(self.bandTop, self.okh_ends + yc),
90
+ # np.minimum(self.bandTop, self.okh_ends + self.high_ends + yc),
91
+ # zorder = 1,
92
+ # color=COLDARKRED)
93
+
94
+
95
+
96
+ if self .__dict__ .has_key ('nns' ):
97
+ self .l .debug ("plotting N band" )
98
+ self .ax .fill_between (
99
+ self .locx ,
100
+ self .zero + yc + (self .plot .maxY * self .nns ),
101
+ self .zero + yc - (self .plot .maxY * self .nns ),
102
+ color = COLLIGHTYELLOW , alpha = 0.6 )
103
+
208
104
209
105
210
106
if options .score :
0 commit comments