How to use the @single-cell-portal/igv.GenomeUtils function in @single-cell-portal/igv

To help you get started, we’ve selected a few @single-cell-portal/igv examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github broadinstitute / single_cell_portal_core / app / javascript / components / explore / GenomeView.js View on Github external
}

  igv.createBrowser(igvContainer, igvOptions)

  // Log igv.js initialization in Google Analytics
  ga('send', 'event', 'igv', 'initialize')
  log('igv:initialize')
}


// Monkey patch getKnownGenome to remove baked-in genes track.
// We use a different gene annotation source, in a different track order,
// so removing this default gives our genome browser instance a more
// polished feel.
const originalGetKnownGenomes = igv.GenomeUtils.getKnownGenomes
igv.GenomeUtils.getKnownGenomes = function() {
  return originalGetKnownGenomes.apply(this).then(reference => {
    const newRef = {}
    newRef['GRCm38'] = reference['mm10'] // Fix name
    Object.keys(reference).forEach(key => {
      delete reference[key].tracks
      newRef[key] = reference[key]
    })
    return newRef
  })
}
github broadinstitute / single_cell_portal_core / app / javascript / components / explore / GenomeView.js View on Github external
igvOptions['search'] = searchOptions
  }

  igv.createBrowser(igvContainer, igvOptions)

  // Log igv.js initialization in Google Analytics
  ga('send', 'event', 'igv', 'initialize')
  log('igv:initialize')
}


// Monkey patch getKnownGenome to remove baked-in genes track.
// We use a different gene annotation source, in a different track order,
// so removing this default gives our genome browser instance a more
// polished feel.
const originalGetKnownGenomes = igv.GenomeUtils.getKnownGenomes
igv.GenomeUtils.getKnownGenomes = function() {
  return originalGetKnownGenomes.apply(this).then(reference => {
    const newRef = {}
    newRef['GRCm38'] = reference['mm10'] // Fix name
    Object.keys(reference).forEach(key => {
      delete reference[key].tracks
      newRef[key] = reference[key]
    })
    return newRef
  })
}

@single-cell-portal/igv

Development fork of igv.js, for patches before merging upstream

MIT
Latest version published 4 months ago

Package Health Score

81 / 100
Full package analysis