<commit_before>define([
           'dojo/_base/declare',
           'JBrowse/Util'
       ],
       function( declare, Util ) {

return declare(null,
{

    constructor: function( args ) {
        this.width = args.width || 78;
    },
    renderHTML: function( region, seq, container ) {
        return dojo.create('textarea', {
                        className: 'fasta',
                        cols: this.width,
                        rows: 10,
                        readonly: true,
                        style: { width: (this.width*1.37)+4+'ex' },
                        innerHTML: this.renderText( region, seq )
                    }, container );
    },
    renderText: function( region, seq ) {
        return '>' + region.ref
            +' '+Util.assembleLocString(region) + "\n"
            + this._wrap( seq, this.width );
    },
    _wrap: function( string, length ) {
        length = length || this.width;
        return string.replace( new RegExp('(.{'+length+'})','g'), "$1\n" );
    }
});
});<commit_msg>add the seq length to the FASTA view<commit_after>define([
           'dojo/_base/declare',
           'JBrowse/Util'
       ],
       function( declare, Util ) {

return declare(null,
{

    constructor: function( args ) {
        this.width = args.width || 78;
    },
    renderHTML: function( region, seq, container ) {
        return dojo.create('textarea', {
                        className: 'fasta',
                        cols: this.width,
                        rows: 10,
                        readonly: true,
                        style: { width: (this.width*1.37)+4+'ex' },
                        innerHTML: this.renderText( region, seq )
                    }, container );
    },
    renderText: function( region, seq ) {
        return '>' + region.ref
            +' '+Util.assembleLocString(region)
            +' length:'+(region.end - region.start)+"\n"
            + this._wrap( seq, this.width );
    },
    _wrap: function( string, length ) {
        length = length || this.width;
        return string.replace( new RegExp('(.{'+length+'})','g'), "$1\n" );
    }
});
});
{'fraction_non_alphanumeric': 0.14950634696755993, 'fraction_numerical': 0.00846262341325811, 'mean_word_length': 1.512396694214876, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5868724', 'n_tokens_mistral': 622, 'n_tokens_neox': 584, 'n_words': 128}