You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
% cat example.mjs
import { IndexedFasta, BgzipIndexedFasta } from '@gmod/indexedfasta'
import { RemoteFile } from 'generic-filehandle'
const t = new IndexedFasta({
filehandle: new RemoteFile('https://raw.githubusercontent.com/samtools/htslib/develop/test/faidx/faidx.fa', { fetch }),
faiFilehandle: new RemoteFile('https://raw.githubusercontent.com/samtools/htslib/develop/test/faidx/faidx.fa.expected.fai', { fetch }),
})
% node example.mjs
/.../node_modules/@gmod/indexedfasta/dist/indexedFasta.js:97
throw new Error('Need to pass filehandle for fasta or path to localfile');
^
Error: Need to pass filehandle for fasta or path to localfile
at new IndexedFasta (/.../node_modules/@gmod/indexedfasta/dist/indexedFasta.js:97:19)
at file:///.../example.mjs:4:11
at ModuleJob.run (node:internal/modules/esm/module_job:194:25)
Node.js v18.15.0
Substituting the parameters "filehandle" and "faiFilehandle" with "fasta" and "fai", respectively, appears to resolve the issue. Is the documentation out of date, or is something else amiss?
The text was updated successfully, but these errors were encountered:
that is a real bug in the docs, thanks for pointing it out! actually fixed other cases of that issue recently but didn't apply to entire readme c028625
The last example in the README (substituting real .fa/.fai files):
indexedfasta-js/README.md
Lines 64 to 73 in a1213b1
Results in the error
Substituting the parameters "filehandle" and "faiFilehandle" with "fasta" and "fai", respectively, appears to resolve the issue. Is the documentation out of date, or is something else amiss?
The text was updated successfully, but these errors were encountered: