Mercurial > repos > dereeper > haplophyle
comparison Haplophyle.sh @ 0:6f11162b6fa2 draft
planemo upload commit 11382afe87364aaafb19973470d5066229a6e34f
author | dereeper |
---|---|
date | Tue, 14 Aug 2018 08:04:23 -0400 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:6f11162b6fa2 |
---|---|
1 #!/bin/bash | |
2 | |
3 # Config ####### | |
4 maxsizeseq=500 | |
5 maxnumseq=200 | |
6 ################ | |
7 | |
8 tool_path=$(dirname $0) | |
9 | |
10 filein=$1 | |
11 fileout=$2 | |
12 dotfile=$3 | |
13 logfile=$4 | |
14 filein2=$5 | |
15 groups=$6 | |
16 | |
17 nbline=$(sed -n '$=' $filein) | |
18 let "nbseq = $nbline / 2" | |
19 seq=$(sed -n 2p $filein) | |
20 sizeseq=${#seq} | |
21 | |
22 if [ $nbseq -lt $maxnumseq ] | |
23 then | |
24 if [ $sizeseq -lt $maxsizeseq ] | |
25 then | |
26 perl $tool_path/Haplophyle.pl --input $filein --groups $groups --stats $filein2 --dot $dotfile --out $fileout --tool_path $tool_path >>$logfile 2>&1 | |
27 else | |
28 echo "Sequence size: $sizeseq" | |
29 echo "Input Sequences bust have a length < $maxsizeseq" | |
30 exit 1 | |
31 fi | |
32 else | |
33 echo "$nbseq sequences in the file" | |
34 echo "Input file must have less than $maxnumseq sequences" | |
35 exit 1 | |
36 fi |