comparison report_clonality/r_wrapper.sh @ 57:33412e85e669 draft

"planemo upload commit 2a9ed3adf321f18047c3746735a5e79a4586798d"
author rhpvorderman
date Wed, 02 Feb 2022 10:50:01 +0000
parents 81b3eb11ed2c
children 4c6df851e262
comparison
equal deleted inserted replaced
56:7ae6b6b5d890 57:33412e85e669
6 clonalType=$4 6 clonalType=$4
7 species=$5 7 species=$5
8 locus=$6 8 locus=$6
9 filterproductive=$7 9 filterproductive=$7
10 clonality_method=$8 10 clonality_method=$8
11
12 ALL_OUTPUTS_ZIP="$outputDir/all_outputs.zip"
11 13
12 dir="$(cd "$(dirname "$0")" && pwd)" 14 dir="$(cd "$(dirname "$0")" && pwd)"
13 useD="false" 15 useD="false"
14 if grep -q "$species.*${locus}D" "$dir/genes.txt" ; then 16 if grep -q "$species.*${locus}D" "$dir/genes.txt" ; then
15 echo "species D region in reference db" 17 echo "species D region in reference db"
332 cat $dir/naive_junction.htm >> $outputFile 334 cat $dir/naive_junction.htm >> $outputFile
333 335
334 echo "</div>" >> $outputFile 336 echo "</div>" >> $outputFile
335 fi 337 fi
336 338
339
340 # Create zip file with all download files
341 # Use 7za as it is packaged in the container already.
342 cd "$outputDir" || exit 1
343
344 7za a -tzip "$ALL_OUTPUTS_ZIP" -- \
345 allUnique.txt VFFrequency.txt VFrequency.txt \
346 JFrequency.txt DReadingFrame.txt CDR3LengthPlot.txt \
347 AAComposition.txt clonalityComplete.txt
348
349 if [[ "$useD" == "true" ]] ; then
350 7za a -tzip "$ALL_OUTPUTS_ZIP" -- \
351 DFFrequency.txt DFrequency.txt
352 fi
353 for sample in $samples; do
354 if [[ "$useD" == "true" ]] ; then
355 7za a -tzip "$ALL_OUTPUTS_ZIP" -- \
356 "HeatmapVD_$sample.txt" "HeatmapDJ_$sample.txt" \
357 "${sample}_VD_circos.txt" "${sample}_DJ_circos.txt"
358 fi
359 7za a -tzip "$ALL_OUTPUTS_ZIP" -- \
360 "HeatmapVJ_$sample.txt" "${sample}_VJ_circos.txt"
361 done
362
363 cd $dir || exit 1
364
337 echo "<div class='tabbertab' title='Downloads'>" >> $outputFile 365 echo "<div class='tabbertab' title='Downloads'>" >> $outputFile
338 echo "<table class='pure-table pure-table-striped'>" >> $outputFile 366 echo "<table class='pure-table pure-table-striped'>" >> $outputFile
339 echo "<thead><tr><th>Description</th><th>Link</th></tr></thead>" >> $outputFile 367 echo "<thead><tr><th>Description</th><th>Link</th></tr></thead>" >> $outputFile
368 echo "<tr><td>All outputs below in a zip file</td><td><a href='$ALL_OUTPUTS_ZIP'>Download</a></td></tr>" >> $outputFile
340 echo "<tr><td>The filtered dataset</td><td><a href='allUnique.txt'>Download</a></td></tr>" >> $outputFile 369 echo "<tr><td>The filtered dataset</td><td><a href='allUnique.txt'>Download</a></td></tr>" >> $outputFile
341 echo "<tr><td colspan='2' style='background-color:#E0E0E0;'>Gene frequencies</td></tr>" >> $outputFile 370 echo "<tr><td colspan='2' style='background-color:#E0E0E0;'>Gene frequencies</td></tr>" >> $outputFile
342 371
343 echo "<tr><td>The dataset used to generate the distribution of V gene families graph</td><td><a href='VFFrequency.txt'>Download</a></td></tr>" >> $outputFile 372 echo "<tr><td>The dataset used to generate the distribution of V gene families graph</td><td><a href='VFFrequency.txt'>Download</a></td></tr>" >> $outputFile
344 if [[ "$useD" == "true" ]] ; then 373 if [[ "$useD" == "true" ]] ; then