Repository 'argalaxy_tools'
hg clone https://toolshed.g2.bx.psu.edu/repos/davidvanzessen/argalaxy_tools

Changeset 53:0ef7f80ea061 (2021-02-25)
Previous changeset 52:124b7fd92a3e (2021-02-25) Next changeset 54:81b3eb11ed2c (2021-11-16)
Commit message:
Uploaded
modified:
.gitattributes
complete.sh
experimental_design/experimental_design.sh
igblast/igblast.sh
imgt_loader/imgt_loader.sh
report_clonality/r_wrapper.sh
b
diff -r 124b7fd92a3e -r 0ef7f80ea061 .gitattributes
--- a/.gitattributes Thu Feb 25 13:36:15 2021 +0000
+++ b/.gitattributes Thu Feb 25 13:39:50 2021 +0000
b
@@ -1,2 +1,4 @@
 # Auto detect text files and perform LF normalization
 * text=auto
+# Convert to LF line endings on checkout.
+*.sh text eol=lf
b
diff -r 124b7fd92a3e -r 0ef7f80ea061 complete.sh
--- a/complete.sh Thu Feb 25 13:36:15 2021 +0000
+++ b/complete.sh Thu Feb 25 13:39:50 2021 +0000
[
@@ -1,72 +1,72 @@
-#!/bin/bash
-set -e
-inputFiles=($1)
-outputDir=$3
-outputFile=$3/index.html #$1
-clonalType=$4
-species=$5
-locus=$6
-filterproductive=$7
-clonality_method=$8
-
-html=$2
-dir="$(cd "$(dirname "$0")" && pwd)"
-array=("$@")
-echo "<html><h3>Progress</h3><table><tr><td>info</td></tr>" > $html
-echo "<tr><td>-----------------------------------</td></tr>" >> $html
-
-#mkdir $PWD/igblastdatabase
-#unzip $dir/database.zip -d $PWD/igblastdatabase/
-#export IGDATA=$PWD/igblastdatabase/
-
-echo "python: `which python`"
-echo "R: `which R`"
-echo "Rscript: `which Rscript`"
-
-id=""
-forwardSlash="/"
-mergerInput=()
-echo "Before loop"
-count=1
-for current in "${inputFiles[@]}"
-do
- if [[ "$current" != *"$forwardSlash"* ]]; then
- id="$current"
- mergerInput+=($id)
- count=1
- continue
- fi
- echo "working on $current"
- fileName=$(basename $current)
- fileName="${fileName%.*}"
- parsedFileName="$PWD/$fileName.parsed"
- f=$(file $current)
- zipType="Zip archive"
- zxType="XZ compressed data"
- echo "filetype of ${id}: $f"
-   if [[ "$f" == *"$zipType"* ]] || [[ "$f" == *"$zxType"* ]]
- then
- echo "<tr><td>Sample $count of patient $id is an archive file, using IMGT Loader</td></tr>" >> $html
-    fileName=$(basename $current)
- bash ${dir}/imgt_loader/imgt_loader.sh $current $parsedFileName "${fileName}"
- else
- echo "<tr><td>Sample $count of patient $id is not a zip file so assuming fasta/fastq, using igBLASTn</td></tr>" >> $html
- bash ${dir}/igblast/igblast.sh $current "$species" $locus $parsedFileName
- fi
- mergerInput+=($parsedFileName)
- count=$((count+1))
-done
-
-echo "<tr><td>-----------------------------------</td></tr>" >> $html
-echo "<tr><td>merging</td></tr>" >> $html
-
-bash $dir/experimental_design/experimental_design.sh ${mergerInput[*]} $PWD/merged.txt
-
-echo "<tr><td>done</td></tr>" >> $html
-echo "<tr><td>-----------------------------------</td></tr>" >> $html
-echo "<tr><td>plotting</td></tr>" >> $html
-
-echo "after ED"
-
-bash $dir/report_clonality/r_wrapper.sh $PWD/merged.txt $2 $outputDir $clonalType "$species" "$locus" $filterproductive $clonality_method
-
+#!/bin/bash
+set -e
+inputFiles=($1)
+outputDir=$3
+outputFile=$3/index.html #$1
+clonalType=$4
+species=$5
+locus=$6
+filterproductive=$7
+clonality_method=$8
+
+html=$2
+dir="$(cd "$(dirname "$0")" && pwd)"
+array=("$@")
+echo "<html><h3>Progress</h3><table><tr><td>info</td></tr>" > $html
+echo "<tr><td>-----------------------------------</td></tr>" >> $html
+
+#mkdir $PWD/igblastdatabase
+#unzip $dir/database.zip -d $PWD/igblastdatabase/
+#export IGDATA=$PWD/igblastdatabase/
+
+echo "python: `which python`"
+echo "R: `which R`"
+echo "Rscript: `which Rscript`"
+
+id=""
+forwardSlash="/"
+mergerInput=()
+echo "Before loop"
+count=1
+for current in "${inputFiles[@]}"
+do
+ if [[ "$current" != *"$forwardSlash"* ]]; then
+ id="$current"
+ mergerInput+=($id)
+ count=1
+ continue
+ fi
+ echo "working on $current"
+ fileName=$(basename $current)
+ fileName="${fileName%.*}"
+ parsedFileName="$PWD/$fileName.parsed"
+ f=$(file $current)
+ zipType="Zip archive"
+ zxType="XZ compressed data"
+ echo "filetype of ${id}: $f"
+   if [[ "$f" == *"$zipType"* ]] || [[ "$f" == *"$zxType"* ]]
+ then
+ echo "<tr><td>Sample $count of patient $id is an archive file, using IMGT Loader</td></tr>" >> $html
+    fileName=$(basename $current)
+ bash ${dir}/imgt_loader/imgt_loader.sh $current $parsedFileName "${fileName}"
+ else
+ echo "<tr><td>Sample $count of patient $id is not a zip file so assuming fasta/fastq, using igBLASTn</td></tr>" >> $html
+ bash ${dir}/igblast/igblast.sh $current "$species" $locus $parsedFileName
+ fi
+ mergerInput+=($parsedFileName)
+ count=$((count+1))
+done
+
+echo "<tr><td>-----------------------------------</td></tr>" >> $html
+echo "<tr><td>merging</td></tr>" >> $html
+
+bash $dir/experimental_design/experimental_design.sh ${mergerInput[*]} $PWD/merged.txt
+
+echo "<tr><td>done</td></tr>" >> $html
+echo "<tr><td>-----------------------------------</td></tr>" >> $html
+echo "<tr><td>plotting</td></tr>" >> $html
+
+echo "after ED"
+
+bash $dir/report_clonality/r_wrapper.sh $PWD/merged.txt $2 $outputDir $clonalType "$species" "$locus" $filterproductive $clonality_method
+
b
diff -r 124b7fd92a3e -r 0ef7f80ea061 experimental_design/experimental_design.sh
--- a/experimental_design/experimental_design.sh Thu Feb 25 13:36:15 2021 +0000
+++ b/experimental_design/experimental_design.sh Thu Feb 25 13:39:50 2021 +0000
b
@@ -1,4 +1,4 @@
-
-dir="$(cd "$(dirname "$0")" && pwd)"
-
-Rscript --verbose $dir/experimental_design.r $@ 2>&1
+
+dir="$(cd "$(dirname "$0")" && pwd)"
+
+Rscript --verbose $dir/experimental_design.r $@ 2>&1
b
diff -r 124b7fd92a3e -r 0ef7f80ea061 igblast/igblast.sh
--- a/igblast/igblast.sh Thu Feb 25 13:36:15 2021 +0000
+++ b/igblast/igblast.sh Thu Feb 25 13:39:50 2021 +0000
[
@@ -1,28 +1,28 @@
-set -e
-
-dir="$(cd "$(dirname "$0")" && pwd)"
-
-input=$1
-species=$2
-locus=$3
-output=$4
-
-declare -A speciesdict
-
-speciesdict=(["Rattus norvegicus functional"]="rat" ["Rattus norvegicus non-functional"]="rat" ["Oryctolagus cuniculus functional"]="rabbit" ["Oryctolagus cuniculus non-functional"]="rabbit" ["Mus musculus functional"]="mouse" ["Mus musculus non-functional"]="mouse" ["Homo sapiens functional"]="human" ["Homo sapiens non-functional"]="human" ["Macaca mulatta non-functional"]="rhesus_monkey" ["Macaca mulatta functional"]="rhesus_monkey")
-
-echo "Species: $species ${speciesdict[$species]}"
-
-species="${speciesdict[$species]}"
-
-if [ "$species" == "" ]
-then
- >&2 echo "Species not possible with igBLASTn, use IMGT"
- exit 1
-fi
-
-echo "$input $species $locus $output"
-
-java -Xmx16G -jar $IGBLASTWRP/igblastwrp.jar -p 4 -S $species -R $locus ${input} $PWD/blasted_output 2>&1
-
-Rscript --verbose $dir/igblast.r "$PWD/blasted_output.L2.txt" "$output" 2>&1
+set -e
+
+dir="$(cd "$(dirname "$0")" && pwd)"
+
+input=$1
+species=$2
+locus=$3
+output=$4
+
+declare -A speciesdict
+
+speciesdict=(["Rattus norvegicus functional"]="rat" ["Rattus norvegicus non-functional"]="rat" ["Oryctolagus cuniculus functional"]="rabbit" ["Oryctolagus cuniculus non-functional"]="rabbit" ["Mus musculus functional"]="mouse" ["Mus musculus non-functional"]="mouse" ["Homo sapiens functional"]="human" ["Homo sapiens non-functional"]="human" ["Macaca mulatta non-functional"]="rhesus_monkey" ["Macaca mulatta functional"]="rhesus_monkey")
+
+echo "Species: $species ${speciesdict[$species]}"
+
+species="${speciesdict[$species]}"
+
+if [ "$species" == "" ]
+then
+ >&2 echo "Species not possible with igBLASTn, use IMGT"
+ exit 1
+fi
+
+echo "$input $species $locus $output"
+
+java -Xmx16G -jar $IGBLASTWRP/igblastwrp.jar -p 4 -S $species -R $locus ${input} $PWD/blasted_output 2>&1
+
+Rscript --verbose $dir/igblast.r "$PWD/blasted_output.L2.txt" "$output" 2>&1
b
diff -r 124b7fd92a3e -r 0ef7f80ea061 imgt_loader/imgt_loader.sh
--- a/imgt_loader/imgt_loader.sh Thu Feb 25 13:36:15 2021 +0000
+++ b/imgt_loader/imgt_loader.sh Thu Feb 25 13:39:50 2021 +0000
[
@@ -1,74 +1,74 @@
-#!/bin/bash
-input=$1
-output=$2
-name=$3
-dir="$(cd "$(dirname "$0")" && pwd)"
-mkdir -p $PWD/$name/files
-f=$(file $input)
-zip7Type="7-zip archive"
-tarType="tar archive"
-bzip2Type="bzip2 compressed"
-gzipType="gzip compressed"
-zipType="Zip archive"
-rarType="RAR archive"
-zxType="XZ compressed data"
-
-if [[ "$f" == *"$zip7Type"* ]]; then
- echo "7-zip"
- echo "Trying: 7za e $input -o$PWD/files/"
- 7za e $input -o$PWD/$name/files
-fi
-
-if [[ "$f" == *"$tarType"* ]]
-then
- echo "tar archive"
- echo "Trying: tar xvf $input -C $PWD/files/"
- tar -xvf $input -C $PWD/$name/files
-fi
-
-if [[ "$f" == *"$bzip2Type"* ]]
-then
- echo "bzip2 compressed data"
- echo "Trying: tar jxf $input -C $PWD/files/"
- tar -jxf $input -C $PWD/$name/files
-fi
-
-if [[ "$f" == *"$gzipType"* ]]
-then
- echo "gzip compressed data"
- echo "Trying: tar xvzf $input -C $PWD/files/"
- tar -xvzf $input -C $PWD/$name/files
-fi
-
-if [[ "$f" == *"$zipType"* ]]
-then
- echo "Zip archive"
- echo "Trying: unzip $input -d $PWD/files/"
- unzip $input -d $PWD/$name/files > $PWD/unziplog.log
-fi
-
-if [[ "$f" == *"$rarType"* ]]
-then
- echo "RAR archive"
- echo "Trying: unrar e $input $PWD/files/"
- unrar e $input $PWD/$name/files
-fi
-
-if [[ "$f" == *"$zxType"* ]]
-then
- echo "xz compressed data"
- echo "Trying: tar -xJf $input -C $PWD/files/"
- tar xJf $input -C $PWD/$name/files
-fi
-find $PWD/$name/files -iname "1_*" -exec cat {} + > $PWD/$name/summ.txt
-find $PWD/$name/files -iname "3_*" -exec cat {} + > $PWD/$name/sequences.txt
-find $PWD/$name/files -iname "4_*" -exec cat {} + > $PWD/$name/gapped_aa.txt
-find $PWD/$name/files -iname "5_*" -exec cat {} + > $PWD/$name/aa.txt
-find $PWD/$name/files -iname "6_*" -exec cat {} + > $PWD/$name/junction.txt
-
-echo "summ.txt `cat $PWD/$name/summ.txt | wc -l`"
-echo "aa.txt `cat $PWD/$name/aa.txt | wc -l`"
-
-#python $dir/imgt_loader.py --summ $PWD/$name/summ.txt --aa $PWD/$name/aa.txt --junction $PWD/$name/junction.txt --output $output
-
-Rscript --verbose $dir/imgt_loader.r $PWD/$name/summ.txt $PWD/$name/sequences.txt $PWD/$name/aa.txt $PWD/$name/junction.txt $PWD/$name/gapped_aa.txt $output 2>&1
+#!/bin/bash
+input=$1
+output=$2
+name=$3
+dir="$(cd "$(dirname "$0")" && pwd)"
+mkdir -p $PWD/$name/files
+f=$(file $input)
+zip7Type="7-zip archive"
+tarType="tar archive"
+bzip2Type="bzip2 compressed"
+gzipType="gzip compressed"
+zipType="Zip archive"
+rarType="RAR archive"
+zxType="XZ compressed data"
+
+if [[ "$f" == *"$zip7Type"* ]]; then
+ echo "7-zip"
+ echo "Trying: 7za e $input -o$PWD/files/"
+ 7za e $input -o$PWD/$name/files
+fi
+
+if [[ "$f" == *"$tarType"* ]]
+then
+ echo "tar archive"
+ echo "Trying: tar xvf $input -C $PWD/files/"
+ tar -xvf $input -C $PWD/$name/files
+fi
+
+if [[ "$f" == *"$bzip2Type"* ]]
+then
+ echo "bzip2 compressed data"
+ echo "Trying: tar jxf $input -C $PWD/files/"
+ tar -jxf $input -C $PWD/$name/files
+fi
+
+if [[ "$f" == *"$gzipType"* ]]
+then
+ echo "gzip compressed data"
+ echo "Trying: tar xvzf $input -C $PWD/files/"
+ tar -xvzf $input -C $PWD/$name/files
+fi
+
+if [[ "$f" == *"$zipType"* ]]
+then
+ echo "Zip archive"
+ echo "Trying: unzip $input -d $PWD/files/"
+ unzip $input -d $PWD/$name/files > $PWD/unziplog.log
+fi
+
+if [[ "$f" == *"$rarType"* ]]
+then
+ echo "RAR archive"
+ echo "Trying: unrar e $input $PWD/files/"
+ unrar e $input $PWD/$name/files
+fi
+
+if [[ "$f" == *"$zxType"* ]]
+then
+ echo "xz compressed data"
+ echo "Trying: tar -xJf $input -C $PWD/files/"
+ tar xJf $input -C $PWD/$name/files
+fi
+find $PWD/$name/files -iname "1_*" -exec cat {} + > $PWD/$name/summ.txt
+find $PWD/$name/files -iname "3_*" -exec cat {} + > $PWD/$name/sequences.txt
+find $PWD/$name/files -iname "4_*" -exec cat {} + > $PWD/$name/gapped_aa.txt
+find $PWD/$name/files -iname "5_*" -exec cat {} + > $PWD/$name/aa.txt
+find $PWD/$name/files -iname "6_*" -exec cat {} + > $PWD/$name/junction.txt
+
+echo "summ.txt `cat $PWD/$name/summ.txt | wc -l`"
+echo "aa.txt `cat $PWD/$name/aa.txt | wc -l`"
+
+#python $dir/imgt_loader.py --summ $PWD/$name/summ.txt --aa $PWD/$name/aa.txt --junction $PWD/$name/junction.txt --output $output
+
+Rscript --verbose $dir/imgt_loader.r $PWD/$name/summ.txt $PWD/$name/sequences.txt $PWD/$name/aa.txt $PWD/$name/junction.txt $PWD/$name/gapped_aa.txt $output 2>&1
b
diff -r 124b7fd92a3e -r 0ef7f80ea061 report_clonality/r_wrapper.sh
--- a/report_clonality/r_wrapper.sh Thu Feb 25 13:36:15 2021 +0000
+++ b/report_clonality/r_wrapper.sh Thu Feb 25 13:39:50 2021 +0000
[
b'@@ -1,391 +1,391 @@\n-#!/bin/bash\r\n-\r\n-inputFile=$1\r\n-outputDir=$3\r\n-outputFile=$3/index.html #$2\r\n-clonalType=$4\r\n-species=$5\r\n-locus=$6\r\n-filterproductive=$7\r\n-clonality_method=$8\r\n-\r\n-dir="$(cd "$(dirname "$0")" && pwd)"\r\n-useD="false"\r\n-if grep -q "$species.*${locus}D" "$dir/genes.txt" ; then\r\n-\techo "species D region in reference db"\r\n-\tuseD="true"\r\n-fi\r\n-echo "$species"\r\n-if [[ "$species" == *"custom"* ]] ; then\r\n-\tloci=(${locus//;/ })\r\n-\tuseD="true"\r\n-\techo "${loci[@]}"\r\n-\tif [[ "${#loci[@]}" -eq "2" ]] ; then\r\n-\t\tuseD="false"\r\n-\tfi\r\n-fi\r\n-mkdir $3\r\n-cp $dir/genes.txt $outputDir\r\n-Rscript --verbose $dir/RScript.r $inputFile $outputDir $outputDir $clonalType "$species" "$locus" $filterproductive ${clonality_method} 2>&1\r\n-cp $dir/tabber.js $outputDir\r\n-cp $dir/style.css $outputDir\r\n-cp $dir/script.js $outputDir\r\n-cp $dir/jquery-1.11.0.min.js $outputDir\r\n-cp $dir/pure-min.css $outputDir\r\n-cp $dir/IGH_junctie_analyse.png $outputDir\r\n-samples=`cat $outputDir/samples.txt`\r\n-\r\n-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\r\n-echo "<table border = 1>" >> $2\r\n-echo "<thead><tr><th>Donor/Replicate</th><th>All</th><th>Productive</th><th>Unique Productive</th><th>Unproductive</th><th>Unique Unproductive</th></tr></thead>" >> $2\r\n-while IFS=, read sample all productive perc_prod productive_unique perc_prod_un unproductive perc_unprod unproductive_unique perc_unprod_un\r\n-\tdo\r\n-\t\techo "<tr><td>$sample</td>" >> $2\r\n-\t\techo "<td>$all</td>" >> $2\r\n-\t\tif [[ "$productive" != "0" ]] ; then\r\n-\t\t\techo "<td>$productive (${perc_prod}%)</td>" >> $2\r\n-\t\t\techo "<td>$productive_unique (${perc_prod_un}%)</td>" >> $2\r\n-\t\t\techo "<td>$unproductive (${perc_unprod}%)</td>" >> $2\r\n-\t\t\techo "<td>$unproductive_unique (${perc_unprod_un}%)</td></tr>" >> $2\r\n-\t\telse\r\n-\t\t\techo "<td colspan=\'4\' style=\'background-color: red;\'>No productive sequences!</td>" >> $2\r\n-\t\tfi\r\n-done < $outputDir/productive_counting.txt\r\n-echo "</table><br />" >> $2\r\n-echo "Table showing the number and percentage of (unique) productive and unproductive sequences per donor and per replicate. <br />" >> $2\r\n-echo "The definition of unique sequences is based on the clonal type definition filter setting chosen. " >> $2\r\n-echo "</center></html>" >> $2\r\n-\r\n-echo "<html><head><title>Report on:" >> $outputFile\r\n-\r\n-mkdir $outputDir/circos\r\n-cp -R $dir/circos/* $outputDir/circos/\r\n-\r\n-USECIRCOS="no"\r\n-path_to_circos=$(which circos)\r\n-if [ -x "$path_to_circos" ]; then\r\n-\tUSECIRCOS="yes"\r\n-fi\r\n-\r\n-echo "Using Circos: $USECIRCOS"\r\n-sed -i "s%DATA_DIR%$outputDir/circos%" $outputDir/circos/circos.conf\r\n-for sample in $samples; do #output the samples to a file and create the circos plots with the R script output\r\n-\techo " $sample" >> $outputFile\r\n-\t\r\n-\tif [[ "$USECIRCOS" != "yes" ]]; then\r\n-\t\tcontinue\r\n-\tfi\r\n-\t\r\n-\tcircos_file="$outputDir/${sample}_VJ_circos.txt"\r\n-\tsed -i -- \'s%/%:%g\' $circos_file\r\n-\techo -e -n "labels$(cat ${circos_file})" > ${circos_file}\r\n-\techo "Circos tools command:"\r\n-\techo "cat \\"${circos_file}\\" | parse-table -configfile $dir/circos/parse-table.conf 2>&1 | make-conf -dir $outputDir/circos/"\r\n-\tcat "${circos_file}" | parse-table -configfile $dir/circos/parse-table.conf 2>&1 | make-conf -dir $outputDir/circos/\r\n-\r\n-\techo "Circos command:"\r\n-\techo "circos -conf $outputDir/circos/circos.conf 2>&1"\r\n-\tcircos -conf $outputDir/circos/circos.conf 2>&1\r\n-\tmv $outputDir/circos/circos.png $outputDir/circosVJ_${sample}.png\r\n-\tmv $outputDir/circos/circos.svg $outputDir/circosVJ_${sample}.svg\r\n-\t\r\n-\t\r\n-\tif [[ "$useD" == "true" ]] ; then\r\n-\t\tcircos_file="$outputDir/${sample}_VD_circos.txt"\r\n-\t\tsed -i -- \'s%/%:%g\' $circos_file\r\n-\t\techo -e -n "labels$(cat ${circos_file})" > ${circos_file}\r\n-\t\tcat "${circos_file}" | parse-table -configfile $dir/circos/parse-table.conf 2>&1 | make-conf -dir $outputDir/circos/\r\n-\t\tsed -i -- \'s%/%:%g\' $outputDir'..b' $outputFile\n+\t\n+\techo "</div>" >> $outputFile\n+fi\n+\n+echo "<div class=\'tabbertab\' title=\'Downloads\'>" >> $outputFile\n+echo "<table class=\'pure-table pure-table-striped\'>" >> $outputFile\n+echo "<thead><tr><th>Description</th><th>Link</th></tr></thead>" >> $outputFile\n+echo "<tr><td>The filtered dataset</td><td><a href=\'allUnique.txt\'>Download</a></td></tr>" >> $outputFile\n+echo "<tr><td colspan=\'2\' style=\'background-color:#E0E0E0;\'>Gene frequencies</td></tr>" >> $outputFile\n+\n+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\n+if [[ "$useD" == "true" ]] ; then\n+\techo "<tr><td>The dataset used to generate  the distribution of D gene families graph</td><td><a href=\'DFFrequency.txt\'>Download</a></td></tr>" >> $outputFile\n+fi\n+\n+echo "<tr><td>The dataset used to generate the relative frequency of V gene usage graph</td><td><a href=\'VFrequency.txt\'>Download</a></td></tr>" >> $outputFile\n+if [[ "$useD" == "true" ]] ; then\n+\techo "<tr><td>The dataset used to generate the relative frequency of D gene usage graph</td><td><a href=\'DFrequency.txt\'>Download</a></td></tr>" >> $outputFile\n+fi\n+echo "<tr><td>The dataset used to generate the relative frequency of J gene usage graph</td><td><a href=\'JFrequency.txt\'>Download</a></td></tr>" >> $outputFile\n+echo "<tr><td>The dataset used to generate the relative frequency of the D reading frame graph</td><td><a href=\'DReadingFrame.txt\'>Download</a></td></tr>" >> $outputFile\n+\n+echo "<tr><td colspan=\'2\' style=\'background-color:#E0E0E0;\'>CDR3 Characteristics</td></tr>" >> $outputFile\n+echo "<tr><td>The dataset used to generate the CDR3 length frequency graph</td><td><a href=\'CDR3LengthPlot.txt\'>Download</a></td></tr>" >> $outputFile\n+echo "<tr><td>The dataset used to generate the Amino Acid Composition in the CDR3 graph</td><td><a href=\'AAComposition.txt\'>Download</a></td></tr>" >> $outputFile\n+\n+echo "<tr><td colspan=\'2\' style=\'background-color:#E0E0E0;\'>Heatmaps</td></tr>" >> $outputFile\n+for sample in $samples; do\n+\tif [[ "$useD" == "true" ]] ; then\n+\t\techo "<tr><td>The data used to generate the VD heatmap for $sample.</td><td><a href=\'HeatmapVD_$sample.txt\'>Download</a></td></tr>" >> $outputFile\n+\tfi\n+\techo "<tr><td>The data used to generate the VJ heatmap for $sample.</td><td><a href=\'HeatmapVJ_$sample.txt\'>Download</a></td></tr>" >> $outputFile\n+\tif [[ "$useD" == "true" ]] ; then\n+\t\techo "<tr><td>The data used to generate the DJ heatmap for $sample.</td><td><a href=\'HeatmapDJ_$sample.txt\'>Download</a></td></tr>" >> $outputFile\n+\tfi\n+done\n+\n+echo "<tr><td colspan=\'2\' style=\'background-color:#E0E0E0;\'>Circos</td></tr>" >> $outputFile\n+for sample in $samples; do\n+\tif [[ "$useD" == "true" ]] ; then\n+\t\techo "<tr><td>The data used to generate the VD Circos plots for $sample.</td><td><a href=\'${sample}_VD_circos.txt\'>Download</a></td></tr>" >> $outputFile\n+\tfi\n+\techo "<tr><td>The data used to generate the VJ Circos plots for $sample.</td><td><a href=\'${sample}_VJ_circos.txt\'>Download</a></td></tr>" >> $outputFile\n+\tif [[ "$useD" == "true" ]] ; then\n+\t\techo "<tr><td>The data used to generate the DJ Circos plots for $sample.</td><td><a href=\'${sample}_DJ_circos.txt\'>Download</a></td></tr>" >> $outputFile\n+\tfi\n+done\n+\n+#echo "<tr><td>A frequency count of V Gene + J Gene + CDR3</td><td><a href=\'VJCDR3_count.txt\'>Download</a></td></tr>" >> $outputFile\n+\n+echo "<tr><td colspan=\'2\' style=\'background-color:#E0E0E0;\'>Clonality</td></tr>" >> $outputFile\n+echo "<tr><td>The dataset used to calculate clonality score (Unique based on clonaltype, $clonalType)</td><td><a href=\'clonalityComplete.txt\'>Download</a></td></tr>" >> $outputFile\n+# echo "<tr><td>Sequences that are present in more than one replicate</td><td><a href=\'clonaltypes_replicates.txt\'>Download</a></td></tr>" >> $outputFile\n+\n+echo "</table>" >> $outputFile\n+\n+cat $dir/naive_downloads.htm >> $outputFile\n+\n+echo "</div></html>" >> $outputFile\n'