Mercurial > repos > davidvanzessen > argalaxy_tools
comparison complete.sh @ 0:afe85eb6572e draft
Uploaded
author | davidvanzessen |
---|---|
date | Mon, 29 Aug 2016 05:41:20 -0400 |
parents | |
children | 54f6756bacb1 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:afe85eb6572e |
---|---|
1 #!/bin/bash | |
2 set -e | |
3 inputFiles=($1) | |
4 outputDir=$3 | |
5 outputFile=$3/index.html #$1 | |
6 clonalType=$4 | |
7 species=$5 | |
8 locus=$6 | |
9 filterproductive=$7 | |
10 clonality_method=$8 | |
11 | |
12 html=$2 | |
13 dir="$(cd "$(dirname "$0")" && pwd)" | |
14 array=("$@") | |
15 echo "<html><h3>Progress</h3><table><tr><td>info</td></tr>" > $html | |
16 echo "<tr><td>-----------------------------------</td></tr>" >> $html | |
17 | |
18 #mkdir $PWD/igblastdatabase | |
19 #unzip $dir/database.zip -d $PWD/igblastdatabase/ | |
20 #export IGDATA=$PWD/igblastdatabase/ | |
21 | |
22 id="" | |
23 forwardSlash="/" | |
24 mergerInput=() | |
25 echo "Before loop" | |
26 count=1 | |
27 for current in "${inputFiles[@]}" | |
28 do | |
29 if [[ "$current" != *"$forwardSlash"* ]]; then | |
30 id="$current" | |
31 mergerInput+=($id) | |
32 count=1 | |
33 continue | |
34 fi | |
35 echo "working on $current" | |
36 fileName=$(basename $current) | |
37 fileName="${fileName%.*}" | |
38 parsedFileName="$PWD/$fileName.parsed" | |
39 f=$(file $current) | |
40 zipType="Zip archive" | |
41 zxType="XZ compressed data" | |
42 if [[ "$f" == *"$zipType"* ]] || [[ "$f" == *"$zxType"* ]] | |
43 then | |
44 echo "<tr><td>Sample $count of patient $id is an archive file, using IMGT Loader</td></tr>" >> $html | |
45 fileName=$(basename $current) | |
46 bash ${dir}/imgt_loader/imgt_loader.sh $current $parsedFileName "${fileName}" | |
47 else | |
48 echo "<tr><td>Sample $count of patient $id is not a zip file so assuming fasta/fastq, using igBLASTn</td></tr>" >> $html | |
49 bash ${dir}/igblast/igblast.sh $current $species $locus $parsedFileName | |
50 fi | |
51 mergerInput+=($parsedFileName) | |
52 count=$((count+1)) | |
53 done | |
54 | |
55 echo "<tr><td>-----------------------------------</td></tr>" >> $html | |
56 echo "<tr><td>merging</td></tr>" >> $html | |
57 | |
58 bash $dir/experimental_design/experimental_design.sh ${mergerInput[*]} $PWD/merged.txt | |
59 | |
60 echo "<tr><td>done</td></tr>" >> $html | |
61 echo "<tr><td>-----------------------------------</td></tr>" >> $html | |
62 echo "<tr><td>plotting</td></tr>" >> $html | |
63 | |
64 echo "after ED" | |
65 | |
66 bash $dir/report_clonality/r_wrapper.sh $PWD/merged.txt $2 $outputDir $clonalType "$species" "$locus" $filterproductive $clonality_method | |
67 |