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/bash | |
# usage: refdiff.sh <h37>.bed <hg19>.bed | |
bedtools getfasta -fi /resources/h37/human_g1k_v37.fasta -bed $1 -fo - | sed -e 's/MT/M/' | tr '[:lower:]' '[:upper:]' > tmp.h37.fasta | |
bedtools getfasta -fi /resources/hg19/ucsc.hg19.fasta -bed $2 -fo - | sed -e 's/chr//' | tr '[:lower:]' '[:upper:]' > tmp.hg19.fasta | |
diff -u tmp.h*.fasta | |
rm tmp.h*.fasta |
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/bash | |
source /etc/lsb-release | |
echo "deb http://r.meteo.uni.wroc.pl/bin/linux/ubuntu ${DISTRIB_CODENAME}/" > /etc/apt/sources.list.d/cran.list | |
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E084DAB9 | |
apt-get update | |
apt-get upgrade -y | |
apt-get install -y r-cran-dbi libcurl4-openssl-dev libxml2-dev libjpeg62 |
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
source("http://bioconductor.org/biocLite.R") | |
biocLite() | |
biocLite('AnnotationForge') | |
biocLite(c('illuminaio', 'beadarray', 'minfi', 'minfiData', 'limma', 'ChAMP', 'ChAMPdata')) | |
biocLite('IlluminaDataTestFiles') |
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/bash | |
#usage: $0 <prefix> <number of parts> | |
#eg: $0 nt 17 | |
# Download blast db form NCBI | |
for i in $(seq -f '%02.f' 0 $2); do | |
wget ftp://ftp.ncbi.nlm.nih.gov/blast/db/${1}.${i}.tar.gz | |
wget ftp://ftp.ncbi.nlm.nih.gov/blast/db/${1}.${i}.tar.gz.md5 | |
done |
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/bash | |
number_of_jobs=4 | |
# Opts for fast blasting, http://www.biostars.org/p/16425/#16431 |
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
source("http://bioconductor.org/biocLite.R") | |
biocLite(); | |
biocLite("aCGH"); | |
source("http://aroma-project.org/hbLite.R"); | |
hbInstall("aroma.affymetrix"); | |
install.packages("ggplot2") | |
install.packages("gplots") |
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/bash | |
echo "track name=\"$(basename $1)\" description=\"hydra output\" useScore=0 colorByStrand=255,0,0 0,0,255 gffTags=on" | |
awk -F '\t' '{ \ | |
gsub("+", "forward", $9); \ | |
gsub("-", "reverse", $9); \ | |
print $1 FS $2 FS $3 FS "Name=" $7 ";Strand=" $9 ";numMapping=" $16 FS FS $9; }' $1 | |
awk -F '\t' '{ | |
gsub("+", "forward", $10); \ | |
gsub("-", "reverse", $10); \ |
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/bash | |
# Unzip files | |
for file in *.zip; do |
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/bash | |
echo -e "#CHR\tBP1\tBP2\tID" | |
awk -F '\t' '{ print $1 FS $2+1 FS $3 FS NR }' | sed -e 's/^\([0-9]\+\)/chr\1/g' |
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
bedtools sort -i foo.bed | bedtools merge -i - -nms | sed -e 's/\r//g' | awk -F '\t' '{ split($4, name, "."); print $1 FS $2 FS $3 FS name[1] }' |
OlderNewer