Mercurial > repos > davidvanzessen > argalaxy_tools
comparison report_clonality/r_wrapper.sh @ 44:4c5033eb708f draft
Uploaded
| author | davidvanzessen |
|---|---|
| date | Tue, 26 Jan 2016 10:10:04 -0500 |
| parents | 65134a538c5a |
| children | ee7209928db8 |
comparison
equal
deleted
inserted
replaced
| 43:4d201d22633d | 44:4c5033eb708f |
|---|---|
| 29 cp $dir/tabber.js $outputDir | 29 cp $dir/tabber.js $outputDir |
| 30 cp $dir/style.css $outputDir | 30 cp $dir/style.css $outputDir |
| 31 cp $dir/script.js $outputDir | 31 cp $dir/script.js $outputDir |
| 32 cp $dir/jquery-1.11.0.min.js $outputDir | 32 cp $dir/jquery-1.11.0.min.js $outputDir |
| 33 samples=`cat $outputDir/samples.txt` | 33 samples=`cat $outputDir/samples.txt` |
| 34 #CIRCOSTOOLS="/home/galaxy/Downloads/circos-master/tools" | 34 |
| 35 echo "<html><center><h1><a href='index.html'>Click here for the results</a></h1>Tip: Open it in a new tab (middle mouse button or right mouse button -> 'open in new tab' on the link above)<br />" > $2 | 35 echo "<html><center><h1><a href='index.html'>Click here for the results</a></h1>Tip: Open it in a new tab (middle mouse button or right mouse button -> 'open in new tab' on the link above)<br />" > $2 |
| 36 echo "<table border = 1>" >> $2 | 36 echo "<table border = 1>" >> $2 |
| 37 echo "<thead><tr><th>Sample/Replicate</th><th>All</th><th>Productive</th><th>Unique Productive</th><th>Unproductive</th><th>Unique Unproductive</th></tr></thead>" >> $2 | 37 echo "<thead><tr><th>Sample/Replicate</th><th>All</th><th>Productive</th><th>Unique Productive</th><th>Unproductive</th><th>Unique Unproductive</th></tr></thead>" >> $2 |
| 38 while IFS=, read sample all productive perc_prod productive_unique perc_prod_un unproductive perc_unprod unproductive_unique perc_unprod_un | 38 while IFS=, read sample all productive perc_prod productive_unique perc_prod_un unproductive perc_unprod unproductive_unique perc_unprod_un |
| 39 do | 39 do |
| 49 echo "productive_counting.txt" | 49 echo "productive_counting.txt" |
| 50 echo "<html><head><title>Report on:" >> $outputFile | 50 echo "<html><head><title>Report on:" >> $outputFile |
| 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" | |
| 55 CIRCOSDIR="/data/galaxy/galaxy-dist/toolsheddependencies/circos/0.64/saskia-hiltemann/cg_circos_plots/bbfdd52d64fd/bin/" | |
| 54 sed -i "s%DATA_DIR%$outputDir/circos%" $outputDir/circos/circos.conf | 56 sed -i "s%DATA_DIR%$outputDir/circos%" $outputDir/circos/circos.conf |
| 55 for sample in $samples; do #output the samples to a file and create the circos plots with the R script output | 57 for sample in $samples; do #output the samples to a file and create the circos plots with the R script output |
| 56 echo " $sample" >> $outputFile | 58 echo " $sample" >> $outputFile |
| 57 | 59 |
| 58 circos_file="$outputDir/${sample}_VJ_circos.txt" | 60 circos_file="$outputDir/${sample}_VJ_circos.txt" |
| 59 echo -e -n "labels$(cat ${circos_file})" > ${circos_file} | 61 echo -e -n "labels$(cat ${circos_file})" > ${circos_file} |
| 60 cat "${circos_file}" | $CIRCOSTOOLS/circos-tools-0.20/tools/tableviewer/bin/parse-table -configfile $dir/circos/parse-table.conf 2>&1 | $CIRCOSTOOLS/circos-tools-0.20/tools/tableviewer/bin/make-conf -dir $outputDir/circos/ | 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/ |
| 61 #/home/galaxy/Downloads/circos-master/bin/circos -conf $outputDir/circos/circos.conf 2>&1 | 63 #/home/galaxy/Downloads/circos-master/bin/circos -conf $outputDir/circos/circos.conf 2>&1 |
| 62 circos -conf $outputDir/circos/circos.conf 2>&1 | 64 $CIRCOSDIR/circos -conf $outputDir/circos/circos.conf 2>&1 |
| 63 mv $outputDir/circos/circos.png $outputDir/circosVJ_${sample}.png | 65 mv $outputDir/circos/circos.png $outputDir/circosVJ_${sample}.png |
| 64 | 66 |
| 65 | 67 |
| 66 if [[ "$useD" == "true" ]] ; then | 68 if [[ "$useD" == "true" ]] ; then |
| 67 circos_file="$outputDir/${sample}_VD_circos.txt" | 69 circos_file="$outputDir/${sample}_VD_circos.txt" |
| 68 echo -e -n "labels$(cat ${circos_file})" > ${circos_file} | 70 echo -e -n "labels$(cat ${circos_file})" > ${circos_file} |
| 69 cat "${circos_file}" | $CIRCOSTOOLS/circos-tools-0.20/tools/tableviewer/bin/parse-table -configfile $dir/circos/parse-table.conf 2>&1 | $CIRCOSTOOLS/circos-tools-0.20/tools/tableviewer/bin/make-conf -dir $outputDir/circos/ | 71 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 circos -conf $outputDir/circos/circos.conf 2>&1 | 72 $CIRCOSDIR/circos -conf $outputDir/circos/circos.conf 2>&1 |
| 71 mv $outputDir/circos/circos.png $outputDir/circosVD_${sample}.png | 73 mv $outputDir/circos/circos.png $outputDir/circosVD_${sample}.png |
| 72 | 74 |
| 73 circos_file="$outputDir/${sample}_DJ_circos.txt" | 75 circos_file="$outputDir/${sample}_DJ_circos.txt" |
| 74 echo -e -n "labels$(cat ${circos_file})" > ${circos_file} | 76 echo -e -n "labels$(cat ${circos_file})" > ${circos_file} |
| 75 cat "${circos_file}" | $CIRCOSTOOLS/circos-tools-0.20/tools/tableviewer/bin/parse-table -configfile $dir/circos/parse-table.conf 2>&1 | $CIRCOSTOOLS/circos-tools-0.20/tools/tableviewer/bin/make-conf -dir $outputDir/circos/ | 77 cat "${circos_file}" | $CIRCOSTOOLS/tableviewer/bin/parse-table -configfile $dir/circos/parse-table.conf 2>&1 | $CIRCOSTOOLS/tableviewer/bin/make-conf -dir $outputDir/circos/ |
| 76 circos -conf $outputDir/circos/circos.conf 2>&1 | 78 $CIRCOSDIR/circos -conf $outputDir/circos/circos.conf 2>&1 |
| 77 mv $outputDir/circos/circos.png $outputDir/circosDJ_${sample}.png | 79 mv $outputDir/circos/circos.png $outputDir/circosDJ_${sample}.png |
| 78 | 80 |
| 79 fi | 81 fi |
| 80 done | 82 done |
| 81 echo "</title><script type='text/javascript' src='jquery-1.11.0.min.js'></script>" >> $outputFile | 83 echo "</title><script type='text/javascript' src='jquery-1.11.0.min.js'></script>" >> $outputFile |
