Research
Security News
Kill Switch Hidden in npm Packages Typosquatting Chalk and Chokidar
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
Command line and web utilities for reading .hic contact matrix files
Requires Node (https://nodejs.org)
npm install hic-straw
Return a collection of binned contact counts.
Arguments
Script tag - see examples/straw.html
<script src="../dist/hic-straw.js"></script>
...
const straw = new HicStraw({
url: "https://s3.amazonaws.com/igv.broadinstitute.org/data/hic/intra_nofrag_30.hic"
})
straw.getContactRecords(
"KR",
{chr: "8",start: 50000000, end: 60000000},
{chr: "8",start: 50000000, end: 60000000},
"BP",
1000000
)
.then(function (contactRecords) {...})
ES6 module - see examples/straw-es6.html
import HicStraw from '../dist/hic-straw_es6.js'
const straw = new HicStraw({
url: "https://s3.amazonaws.com/igv.broadinstitute.org/data/hic/intra_nofrag_30.hic"
})
straw.getContactRecords(
"KR",
{chr: "8",start: 50000000, end: 60000000},
{chr: "8",start: 50000000, end: 60000000},
"BP",
1000000
)
.then(function (contactRecords) {...})
`
The hic-straw distributions are built for browser usagae, but can be used in Node with shims.
local file
To use hic-straw with a local file use the NodeLocalFile class as follows
import NodeLocalFile from "src/io/nodeLocalFile.mjs"
const path = "test/data/test_chr22.hic"
const nodeLocalFile = new NodeLocalFile({path})
const straw = new Straw({file: nodeLocalFile})
remote file
For remote file access define a global fetch
function
global.fetch = require("node-fetch")
const url = "https://foo.bar/test.hic"
const straw = new Straw({url: url})
See examples/script-es6.js
and examples/script-cjs.js
for complete examples.
Note: "straw" is installed in node_modules/.bin/straw. This should be added to the path automatically upon installing
hic-straw, however if you get the error straw: command not found
try running straw explicitly as
node_modules/.bin/straw...
straw --meta test/data/test_chr22.hic
straw --norms test/data/test_chr22.hic
straw KR test/data/test_chr22.hic 22:40,000,000-50,000,000 22:40,000,000-50,000,000 BP 100,000
straw KR https://s3.amazonaws.com/igv.broadinstitute.org/data/hic/intra_nofrag_30.hic 8:48,700,000-48,900,000 8:48700000-48900000 BP 10,000
``
FAQs
Utilities for reading .files (contact matrix files)
The npm package hic-straw receives a total of 205 weekly downloads. As such, hic-straw popularity was classified as not popular.
We found that hic-straw demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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.
Research
Security News
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.