Mercurial > repos > davidvanzessen > argalaxy_tools
comparison report_clonality/r_wrapper.sh @ 45:ee7209928db8 draft
Uploaded
author | davidvanzessen |
---|---|
date | Wed, 27 Jan 2016 05:35:55 -0500 |
parents | 4c5033eb708f |
children | fee06348bfad |
comparison
equal
deleted
inserted
replaced
44:4c5033eb708f | 45:ee7209928db8 |
---|---|
51 | 51 |
52 mkdir $outputDir/circos | 52 mkdir $outputDir/circos |
53 cp $dir/circos/* $outputDir/circos/ | 53 cp $dir/circos/* $outputDir/circos/ |
54 CIRCOSTOOLS="/data/galaxy/galaxy-dist/toolsheddependencies/circos/0.64/saskia-hiltemann/cg_circos_plots/bbfdd52d64fd/circos-tools-0.21/tools" | 54 CIRCOSTOOLS="/data/galaxy/galaxy-dist/toolsheddependencies/circos/0.64/saskia-hiltemann/cg_circos_plots/bbfdd52d64fd/circos-tools-0.21/tools" |
55 CIRCOSDIR="/data/galaxy/galaxy-dist/toolsheddependencies/circos/0.64/saskia-hiltemann/cg_circos_plots/bbfdd52d64fd/bin/" | 55 CIRCOSDIR="/data/galaxy/galaxy-dist/toolsheddependencies/circos/0.64/saskia-hiltemann/cg_circos_plots/bbfdd52d64fd/bin/" |
56 USECIRCOS="no" | |
57 if [ -d "$CIRCOSDIR" ]; then | |
58 USECIRCOS="yes" | |
59 fi | |
56 sed -i "s%DATA_DIR%$outputDir/circos%" $outputDir/circos/circos.conf | 60 sed -i "s%DATA_DIR%$outputDir/circos%" $outputDir/circos/circos.conf |
57 for sample in $samples; do #output the samples to a file and create the circos plots with the R script output | 61 for sample in $samples; do #output the samples to a file and create the circos plots with the R script output |
58 echo " $sample" >> $outputFile | 62 echo " $sample" >> $outputFile |
63 | |
64 if [[ "$USECIRCOS" == "no" ]]; then | |
65 continue | |
66 fi | |
59 | 67 |
60 circos_file="$outputDir/${sample}_VJ_circos.txt" | 68 circos_file="$outputDir/${sample}_VJ_circos.txt" |
61 echo -e -n "labels$(cat ${circos_file})" > ${circos_file} | 69 echo -e -n "labels$(cat ${circos_file})" > ${circos_file} |
62 cat "${circos_file}" | $CIRCOSTOOLS/tableviewer/bin/parse-table -configfile $dir/circos/parse-table.conf 2>&1 | $CIRCOSTOOLS/tableviewer/bin/make-conf -dir $outputDir/circos/ | 70 cat "${circos_file}" | $CIRCOSTOOLS/tableviewer/bin/parse-table -configfile $dir/circos/parse-table.conf 2>&1 | $CIRCOSTOOLS/tableviewer/bin/make-conf -dir $outputDir/circos/ |
63 #/home/galaxy/Downloads/circos-master/bin/circos -conf $outputDir/circos/circos.conf 2>&1 | 71 #/home/galaxy/Downloads/circos-master/bin/circos -conf $outputDir/circos/circos.conf 2>&1 |
117 done | 125 done |
118 echo "</div></div>" >> $outputFile | 126 echo "</div></div>" >> $outputFile |
119 | 127 |
120 #circos | 128 #circos |
121 | 129 |
122 echo "<div class='tabbertab' title='Circos'><div class='tabber'>" >> $outputFile | 130 if [[ "$USECIRCOS" == "no" ]]; then |
123 for sample in $samples; do | 131 |
124 echo "<div class='tabbertab' title='$sample'><table border='1'><center>" >> $outputFile | 132 echo "<div class='tabbertab' title='Circos'><div class='tabber'>" >> $outputFile |
125 if [[ "$useD" == "true" ]] ; then | 133 for sample in $samples; do |
126 echo "<tr><td>V-D</td><td><img src='circosVD_${sample}.png' width='700' height='700'/></td></tr>" >> $outputFile | 134 echo "<div class='tabbertab' title='$sample'><table border='1'><center>" >> $outputFile |
127 fi | 135 if [[ "$useD" == "true" ]] ; then |
128 echo "<tr><td>V-J</td><td><img src='circosVJ_${sample}.png' width='700' height='700'/></td></tr>" >> $outputFile | 136 echo "<tr><td>V-D</td><td><img src='circosVD_${sample}.png' width='700' height='700'/></td></tr>" >> $outputFile |
129 if [[ "$useD" == "true" ]] ; then | 137 fi |
130 echo "<tr><td>D-J</td><td><img src='circosDJ_${sample}.png' width='700' height='700'/></td></tr>" >> $outputFile | 138 echo "<tr><td>V-J</td><td><img src='circosVJ_${sample}.png' width='700' height='700'/></td></tr>" >> $outputFile |
131 fi | 139 if [[ "$useD" == "true" ]] ; then |
132 echo "<center></table></div>" >> $outputFile | 140 echo "<tr><td>D-J</td><td><img src='circosDJ_${sample}.png' width='700' height='700'/></td></tr>" >> $outputFile |
133 count=$((count+1)) | 141 fi |
134 done | 142 echo "<center></table></div>" >> $outputFile |
135 echo "</div></div>" >> $outputFile | 143 count=$((count+1)) |
136 | 144 done |
145 echo "</div></div>" >> $outputFile | |
146 fi | |
137 #echo "<div class='tabbertab' title='Interactive'><svg class='chart'></svg><script src='http://d3js.org/d3.v3.min.js'></script></div>" >> $outputFile | 147 #echo "<div class='tabbertab' title='Interactive'><svg class='chart'></svg><script src='http://d3js.org/d3.v3.min.js'></script></div>" >> $outputFile |
138 | 148 |
139 hasReplicateColumn="$(if head -n 1 $inputFile | grep -q 'Replicate'; then echo 'Yes'; else echo 'No'; fi)" | 149 hasReplicateColumn="$(if head -n 1 $inputFile | grep -q 'Replicate'; then echo 'Yes'; else echo 'No'; fi)" |
140 echo "$hasReplicateColumn" | 150 echo "$hasReplicateColumn" |
141 #if its a 'new' merged file with replicate info | 151 #if its a 'new' merged file with replicate info |