UNPKG

@jbrowse/plugin-wiggle

Version:

JBrowse 2 wiggle adapters, tracks, etc.

12 lines (11 loc) 360 B
export function stringifyBedGraph({ features }) { return features .map(feature => { const chrom = feature.get('refName'); const start = feature.get('start'); const end = feature.get('end'); const score = feature.get('score') ?? 0; return `${chrom}\t${start}\t${end}\t${score}`; }) .join('\n'); }