Friday, July 11, 2014

Adding letter head to latex file


\documentclass{article}
\usepackage{wallpaper}
\ULCornerWallPaper{1}{letterheadfile.pdf}
\begin{document}
  Your text on the letterhead
\end{document}

via http://tex.stackexchange.com/questions/837/pdf-letterhead-as-document-background

Tuesday, July 1, 2014

R script to query UCSC database - RMySQL



## this will let you install R packages in a directory where you have access
.libPaths('~/Rlibs/') ## create directory ~/Rlibs if it doesnt exist
install.packages(RMySQL)

## call the RMySQL library
library(RMySQL) 

## connect to UCSC server
channel = dbConnect(MySQL(), user="genome", host="genome-mysql.cse.ucsc.edu")

## for a list of tables check url below
## http://hgdownload.cse.ucsc.edu/goldenPath/hg19/database/

## convenience function to run SQL queries
query <- function(...) dbGetQuery(channel, ...)

## use hg19 database in UCSC to use
query("USE hg19")

## see table content
query("DESCRIBE snpArrayAffy5")

## get number of rows from table
print( query("select count(*) from snpArrayAffy6") )

## get number of rows from table
tempo6 = query("select * from snpArrayAffy6")


Contributors

google