This repository has been archived by the owner on Apr 27, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
133 lines (130 loc) · 5.41 KB
/
index.html
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
{% extends "tool_base.html" %}
{% load static %}
{% block head %}
<link rel="stylesheet" href="{% static "fas_css/style.css" %}">
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="{% static "fac_script.js" %}"></script>
<title>Fasta Converter</title>
{% endblock %}
{% block content %}
<div id="body-div">
<div class="container">
<form enctype="multipart/form-data" action="calculate/" method="post" id="form">
{% csrf_token %}
<div class="row">
<div class="col-md-9">
<textarea style="font-family:monospace;" placeholder="Enter fasta or excel data here" id="textinput" name="textinput" form="form" required></textarea>
<div id="clearbutton" class="hide">Clear</div>
</div>
<div class="col-md-3">
<div class="info-box">
<h2>Upload Fasta File:</h2>
<input id="datafile" type="file" name="datafile" size="40">
</div>
</div>
</div>
<div class="spacer"></div>
<div class="row">
<div class="col-md-6">
<div class="info-box">
<h2>Options</h2>
<h3>Delimiter:</h3>
<select class="styled-select" name="delim">
<option value = "_" selected>underscore: _</option>
<option value = "/">forward slash: /</option>
<option value = "-">dash: -</option>
<option value = ".">period: .</option>
<option value = " ">whitespace: </option>
</select>
<div class="row checkbox">
<div class="col-md-6">
<input type="checkbox" id="cboxOne" value="on" name="splitfastaheader" checked>
<label for="cboxOne">Split fasta header by delimiter</label>
</div>
<div class="col-md-6 description">
If you would like your fasta header to be broken up into its constituent parts, enable this option. The header
will be split based on the delimiter selection above.
</div>
</div>
<div class="row checkbox" id="whitespace-strip">
<div class="col-md-6">
<input type="checkbox" id="cboxTwo" value="on" name="stripwhitespace" checked>
<label for="cboxTwo">Strip whitespace from fasta headers</label>
</div>
<div class="col-md-6 description">
Sometimes programs do not correctly parse whitespaces and will truncate your headers. To avoid this, check this box to
enable automatic collapse of whitespaces in your fasta headers.
</div>
</div>
</div>
</div>
<div class="col-md-6">
<div class="info-box">
<h2>Converting or downloading to CSV</h2>
<p>
When converting or downloading fasta to csv, the input must consist of a header beginning with ">"
, followed by the name of the header. The following line must be the sequence corresponding to that header. <br><br>
Often people want to encode multiple types of information
in their headers, if you have a header with multiple columns of information then you may select the
appropriate delimiter in the delimiter setting. The header will be broken up into its constituent parts.
For example:
<div class="example">>4xB001_03-05-2014_British Columbia_ACUTE</div>
will become:
<div class="example"><table id="fasta-convert-table"><td>4xB001</td><td>03-05-2014</td><td>British Columbia</td><td>ACUTE</td></table></div>
The line following the header must be a sequence of (ATCG) or extended mixture base pairs (R,Y,K,M,S,W,B,H,D,V,N, or :) or '-' for gaps.
Sequences may span multiple lines for a given header, or they may be one line.
</p>
</div>
</div>
</div>
<div class="spacer"></div>
<div class="row">
<div class="col-md-6">
<div class="info-box">
<h2>Converting or downloading to Fasta</h2>
<p>
The input must be in tab-delimited format or comma-delimited format, with the last column being the sequence. It is
easiest to have your data in excel, and directly copy and paste from there (excluding headers).
All columns prior to the last will be concatenated into the header for that sequence in the
fasta file. For example:
<div class="example">
<table id="fasta-convert-table">
<tr>
<td>4xB001</td>
<td>03-05-2014</td>
<td>Canada</td>
<td>ACUTE</td>
<td>CCCGTGCGAAATA</td>
</tr>
<tr>
<td>4xB002</td>
<td>01-10-2014</td>
<td>Australia</td>
<td>ACUTE</td>
<td>CTGACTCTAGAGG</td>
</tr>
</table>
</div>
will become:
<div class="example">
>4xB001_03-05-2014_Canada_ACUTE<br>
CCCGTGCGAAATA<br>
>4xB002_01-10-2014_Australia_ACUTE<br>
CTGACTCTAGAGG
</div>
depending on which delimiter you choose. Your fasta header will be joined using the delimiter
selected in the delimiter setting. In this case it is joined using the underscore.
</p>
</div>
</div>
<div class="col-md-6">
<input class="button blue multibutton dual left" id="submit_button" type="submit" name="runfasta" value="Convert to Fasta"><!--
--><input class="button blue multibutton dual right" id="submit_button" type="submit" name="dlfasta" value="Download Fasta">
<input class="button orange multibutton dual left" id="submit_button" type="submit" name="runcsv" value="Convert to CSV"><!--
--><input class="button orange multibutton dual right" id="submit_button" type="submit" name="dlcsv" value="Download CSV">
</div>
</div>
</form>
</div>
</div>
{% endblock %}