Security News
Supply Chain Attack Detected in Solana's web3.js Library
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
A parser for bigwig and bigbed file formats
If using locally
import {BigWig} from '@gmod/bbi'
const ti = new BigWig({
path: 'volvox.bw'
})
await ti.getHeader()
const feats = await ti.getFeatures('chr1', 0, 100, { scale: 1 })
Accepts an object containing either
Returns a promise to an array of features.
Example:
const feats = await bigwig.getFeatures('chr1', 0, 100)
// returns array of features with start, end, score
// coordinates on returned data are are 0-based half open
// no conversion to 1-based as in wig is done)
// note refseq is not returned on the object, it is clearly chr1 from the query though
Same getFeatures but returns an RxJS observable stream, useful for very large queries
const observer = await bigwig.getFeatureStream('chr1', 0, 100)
observer.subscribe(chunk => { /* chunk contains array of features with start, end, score */ }, errorCallback, finishCallback)
returns a promise to an array of features
The BigBed line contents can be parsed by @gmod/bed, it is not integrated with this module by default but for example
import {BigBed} from '@gmod/bed'
import BED from '@gmod/bed'
const ti = new BigBed({
filehandle: new LocalFile(require.resolve('./data/hg18.bb')),
})
const {autoSql} = await ti.getHeader()
const feats = await ti.getFeatures('chr7', 0, 100000)
const parser = new BED({autoSql})
const lines = feats.map(f => parser.parseBedText('chr7', f.start, f.end, f.rest, 3))
Example output, coordinates are 0-based half open as in BED
{ refID: 'chr7',
start: 75460,
end: 116489,
name: 'uc003sin.1',
score: 0,
strand: -1,
thick_start: 75460,
thick_end: 75460,
reserved: '255,0,0',
sp_id: 'AL137655' } ]
See docs
This package was written with funding from the NHGRI as part of the JBrowse project. If you use it in an academic project that you publish, please cite the most recent JBrowse paper, which will be linked from jbrowse.org.
MIT © Colin Diesh
1.0.11 (2019-04-10)
FAQs
Parser for BigWig/BigBed files
The npm package @gmod/bbi receives a total of 0 weekly downloads. As such, @gmod/bbi popularity was classified as not popular.
We found that @gmod/bbi demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 6 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.