0
|
1 set -e
|
|
2
|
|
3 dir="$(cd "$(dirname "$0")" && pwd)"
|
|
4
|
|
5 input=$1
|
|
6 species=$2
|
|
7 locus=$3
|
|
8 output=$4
|
|
9
|
6
|
10 declare -A speciesdict
|
|
11
|
7
|
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")
|
|
13
|
|
14 echo "Species: $species ${speciesdict[$species]}"
|
|
15
|
|
16 species="${speciesdict[$species]}"
|
0
|
17
|
8
|
18 if [ "$species" == "" ]
|
|
19 then
|
|
20 >&2 echo "Species not possible with igBLASTn, use IMGT"
|
|
21 exit 1
|
|
22 fi
|
|
23
|
0
|
24 echo "$input $species $locus $output"
|
|
25
|
8
|
26 java -Xmx16G -jar $IGBLASTWRP/igblastwrp.jar -p 4 -S $species -R $locus ${input} $PWD/blasted_output 2>&1
|
7
|
27 #java -Xmx64G -jar $dir/igblastwrp.jar -p 4 -S $species -R $locus ${input} $PWD/blasted_output 2>&1
|
|
28 #java -Xmx64G -jar $dir/migmap-1.0.1.jar -p 4 -S "$species" -R $locus ${input} $PWD/blasted_output 2>&1
|
0
|
29
|
|
30 Rscript --verbose $dir/igblast.r "$PWD/blasted_output.L2.txt" "$output" 2>&1
|