annotate igblast/igblast.sh @ 58:4c6df851e262 draft default tip

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