#!/bin/bash #### 05-27-16 #### This is for making batch bigwig load file. Do NOT use for regular bigwig in pipeline. ---------- DIR="/mnt/data1/www/html/Lymphoma_chrmatin" make_bw(){ if [ "$#" -eq 2 ]; then CELL=$1 ## the cell line COLOR=$2 for FILE in ${DIR}/*${CELL}*bw do PREFIX=$(basename $FILE .bw) echo ${PREFIX} NAME="\"${PREFIX}\"" HEADER="track type=bigWig name=${NAME} description=${NAME} visibility=1 color=${COLOR} bigDataUrl=http://128.91.213.129/Lymphoma_chrmatin/${PREFIX}.bw" echo ${HEADER} >> load.txt echo " " >> load.txt done else echo "plese specify cell line and RBG color" fi } #### blak tracks for FL make_bw "FL" "0,0,0" #### blue tracks for MCL make_bw "MCL" "0,0,153" #### red tracks for DLBCL and HGB make_bw "DLBCL" "153,0,0" make_bw "HGB" "153,0,0" #### green tracks for SLL make_bw "SLL" "0,153,0"