Last active
September 17, 2018 19:20
-
-
Save afrendeiro/2ba0d2bb3a5710c51c0f to your computer and use it in GitHub Desktop.
Get static files used in bioinformatics (genomes, indexes, annotations)
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
for GENOME in hg19 mm10 danRer10 | |
do | |
# Static files | |
mkdir -p resources/${GENOME} | |
cd resources/${GENOME} | |
### Genome | |
wget http://hgdownload.cse.ucsc.edu/goldenPath/${GENOME}/bigZips/${GENOME}.2bit | |
twoBitToFa ${GENOME}.2bit ${GENOME}.fa | |
samtools faidx ${GENOME}.fa | |
cd ../.. | |
### Bowtie2 genome index | |
mkdir -p resources/${GENOME}/forBowtie2 | |
cd resources/${GENOME}/forBowtie2 | |
wget ftp://ftp.ccb.jhu.edu/pub/data/bowtie2_indexes/${GENOME}.zip | |
unzip ${GENOME}.zip | |
cd ../../.. | |
### Chromosome sizes | |
cd resources | |
mysql --user=genome --host=genome-mysql.cse.ucsc.edu -A -e \ | |
"select chrom, size from ${GENOME}.chromInfo" | tail -n +2 > ${GENOME}/${GENOME}.chrom-sizes.tsv | |
cd .. | |
### Hisat index | |
mkdir -p resources/${GENOME}/forHisat | |
cd resources/${GENOME}/forHisat | |
wget ftp://ftp.ccb.jhu.edu/pub/data/hisat_indexes/hg19_hisat.tar.gz | |
tar xfz hg19_hisat.tar.gz | |
cd ../../.. | |
### Mappability regions | |
if [ $GENOME == hg19 ] | |
then | |
mkdir -p resources/${GENOME}/mappability | |
cd resources/${GENOME}/mappability | |
for readLength in 24 36 50 | |
do | |
wget http://hgdownload.cse.ucsc.edu/goldenPath/hg19/encodeDCC/wgEncodeMapability/wgEncodeCrgMapabilityAlign${readLength}mer.bigWig | |
bigWigToBedgraph wgEncodeCrgMapabilityAlign${readLength}mer.bigWig wgEncodeCrgMapabilityAlign${readLength}mer.bedgraph | |
awk '$4 == 1 {OFS="\t"; print $1, $2, $3}' wgEncodeCrgMapabilityAlign${readLength}mer.bedgraph > wgEncodeCrgMapabilityAlign${readLength}mer.bed | |
done | |
cd ../../.. | |
fi | |
done | |
# ERCCs | |
mkdir -p resources/ercc | |
cd resources/ercc | |
wget https://tools.lifetechnologies.com/content/sfs/manuals/cms_095047.txt | |
wget https://tools.lifetechnologies.com/content/sfs/manuals/cms_095046.txt | |
cd ../.. | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment