@@ -4,25 +4,25 @@ import grails.util.Holders
44import groovy.json.JsonSlurper
55
66class ReportController {
7-
7+
88 def springSecurityService
99 def reportService
1010 def utilityService
11-
11+
1212 def createReportForCohortAjax (Long cohortId ) {
1313 def cohort = SequencingCohort . get(cohortId)
1414 if (cohort && ! cohort. report) {
1515 reportService. createReportForCohort(cohort)
1616 }
1717 render template : " /report/reportRow" , model : [cohort : cohort]
1818 }
19-
19+
2020 def deleteReportForCohortAjax (Long cohortId ) {
2121 def cohort = SequencingCohort . get(cohortId)
2222 reportService. deleteReportForCohort(cohort)
2323 render template : " /report/reportRow" , model : [cohort : cohort]
2424 }
25-
25+
2626 def runStatus (Long runId ) {
2727 def run = SequenceRun . get(runId)
2828 if (! run) {
@@ -40,7 +40,7 @@ class ReportController {
4040 def user = springSecurityService. currentUser
4141 if (user. isAdmin()) {
4242 admin = true
43- }
43+ }
4444 if (qcSettings. yeast) {
4545 headers[" yeast" ] = []
4646 subheaders[" yeast" ] = []
@@ -58,8 +58,8 @@ class ReportController {
5858 }
5959 }
6060 }
61- [runStatus : runStatus. results,
62- noResultSamples : runStatus. noResultSamples,
61+ [runStatus : runStatus. results,
62+ noResultSamples : runStatus. noResultSamples,
6363 qcSettings : qcSettings,
6464 run : run,
6565 headers : headers,
@@ -70,18 +70,18 @@ class ReportController {
7070 } catch (ReportException e) {
7171 flash. message = e. message
7272 redirect(controller : " sequenceRun" , action : " index" )
73- }
73+ }
7474 }
7575 }
76-
76+
7777 def updateRunStatusAjax (Long runId , String status ) {
7878 reportService. updateRunStatus(runId, status)
79- render status
79+ render status
8080 }
81-
81+
8282 def updateReportStatusAjax (Long reportId , String status ) {
8383 reportService. updateReportStatus(reportId, status)
84- render status
84+ render status
8585 }
8686 // axa677-180306: Added this function to handle the deletion of selected (multiple) alignments
8787 // This function is called in template report/_generalQc.gsp
@@ -103,7 +103,7 @@ class ReportController {
103103 }
104104 redirect(action : " runStatus" , params : [runId : runId])
105105 }
106-
106+
107107 // axa677-180306: No need for this function since we have written the previous one to handle deletion using checkboxes
108108 def deleteAlignment (Long alignmentId , Long runId ) {
109109 try {
@@ -114,7 +114,7 @@ class ReportController {
114114 }
115115 redirect(action : " runStatus" , params : [runId : runId])
116116 }
117-
117+
118118 def show (Long id ) {
119119 def report = SummaryReport . get(id)
120120 if (! report) {
@@ -127,26 +127,26 @@ class ReportController {
127127 def imageMap = report. cohort?. imageMap
128128 [project : currentProject, projectUsers : projectUsers, report : report, imageMap : imageMap]
129129 }
130-
130+
131131 def fetchDataForReportAjax (Long id ) {
132132 def data = reportService. fetchDataForReport(id)
133- render(template : ' details' , model : [ sampleDTOs : data])
133+ render(template : ' details' , model : [ sampleDTOs : data])
134134 }
135-
135+
136136 def fetchMemeDataAjax (String url ) {
137137 def results = reportService. fetchMemeMotif(url) as JSON
138138 render results
139139 }
140-
140+
141141 def fetchMemERDataAjax (String url ) {
142142 def results = reportService. fetchMemERMotif(url) as JSON
143143 render results
144144 }
145-
145+
146146 def composite (String url ) {
147147 [url : url]
148148 }
149-
149+
150150 def fetchCompositeDataAjax (String url ) {
151151 def result
152152 try {
@@ -156,29 +156,29 @@ class ReportController {
156156 }
157157 } catch (ReportException e) {
158158 result = [error : e. message] as JSON
159- }
159+ }
160160 render result
161161 }
162-
162+
163163 def manage () {
164164 // get QC settings
165165 def results = reportService. getQcSettings()
166166 // get the purge alignments configs for the last time
167167 def purgeConfigStr = Chores . findByName(reportService. PURGE_ALIGNMENTS_CONFIG )?. value
168168 def purgeConfig = utilityService. parseJson(purgeConfigStr)
169- [qcSettings : results. qcSettings, meta : results. meta, purgeConfig : purgeConfig]
169+ [qcSettings : results. qcSettings, meta : results. meta, purgeConfig : purgeConfig]
170170 }
171-
171+
172172 def saveQcSettings () {
173173 try {
174174 reportService. saveQcSettings(params)
175175 redirect(controller : " sequenceRun" , action : " index" )
176176 } catch (ReportException e) {
177177 flash. message = e. message
178- redirect(action : " editQcSettings" )
178+ redirect(action : " editQcSettings" )
179179 }
180180 }
181-
181+
182182 def deletePurgedAlignments () {
183183 def message
184184 try {
@@ -193,12 +193,12 @@ class ReportController {
193193 def purgeConfig = utilityService. parseJson(purgeConfigStr)
194194 render(template : " purgeAlignments" , model : [purgeConfig :purgeConfig, message : message])
195195 }
196-
196+
197197 def togglePreferredAlignment (Long alignmentId ) {
198198 reportService. togglePreferredAlignment(alignmentId)
199199 render " "
200200 }
201-
201+
202202 def unknownIndex (Long runId ) {
203203 def run = SequenceRun . get(runId)
204204 if (! run) {
@@ -207,24 +207,24 @@ class ReportController {
207207 try {
208208 def file = reportService. getUnknownIndex(run)
209209 def htmlContent = new File (file). text
210- render text : htmlContent, contentType :" text/html" , encoding :" UTF-8"
210+ render text : htmlContent, contentType :" text/html" , encoding :" UTF-8"
211211 } catch (Exception e) {
212212 render(view : " /404" )
213213 }
214214 }
215215 }
216-
216+
217217 def decisionTree (String type ) {
218218 [type : type]
219219 }
220-
220+
221221 def getDecisionTreeAjax (String type ) {
222222 def tree = reportService. getDecisionTree(type)
223223 def map = utilityService. parseJson(tree?. value)
224224 render (map as JSON )
225225 return
226226 }
227-
227+
228228 def saveDecisionTree (String json , String type ) {
229229 try {
230230 reportService. saveDecisionTree(json, type)
@@ -233,19 +233,19 @@ class ReportController {
233233 }
234234 redirect(action : " decisionTree" , params : [type : type])
235235 }
236-
236+
237237 def saveNotesAjax (Long cohortId , String notes ) {
238238 reportService. saveNotes(cohortId, notes)
239239 render " "
240240 return
241241 }
242-
242+
243243 def updateAnalysisCodeAjax (Long analysisId , String code , String message ) {
244244 reportService. updateAnalysisCode(analysisId, code, message)
245245 render " "
246246 return
247247 }
248-
248+
249249 def print (Long id ) {
250250 def report = SummaryReport . get(id)
251251 if (! report) {
@@ -256,7 +256,7 @@ class ReportController {
256256 def imageMap = report. cohort?. imageMap
257257 [report : report, imageMap : imageMap, sampleList : data]
258258 }
259-
259+
260260 def listFiles (Long id ) {
261261 def samples = reportService. fetchDataForReport(id)
262262 [samples : samples]
@@ -304,15 +304,15 @@ class AlignmentDTO {
304304 Long mappedReads
305305 Long uniquelyMappedReads
306306 Long dedupUniquelyMappedReads
307-
307+
308308 Float mappedReadPct
309309 Float uniquelyMappedPct
310310 Float deduplicatedPct
311311
312312 Integer avgInsertSize
313313 Float stdInsertSize
314314 Float genomeCoverage
315-
315+
316316 String peakCallingParam
317317 Long peaks
318318 Long singletons
0 commit comments