comparison report_clonality/r_wrapper.sh @ 44:1d8728f3ff37 draft

Uploaded
author davidvanzessen
date Fri, 08 Dec 2017 05:47:33 -0500
parents 106275b54470
children 942eea8359fe
comparison
equal deleted inserted replaced
43:2325074a8461 44:1d8728f3ff37
79 if [ -d "/home/galaxy/Anaconda3/bin" ]; then #hopefully temporary fix #or not 79 if [ -d "/home/galaxy/Anaconda3/bin" ]; then #hopefully temporary fix #or not
80 USECIRCOS="yes" 80 USECIRCOS="yes"
81 CIRCOSTOOLS="/home/galaxy/circos/circos-tools-0.22/tools" 81 CIRCOSTOOLS="/home/galaxy/circos/circos-tools-0.22/tools"
82 CIRCOSDIR="/home/galaxy/Anaconda3/bin" 82 CIRCOSDIR="/home/galaxy/Anaconda3/bin"
83 fi 83 fi
84
85 if [ -d "/media/galaxy/data/other_backup/circos/galaxian-circos//bin" ]; then #hopefully temporary fix #or not #really not
86 USECIRCOS="yes"
87 CIRCOSTOOLS="/media/galaxy/data/other_backup/circos/galaxian-circos/tools"
88 CIRCOSDIR="/media/galaxy/data/other_backup/circos/galaxian-circos/bin"
89 fi
84 fi 90 fi
85 91
86 echo "Using Circos: $USECIRCOS" 92 echo "Using Circos: $USECIRCOS"
87 sed -i "s%DATA_DIR%$outputDir/circos%" $outputDir/circos/circos.conf 93 sed -i "s%DATA_DIR%$outputDir/circos%" $outputDir/circos/circos.conf
88 for sample in $samples; do #output the samples to a file and create the circos plots with the R script output 94 for sample in $samples; do #output the samples to a file and create the circos plots with the R script output
92 continue 98 continue
93 fi 99 fi
94 100
95 circos_file="$outputDir/${sample}_VJ_circos.txt" 101 circos_file="$outputDir/${sample}_VJ_circos.txt"
96 echo -e -n "labels$(cat ${circos_file})" > ${circos_file} 102 echo -e -n "labels$(cat ${circos_file})" > ${circos_file}
103 echo "Circos tools command:"
104 echo "cat \"${circos_file}\" | $CIRCOSTOOLS/tableviewer/bin/parse-table -configfile $dir/circos/parse-table.conf 2>&1 | $CIRCOSTOOLS/tableviewer/bin/make-conf -dir $outputDir/circos/"
97 cat "${circos_file}" | $CIRCOSTOOLS/tableviewer/bin/parse-table -configfile $dir/circos/parse-table.conf 2>&1 | $CIRCOSTOOLS/tableviewer/bin/make-conf -dir $outputDir/circos/ 105 cat "${circos_file}" | $CIRCOSTOOLS/tableviewer/bin/parse-table -configfile $dir/circos/parse-table.conf 2>&1 | $CIRCOSTOOLS/tableviewer/bin/make-conf -dir $outputDir/circos/
106 sed -i -- 's%/%:%g' $outputDir/circos/cells.txt
107 echo "Circos command:"
108 echo "$CIRCOSDIR/circos -conf $outputDir/circos/circos.conf 2>&1"
98 $CIRCOSDIR/circos -conf $outputDir/circos/circos.conf 2>&1 109 $CIRCOSDIR/circos -conf $outputDir/circos/circos.conf 2>&1
99 mv $outputDir/circos/circos.png $outputDir/circosVJ_${sample}.png 110 mv $outputDir/circos/circos.png $outputDir/circosVJ_${sample}.png
100 mv $outputDir/circos/circos.svg $outputDir/circosVJ_${sample}.svg 111 mv $outputDir/circos/circos.svg $outputDir/circosVJ_${sample}.svg
101 112
102 113
103 if [[ "$useD" == "true" ]] ; then 114 if [[ "$useD" == "true" ]] ; then
104 circos_file="$outputDir/${sample}_VD_circos.txt" 115 circos_file="$outputDir/${sample}_VD_circos.txt"
105 echo -e -n "labels$(cat ${circos_file})" > ${circos_file} 116 echo -e -n "labels$(cat ${circos_file})" > ${circos_file}
106 cat "${circos_file}" | $CIRCOSTOOLS/tableviewer/bin/parse-table -configfile $dir/circos/parse-table.conf 2>&1 | $CIRCOSTOOLS/tableviewer/bin/make-conf -dir $outputDir/circos/ 117 cat "${circos_file}" | $CIRCOSTOOLS/tableviewer/bin/parse-table -configfile $dir/circos/parse-table.conf 2>&1 | $CIRCOSTOOLS/tableviewer/bin/make-conf -dir $outputDir/circos/
118 sed -i -- 's%/%:%g' $outputDir/circos/cells.txt
107 $CIRCOSDIR/circos -conf $outputDir/circos/circos.conf 2>&1 119 $CIRCOSDIR/circos -conf $outputDir/circos/circos.conf 2>&1
108 mv $outputDir/circos/circos.png $outputDir/circosVD_${sample}.png 120 mv $outputDir/circos/circos.png $outputDir/circosVD_${sample}.png
109 mv $outputDir/circos/circos.svg $outputDir/circosVD_${sample}.svg 121 mv $outputDir/circos/circos.svg $outputDir/circosVD_${sample}.svg
110 122
111 circos_file="$outputDir/${sample}_DJ_circos.txt" 123 circos_file="$outputDir/${sample}_DJ_circos.txt"
112 echo -e -n "labels$(cat ${circos_file})" > ${circos_file} 124 echo -e -n "labels$(cat ${circos_file})" > ${circos_file}
113 cat "${circos_file}" | $CIRCOSTOOLS/tableviewer/bin/parse-table -configfile $dir/circos/parse-table.conf 2>&1 | $CIRCOSTOOLS/tableviewer/bin/make-conf -dir $outputDir/circos/ 125 cat "${circos_file}" | $CIRCOSTOOLS/tableviewer/bin/parse-table -configfile $dir/circos/parse-table.conf 2>&1 | $CIRCOSTOOLS/tableviewer/bin/make-conf -dir $outputDir/circos/
126 sed -i -- 's%/%:%g' $outputDir/circos/cells.txt
114 $CIRCOSDIR/circos -conf $outputDir/circos/circos.conf 2>&1 127 $CIRCOSDIR/circos -conf $outputDir/circos/circos.conf 2>&1
115 mv $outputDir/circos/circos.png $outputDir/circosDJ_${sample}.png 128 mv $outputDir/circos/circos.png $outputDir/circosDJ_${sample}.png
116 mv $outputDir/circos/circos.svg $outputDir/circosDJ_${sample}.svg 129 mv $outputDir/circos/circos.svg $outputDir/circosDJ_${sample}.svg
117 fi 130 fi
118 done 131 done