Security News
UK Officials Consider Banning Ransomware Payments from Public Entities
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.
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 6 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
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.
Security News
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.
Research
Security News
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.