aboutsummaryrefslogtreecommitdiff
path: root/qc_app/templates/index.html
blob: a454dd2f44aca474521c3014f005d7fcd96ae88e (plain)
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
{%extends "base.html"%}

{%block title%}Data Upload{%endblock%}

{%block contents%}
<h1 class="heading">data upload</h1>

<h2>R/qtl2 Bundles</h2>

<div class="explainer">
  <p>This feature combines and extends the two upload methods below. Instead of
    uploading one item at a time, the R/qtl2 bundle you upload can contain both
    the genotypes data (samples/individuals/cases and their data) and the
    expression data.</p>
  <p>The R/qtl2 bundle, additionally, can contain extra metadata, that neither
    of the methods below can handle.</p>

  <a href={{url_for("upload.rqtl2.select_species")}}
     title="Upload a zip bundle of R/qtl2 files">
    <button class="btn btn-main">upload R/qtl2 bundle</button></a>
</div>

<h2>Expression Data</h2>

<div class="explainer">
  <p>This application assumes that you are familiar with the basics of data
    verification formats and uploading procedures. If you haven't done so please
    go to this page to learn the requirements for file formats and helpful
    suggestions to enter your data in a fast and easy way.</p>

  <ol>
    <li><strong>PLEASE REVIEW YOUR DATA.</strong>Make sure your data complies
      with our system requirements. (
      <a href="{{url_for('entry.data_review')}}#data-concerns"
	 title="Details for the data expectations.">Help</a>
      )</li>
    <li><strong>UPLOAD YOUR DATA FOR DATA VERIFICATION.</strong> We accept
      <strong>.csv</strong>, <strong>.txt</strong> and <strong>.zip</strong>
      files (<a href="{{url_for('entry.data_review')}}#file-types"
	 title="Details for the data expectations.">Help</a>)</li>
  </ol>
</div>

<form action="{{url_for('entry.upload_file')}}"
      method="POST" enctype="multipart/form-data">
  <legend class="heading">upload expression data</legend>
  {%with messages = get_flashed_messages(with_categories=True) %}
  {%if messages %}
  <div class="alerts">
    {%for category, message in messages %}
    <span class="alert {{category}}">{{message}}</span>
    {%endfor%}
  </div>
  {%endif%}
  {%endwith%}

  <fieldset>
    <legend>file type</legend>

    <input type="radio" name="filetype" value="average" id="filetype_average"
	   required="required" class="form-col-1" />
    <label for="filetype_average" class="form-col-2">average</label>

    <input type="radio" name="filetype" value="standard-error"
	   id="filetype_standard_error" required="required"
	   class="form-col-1" />
    <label for="filetype_standard_error" class="form-col-2">
      standard error
    </label>
  </fieldset>

  <fieldset>
    <span id="no-file-error" class="alert-error" style="display: none;">
      No file selected
    </span>
    <label for="file_upload" class="form-col-1">select file</label>
    <input type="file" name="qc_text_file" id="file_upload"
	   accept="text/plain, text/tab-separated-values, application/zip"
	   class="form-col-2"/>
  </fieldset>

  <fieldset>
    <input type="submit" value="upload file" class="btn btn-main form-col-2" />
  </fieldset>
</form>

<div id="progress-indicator" class="hidden">
  <h3>Uploading file</h3>
  <p id="progress-filename">the-file</p>
  <progress id="progress-bar" value="0" max="100">
    0
  </progress>
  <p id="progress-text">Uploading 0%</p>
  <p id="progress-extra-text">Processing</p>
  <form id="frm-cancel-upload" style="border-style: none;">
    <button id="btn-cancel-upload" type="submit" class="btn btn-danger">
      Cancel
    </button>
  </form>
</div>

<h2>samples/cases</h2>

<div class="explainer">
  <p>For the expression data above, you need the samples/cases in your file to
    already exist in the GeneNetwork database. If there are any samples that do
    not already exist the upload of the expression data will fail.</p>
  <p>This section gives you the opportunity to upload any missing samples</p>
</div>

<form method="POST" action="{{url_for('samples.select_species')}}">
  <legend class="heading">upload samples</legend>
  <fieldset>
    <label for="select:species">Species</label>
    <select id="select:species" name="species_id" required="required">
      <option value="">Select species</option>
      {%for spec in species%}
      <option value="{{spec.SpeciesId}}">{{spec.MenuName}}</option>
      {%endfor%}
    </select>
  </fieldset>

  <fieldset>
    <input type="submit" value="submit" class="btn btn-main form-col-2" />
  </fieldset>
</form>

{%endblock%}


{%block javascript%}
<script type="text/javascript" src="static/js/upload_progress.js"></script>
<script type="text/javascript">
  setup_upload_handlers();
</script>
{%endblock%}