This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
QUERY="Inositol pyrophosphate dynamics reveals control of the yeast PHO starvation program through 1,5-IP8 and the SPX domain of Pho81" | |
curl --get --data-urlencode "query.bibliographic=${QUERY}" "https://api.crossref.org/works/?filter=type:journal-article,type:posted-content&rows=1" | jq '. | { title: .message.items[0].title[0], abstract: .message.items[0].abstract, doi: .message.items[0].DOI, publisher: .message.items[0].publisher }' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
certbot certonly --webroot --webroot-path=<webroot path> --cert-name <certname> -d <domain> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Pass the env-vars to MYCOMMAND | |
eval $(egrep -v '^#' .env | xargs) MYCOMMAND | |
# … or ... | |
# Export the vars in .env into your shell: | |
export $(egrep -v '^#' .env | xargs) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<opml version="1.0"> | |
<head> | |
<title>Ross's academic journal RSS feed subscriptions</title> | |
</head> | |
<body> | |
<outline text="General Biology Journals" title="General Biology Journals"> | |
<outline type="rss" text="BioEssays" title="BioEssays" xmlUrl="http://onlinelibrary.wiley.com/rss/journal/10.1002/(ISSN)1521-1878" htmlUrl="http://onlinelibrary.wiley.com/resolve/doi?DOI=10.1002%2F%28ISSN%291521-1878"/> | |
<outline type="rss" text="Biol J Linn Soc" title="Biol J Linn Soc" xmlUrl="http://onlinelibrary.wiley.com/rss/journal/10.1111/(ISSN)1095-8312" htmlUrl="http://onlinelibrary.wiley.com/resolve/doi?DOI=10.1111%2F%28ISSN%291095-8312"/> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
dflag= | |
iflag= | |
oflag= | |
while getopts 'dio:' OPTION | |
do | |
case $OPTION in | |
d) dflag=1 | |
;; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Find row and print columns in tab-delimited file | |
#tax_id GeneID PubMed_ID | |
tax_id=9606 | |
GeneID=9518 | |
grep -Ei "^$tax_id\t$GeneID\t[0-9.]+$" ./data/gene2pubmed > result.txt |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const TIMEOUT = 5000; | |
const promiseTimeout = delay => new Promise( ( resolve, reject ) => setTimeout( () => reject( new Error('fake timeout') ), delay ) ); | |
const doSomethingAsync = ( ) => { | |
return Promise.resolve() | |
.then( () => promiseTimeout( TIMEOUT ) ); | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Probability of GO term (GeneSet) in gene hits (Hits) from a screen | |
# Initialize our relevant variables | |
nBackground <- 407 # Total genes screened | |
nGeneSet <- 18 # Genes in GO term that are in the bachground | |
nHits <- 60 # Genes enriched in screen in background | |
nOutsideGeneSet <- nBackground - nGeneSet # Genes not in GeneSet but in background | |
nQueryPathway <- 0:nGeneSet # Overlap between query genes ('Hits') and GO term (in background) | |
# Use the dhyper built-in function for hypergeometric probability |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// const request = require('request'); | |
// const Promise = require('promise-simple'); | |
// const csv = require('csvtojson'); | |
// const fs = require('fs'); | |
// const _ = require('lodash'); | |
const enrichment = function (query) { | |
var promise = new Promise(function(resolve, reject) { | |
// do a thing, possibly async, then… | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var request = require('request'); | |
var formData = { | |
"output": "mini", | |
"organism": "hsapiens", | |
"significant": "1", | |
"sort_by_structure": "1", | |
"ordered_query": "0", | |
"as_ranges": "0", | |
"no_iea": "1", |
NewerOlder