An Alfred workflow for generating markdown tables from your clipboard


October 30, 2015    Alfred Utilities

Generate markdown tables from clipboard content.

Download

Usage

Copy a csv or tsv. The script will attempt to intelligently guess the format. For example, if you copy the table below:

carat   cut color   clarity depth   table   price   x   y   z
0.23    Ideal   E   SI2 61.5    55  326 3.95    3.98    2.43
0.21    Premium E   SI1 59.8    61  326 3.89    3.84    2.31
0.23    Good    E   VS1 56.9    65  327 4.05    4.07    2.31
0.29    Premium I   VS2 62.4    58  334 4.2 4.23    2.63
0.31    Good    J   SI2 63.3    58  335 4.34    4.35    2.75

Then type tbl in alfred and you will see the following:

tbl screen

You can create a table with or without a header. It will be copied to your clipboard as this:

|   carat | cut     | color   | clarity   | depth   |   table |   price |      x |    y |    z |
|--------:|:--------|:--------|:----------|:--------|--------:|--------:|-------:|-----:|-----:|
|    0.23 | Ideal   | E       | SI2       | 61.5    |    55   |     326 |   3.95 | 3.98 | 2.43 |
|    0.21 | Premium | E       | SI1       | 59.8    |    61   |     326 |   3.89 | 3.84 | 2.31 |
|    0.23 | Good    | E       | VS1       | 56.9    |    65   |     327 |   4.05 | 4.07 | 2.31 |
|    0.29 | Premium | I       | VS2       | 62.4    |    58   |     334 |   4.2  | 4.23 | 2.63 |
|    0.31 | Good    | J       | SI2       | 63.3    |    58   |     335 |   4.34 | 4.35 | 2.75 |

And it will render like this:

carat cut color clarity depth table price x y z
0.23 Ideal E SI2 61.5 55 326 3.95 3.98 2.43
0.21 Premium E SI1 59.8 61 326 3.89 3.84 2.31
0.23 Good E VS1 56.9 65 327 4.05 4.07 2.31
0.29 Premium I VS2 62.4 58 334 4.2 4.23 2.63
0.31 Good J SI2 63.3 58 335 4.34 4.35 2.75

Fetch Citations in Google Sheets using pubmed() function


October 29, 2015    Programming  Google Sheets

If you need to fetch pubmed citations in aggregate it can be convenient to do so using pubmed identifiers. I’ve created a pubmed() function that can be added to a google sheet and used to fetch formatted html citations from pubmed. For example, entering the following into a cell:

=pubmed(23149456)

Will return an html-formatted citation:

<p><strong>The heritability of metabolic profiles in newborn twins.</strong><br />Alul FY, Cook DE, Shchelochkov OA, Fleener LG, Berberich SL, Murray JC, Ryckman KK, <br />(2013 Mar) <em>Heredity</em> 110 (3) 253-8</p>

This citations formats nicely as:

The heritability of metabolic profiles in newborn twins.
Alul FY, Cook DE, Shchelochkov OA, Fleener LG, Berberich SL, Murray JC, Ryckman KK,
(2013 Mar) Heredity 110 (3) 253-8

Setup

To implement the function, you’ll need to copy and paste the function below into the script editor and save it as a new project. Then it will become available within your google sheet. The script editor is available through the Tools > Script Editor


An Alfred Workflow for wormbase


July 9, 2015    Alfred Utilities  Wormbase

I have created an Alfred workflow for looking up gene information in wormbase. You can search by wormbase ID (e.g. WBGene00006759) You can use it to search for genes. Returned results will include:

  • Gene identifiers
  • Location
  • Caenorhabditis orthologs
  • Publications

Download the latest version

Usage

Search for Genes
search

Get Gene Information
Get Gene Info


An Alfred Workflow for Codebox


June 25, 2015    Alfred Programming

Codebox is a great program for storing and accessing snippets. It offers a quickbar menu item, but I thought Alfred might offer more functionality. So I wrote a workflow for it.

Download Codebox-Alfred workflow

Important!

The workflow works fairly well, but there are a few caveats. You should not do the following with your codebox libraries:

  • Don’t put spaces into tag, list, or folder names. Use an underscore instead.
  • Don’t nest folders/lists with the same name.

Usage

Set the codebox source using cb_src

set source

Invoke the workflow by typing ff

search directory

Browse tags with ff #<search>
search tags

Search all Snippets: ff <search>

search all


HGNC Search – Instant search of human genes with Alfred


I have put together an Alfred workflow – this one searches the HGNC database for genes! I have converted the text database from the HGNC website and configured it for full text search using sqlite. This allows you to lookup genes by their UCSC, Entrez, Vega, Ensembl, and many other identifiers very quickly.

Download the latest release

Usage

Full text search of the HGNC database

Information and links are provided for individual genes

Feedback

Please provide feedback. Specifically:

  • What other gene IDs should be displayed by default? (You can currently search for any)
  • What other sites would you like to be able to navigate to.
  • Is there additional information that should be folded in that would be useful?