static/js/display.js
/**
 * Calculate total abundance of contigs.
 * @function cacheTotAbundance
 * @param {Object} mo - main object
 * @description Total abundance = sum of length x contig
 */
Calculate total abundance of contigs.
@function cacheTotAbundance
@param {Object} mo - main object
@description Total abundance = sum of length x contig
Calculate total abundance of contigs . @function cacheTotAbundance @param { Object } mo - main object @description Total abundance = sum of length x contig
function cacheTotAbundance(mo) {
  const data = mo.data,
        cache = mo.cache;
  if (cache.splen && cache.spcov) {
    const L = data[cache.splen],
          C = data[cache.spcov];
    const m = L.length;
    for (let i = 0; i < m; i++) {
      cache.abund += L[i] * C[i];
    }
  } else cache.abund = 0;
}
function cacheTotAbundance ( mo ) { const data = mo . data , cache = mo . cache ; if ( cache . splen && cache . spcov ) { const L = data [ cache . splen ] , C = data [ cache . spcov ] ; const m = L . length ; for ( let i = 0 ; i < m ; i ++ ) { cache . abund += L [ i ] * C [ i ] ; } } else cache . abund = 0 ; }
Calculate total abundance of contigs.
Calculate total abundance of contigs .