Mercurial > repos > davidvanzessen > plotting_merged
changeset 50:e6209052aaf4 draft
Uploaded
author | davidvanzessen |
---|---|
date | Mon, 09 Dec 2013 05:46:53 -0500 |
parents | 3da85f1a7f42 |
children | 8f5ab5290c88 |
files | r_wrapper.sh |
diffstat | 1 files changed, 7 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/r_wrapper.sh Mon Dec 09 05:42:56 2013 -0500 +++ b/r_wrapper.sh Mon Dec 09 05:46:53 2013 -0500 @@ -17,23 +17,24 @@ samples=`cat $outputDir/samples.txt` count=1 -echo "<table border='1'><caption><h3>$clonalType</h3></caption>" >> $outputFile +echo "<table border='1'><caption><a href='allUnique.tsv'><h3>$clonalType</h3></a></caption>" >> $outputFile +hasReplicateColumn="$(if head -n 1 $inputFile | grep -q 'Replicate'; then echo 'Yes'; else echo 'No'; fi)" for sample in $samples; do clonalityScore="$(cat $outputDir/ClonalityScore_$sample.csv)" echo "<tr><td colspan='3' height='100'></td></tr>" >> $outputFile echo "<tr><td colspan='3'><h1>$sample</h1></td></tr>" >> $outputFile - + + echo "$hasReplicateColumn" #if its a 'new' merged file with replicate info - if head -n 1 $inputFile | grep -q "Replicate" - then - echo "<tr><td colspan='3'><h2>Clonality Score: $clonalityScore</h2></td></tr>" >> $outputFile + if [[ "$hasReplicateColumn" == "Yes" ]] ; then + echo "<tr><td colspan='3'><a href='clonality_$sample.tsv'><h2>Clonality Score: $clonalityScore</h2></a></td></tr>" >> $outputFile #replicate,reads,squared echo "<tr><td colspan='3'><table border='1'><tr><th>Replicate ID</th><th>Number of Reads</th><th>Reads Squared</th></tr>" >> $outputFile while IFS=, read replicate reads squared do - echo "<tr><td>$replicate</td><td>$reads</td><td>$squared</td></tr>" >> $outputFile + echo "<tr><td><a href='clonality_${sample}_$replicate.tsv'>$replicate</a></td><td>$reads</td><td>$squared</td></tr>" >> $outputFile done < $outputDir/ReplicateReads_$sample.csv #sum of reads and reads squared