couple of new shells
authorcmzmasek <chris.zma@outlook.com>
Tue, 28 Mar 2017 01:09:08 +0000 (18:09 -0700)
committercmzmasek <chris.zma@outlook.com>
Tue, 28 Mar 2017 01:09:08 +0000 (18:09 -0700)
forester/sh/x_hmmscan.sh
forester/sh/x_mafft.sh [new file with mode: 0644]
forester/sh/x_msa_pro.sh [new file with mode: 0644]
forester/sh/x_phylo_pl.sh [new file with mode: 0644]
forester/sh/x_tap.sh [new file with mode: 0644]

index bdd460b..49657ab 100644 (file)
@@ -3,11 +3,11 @@ for i in *
 do
     if test -f "$i" 
     then
-        if [[ $i =~ $re ]];
+        if [[ $i =~ $re ]]
         then
             name=${BASH_REMATCH[1]}
             echo $name
             /usr/local/bin/hmmscan --max --domtblout ${name}.hmmscan -E 20 --domE 20 --noali ~/DATA/PFAM/PFAM_30/Pfam-A.hmm ${name}.fasta
-       fi
+        fi
     fi
 done
\ No newline at end of file
diff --git a/forester/sh/x_mafft.sh b/forester/sh/x_mafft.sh
new file mode 100644 (file)
index 0000000..e5ddb95
--- /dev/null
@@ -0,0 +1,24 @@
+re="(.+)_ni\.fasta"
+cutoff=3
+for i in * 
+do
+    if test -f "$i" 
+    then
+        if [[ $i =~ $re ]]
+        then
+            name=${BASH_REMATCH[1]}
+            echo $name
+            count=$(grep -c '>' $i)
+            echo $count
+            if [ $count -gt $cutoff ]
+            then
+                /usr/local/bin/mafft --maxiterate 1000 --globalpair $i > ${name}_mafft_1000_g.aln
+                rc=$?
+                if [[ $rc != 0 ]]
+                then
+                    exit $rc
+                fi
+            fi
+        fi
+    fi
+done
\ No newline at end of file
diff --git a/forester/sh/x_msa_pro.sh b/forester/sh/x_msa_pro.sh
new file mode 100644 (file)
index 0000000..57544c1
--- /dev/null
@@ -0,0 +1,18 @@
+re="(.+)_mafft_1000_g\.aln"
+for i in * 
+do
+    if test -f "$i" 
+    then
+        if [[ $i =~ $re ]]
+        then
+            name=${BASH_REMATCH[1]}
+            echo $name
+            ruby /home/zma/git/forester/forester/ruby/evoruby/exe/msa_pro.rb -i=f -o=p -d -c -rr=0.5 -rsl=20 $i ${name}_mafft_1000_g_05_20
+            rc=$?
+            if [[ $rc != 0 ]]
+            then
+                exit $rc
+            fi
+        fi
+    fi
+done
\ No newline at end of file
diff --git a/forester/sh/x_phylo_pl.sh b/forester/sh/x_phylo_pl.sh
new file mode 100644 (file)
index 0000000..f74b6bf
--- /dev/null
@@ -0,0 +1,18 @@
+re="(.+)_mafft_1000_g_05_20"
+for i in * 
+do
+    if test -f "$i" 
+    then
+        if [[ $i =~ $re ]]
+        then
+            name=${BASH_REMATCH[1]}
+            echo $name
+            perl /home/zma/git/forester/forester/perl/phylo_pl.pl -B1000Wq@1S9 $i ${name}_mafft_1000_g_05_20_tree
+            rc=$?
+            if [[ $rc != 0 ]]
+            then
+                exit $rc
+            fi
+        fi
+    fi
+done
\ No newline at end of file
diff --git a/forester/sh/x_tap.sh b/forester/sh/x_tap.sh
new file mode 100644 (file)
index 0000000..aeec299
--- /dev/null
@@ -0,0 +1,18 @@
+re="(.+)\.fasta"
+for i in * 
+do
+    if test -f "$i" 
+    then
+        if [[ $i =~ $re ]]
+        then
+            name=${BASH_REMATCH[1]}
+            echo $name
+            ruby /home/zma/git/forester/forester/ruby/evoruby/exe/tap.rb -t $i
+            rc=$?
+            if [[ $rc != 0 ]]
+            then
+                exit $rc
+            fi
+        fi
+    fi
+done
\ No newline at end of file