Security News
CISA Brings KEV Data to GitHub
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.
This module provides simple yet flexible FASTA parsing functionality.
npm install fasta-js --save
var fastaParser = require('fasta-js');
var options = {
'definition': 'gi|accession|description',
'delimiter': '|'
};
var fasta = new fastaParser(options);
var sequenceData = `>gi|123456|Sequence A
ATCGATCGATCG
>gi|567890|Sequence B
CATCATCATGGG`
console.log(fasta.parse(sequenceData));
Output
[
{
gi: 'gi',
accession: '123456',
description: 'Sequence A',
sequence: 'ATCGATCGATCG'
},
{
gi: 'gi',
accession: '567890',
description: 'Sequence B',
sequence: 'CATCATCATGGG'
}
]
The options are of course optional. The default values are
{
'definition': 'id',
'delimiter': ''
}
In this case, the entire definition line for the sequence will be saved as the ID for the sequence and no delimiting will take place. If you do decide to pass in the options, then the definition will be the title of each field separated by the delimiter that you specify as the other option.
The parse function does not care whether or not you are giving it DNA/RNA/protein/whatever, but the string of fasta data must have line separations (\n). Sequences can span multiple lines.
You can run npm test
to run the tests after installing the development dependencies.
No future functionality is planned.
This software is released under the MIT license.
FAQs
A general purpose module for parsing FASTA files
The npm package fasta-js receives a total of 4 weekly downloads. As such, fasta-js popularity was classified as not popular.
We found that fasta-js demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.
Security News
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.
Security News
Opengrep forks Semgrep to preserve open source SAST in response to controversial licensing changes.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.