annotate igblast/igblast.sh @ 52:124b7fd92a3e draft

Uploaded
author davidvanzessen
date Thu, 25 Feb 2021 13:36:15 +0000
parents e35b82f31ec7
children 0ef7f80ea061
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
52
124b7fd92a3e Uploaded
davidvanzessen
parents: 51
diff changeset
1 set -e
124b7fd92a3e Uploaded
davidvanzessen
parents: 51
diff changeset
2
124b7fd92a3e Uploaded
davidvanzessen
parents: 51
diff changeset
3 dir="$(cd "$(dirname "$0")" && pwd)"
124b7fd92a3e Uploaded
davidvanzessen
parents: 51
diff changeset
4
124b7fd92a3e Uploaded
davidvanzessen
parents: 51
diff changeset
5 input=$1
124b7fd92a3e Uploaded
davidvanzessen
parents: 51
diff changeset
6 species=$2
124b7fd92a3e Uploaded
davidvanzessen
parents: 51
diff changeset
7 locus=$3
124b7fd92a3e Uploaded
davidvanzessen
parents: 51
diff changeset
8 output=$4
124b7fd92a3e Uploaded
davidvanzessen
parents: 51
diff changeset
9
124b7fd92a3e Uploaded
davidvanzessen
parents: 51
diff changeset
10 declare -A speciesdict
124b7fd92a3e Uploaded
davidvanzessen
parents: 51
diff changeset
11
124b7fd92a3e Uploaded
davidvanzessen
parents: 51
diff changeset
12 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")
124b7fd92a3e Uploaded
davidvanzessen
parents: 51
diff changeset
13
124b7fd92a3e Uploaded
davidvanzessen
parents: 51
diff changeset
14 echo "Species: $species ${speciesdict[$species]}"
124b7fd92a3e Uploaded
davidvanzessen
parents: 51
diff changeset
15
124b7fd92a3e Uploaded
davidvanzessen
parents: 51
diff changeset
16 species="${speciesdict[$species]}"
124b7fd92a3e Uploaded
davidvanzessen
parents: 51
diff changeset
17
124b7fd92a3e Uploaded
davidvanzessen
parents: 51
diff changeset
18 if [ "$species" == "" ]
124b7fd92a3e Uploaded
davidvanzessen
parents: 51
diff changeset
19 then
124b7fd92a3e Uploaded
davidvanzessen
parents: 51
diff changeset
20 >&2 echo "Species not possible with igBLASTn, use IMGT"
124b7fd92a3e Uploaded
davidvanzessen
parents: 51
diff changeset
21 exit 1
124b7fd92a3e Uploaded
davidvanzessen
parents: 51
diff changeset
22 fi
124b7fd92a3e Uploaded
davidvanzessen
parents: 51
diff changeset
23
124b7fd92a3e Uploaded
davidvanzessen
parents: 51
diff changeset
24 echo "$input $species $locus $output"
124b7fd92a3e Uploaded
davidvanzessen
parents: 51
diff changeset
25
124b7fd92a3e Uploaded
davidvanzessen
parents: 51
diff changeset
26 java -Xmx16G -jar $IGBLASTWRP/igblastwrp.jar -p 4 -S $species -R $locus ${input} $PWD/blasted_output 2>&1
124b7fd92a3e Uploaded
davidvanzessen
parents: 51
diff changeset
27
124b7fd92a3e Uploaded
davidvanzessen
parents: 51
diff changeset
28 Rscript --verbose $dir/igblast.r "$PWD/blasted_output.L2.txt" "$output" 2>&1