This file contains 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
## ------ download this file: | |
## wget https://gist.githubusercontent.com/sahilseth/01d5e88e431334fcd527/raw -O cloud_formation.sh | |
## bash cloud_formation.sh | |
## run this file | |
## chmod u+x cloud_formation.sh | |
## Assuming you are running this as ubuntu user | |
### --------- Install from apt-get |
This file contains 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/sh | |
#---------------------------------------------------------------- | |
# Daily Backup Routine - Backup and Sync to Dropbox | |
# This script creates a backup using today's date, then deleted | |
# any backups made 3 days ago. If run every day it will ensure | |
# you have a week's worth of backups of your MySQL databases and | |
# zPanel web directories. | |
# | |
# Uses whatever Dropbox account is running on the server. | |
# |
This file contains 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
## a vector of full paths to fastq files (mate 1) | |
fqs1 = rep("myfile.fastq", 20) | |
## a vector of full paths to fastq files (mate 2) | |
fqs2 = rep("myfile.fastq", 20) | |
## full path to bwa | |
bwa_exe = "" | |
bwa_aln_opts = "" | |
bwa_sampe_opts = "" |
This file contains 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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains 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
## make a dir to install | |
sudo mkdir -m 775 /apps | |
chown sahilseth /apps | |
## download to a tmp space | |
cd /tmp | |
wget http://cran.r-project.org/src/base/R-3/R-3.2.2.tar.gz | |
tar -zxvf R-3.2.2.tar.gz | |
cd R-3.2.2 | |
./configure --prefix /apps/R/3.2.2/ --enable-R-shlib --enable-R-profiling \ |
This file contains 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
jobname sub_type prev_jobs dep_type queue memory_reserved walltime cpu_reserved platform jobid | |
create_db serial none none short 2000 1:00 1 local 1 | |
rna2dna1 serial create_db serial short 2000 1:00 1 local 2 | |
echorna1 serial rna2dna1 serial short 2000 1:00 1 local 3 | |
rna2dna2 serial create_db serial short 2000 1:00 1 local 4 | |
echorna2 serial rna2dna2 serial short 2000 1:00 1 local 5 | |
rna2dna3 serial create_db serial short 2000 1:00 1 local 6 | |
echorna3 serial rna2dna3 serial short 2000 1:00 1 local 7 |
This file contains 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
mn=1;mx=10 | |
pb <- txtProgressBar(mn, mx, style = 3) | |
tmp <- lapply(mn:mx, function(x){ | |
pb$up(x) | |
Sys.sleep(0.5) | |
#message("I am doing something...") | |
}) |
This file contains 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
setwd("~/pub/slides/rmeetup_oct2015") | |
# get commands ------------------------------ | |
hello='echo Hello World !' | |
sleep=c('sleep 5', 'sleep 5') | |
tmp=c('cat $RANDOM > tmp1', | |
'cat $RANDOM > tmp2') | |
This file contains 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
df = data.frame(id = 1:10, fname = paste0("name", 1:10)) | |
nms = c(id = "the unique id which does this or that", | |
fname = "first name of a person") | |
attr(df, 'info') <- nms | |
## let is see how this looks | |
attr(df, "info") |
This file contains 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
## add this to bashrc: | |
export PYTHONPATH=$PYTHONPATH:~/lib/python2.7/site-packages/ | |
module load Python | |
python setup.py install --prefix=$HOME |
OlderNewer