#!/bin/bash gdacsite=http://gdac.broadinstitute.org/runs/stddata__2016_01_28/data/XXXX/20160128 rnaseqfile=gdac.broadinstitute.org_XXXX.Merge_rnaseqv2__illuminahiseq_rnaseqv2__unc_edu__Level_3__RSEM_genes_normalized__data.Level_3.2016012800.0.0.tar.gz clinicalfile=gdac.broadinstitute.org_XXXX.Merge_Clinical.Level_1.2016012800.0.0.tar.gz for gdac in ACC BLCA BRCA CESC CHOL COAD COADREAD DLBC ESCA GBM GBMLGG HNSC KICH KIPAN KIRC KIRP LAML LGG LIHC LUAD LUSC MESO OV PAAD PCPG PRAD READ SARC SKCM STAD STES TGCT THCA THYM UCEC UCS UVM do echo "Processing $gdac" mkdir -pv $gdac cd $gdac gdacurl=${gdacsite//XXXX/$gdac} rnasequrl=${rnaseqfile//XXXX/$gdac} clinicalurl=${clinicalfile//XXXX/$gdac} mkdir -pv RNA-seq cd RNA-seq wget -nv $gdacurl/$rnasequrl tar -zxf $rnasequrl rnaseqdir=${rnasequrl//.tar.gz//} cp $rnaseqdir/$gdac*RSEM*.txt geneexpression_RSEM.txt -vf rm -vf $rnasequrl cd .. mkdir -pv CLINICAL cd CLINICAL wget -nv $gdacurl/$clinicalurl tar -zxf $clinicalurl cp */*clin.merged.txt clinical_merged.txt rm -vf $clinicalurl cd .. echo "Completed $gdac" echo "======================================>" cd ../ done