New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@geneontology/go-exporter

Package Overview
Dependencies
Maintainers
5
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@geneontology/go-exporter - npm Package Compare versions

Comparing version 0.1.5 to 0.1.6

26

go-exporter.js

@@ -25,5 +25,8 @@ const axios = require('axios');

async get(url) {
/* console.log("url: ", url);*/
return await axios.get(url);
}
async post(url, payload) {
return await axios.post(url, payload);
}

@@ -37,6 +40,18 @@ /**

createPayload(url) {
let params = url.substring(url.indexOf("?") + 1);
let json = { };
let array = params.split("&");
for(let param of array) {
let split = param.split("=");
json[split[0]] = split[1].trim();
}
return json;
}
async getAnnotations(ids) {
let url = this.golrBaseUrl + this.service + this.params + this.docAnnotations + this.docAnnotationsFilter + "&fq=bioentity:(\"" + ids.join("\" \"") + "\")";
let payload = this.createPayload(url);
return this.get(url)
return this.post(url, payload)
.then(response => {

@@ -52,4 +67,5 @@ return response.data.response.docs;

let url = this.golrBaseUrl + this.service + this.params + this.docBioentities + this.docBioentitiesFilter + "&fq=bioentity:(\"" + ids.join("\" \"") + "\")";
let payload = this.createPayload(url);
return this.get(url)
return this.post(url, payload)
.then(response => {

@@ -173,7 +189,7 @@ return response.data.response.docs;

let gaf = goe.toGAF(docs);
console.log("GAF file:\n", gaf);
console.log("GAF file:\n" + gaf);
let docs2 = await goe.getBioentities(ids);
let gpi = goe.toGPI(docs2);
console.log("GPI file:\n", gpi);
console.log("GPI file:\n" + gpi);

@@ -180,0 +196,0 @@ }

2

package.json
{
"name": "@geneontology/go-exporter",
"version": "0.1.5",
"version": "0.1.6",
"description": "Export GO annotations from a GOLr instance to GPAD/GPI/GAF files",

@@ -5,0 +5,0 @@ "main": "go-exporter.js",

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