<commit_before>define([
           'dojo/_base/declare', 
           'dojo/_base/array',
           'JBrowse/View/Track/Alignments',
           'WebApollo/View/Track/DraggableHTMLFeatures', 
           'JBrowse/Util', 
       ],
       function(
           declare,
           array, 
           AlignmentsTrack,
           DraggableTrack, 
           Util
       ) {

return declare([ DraggableTrack, AlignmentsTrack ], {

    constructor: function( args )  {
	// forcing store to create subfeatures, unless config.subfeatures explicitly set to false
	//     default is set to true in _defaultConfig()
	this.store.createSubfeatures = this.config.subfeatures;
    }, 

    _defaultConfig: function()  {
        var thisConfig = Util.deepUpdate(
//       return Util.deepUpdate(
            dojo.clone( this.inherited(arguments) ),
            {
                layoutPitchY: 2, 
                subfeatures: true,
                style: {
                    className: "bam-read", 
                    renderClassName: null, 
                    arrowheadClass: null, 
	            centerChildrenVertically: false, 
	            showSubfeatures: true, 
	            showMismatches: true, 
		    showLabels: false, 
                    showMismatchResidues: false,  // when rendering mismatches, whether to render residues text
                    subfeatureClasses: {
	                M: "cigarM", 
//		        D: "cigarD",
		        D: null, // not rendering deletions as subfeats, relying on drawMismatches instead
		        N: "cigarN",
		        E: "cigarEQ",  /* "=" converted to "E" in BAM/LazyFeature subfeature construction */
		        X: "cigarX", 
//		        I: "cigarI"
		        I: null // not rendering insertions as subfeats, relying on drawMismatches instead
                    }
                }
            }
        );
        return thisConfig;
    }, 

    /**
     * draw base-mismatches on the feature
     */
    _drawMismatches: function( feature, featDiv, scale, displayStart, displayEnd ) {
        var featLength = displayEnd - displayStart;
        // recall: scale is pixels/basepair
        // if ( featLength*scale > 1 && scale >= 1) {  // alternatively, also require zoomed in scale min (1px/bp  in this case)
        if ( featLength*scale > 1) {     
            var mismatches = this._getMismatches( feature );
            var charSize = this.getCharacterMeasurements();
            var drawChars = (this.config.style.showMismatchResidues && 
                             (scale >= charSize.w) && <commit_msg>Switched to showing mismatches (and mismatch residues) by default in DraggableAlignments. Also eliminated config.subfeatures setting, deriving whether store should create subfeatures or not from config.style.showSubfeatures instead.<commit_after>define([
           'dojo/_base/declare', 
           'dojo/_base/array',
           'JBrowse/View/Track/Alignments',
           'WebApollo/View/Track/DraggableHTMLFeatures', 
           'JBrowse/Util', 
       ],
       function(
           declare,
           array, 
           AlignmentsTrack,
           DraggableTrack, 
           Util
       ) {

return declare([ DraggableTrack, AlignmentsTrack ], {

    constructor: function( args )  {
	// forcing store to create subfeatures, unless config.subfeatures explicitly set to false
	//     default is set to true in _defaultConfig()
        //	this.store.createSubfeatures = this.config.subfeatures;
        if (this.config.style.showSubfeatures) { this.store.createSubfeatures = true; }
    }, 

    _defaultConfig: function()  {
        var thisConfig = Util.deepUpdate(
//       return Util.deepUpdate(
            dojo.clone( this.inherited(arguments) ),
            {
                layoutPitchY: 2, 
//                subfeatures: true,
                maxFeatureScreenDensity: 0.5,
                style: {
                    className: "bam-read", 
                    renderClassName: null, 
                    arrowheadClass: null, 
	            centerChildrenVertically: false, 
	            showSubfeatures: true, 
	            showMismatches: true, 
		    showLabels: false, 
                    showMismatchResidues: true,  // when rendering mismatches, whether to render residues text when zoomed in and sizing works
                    subfeatureClasses: {
	                M: "cigarM", 
//		        D: "cigarD",
		        D: null, // not rendering deletions as subfeats, relying on drawMismatches instead
		        N: "cigarN",
		        E: "cigarEQ",  /* "=" converted to "E" in BAM/LazyFeature subfeature construction */
		        X: "cigarX", 
//		        I: "cigarI"
		        I: null // not rendering insertions as subfeats, relying on drawMismatches instead
                    }
                }
            }
        );
        return thisConfig;
    }, 

    /**
     * draw base-mismatches on the feature
     */
    _drawMismatches: function( feature, featDiv, scale, displayStart, displayEnd ) {
        var featLength = displayEnd - displayStart;
        // recall: scale is pixels/basepair
        // if ( featLength*scale > 1 && scale >= 1) {  // alternatively, also require zoomed in scale min (1px/bp  in this case)
        if ( featLength*scale > 1) {     
            var mismatches = this._getMismatches( feature );
            var charSize = this.getCharacterMeasurements();
            var drawChars = (this.config.style.showMismatchResidues && 
                             (scale >= charSize.w) && 
{'fraction_non_alphanumeric': 0.09104151493080845, 'fraction_numerical': 0.0021849963583394027, 'mean_word_length': 1.7139328063241106, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, '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': '4886082', 'n_tokens_mistral': 1584, 'n_tokens_neox': 1424, 'n_words': 381}