Mercurial > repos > ucsb-phylogenetics > osiris_phylogenetics
comparison orthologs/ucsb_hamster/ucsb_galaxy_hamster.sh @ 0:5b9a38ec4a39 draft default tip
First commit of old repositories
author | osiris_phylogenetics <ucsb_phylogenetics@lifesci.ucsb.edu> |
---|---|
date | Tue, 11 Mar 2014 12:19:13 -0700 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:5b9a38ec4a39 |
---|---|
1 #!/bin/sh | |
2 # set -x | |
3 # Uncomment 'set -x' for debug information | |
4 | |
5 ############################################# | |
6 # UCSB HAMSTER - GALAXY HISTORY # | |
7 # # | |
8 # Executed when user chooses Galaxy history # | |
9 ############################################# | |
10 | |
11 # Set your hamster script location here. The directory containing these scripts should be in | |
12 #your path | |
13 script="hamstrsearch_local-hmmer3.pl" | |
14 # Set your unbuild.py script location here | |
15 unbuild="unbuild.py" | |
16 # Set your emap2fasta.pl script location here | |
17 emap2fasta="emap2fasta.pl" | |
18 | |
19 | |
20 # 1 - Sequence input file | |
21 # 2 - Proteins results output file | |
22 # 3 - CDS results output file | |
23 # 4 - Screen log | |
24 # 5 - Species name | |
25 # 6 - whether to use EST flag D=DNA so use -est flag P=Protein so do not use -est flag in hmmstr call | |
26 # 7 - HMM Input from UCSB HMMBUILD | |
27 # 8 - MUSCLE data from UCSB MUSCLE | |
28 # 9 - Reference Species File | |
29 # 10 - Reference Species Name | |
30 | |
31 input=$1 | |
32 proteins=$2 | |
33 cdsfile=$3 | |
34 screenlog=$4 | |
35 speciesName=$5 | |
36 datatype=$6 | |
37 hmm_data=$7 | |
38 muscle_data=$8 | |
39 filepath=`pwd` | |
40 tail="_prot" | |
41 tail2="_temp" | |
42 | |
43 # set flag based on input | |
44 if [ $datatype = "P" ]; | |
45 then | |
46 estflag="-protein" | |
47 else | |
48 estflag="-est" | |
49 fi | |
50 | |
51 refspfile=${9} | |
52 refsphist=${10} | |
53 | |
54 | |
55 | |
56 echo "Protein or EST? : $estflag" >> $screenlog | |
57 echo "Reference genome file from galaxy history: $refspfile" >> $screenlog | |
58 echo "Reference species genome name: $refsphist" >> $screenlog | |
59 | |
60 # unbuild.py here on $hmm_data | |
61 mkdir core | |
62 mkdir core/hmm_dir | |
63 cp $hmm_data core/core.fa | |
64 | |
65 $unbuild core/hmm_dir core/core.fa | |
66 cp core/hmm_dir/hmmlist.txt core/hmmlist.txt | |
67 | |
68 # use formatdb to generate new blastdb from this input file | |
69 refsphistGALAXY=$refsphist | |
70 mkdir $refsphistGALAXY | |
71 | |
72 cp $muscle_data $refsphistGALAXY/$refsphist$tail2 | |
73 $emap2fasta $refsphistGALAXY/$refsphist$tail2 $refsphist | |
74 cp full.fasta core/core.fa | |
75 | |
76 cp $refspfile $refsphistGALAXY/$refsphist$tail | |
77 cd $refsphistGALAXY | |
78 formatdb -t $refsphist -i $refsphist$tail -n $refsphist$tail | |
79 | |
80 echo "*** Direcotry Structure of Ref. Genome ***" >> $screenlog | |
81 ls -l >> $screenlog | |
82 echo >> $screenlog | |
83 | |
84 cd $filepath | |
85 | |
86 # script execution | |
87 $script -sequence_file=$1 $estflag -taxon=$5 -hmmset=core -refspec=$refsphistGALAXY -galaxyout=$2 -2galaxyout=$cdsfile 2>log.txt >> $screenlog |