Skip to content

Instantly share code, notes, and snippets.

Avatar

Luca Pandini lpand

  • Milan – Italy
View GitHub Profile
@lpand
lpand / enrichment_data.json
Last active Aug 29, 2015
Enrichment front-end app data format
View enrichment_data.json
{
"Gene Ontology (GO)": {
"header": {
"type": "annotation",
"columns": ["id", "status", "..."],
"display_names": ["name", "status", "..."]
},
"nodes": [
{ "id": "", "status": "", "start": "", "type": "term" },
{ "id": "", "foo": "", "bar": "", "type": "gene" },
View angular-results-service-promise.js
"use strict";
angular.module("martVisualEnrichment.services", [])
.factory("results",
["$document", "$q", "enrichmentResultsId",
function resultsFactory ($doc, $q, containerId) {
// I'm using a promise such that if we get data with ajax the API won't
// change.
var deffed = $q.defer(),
View angular-pills.js
;(function (angular) {
"use strict";
var app = angular.module("martVisualEnrichment.directives");
/**
*
* This implementation is highly inspired by https://github.com/angular-ui/bootstrap/blob/master/src/tabs/tabs.js
*
View forward.js
function forward (receiver, methods, toProvider) {
methods.forEach(function (methodName) {
receiver[methodName] = function () {
var result = toProvider[methodName].apply(toProvider, arguments);
// for method chaining
return result === toProvider ? this : result;
};
});
return receiver;
View enrichment-network-test.js
var graph = (function (d3) {
"use strict";
return function graph (nodes, edges, options) {
options = options || {};
var container = d3.select(options.container);
var nthTerms = options.showNth || 5;
var margin = options.margin || { top: 20, right: 30, bottom: 20, left: 30 };
var width = (options.width || 1200) - margin.right - margin.left;
View enrichment-network-init.js
var data = {"graphs":{"Gene Ontology (GO)":{"edges":[{"source":"ACE","target":"GO:0048856"},{"source":"AIMP1","target":"GO:0048856"},{"source":"AMHR2","target":"GO:0048856"},{"source":"ANKRD1","target":"GO:0048856"},{"source":"APRT","target":"GO:0048856"},{"source":"ARHGAP26","target":"GO:0048856"},{"source":"ATP7A","target":"GO:0048856"},{"source":"BLNK","target":"GO:0048856"},{"source":"BMP4","target":"GO:0048856"},{"source":"BRAF","target":"GO:0048856"},{"source":"BSG","target":"GO:0048856"},{"source":"CASC5","target":"GO:0048856"},{"source":"CD8A","target":"GO:0048856"},{"source":"CDKL5","target":"GO:0048856"},{"source":"CDKN1B","target":"GO:0048856"},{"source":"CDSN","target":"GO:0048856"},{"source":"CHRND","target":"GO:0048856"},{"source":"COL11A2","target":"GO:0048856"},{"source":"COX7B","target":"GO:0048856"},{"source":"CRYAB","target":"GO:0048856"},{"source":"DNAAF1","target":"GO:0048856"},{"source":"DSP","target":"GO:0048856"},{"source":"FHL1","target":"GO:0048856"},{"source":"FOXN1","target":"GO:0
View hypg.c
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <math.h>
#include <unistd.h>
#include <time.h>
#define MAX 2000
#define UNDEF "NA"
View nt.gml
graph [
node [
id 0
label "0"
pathway [u'Hemostasis']
domain [u'pfam05109']
compartment [u'GO:0001931', u' GO:0005604', u' GO:0005615', u' GO:0005886', u' GO:0005887']
name "SPN"
disease [u'MYL003', u'MNT214', u'WSK001', u'MRG003', u'MYL040', u'BCL009']
]
View .emacs
(add-to-list 'load-path "~/.emacs.d/auto-complete/")
(add-to-list 'load-path "~/.emacs.d/elisp/")
(load-library "mac-keyboard")
(load-library "auto-complete")
(add-to-list 'load-path "~/.emacs.d/elpa/yasnippet-0.8.0")
(add-to-list 'load-path "~/.emacs.d/multiple-cursors/")
(add-to-list 'custom-theme-load-path "~/.emacs.d/themes")
View OverviewResource.java
package com.mediture.truchart.rest.resources;
import java.util.*;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
You can’t perform that action at this time.