Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bioinformatics-parser

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bioinformatics-parser - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0

17

lib/fasta.js

@@ -8,3 +8,3 @@ "use strict";

exports.reverseComplement = reverseComplement;
exports.fastaToString = fastaToString;
exports.stringify = stringify;
exports.parse = parse;

@@ -22,3 +22,3 @@ exports.isAllowed = isAllowed;

*/
var LINE_LENGTH = 70;
/**

@@ -42,2 +42,3 @@ * @typedef {Object} Fasta

*/
function realignFasta(fasta, sequence) {

@@ -99,3 +100,3 @@ var index = fasta.data.indexOf(sequence);

/**
* @param {Fasta} fasta
* @param {Fasta|Fasta[]} fasta
* @returns {string} fasta file string

@@ -105,4 +106,10 @@ */

function fastaToString(fasta) {
var LINE_LENGTH = 70;
function stringify(fasta) {
if (Array.isArray(fasta)) return fasta.map(function (s) {
return stringifySequence(s);
}).join('\n');
return stringifySequence(fasta);
}
function stringifySequence(fasta) {
var result = '>' + fasta.description + '\n';

@@ -109,0 +116,0 @@ var i;

{
"name": "bioinformatics-parser",
"version": "1.0.0",
"version": "1.1.0",
"description": ".fasta and .fastq parsers",

@@ -5,0 +5,0 @@ "main": "./lib/index.js",

@@ -5,3 +5,5 @@ /*

const LINE_LENGTH = 70
/**

@@ -68,8 +70,12 @@ * @typedef {Object} Fasta

/**
* @param {Fasta} fasta
* @param {Fasta|Fasta[]} fasta
* @returns {string} fasta file string
*/
export function fastaToString(fasta) {
const LINE_LENGTH = 70
export function stringify(fasta) {
if (Array.isArray(fasta))
return fasta.map(s => stringifySequence(s)).join('\n')
return stringifySequence(fasta)
}
function stringifySequence(fasta) {
let result = '>' + fasta.description + '\n'

@@ -76,0 +82,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc