annotate tassel.sh @ 11:75948ef196f9 draft

Uploaded
author dereeper
date Wed, 03 Jan 2024 10:22:35 +0000
parents e94b8b64929c
children 88ea6f8f664e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3
0eebff4180d9 Uploaded
dereeper
parents:
diff changeset
1 #!/bin/bash
0eebff4180d9 Uploaded
dereeper
parents:
diff changeset
2
0eebff4180d9 Uploaded
dereeper
parents:
diff changeset
3 analyseType=$1;
0eebff4180d9 Uploaded
dereeper
parents:
diff changeset
4 out1=$2;
0eebff4180d9 Uploaded
dereeper
parents:
diff changeset
5 out2=$3;
0eebff4180d9 Uploaded
dereeper
parents:
diff changeset
6 out3=$4;
0eebff4180d9 Uploaded
dereeper
parents:
diff changeset
7 log1=$5;
0eebff4180d9 Uploaded
dereeper
parents:
diff changeset
8 galaxyOutDir=$6;
0eebff4180d9 Uploaded
dereeper
parents:
diff changeset
9
0eebff4180d9 Uploaded
dereeper
parents:
diff changeset
10 version=$(java -version 2>&1 | grep version)
0eebff4180d9 Uploaded
dereeper
parents:
diff changeset
11 if [[ ! $version =~ 1.8 ]]; then
0eebff4180d9 Uploaded
dereeper
parents:
diff changeset
12 echo "Java found: $version. Tassel 5.0 requires java 1.8..." >&2
0eebff4180d9 Uploaded
dereeper
parents:
diff changeset
13 exit 1
0eebff4180d9 Uploaded
dereeper
parents:
diff changeset
14 fi
0eebff4180d9 Uploaded
dereeper
parents:
diff changeset
15
0eebff4180d9 Uploaded
dereeper
parents:
diff changeset
16 mkdir $galaxyOutDir
0eebff4180d9 Uploaded
dereeper
parents:
diff changeset
17
0eebff4180d9 Uploaded
dereeper
parents:
diff changeset
18 # Suppression des 6 premiers arguments de la liste des arguments $@
0eebff4180d9 Uploaded
dereeper
parents:
diff changeset
19 shift; shift; shift; shift; shift; shift;
0eebff4180d9 Uploaded
dereeper
parents:
diff changeset
20
0eebff4180d9 Uploaded
dereeper
parents:
diff changeset
21
0eebff4180d9 Uploaded
dereeper
parents:
diff changeset
22 if [[ $analyseType == glm ]]
0eebff4180d9 Uploaded
dereeper
parents:
diff changeset
23 then
0eebff4180d9 Uploaded
dereeper
parents:
diff changeset
24 run_pipeline.pl $* >> $log1 2>&1
0eebff4180d9 Uploaded
dereeper
parents:
diff changeset
25 mv "$galaxyOutDir/TASSELGLM1.txt" $out1
5
e94b8b64929c planemo upload commit 9f362f944b3ce480662bec519a3d7c7616454b4c
dereeper
parents: 3
diff changeset
26 if [ $? -gt 0 ] ; then exit 1 ; fi ##check the run of commands
3
0eebff4180d9 Uploaded
dereeper
parents:
diff changeset
27 mv "$galaxyOutDir/TASSELGLM2.txt" $out2
0eebff4180d9 Uploaded
dereeper
parents:
diff changeset
28 fi
0eebff4180d9 Uploaded
dereeper
parents:
diff changeset
29
0eebff4180d9 Uploaded
dereeper
parents:
diff changeset
30 if [[ $analyseType == mlm ]]
0eebff4180d9 Uploaded
dereeper
parents:
diff changeset
31 then
0eebff4180d9 Uploaded
dereeper
parents:
diff changeset
32 run_pipeline.pl $* >> $log1 2>&1
0eebff4180d9 Uploaded
dereeper
parents:
diff changeset
33 mv "$galaxyOutDir/TASSELMLM1.txt" $out1
5
e94b8b64929c planemo upload commit 9f362f944b3ce480662bec519a3d7c7616454b4c
dereeper
parents: 3
diff changeset
34 if [ $? -gt 0 ] ; then exit 1 ; fi ##check the run of commands
3
0eebff4180d9 Uploaded
dereeper
parents:
diff changeset
35 mv "$galaxyOutDir/TASSELMLM2.txt" $out2
0eebff4180d9 Uploaded
dereeper
parents:
diff changeset
36 mv "$galaxyOutDir/TASSELMLM3.txt" $out3
0eebff4180d9 Uploaded
dereeper
parents:
diff changeset
37 fi
0eebff4180d9 Uploaded
dereeper
parents:
diff changeset
38
0eebff4180d9 Uploaded
dereeper
parents:
diff changeset
39 if [[ $analyseType == ld ]]
0eebff4180d9 Uploaded
dereeper
parents:
diff changeset
40 then
0eebff4180d9 Uploaded
dereeper
parents:
diff changeset
41 run_pipeline.pl $* >> $log1 2>&1
0eebff4180d9 Uploaded
dereeper
parents:
diff changeset
42 fi
0eebff4180d9 Uploaded
dereeper
parents:
diff changeset
43
0eebff4180d9 Uploaded
dereeper
parents:
diff changeset
44
0eebff4180d9 Uploaded
dereeper
parents:
diff changeset
45 if [[ $analyseType == ck ]]
0eebff4180d9 Uploaded
dereeper
parents:
diff changeset
46 then
0eebff4180d9 Uploaded
dereeper
parents:
diff changeset
47 run_pipeline.pl $* >> $log1 2>&1
0eebff4180d9 Uploaded
dereeper
parents:
diff changeset
48 mv "$galaxyOutDir/kinship.txt" $out1
5
e94b8b64929c planemo upload commit 9f362f944b3ce480662bec519a3d7c7616454b4c
dereeper
parents: 3
diff changeset
49 if [ $? -gt 0 ] ; then exit 1 ; fi ##check the run of commands
3
0eebff4180d9 Uploaded
dereeper
parents:
diff changeset
50 fi