Mercurial > repos > davidvanzessen > argalaxy_tools
diff report_clonality/r_wrapper.sh @ 34:f2010de70741 draft
Uploaded
author | davidvanzessen |
---|---|
date | Mon, 18 Jan 2016 07:55:31 -0500 |
parents | ee1bda8c27c8 |
children | d7580295e13b |
line wrap: on
line diff
--- a/report_clonality/r_wrapper.sh Wed Jan 13 05:05:32 2016 -0500 +++ b/report_clonality/r_wrapper.sh Mon Jan 18 07:55:31 2016 -0500 @@ -31,6 +31,7 @@ cp $dir/script.js $outputDir cp $dir/jquery-1.11.0.min.js $outputDir samples=`cat $outputDir/samples.txt` +CIRCOSTOOLS="/home/galaxy/Downloads/circos-master/tools" 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 echo "<table border = 1>" >> $2 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 @@ -47,8 +48,18 @@ echo "productive_counting.txt" echo "<html><head><title>Report on:" >> $outputFile + +mkdir $outputDir/circos +cp $dir/circos/* $outputDir/circos/ for sample in $samples; do echo " $sample" >> $outputFile + + circos_file="$outputDir/${sample}_VD_circos.txt" + echo -e -n "labels$(cat ${circos_file})" > ${circos_file} + #echo -n "labels" > $outputDir/tmp.txt + #cat ${circos_file} >> $outputDir/tmp.txt + #mv $outputDir/tmp.txt ${circos_file} + #cat "${circos_file}" | $CIRCOSTOOLS/tableviewer/bin/parse-table -configfile $dir/circos/parse-table.conf 2>&1 | $CIRCOSTOOLS/tableviewer/bin/make-conf -dir $outputDir/circos/; /home/galaxy/Downloads/circos-master/bin/circos -param karyotype=$outputDir/circos/karyotype.txt -conf $dir/circos/circos.conf 2>&1 done echo "</title><script type='text/javascript' src='jquery-1.11.0.min.js'></script>" >> $outputFile echo "<script type='text/javascript' src='tabber.js'></script>" >> $outputFile @@ -90,7 +101,7 @@ hasReplicateColumn="$(if head -n 1 $inputFile | grep -q 'Replicate'; then echo 'Yes'; else echo 'No'; fi)" echo "$hasReplicateColumn" #if its a 'new' merged file with replicate info -if [[ "$hasReplicateColumn" == "Yes" && "$clonalType" != "none" ]] ; then +if [[ "$hasReplicateColumn" == "Yes" ]] ; then echo "<div class='tabbertab' title='Clonality'><div class='tabber'>" >> $outputFile for sample in $samples; do echo "${clonality_method}" @@ -137,9 +148,10 @@ echo "</div></div>" >> $outputFile fi -hasJunctionData="$(if head -n 1 $inputFile | grep -qE '3V.REGION.trimmed.nt.nb'; then echo 'Yes'; else echo 'No'; fi)" +#hasJunctionData="$(if head -n 1 $inputFile | grep -qE '3V.REGION.trimmed.nt.nb'; then echo 'Yes'; else echo 'No'; fi)" -if [[ "$hasJunctionData" == "Yes" ]] ; then +#if [[ "$hasJunctionData" == "Yes" ]] ; then +if [ -a "$outputDir/junctionAnalysisProd.csv" ] ; then echo "<div class='tabbertab' title='Junction Analysis'>" >> $outputFile echo "<table border='1' id='junction_table'> <caption>Productive</caption><thead><tr><th>Sample</th><th>count</th><th>VH.DEL</th><th>P1</th><th>N1</th><th>P2</th><th>DEL.DH</th><th>DH.DEL</th><th>P3</th><th>N2</th><th>P4</th><th>DEL.JH</th><th>Total.Del</th><th>Total.N</th><th>Total.P</th><thead></tr><tbody>" >> $outputFile while IFS=, read Sample unique VHDEL P1 N1 P2 DELDH DHDEL P3 N2 P4 DELJH TotalDel TotalN TotalP