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

@datagrok-libraries/bio

Package Overview
Dependencies
Maintainers
3
Versions
267
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@datagrok-libraries/bio - npm Package Compare versions

Comparing version 2.8.7 to 2.8.8

2

package.json

@@ -8,3 +8,3 @@ {

"friendlyName": "Datagrok bio library",
"version": "2.8.7",
"version": "2.8.8",
"description": "",

@@ -11,0 +11,0 @@ "dependencies": {

@@ -7,3 +7,2 @@ import * as DG from 'datagrok-api/dg';

private _sequencesArray;
private _columnsParsed;
get descriptionsArray(): string[];

@@ -10,0 +9,0 @@ get sequencesArray(): string[];

@@ -8,17 +8,8 @@ import * as DG from 'datagrok-api/dg';

this._sequencesArray = []; // parsed FASTA sequeces
this._columnsParsed = false;
this._fileContent = fileContent;
this.parseColumns();
}
get descriptionsArray() {
if (this._columnsParsed)
return this._descriptionsArray;
else
throw new Error('Run parseColumns first');
}
get sequencesArray() {
if (this._columnsParsed)
return this._sequencesArray;
else
throw new Error('Run parseColumns first');
}
// private _columnsParsed: boolean = false;
get descriptionsArray() { return this._descriptionsArray; }
get sequencesArray() { return this._sequencesArray; }
/**

@@ -39,3 +30,2 @@ * Helper method to parse a macromolecule from a FASTA file (string)

parseColumns() {
// parse description and content
const regex = /^>(.*)$/gm; // match 'description' lines starting with >

@@ -52,3 +42,3 @@ let startOfSequence = 0;

this._sequencesArray.push(this.parseMacromolecule(startOfSequence, -1));
this._columnsParsed = true;
// this._columnsParsed = true;
}

@@ -61,3 +51,2 @@ /**

importFasta() {
this.parseColumns();
const descriptionsArrayCol = DG.Column.fromStrings('description', this.descriptionsArray);

@@ -74,2 +63,2 @@ const sequenceCol = DG.Column.fromStrings('sequence', this.sequencesArray);

}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmFzdGEtaGFuZGxlci5qcyIsInNvdXJjZVJvb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9yKGZpbGVDb250ZW50OiBzdHJpbmcpIHtcbiAgICB0aGlzLl9maWxlQ29udGVudCA9IGZpbGVDb250ZW50O1xuICAgIHRoaXMucGFyc2VDb2x1bW5zKCk7XG4gIH1cbn1cbiJdfQ==

Sorry, the diff of this file is not supported yet

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