Commit 27a99f60 authored by Mathieu Giraud's avatar Mathieu Giraud
Browse files

clone.js: Fasta export with line breaks between V/N and N/J

.getPrintableSegSequence()
parent c84fac9a
......@@ -212,7 +212,7 @@ Clone.prototype = {
getFasta: function() {
fasta = ''
fasta += '>' + this.getCode() + ' ' + this.getPrintableSize() + '\n'
fasta += this.getSequence() + '\n'
fasta += this.getPrintableSegSequence() + '\n'
return fasta
},
......@@ -338,6 +338,22 @@ Clone.prototype = {
}
},
getPrintableSegSequence: function () {
if (typeof this.seg == 'undefined' || typeof this.seg['5end'] == 'undefined' || typeof this.seg['3start'] == 'undefined') {
return this.getSequence()
}
var s = ''
s += this.sequence.substring(0, this.seg['5end'])
s += '\n'
if (this.seg['5end'] < this.seg['3start'] - 1) {
s += this.sequence.substring(this.seg['5end'], this.seg['3start'] - 1)
s += '\n'
}
s += this.sequence.substring(this.seg['3start'] - 1)
return s
},
computeGCContent: function () {
if (typeof (this.sequence) == 'undefined') {
this.GCContent = '?'
......
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