1 | <html> |
---|
2 | <head> |
---|
3 | <meta name="layout" content="main" /> |
---|
4 | <title>Processed files for assay ${assay.name} | Metagenomics | dbNP</title> |
---|
5 | |
---|
6 | <script> |
---|
7 | var assayId = ${assay.id}; |
---|
8 | </script> |
---|
9 | </head> |
---|
10 | <body> |
---|
11 | <h1> |
---|
12 | ${assay.study.name} - ${assay.name} |
---|
13 | </h1> |
---|
14 | <g:if test="${matchedFiles.size() > 0}"> |
---|
15 | <h2>Match files with samples</h2> |
---|
16 | <% |
---|
17 | def sortedSamples = assay.assaySamples.sort() { a,b -> a.sample.name <=> b.sample.name } |
---|
18 | def sortedRuns = assay.runs.sort() { a,b -> a.name <=> b.name } |
---|
19 | %> |
---|
20 | <g:form name="saveProcessedFiles" action="saveProcessedFiles" id="${assay.id}"> |
---|
21 | <table> |
---|
22 | <thead> |
---|
23 | <tr> |
---|
24 | <th></th> |
---|
25 | <th>Fasta file</th> |
---|
26 | <th># sequences</th> |
---|
27 | <th>Qual file</th> |
---|
28 | <th>Sample</th> |
---|
29 | <th>Run</th> |
---|
30 | </tr> |
---|
31 | </thead> |
---|
32 | |
---|
33 | <g:each in="${matchedFiles}" var="file" status="i"> |
---|
34 | <tr> |
---|
35 | <td> |
---|
36 | <g:hiddenField name="file.${i}.fasta" value="${file.fasta.filename}" /> |
---|
37 | <g:checkBox name="file.${i}.include" value="${true}" /> |
---|
38 | </td> |
---|
39 | <td class="name">${file.fasta.originalfilename}</td> |
---|
40 | <td class="sequences">${file.fasta.numSequences}</td> |
---|
41 | <td> |
---|
42 | <g:if test="${file.feasibleQuals?.size()}"> |
---|
43 | <g:select name="file.${i}.qual" from="${file.feasibleQuals}" optionKey="filename" optionValue="originalfilename" value="${file.qual?.filename}" noSelection="['': '- No qual file -']"/> |
---|
44 | </g:if> |
---|
45 | <g:else> |
---|
46 | No qual file available |
---|
47 | </g:else> |
---|
48 | </td> |
---|
49 | <td> |
---|
50 | <g:if test="${sortedSamples.size()}"> |
---|
51 | <select name="file.${i}.assaySample"> |
---|
52 | <g:each in="${sortedSamples}" var="assaySample"> |
---|
53 | <option |
---|
54 | <g:if test="${file.assaySample?.id == assaySample.id}"> |
---|
55 | selected="selected" |
---|
56 | </g:if> |
---|
57 | value="${assaySample.id}">${assaySample.sample.name}</option> |
---|
58 | </g:each> |
---|
59 | </select> |
---|
60 | </g:if> |
---|
61 | <g:else> |
---|
62 | No samples available. |
---|
63 | </g:else> |
---|
64 | </td> |
---|
65 | <td> |
---|
66 | <g:if test="${sortedRuns.size()}"> |
---|
67 | <select name="file.${i}.run"> |
---|
68 | <g:each in="${sortedRuns}" var="run"> |
---|
69 | <option |
---|
70 | <g:if test="${selectedRun?.toLong() == run.id}"> |
---|
71 | selected="selected" |
---|
72 | </g:if> |
---|
73 | value="${run.id}">${run.name}</option> |
---|
74 | </g:each> |
---|
75 | </select> |
---|
76 | </g:if> |
---|
77 | <g:else> |
---|
78 | No runs available. |
---|
79 | </g:else> |
---|
80 | </td> |
---|
81 | </tr> |
---|
82 | </g:each> |
---|
83 | |
---|
84 | </table> |
---|
85 | |
---|
86 | <input type="submit" value="Continue"> |
---|
87 | </g:form> |
---|
88 | |
---|
89 | </g:if> |
---|
90 | <g:else> |
---|
91 | <h2>Uploaded files</h2> |
---|
92 | <p> |
---|
93 | ${parsedFiles.success?.size()} files were successfully uploaded, but no FASTA file could be determined. Please |
---|
94 | upload at least one FASTA file. |
---|
95 | </p> |
---|
96 | </g:else> |
---|
97 | |
---|
98 | <g:if test="${parsedFiles.failure?.size()}"> |
---|
99 | <h2>Failure</h2> |
---|
100 | <p> |
---|
101 | The following files could not be correctly imported. The system can only interpret FASTA and QUAL files.<br /> |
---|
102 | If these files were intended to be included into the system, please check the messages below. |
---|
103 | </p> |
---|
104 | <ul> |
---|
105 | <g:each in="${parsedFiles.failure}" var="file"> |
---|
106 | <li> |
---|
107 | ${file.originalfilename}: |
---|
108 | ${file.message} |
---|
109 | </li> |
---|
110 | </g:each> |
---|
111 | </ul> |
---|
112 | </g:if> |
---|
113 | |
---|
114 | <p> |
---|
115 | <g:link controller="assay" action="show" id="${assay.id}">Return to assay</g:link> |
---|
116 | </p> |
---|
117 | </body> |
---|
118 | </html> |
---|