gmod / cram-js Goto Github PK
View Code? Open in Web Editor NEWRead CRAM v3 and v2 in node or in the browser
License: MIT License
Read CRAM v3 and v2 in node or in the browser
License: MIT License
6.0.2
to 6.1.0
.This version is covered by your current version range and after updating it in your project the build failed.
mocha is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
options
parameter (@plroebuck).jsonc
extension (@sstephant)These are soft-deprecated, and will emit a warning upon use. Support will be removed in (likely) the next major version of Mocha:
this.skip()
in "before each" hooks (@juergba)--allow-uncaught
for uncaught exceptions thrown inside hooks (@givanse)and some regressions:
Suite
cloning by copying root
property (@fatso83)The new version differs by 28 commits.
f4fc95a
Release v6.1.0
bd29dbd
update CHANGELOG for v6.1.0 [ci skip]
aaf2b72
Use cwd-relative pathname to load config file (#3829)
b079d24
upgrade deps as per npm audit fix; closes #3854
e87c689
Deprecate this.skip() for "after all" hooks (#3719)
81cfa90
Copy Suite property "root" when cloning; closes #3847 (#3848)
8aa2fc4
Fix issue 3714, hide pound icon showing on hover header on docs page (#3850)
586bf78
Update JS-YAML to address security issue (#3845)
d1024a3
Update doc examples "tests.html" (#3811)
1d570e0
Delete "/docs/example/chai.js"
ade8b90
runner.js: "self.test" undefined in Browser (#3835)
0098147
Replace findup-sync with find-up for faster startup (#3830)
d5ba121
Remove "package" flag from sample config file because it can only be passes as CLI arg (#3793)
a3089ad
update package-lock
75430ec
Upgrade yargs-parser dependency to avoid loading 2 copies of yargs
There are 28 commits in total.
See the full diff
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
Found this file https://s3.amazonaws.com/jbrowse.org/genomes/hg19/hg002/HG002_ONTrel2_16x_RG_HP10xtrioRTG.cram.crai
It is actually a BAI file....even though it has crai extension
I have read that BAI can actually serve as a CRAI index, so we could consider supporting this, or perhaps consider throwing an error in this case?
Source:
ftp://ftp-trace.ncbi.nlm.nih.gov/giab/ftp/data/AshkenazimTrio/HG002_NA24385_son/Ultralong_OxfordNanopore/combined_2018-08-10/
Apparently this is probably a GATK-ism https://sourceforge.net/p/samtools/mailman/message/34369364/
Working
samtools view https://s3.amazonaws.com/jbrowse.org/genomes/hg19/hg002/HG002_ONTrel2_16x_RG_HP10xtrioRTG.cram | less
In jbrowse 1
Error: invalid .crai index file
In jbrowse 2
Error: CRAM version 0 not supported
Also I console.logged the version it thinks it is getting and it's all corrupted
{magic: "����", majorVersion: 0, minorVersion: 0, fileId: "��BC�t��Z]���U~"}
magic: "����"
majorVersion: 0
minorVersion: 0
fileId: "��BC�t��Z]���U~"
Not sure why the variability
Hey guys, I found a bug that occurs with some webservers when running in a browser. I'm reporting the issue, and wondering if you've seen it in JBrowse? I have some URLs below that reproduce the problem.
The code below is lines 33 and 34 of remoteFile.js. sizeMatch can be null when 'content-range' is not returned in the headers, causing the next line to fail.
// try to parse out the size of the remote file
const sizeMatch = /\/(\d+)$/.exec(response.headers.get('content-range'))
if (sizeMatch[1]) this._stat = { size: parseInt(sizeMatch[1], 10) }
The test file I'm using is
const cramUrl =
'https://data.broadinstitute.org/igvdata/test/data/cram/NA12878.cram'
const indexUrl =
'https://data.broadinstitute.org/igvdata/test/data/cram/NA12878.crai'
Note that this error does not occur when running from node, only when running from a browser with a webpack converted bundle. Looking at the network traffic the 'content-range' header is returned by the server.
devDependency
@babel/cli was updated from 7.7.7
to 7.8.0
.devDependency
@babel/core was updated from 7.7.7
to 7.8.0
.devDependency
@babel/plugin-transform-runtime was updated from 7.7.6
to 7.8.0
.devDependency
@babel/preset-env was updated from 7.7.7
to 7.8.0
.This version is covered by your current version range and after updating it in your project the build failed.
This monorepo update includes releases of one or more dependencies which all belong to the babel7 group definition.
babel7 is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
With the switch to quick-lru, the feature cache can now become too big. This needs fixing.
introduced by cf56ed2#diff-ac236967b94260ff62d11f891c75549dL46
This is a follow up from the previous issue of #34
Currently when large blocks of sequence are loaded from 'b', we don't have SNPs in this file. I don't know if we need to manually compare it with a seqFetch to see if SNPs exist?
devDependency
@babel/cli was updated from 7.8.3
to 7.8.4
.devDependency
@babel/core was updated from 7.8.4
to 7.8.6
.devDependency
@babel/plugin-transform-runtime was updated from 7.8.0
to 7.8.3
.devDependency
@babel/preset-env was updated from 7.8.4
to 7.8.6
.This version is covered by your current version range and after updating it in your project the build failed.
This monorepo update includes releases of one or more dependencies which all belong to the babel7 group definition.
babel7 is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
If I run yarn run tests
I get 3 tests failed. Is that normal?
The current commit for 1.5.6 and the github tag were not pushed during last release
We probably should fix our publish because this happens across all our packages
4.35.3
to 4.36.0
.This version is covered by your current version range and after updating it in your project the build failed.
webpack is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
append
option now supports the default placeholders in addition to [url]
"..."
when overriding options.The new version differs by 42 commits.
95d21bb
4.36.0
aa1216c
Merge pull request #9422 from webpack/feature/dot-dot-dot-merge
b3ec775
improve merging of resolve and parsing options
53a5ae2
Merge pull request #9419 from vankop/remove-valid-jsdoc-rule
ab75240
Merge pull request #9413 from webpack/dependabot/npm_and_yarn/ajv-6.10.2
0bdabf4
Merge pull request #9418 from webpack/dependabot/npm_and_yarn/eslint-plugin-jsdoc-15.5.2
f207cdc
remove valid jsdoc rule in favour of eslint-plugin-jsdoc
31333a6
chore(deps-dev): bump eslint-plugin-jsdoc from 15.3.9 to 15.5.2
036adf0
Merge pull request #9417 from webpack/dependabot/npm_and_yarn/eslint-plugin-jest-22.8.0
37d4480
Merge pull request #9411 from webpack/dependabot/npm_and_yarn/simple-git-1.121.0
ce2a183
chore(deps-dev): bump eslint-plugin-jest from 22.7.2 to 22.8.0
0beeb7e
Merge pull request #9391 from vankop/create-hash-typescript
bf1a24a
#9391 resolve super call discussion
bd7d95b
#9391 resolve discussions, AbstractMethodError
4190638
chore(deps): bump ajv from 6.10.1 to 6.10.2
There are 42 commits in total.
See the full diff
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
In the CRAM spec this is identified as SUBEXP 7 int offset, int K subexponential coding
The 1000 genomes cram files on their servers use this codec
This data directory has some files that access the 1000 genomes server. Note that it doesn't contain a refseq track so I am not sure if that is a factor
The module is now compiled with tsc, so incrementally, we can add typescript throughout the codebase for better dev experience for downstream consumers and to catch bugs
Should be able to pass an AbortSignal object to many of these calls to get them to abort.
I was wondering if it was possible to estimate template length for reads in more cases.
The current code seems to estimate smaller template lengths well but seems to struggle a bit on larger size ones
Example cram data attached with a test.js script that outputs the templateLength. Many are undefined except for shorter ones
Samtools view on the cram file with cut -f9 will be the template length too for comparison
@jrobinso Reported that a CRAM file with very few reads could take longer than expected because it ended up fetching the entire chromosome
There are some areas with use of viewAsPairs where some excessive CPU usage is generated. The algorithm for determining which redispatch requests are made is sort of a brute force tool, calling getEntriesForRange for each unmatched read, and then it de-duplicates the results
In one area of a long insert size test file, I find this region of code comes up with https://github.com/GMOD/cram-js/blob/master/src/indexedCramFile.js#L94-L113
-541996 chunks before duplication
-32 after deduplication
This issue also applies to bam-js code
I've tried to export your CRAM and VCF modules with these tools with no luck. I've been able to browserify another VCF module, but I need your CRAM module to be used locally in the browser.
Have you tried this and do you know if this is possible? Thanks.
5.15.3
to 5.16.0
.This version is covered by your current version range and after updating it in your project the build failed.
eslint is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
dfef227
Build: gensite passes rulesMeta to formatter rendering (#11567) (Kevin Partington)c06d38c
Fix: Allow HTML formatter to handle no meta data (#11566) (Ilya Volodin)87a5c03
Docs: func-style
: clarify when allowArrowFunctions
is used (#11548) (Oliver Joseph Ash)bc3e427
Update: pass rule meta to formatters RFC 10 (#11551) (Chris Meyer)b452f27
Chore: Update README to pull in reviewer data (#11506) (Nicholas C. Zakas)afe3d25
Upgrade: Bump js-yaml dependency to fix Denial of Service vulnerability (#11550) (Vernon de Goede)4fe7eb7
Chore: use nyc instead of istanbul (#11532) (Toru Nagashima)f16af43
Chore: fix formatters/table test (#11534) (Toru Nagashima)78358a8
Docs: fix duplicate punctuation in CLI docs (#11528) (Teddy Katz)The new version differs by 11 commits.
ded2f94
5.16.0
ea36e13
Build: changelog update for 5.16.0
dfef227
Build: gensite passes rulesMeta to formatter rendering (#11567)
c06d38c
Fix: Allow HTML formatter to handle no meta data (#11566)
87a5c03
Docs: func-style
: clarify when allowArrowFunctions
is used (#11548)
bc3e427
Update: pass rule meta to formatters RFC 10 (#11551)
b452f27
Chore: Update README to pull in reviewer data (#11506)
afe3d25
Upgrade: Bump js-yaml dependency to fix Denial of Service vulnerability (#11550)
4fe7eb7
Chore: use nyc instead of istanbul (#11532)
f16af43
Chore: fix formatters/table test (#11534)
78358a8
Docs: fix duplicate punctuation in CLI docs (#11528)
See the full diff
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
Recently I have opened an issue on IGV repository: igvteam/igv.js#1805 about a problem loading cram files. Initially, the problem was on the IGV tool side because there was a harded-coded limit related to the fetch size limit. They removed the limit, but now the cram file does not load. IGV developers recommended openning an issue here to report the problem. It seems that cram-js cannot load deep coverage cram files. I can send you the files I am trying to load, if necessary.
1.17.1
to 1.18.0
.This version is covered by your current version range and after updating it in your project the build failed.
prettier is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
Thoughts on supporting the browser File object? If you're not working on it, I might take a crack at it. It should be pretty simple, I think we need to implement an "io" file class for it, then some conditional logic to prevent the app from blowing up if run in node.
I'm trying to do some benchmarking of CRAM-JS and am having some trouble with the example code.
I have three cram files and their corresponding crai indices as well as the reference sequences in separate fasta files. I'd like to use the local reference sequences to read the cram files, but I'm not sure how to change the seqFetch argument to do this. Currently the code just seems to generate a fake sequence of A's and the documentation is not entirely clear on how to use the local sequence file.
Also there might be some bugs with fetch records portion of the code (e.g the await is not inside an async)
const { IndexedCramFile, CramFile, CraiIndex } = require('@gmod/cram')
// open local files
const indexedFile = new IndexedCramFile({
cramPath: require.resolve(`./data/ce#5.tmp.cram`),
index: new CraiIndex({
path: require.resolve(`./data/ce#5.tmp.cram.crai`),
}),
seqFetch: async (seqId, start, end) => {
// seqFetch should return a promise for a string.
// this one just returns a fake sequence of all A's of the proper length
let fakeSeq = ''
for (let i = start; i <= end; i += 1) {
fakeSeq += 'A'
}
return fakeSeq
},
checkSequenceMD5: false,
})
// example of fetching records from an indexed CRAM file.
// NOTE: only numeric IDs for the reference sequence are accepted
const records = await indexedFile.getRecordsForRange(0, 10000, 20000)
records.forEach(record => {
console.log(`got a record named ${record.readName}`)
record.readFeatures.forEach(({ code, pos, refPos, ref, sub }) => {
if (code === 'X')
console.log(
`${
record.readName
} shows a base substitution of ${ref}->${sub} at ${refPos}`,
)
})
})
// can also pass `cramUrl`, and `url` params to open remote URLs
Dear @cmdcolin
We found another bug, if cram´s have been compressed additionally with the lzma
. As the decompression is not available.
Maybe this is similar to the bzip2 issue, and the library just needs to be added? (https://github.com/LZMA-JS/LZMA-JS)
This CRAM file with duplicates removed from @sashalau produced this sequence
The numbers in this list appear to be char codes from the ASCII table that correspond with ACGT
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.