Attention une mise à jour du service Gitlab va être effectuée le mardi 14 décembre entre 13h30 et 14h00. Cette mise à jour va générer une interruption du service dont nous ne maîtrisons pas complètement la durée mais qui ne devrait pas excéder quelques minutes.

Commit 545e2ba2 authored by flothoni's avatar flothoni Committed by Mikaël Salson
Browse files

Segmenter; Add a function to export the fasta sequences aligned

link to #2876
parent b7522071
......@@ -942,14 +942,14 @@ Segment.prototype = {
* */
toFasta: function () {
var selected = this.sequenceListInSegmenter();
var result = "";
var result = '<pre>';
for (var i = 0; i < selected.length; i++) {
if (typeof this.sequence[selected[i]] !== "undefined" &&
typeof this.sequence[selected[i]].seq !== "undefined") {
var seq = this.sequence[selected[i]];
if (seq.is_clone) {
result +="> " + this.m.clone(selected[i]).getName() + " // " + this.m.clone(selected[i]).getStrSize() + "\n";
result += "> " + this.m.clone(selected[i]).getName() + " // " + this.m.clone(selected[i]).getStrSize() + "\n";
} else {
result += "> " + selected[i];
}
......@@ -960,6 +960,23 @@ Segment.prototype = {
},
/**
* save a csv file of the currently visibles clones.
* @return {string} csv
* */
exportAlignFasta: function () {
var list = this.m.getSelected()
if (list.length>0){
var fasta = this.toFasta()
openAndFillNewTab( fasta )
}else{
console.log({msg: "Export FASTA: please select clones to be exported", type: 'flash', priority: 2});
}
},
/**
* remove alignement
......
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