#What's the easiest way to extract license info from PMC
As a test, play with a 50-paper request from PMC
library(rentrez)
search <- entrez_search(db="pmc", term="Tetrahymena", retmax=50)
#What's the easiest way to extract license info from PMC
As a test, play with a 50-paper request from PMC
library(rentrez)
search <- entrez_search(db="pmc", term="Tetrahymena", retmax=50)
x <- seq(0,5,0.05) | |
plot(x, dgamma(x, shape=10, scale=0.1), type='l') | |
lines(x, dgamma(x, shape=2, scale=0.5), col='red') | |
lines(x, dgamma(x, shape=1, scale=1), col='blue') |
#!/usr/bin/env python | |
import sys | |
import subprocess | |
import collections | |
import random | |
from StringIO import StringIO | |
from Bio import SeqIO |
double NormalMADensity(std::vector<double> obs, double a, double Va, double Ve, double Ut, bool log){ | |
//starting values for prob and res are for special case of k=0 | |
int n = obs.size(); | |
std::vector<double> res (n, 0.0); | |
double running_prob = exp(-Ut); | |
for(size_t i = 0; i< n; i++){ | |
res.push_back( (exp(-(pow(obs[i],2)/(2*Ve))) / (sqrt(2*M_PI) * sqrt(Ve))) * running_prob ) ; | |
} | |
uint64_t kfac = 1; | |
uint16_t k= 1; |
<p><span class="MathJax_Preview"></span><div class="MathJax_Display" role="textbox" aria-readonly="true" style="text-align: center;"><span class="MathJax" id="MathJax-Element-18-Frame"><nobr><span class="math" id="MathJax-Span-1456" style="width: 13.316em; display: inline-block;"><span style="display: inline-block; position: relative; width: 11.964em; height: 0px; font-size: 111%;"><span style="position: absolute; clip: rect(-0.148em 1000.003em 3.606em -0.398em); top: -2.25em; left: 0.003em;"><span class="mrow" id="MathJax-Span-1457"><span class="munderover" id="MathJax-Span-1458"><span style="display: inline-block; position: relative; width: 1.454em; height: 0px;"><span style="position: absolute; clip: rect(2.655em 1000.003em 4.357em -0.398em); top: -3.751em; left: 0.003em;"><span class="mo" id="MathJax-Span-1459" style="font-family: MathJax_Size2; vertical-align: 0.003em;">∑</span><span style="display: inline-block; width: 0px; height: 3.756em;"></span></span><span style="position: absolute; clip: rect(1.75 |
library(ggplot2) | |
library(grid) | |
make_normal_cont <- function(Ea, n=100, steps=11){ | |
Ut <- 0.2/Ea | |
x <- rma_normal(n, Ea, Ea/10, 1e-4, Ut) | |
effect_sizes <- seq(1e-4, Ea * 2, length.out=steps) | |
mus <- seq(Ut - Ut/1.2, Ut *3, length.out=steps) | |
res <- expand.grid(mean_effect = effect_sizes, Ut=mus) | |
res$Lik <- apply(res, 1, function(r) dma_normal(x, a=r[1], Va =r[1]/50, |
#Notes from ipython notebook lab talk
##Introduction
ipython
is an alternative shell for python which is aimed at meeting the needs of interactive/scientific computing. One of it's coolest features is the ipython notebook
, which allows users to combined styled text, fancy looking maths, code and the results of that codes execution.
Although it has "python" in the name, the notebook is not restricted to that programing language. "Magic" functions allow users to execute different languages in an "ipython" notebook, and other languages (including Julia, Haskell and Ruby...) can be the default language of a whole notebook. In fact, the notebook project recently changed its name to jupyter
(from JUlia PYthon and R -- the "languages of open science").
The notebook is especially helpful for recording exploritory/interactive analyses and plots made in bioinformatics/computational biology.
##Install