Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 13 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ so let us know if it doesn't work for your use case

The BAM class constructor accepts arguments

- `bamPath`/`bamUrl`/`bamFilehandle` - a string file path to a local file or a
class object with a read method
- `bamPath`/`bamUrl`/`bamFilehandle` - a local file path, remote URL string, or
a class object with a read method
- `csiPath`/`csiUrl`/`csiFilehandle` - a CSI index for the BAM file, required
for long chromosomes greater than 2^29 in length
- `baiPath`/`baiUrl`/`baiFilehandle` - a BAI index for the BAM file
Expand Down Expand Up @@ -112,8 +112,8 @@ density across 16kb windows in the genome
- `refName` - a string for the chrom to fetch from

Returns number of features on refName, uses special pseudo-bin from the BAI/CSI
index (e.g. bin 37450 from bai, returning n_mapped from SAM spec pdf) or -1 if
refName not exist in sample
index (e.g. bin 37450 from bai, returning n_mapped from SAM spec pdf) or 0 if
refName does not exist in the sample

### async hasRefSeq(refName: string)

Expand Down Expand Up @@ -201,3 +201,12 @@ console.log(records[0].getDoubleStart())
## License

MIT © [Colin Diesh](https://github.com/cmdcolin)

## Publishing

[Trusted publishing](https://docs.npmjs.com/about-trusted-publishing) via GitHub
Actions.

```bash
npm version patch # or minor/major
```
240 changes: 0 additions & 240 deletions benchmarks/cigar-parsing.bench.ts

This file was deleted.

9 changes: 5 additions & 4 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import eslint from '@eslint/js'
import { defineConfig } from 'eslint/config'
import importPlugin from 'eslint-plugin-import'
import importPlugin from 'eslint-plugin-import-x'
import eslintPluginUnicorn from 'eslint-plugin-unicorn'
import tseslint from 'typescript-eslint'

export default defineConfig(
{
ignores: [
'scripts',
'webpack.config.js',
'benchmarks/*',
'dist/*',
Expand Down Expand Up @@ -119,9 +120,9 @@ export default defineConfig(
},
],

'import/extensions': ['error', 'ignorePackages'],
'import/no-unresolved': 'off',
'import/order': [
'import-x/extensions': ['error', 'ignorePackages'],
'import-x/no-unresolved': 'off',
'import-x/order': [
'error',
{
named: true,
Expand Down
24 changes: 11 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,10 @@
"url": "https://github.com/GMOD/bam-js.git"
},
"type": "module",
"types": "./esm/index.d.ts",
"main": "dist/index.js",
"exports": {
".": {
"import": "./esm/index.js",
"require": "./dist/index.js"
}
"import": "./esm/index.js",
"require": "./dist/index.js"
},
"author": {
"name": "Colin Diesh",
Expand All @@ -27,19 +25,19 @@
],
"scripts": {
"test": "vitest",
"benchonly": "vitest bench",
"bench": "./scripts/build-both-branches.sh \"$BRANCH1\" \"$BRANCH2\" && vitest bench",
"lint": "eslint --report-unused-disable-directives --max-warnings 0",
"clean": "rimraf dist esm",
"format": "prettier --write .",
"lint": "eslint --report-unused-disable-directives --max-warnings 0",
"prebuild": "pnpm clean",
"build:esm": "tsc --outDir esm",
"build:es5": "tsc --module commonjs --moduleResolution bundler --outDir dist",
"build": "pnpm build:esm && pnpm build:es5",
"prebuild": "pnpm clean",
"postbuild:es5": "echo '{\"type\": \"commonjs\"}' > dist/package.json",
"preversion": "pnpm lint && pnpm test --run && pnpm build",
"version": "standard-changelog && git add CHANGELOG.md",
"postversion": "git push --follow-tags"
"postversion": "git push --follow-tags",
"build": "pnpm build:esm && pnpm build:es5",
"benchonly": "vitest bench",
"bench": "./scripts/build-both-branches.sh \"$BRANCH1\" \"$BRANCH2\" && vitest bench",
"version": "standard-changelog && git add CHANGELOG.md"
},
"keywords": [
"bionode",
Expand All @@ -58,7 +56,7 @@
"@types/node": "^25.6.0",
"@vitest/coverage-v8": "^4.1.5",
"eslint": "^10.2.1",
"eslint-plugin-import": "^2.32.0",
"eslint-plugin-import-x": "^4.16.2",
"eslint-plugin-unicorn": "^64.0.0",
"prettier": "^3.8.3",
"rimraf": "^6.1.3",
Expand Down
Loading
Loading