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
library(GEOquery); library(RankProd); library(mouse4302.db) | |
## Download the data from GEO | |
gse12499 <- getGEO('GSE12499',GSEMatrix=TRUE) | |
e <- exprs(gse12499[[1]]) | |
dim(e) | |
[1] 45101 10 | |
## Rank Product | |
eRP <- RP(e[,c(1:3, 7:10)], cl=c(0,0,0,1,1,1,1), rand = 123) | |
table <- topGene(eRP, cutoff=0.001, method="pfp", logged=TRUE, | |
logbase=2, gene.names=rownames(e)) |
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
source('pubmed_trend.r') | |
sex.pub <- pubmed_trend(search.str = 'Sex+Characteristics[mh] AND Pain[mh]', year.span=1970:2011) | |
analgesic.pub <- pubmed_trend(search.str = 'Sex+Characteristics[mh] AND Analgesics[mh]', year.span=1970:2011) | |
source('plot_bar.r') | |
library("RColorBrewer") | |
pdf(file='sex_pain.pdf', height=8, width=8) | |
par(las=1) | |
colorfunction = colorRampPalette(brewer.pal(9, "Reds")) |
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
plot_bar <- function(x=sex.pub, linecol="royalblue", cols, addArg=TRUE) { | |
bp <- barplot(x, col=cols, add=addArg) | |
fit <- stats::lowess(x, f=1/3) | |
lines(x=bp, fit$y, col=linecol, lwd=3) | |
} |
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
#! /usr/bin/perl -w | |
# | |
# pubmed_trend.pl | |
# | |
# Created by David Ruau on 2011-02-17. | |
# Department of Pediatrics/Div. System Medicine Stanford University. | |
# | |
##################### USAGE ######################### | |
# | |
# Query PubMed with Eutils tools |
NewerOlder