From 9df33ab28af374961a4f1546fe14001b09593e74 Mon Sep 17 00:00:00 2001 From: cmzmasek Date: Mon, 27 Mar 2017 18:09:08 -0700 Subject: [PATCH] couple of new shells --- forester/sh/x_hmmscan.sh | 4 ++-- forester/sh/x_mafft.sh | 24 ++++++++++++++++++++++++ forester/sh/x_msa_pro.sh | 18 ++++++++++++++++++ forester/sh/x_phylo_pl.sh | 18 ++++++++++++++++++ forester/sh/x_tap.sh | 18 ++++++++++++++++++ 5 files changed, 80 insertions(+), 2 deletions(-) create mode 100644 forester/sh/x_mafft.sh create mode 100644 forester/sh/x_msa_pro.sh create mode 100644 forester/sh/x_phylo_pl.sh create mode 100644 forester/sh/x_tap.sh diff --git a/forester/sh/x_hmmscan.sh b/forester/sh/x_hmmscan.sh index bdd460b..49657ab 100644 --- a/forester/sh/x_hmmscan.sh +++ b/forester/sh/x_hmmscan.sh @@ -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 index 0000000..e5ddb95 --- /dev/null +++ b/forester/sh/x_mafft.sh @@ -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 index 0000000..57544c1 --- /dev/null +++ b/forester/sh/x_msa_pro.sh @@ -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 index 0000000..f74b6bf --- /dev/null +++ b/forester/sh/x_phylo_pl.sh @@ -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 index 0000000..aeec299 --- /dev/null +++ b/forester/sh/x_tap.sh @@ -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 -- 1.7.10.2