comparison TEdenovo.sh @ 0:baea09e6722b draft default tip

1st Uploaded
author vmarcon
date Mon, 06 Feb 2017 13:31:53 -0500
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:baea09e6722b
1 #!/bin/bash
2 set -e
3
4 fasta=$1
5 outputfasta=$2
6 classif=$3
7 outputlog=$4
8 outputclassif=$7
9 outputconfig=$5
10 outputstats=$6
11
12 projectname=$(date "+%Y%m%d")
13
14
15 add=''
16
17 if [ $classif == yes ]
18 then
19 add='-c'
20 fi
21 `dirname $0`'/'TEdenovo_lite.py -i $fasta -o $outputfasta $add > $outputlog
22 projectname_complete=$(ls $(pwd)|grep $projectname)
23 working_dir=$(pwd)/$projectname_complete
24 sed -i 's@'"$working_dir"'@'$projectname'@g' $outputlog
25 mv $outputfasta-$projectname-denovoLibTEs_filtered.fa $outputfasta
26 mv $outputfasta-$projectname-classif_stats.txt $outputstats
27 if [ $classif == yes ]
28 then
29 mv $outputfasta-$projectname.classif $outputclassif
30 fi
31
32
33 workingconfigfile=$working_dir/TEdenovo_Galaxy_config_$projectname_complete
34 sed -i 's|repet_host:.*|repet_host:|g' $workingconfigfile
35 sed -i 's|repet_user:.*|repet_user:|g' $workingconfigfile
36 sed -i 's|repet_pw:.*|repet_pw:|g' $workingconfigfile
37 sed -i 's|repet_db:.*|repet_db:|g' $workingconfigfile
38 sed -i 's|repet_port:.*|repet_port:|g' $workingconfigfile
39 sed -i 's|repet_job_manager:.*|repet_job_manager:|g' $workingconfigfile
40 sed -i 's|project_name:.*|project_name: '$projectname'|g' $workingconfigfile
41 sed -i 's|project_dir:.*|project_dir:|g' $workingconfigfile
42 sed -i 's|tmpDir:.*|tmpDir:|g' $workingconfigfile
43 mv $workingconfigfile $outputconfig
44