Commit 95cf091f authored by Amanda Ghassaei's avatar Amanda Ghassaei

display and save seq to file

parent dbe5702d
......@@ -508,4 +508,14 @@ label {
display: inline-block;
text-overflow: ellipsis;
position: absolute;
}
.sequenceOutput {
background-color: white;
overflow: auto;
max-height: 200px;
margin: 10px 10px;
padding: 5px 10px 20px 10px;
font-size: 14px;
font-family: Courier, monospace;
}
\ No newline at end of file
......@@ -99,6 +99,7 @@ define(['underscore', 'three', 'threeModel', 'lattice', 'appState', 'superCell',
if (i==0) seq = seq.split('').reverse().join('');
sequence += seq;
}
if (sequence == "-") return "";
return sequence;
};
......
......@@ -30,9 +30,12 @@ define(['underscore', 'backbone', 'lattice', 'appState', 'fileSaver'],
var sequences16 = [];
lattice.loopCells(function(cell, x, y, z){
if (!cell) return;
if (cell.getLength() == 2) sequences32.push(cell.getSequence());
else if (cell.getLength() == 1) sequences16.push(cell.getSequence());
else console.warn("unexpected cell of length " + cell.getLength());
var seq = cell.getSequence();
if (seq && seq != ""){
if (cell.getLength() == 2) sequences32.push(seq);
else if (cell.getLength() == 1) sequences16.push(seq);
else console.warn("unexpected cell of length " + cell.getLength());
}
});
this.set("sequence32", sequences32);
this.set("sequence16", sequences16);
......
32bp sequences:<br/>
<% _.each(sequence32, function(seq){ %>
<%= seq %><br/>
<% }); %><br/>
16bp sequences:<br/>
<% _.each(sequence16, function(seq){ %>
<%= seq %><br/>
<% }); %><br/>
<% if(sequence32.length > 0){ %>
32bp sequences:<br/>
<div class="sequenceOutput">
<% _.each(sequence32, function(seq){ %>
<%= seq %><br/>
<% }); %>
</div>
<% } else { %>
no 32bp sequences<br/><br/>
<% } %>
<% if(sequence16.length > 0){ %>
16bp sequences:<br/>
<div class="sequenceOutput">
<% _.each(sequence16, function(seq){ %>
<%= seq %><br/>
<% }); %>
</div>
<% } else { %>
no 16bp sequences<br/>
<% } %><br/>
<a href="#" id="saveSequences" class="btn btn-block btn-lg btn-success">Save to File</a><br/>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment