Skip to content

Instantly share code, notes, and snippets.

View wwood's full-sized avatar

Ben J Woodcroft wwood

View GitHub Profile
@wwood
wwood / eupathdb_ubiquity0.5.js
Created September 9, 2009 06:52
EuPathDB Ubiquity Scripts
CmdUtils.CreateCommand({
names: ["plasmodb"],
arguments: [{label: "plasmodb_id", nountype: noun_arb_text, role:'object'}],
homepage: "http://gist.github.com/20872",
author: { name: "Ben J. Woodcroft", email: "b.woodcroft@pgrad.unimelb.edu.au"},
contributors: ["Ben J. Woodcroft"],
license: "GPL3",
description: "Go to a PlasmoDB Gene page in a new window",
preview: "Go to a PlasmoDB Gene page in a new window.",
@wwood
wwood / scholar-search.js
Created September 3, 2009 02:08
Google Scholar Ubiquity Plugin (Ubiquity 0.5 compatible) Another copy of http://static.isnotworking.com/scholar-search.html
var noun_type_article = {
_name: "article title",
suggest: function( text, html ) {
var suggestions = [CmdUtils.makeSugg(text)];
return suggestions;
}
}
CmdUtils.CreateCommand({
names: ["scholar"],
@wwood
wwood / pubmed0.5.js
Created September 3, 2009 01:19
A pubmed search plugin for ubiquity that works with Ubiquity 0.5. Inspired by http://hublog.hubmed.org/archives/001747.html
/* This is a template command. */
CmdUtils.CreateCommand({
names: ["pubmed"],
icon: "http://www.ncbi.nlm.nih.gov/favicon.ico",
description: "Searches <a href='http://www.ncbi.nlm.nih.gov/pubmed'>pubmed</a>.",
help: "type 'pubmed something', enter. The something is like searching from the front page of PubMed",
author: { name: "Ben J. Woodcroft", email: "b.woodcroft near pgrad.unimelb.edu.au"},
license: "GPL",
arguments: [{role: 'object', nountype: noun_arb_text}],
execute: function execute(args) {
CmdUtils.CreateCommand({
names: ["amigo", "go"],
arguments: [{label:"GO term query", nountype:noun_arb_text, role:'object'}],
author: { name: "Ben J. Woodcroft", email: "b.woodcroft before pgrad.unimelb.edu.au"},
contributors: ["Ben J. Woodcroft"],
license: "GPL3",
description: "Go to AmiGO search result for your query of GO terms",
preview: "Go to AmiGO search result for your query of GO terms",
execute: function(args) {
@wwood
wwood / entrezUbiquity.js
Created June 18, 2009 02:16
NCBI Entrez Nucleotide Search
CmdUtils.CreateCommand({
names: ["entrez-nucleotide"],
arguments: [{role: 'object', nountype: noun_arb_text, label: 'entrez_id'}],
author: { name: "Ben J. Woodcroft", email: "b.woodcroft@pgrad.unimelb.edu.au"},
contributors: ["Ben J. Woodcroft"],
license: "GPL3",
execute: function(args) {
var urlString = "http://www.ncbi.nlm.nih.gov/sites/entrez?db=nuccore&term="+args.object.text;
Utils.openUrlInBrowser(urlString);
@wwood
wwood / ezproxy.js
Created June 14, 2009 08:52
commands to reload the current page through an EZproxy. Written so that different proxies from different universities to gain access to scholarly articles
CmdUtils.CreateCommand({
DEFAULT_EZPROXY_PREF: "extensions.ubiquity.ezproxy_default",
names: ["set default ezproxy"],
arguments: [{label: "ezproxy_stub", nountype: noun_arb_text, role: 'object'}],
homepage: "http://gist.github.com/129610",
author: { name: "Ben J. Woodcroft", email: "b.woodcroft@pgrad.unimelb.edu.au"},
contributors: ["Ben J. Woodcroft"],
license: "GPL3",
description: "Sets the default proxy. Eg. set-default-ezproxy http://ezproxy.library.uq.edu.au/login?url=",
CmdUtils.CreateCommand({
names: ["life"],
arguments: [{label: "taxon", nountype: noun_arb_text, role: 'object'}],
author: { name: "Ben J. Woodcroft", email: "b.woodcroft@pgrad.unimelb.edu.au"},
contributors: ["Ben J. Woodcroft"],
license: "GPL3",
description: "Go to tolweb.org page in a new window",
preview: "Go to tolweb.org page in a new window.",
execute: function(args) {
# To change this template, choose Tools | Templates
# and open the template in the editor.
module Bio
class Ensembl
# Ensembl species taken from ensembl/modules/Bio/EnsEMBL/Registry.pm
# Ensembl version 52 (December 2009)
# transformed manually to hash form
ENSEMBL_SPECIES_HASH = {'ENSRNO'=>['Rat','Rattus norvegicus'],
'ENSMUS'=>['Mouse','Mus musculus'],
CmdUtils.CreateCommand({
names: ["texmed_pmid"],
arguments: [{role: 'object', nountype: noun_arb_text}],
homepage: "http://www.bioinformatics.org/texmed",
author: { name: "Ben J. Woodcroft", email: "b.woodcroft@pgrad.unimelb.edu.au"},
contributors: ["Ben J. Woodcroft"],
license: "GPL3",
description: "Retrieve the bibtex entry for a pubmed identifier.",
preview: "Retrieve the bibtex entry for a pubmed identifier.",
CmdUtils.CreateCommand({
name: "pfam",
takes: {"pfam_id": noun_arb_text},
author: { name: "Ben J. Woodcroft", email: "b.woodcroft@pgrad.unimelb.edu.au"},
contributors: ["Ben J. Woodcroft"],
license: "GPL3",
description: "Go to a PFAM family page in a new window",
preview: "Go to a PFAM family page in a new window.",
execute: function(plasmodb_id) {