https://github.com/romgrk/bioinformatics-parser
Simple nodejs fasta/fastq parser
https://github.com/romgrk/bioinformatics-parser
bioinformatics fasta fastq
Last synced: 6 months ago
JSON representation
Simple nodejs fasta/fastq parser
- Host: GitHub
- URL: https://github.com/romgrk/bioinformatics-parser
- Owner: romgrk
- Created: 2021-02-11T07:29:22.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-08-23T11:26:07.000Z (about 2 years ago)
- Last Synced: 2025-03-28T03:11:11.969Z (6 months ago)
- Topics: bioinformatics, fasta, fastq
- Language: JavaScript
- Homepage:
- Size: 32.2 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# bioinformatics-parser
Simple package to read and write fasta and fastq inputs.
Usage:
```javascript
const { fasta, fastq } = require('bioinformatics-parser')const exampleFasta =
`>strain_1
NNNACGTACGCTAGCTACGTA
CAGCTAGCTAGCTACATNNNN
>strain_2
NNNACGTACGCTAGCTACGTA
CAGCTAGCTAGCTACATNNNN`const { ok, error, result } = fasta.parse(exampleFasta)
console.log(result)
// => [
// { description: 'strain_1',
// data: 'NNNACGTACGCTAGCTACGTACAGCTAGCTAGCTACATNNNN' },
// { ... },
// ]const stringifiedFasta = fasta.stringify(result)
// `exampleFasta` might be different from `stringifiedFasta` because
// the line break length might be different, but the description and
// data stay the same// NOTE: fastq only implements fastq.parse but not fastq.stringify,
// if you need it open an issue.```