Mercurial > repos > davidvanzessen > argalaxy_tools
diff report_clonality/r_wrapper.sh @ 17:da95be204ebc draft
Uploaded
author | davidvanzessen |
---|---|
date | Wed, 21 Dec 2016 05:57:31 -0500 |
parents | 21ca9391a3b7 |
children | 5d11c9139a55 |
line wrap: on
line diff
--- a/report_clonality/r_wrapper.sh Tue Dec 20 09:06:51 2016 -0500 +++ b/report_clonality/r_wrapper.sh Wed Dec 21 05:57:31 2016 -0500 @@ -32,6 +32,7 @@ cp $dir/script.js $outputDir cp $dir/jquery-1.11.0.min.js $outputDir cp $dir/pure-min.css $outputDir +cp $dir/IGH_junctie_analyse.png $outputDir samples=`cat $outputDir/samples.txt` 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 @@ -182,18 +183,26 @@ 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" ]] ; then - echo "<div class='tabbertab' title='Clonality'><div class='tabber'>" >> $outputFile +if [[ "$hasReplicateColumn" == "Yes" && "${clonality_method}" != "none" ]] ; then + if [[ "${clonality_method}" == "boyd" ]] ; then + echo "<div class='tabbertab' title='Clonality'><div class='tabber'>" >> $outputFile + else + echo "<div class='tabbertab' title='Shared Clonal Types'><div class='tabber'>" >> $outputFile + fi + for sample in $samples; do echo "${clonality_method}" if [[ "${clonality_method}" == "old" ]] ; then echo "in old" clonalityScore="$(cat $outputDir/ClonalityScore_$sample.csv)" echo "<div class='tabbertab' title='$sample'><table class='pure-table pure-table-striped'>" >> $outputFile - echo "<thead><tr><th colspan='4'>Clonality Score: $clonalityScore</th></tr></thead>" >> $outputFile + + if [[ "${clonality_method}" == "boyd" ]] ; then + echo "<thead><tr><th colspan='2'>Clonality Score: $clonalityScore</th></tr></thead>" >> $outputFile + fi #replicate,reads,squared - echo "<tr><td>Replicate ID</td><td>Number of Reads</td></tr>" >> $outputFile + echo "<tr><td>Replicate ID</td><td>Number of Sequences</td></tr>" >> $outputFile while IFS=, read replicate reads squared do echo "<tr><td>$replicate</td><td>$reads</td></tr>" >> $outputFile @@ -206,7 +215,7 @@ done < $outputDir/ReplicateSumReads_$sample.csv #overview - echo "<tr><td>Coincidence Type</td><td>Raw Coincidence Freq</td></tr>" >> $outputFile + echo "<tr><td>Number of replicates containing the coincidence</td><td>Number of sequences shared between replicates</td></tr>" >> $outputFile while IFS=, read type count weight weightedCount do if [[ "$type" -eq "1" ]]; then @@ -238,6 +247,8 @@ #if [[ "$hasJunctionData" == "Yes" ]] ; then if [ -a "$outputDir/junctionAnalysisProd_mean.csv" ] ; then echo "<div class='tabbertab' title='Junction Analysis'>" >> $outputFile + echo "<img src='IGH_junctie_analyse.png' />" >> $outputFile + echo "<table class='pure-table pure-table-striped' id='junction_table'> <caption>Productive mean</caption><thead><tr><th>Sample</th><th>count</th><th>V.DEL</th><th>P1</th><th>N1</th><th>P2</th><th>DEL.D</th><th>D.DEL</th><th>P3</th><th>N2</th><th>P4</th><th>DEL.J</th><th>Total.Del</th><th>Total.N</th><th>Total.P</th><th>Median.CDR3</th><thead></tr><tbody>" >> $outputFile while IFS=, read Sample unique VDEL P1 N1 P2 DELD DDEL P3 N2 P4 DELJ TotalDel TotalN TotalP median do