| 1 |
demotic is a set of Perl modules for interfacing the hieroglyphic |
| 2 |
output of one program with the greek input of another program. |
| 3 |
|
| 4 |
original: SRE, Wed Oct 25 16:32:09 2000 |
| 5 |
into Easel: SRE, Fri Apr 16 16:10:25 2010 |
| 6 |
|
| 7 |
demotic_blast.pm NCBI blastp; NCBI blastpgp; WU blastp |
| 8 |
demotic_fasta.pm fasta; ssearch |
| 9 |
demotic_hmmer.pm hmmsearch, phmmer |
| 10 |
demotic_h2.pm HMMER 2.0 hmmsearch |
| 11 |
|
| 12 |
blast2profmark |
| 13 |
fasta2profmark |
| 14 |
hmmer2profmark |
| 15 |
h22profmark |
| 16 |
|
| 17 |
blast2tbl |
| 18 |
fasta2tbl |
| 19 |
hmmer2tbl |
| 20 |
h22tbl |
| 21 |
|
| 22 |
test.pl : example of using demotic_blast "in line" in a perl script. |
| 23 |
|
| 24 |
################################################################ |
| 25 |
# Generating the example outputs |
| 26 |
|
| 27 |
# Config that's already in my .bashrc: |
| 28 |
export SWISS=/misc/data0/databases/Uniprot/uniprot_sprot.fasta |
| 29 |
export SWISS-WU=/misc/data0/databases/Uniprot/uniprot_sprot_wu.fasta |
| 30 |
export PFAM_HMM=/misc/data0/databases/Pfam/Pfam-A.hmm |
| 31 |
export PFAM_SEED=/misc/data0/databases/Pfam/Pfam-A.seed |
| 32 |
export PFAM_FULL=/misc/data0/databases/Pfam/Pfam-A.full |
| 33 |
export PERLLIB=.:${HOME}/sw/scripts |
| 34 |
|
| 35 |
# Most examples |
| 36 |
esl-seqstat -a $SWISS | awk '{print $2}' | esl-selectn 2 - | esl-sfetch -f $SWISS - > examples/example.fa |
| 37 |
grep -v "^#" /misc/data0/databases/pfam/pfam-24.0/Pfam-A.hmm.stat | awk '{print $2}' | esl-selectn 2 - | hmmfetch -f /misc/data0/databases/pfam/pfam-24.0/Pfam-A.hmm - > examples/example.hmm |
| 38 |
|
| 39 |
# PSIBLAST example takes some massaging, because of the way we convert Stockholm to a checkpoint .asnt file. |
| 40 |
grep -v "^#" /misc/data0/databases/pfam/pfam-24.0/Pfam-A.seed.stat | awk '{print $2}' | esl-selectn 1 - | esl-afetch -f /misc/data0/databases/pfam/pfam-24.0/Pfam-A.seed - > examples/example-single.sto |
| 41 |
esl-reformat -o examples/example-single.pbl psiblast examples/example-single.sto |
| 42 |
esl-seqstat -a examples/example-single.sto | grep "^=" | awk '{print $2}' | esl-selectn 1 - | esl-sfetch -f examples/example-single.sto - |
| 43 |
esl-seqstat -a examples/example-single.sto | grep "^=" | awk '{print $2}' | esl-selectn 1 - | esl-sfetch -f examples/example-single.sto - > examples/example-single-psiquery.fa |
| 44 |
esl-reformat -o examples/example-single.fa fasta examples/example-single.sto |
| 45 |
formatdb -i examples/example-single.fa |
| 46 |
blastpgp -v 9999 -F T -u 1 -j 5 -J TRUE -d examples/example-single.fasta -i examples/example-single-psiquery.fa -C examples/example-single.asnt |
| 47 |
|
| 48 |
# H2 example also is a little special; build new from Stockholm, plus H2 hmmsearch can only do a single query. |
| 49 |
grep -v "^#" /misc/data0/databases/pfam/pfam-24.0/Pfam-A.seed.stat | awk '{print $2}' | esl-selectn 1 - | esl-afetch -f /misc/data0/databases/pfam/pfam-24.0/Pfam-A.seed - > examples/example.sto |
| 50 |
~/releases/hmmer-2.3.2/src/hmmbuild examples/example.hmm2 examples/example.sto |
| 51 |
~/releases/hmmer-2.3.2/src/hmmcalibrate examples/example.hmm2 |
| 52 |
|
| 53 |
blastp $SWISS_WU examples/example.fa > examples/example.wu-blastp.out |
| 54 |
blastall -p blastp -i examples/example.fa -d $SWISS > examples/example.ncbi-blastp.out |
| 55 |
/usr/local/fasta-36x2/bin/ssearch36_t -q examples/example.fa $SWISS > examples/example.ssearch.out |
| 56 |
/usr/local/fasta-36x2/bin/fasta36_t -q examples/example.fa $SWISS > examples/example.fasta.out |
| 57 |
phmmer examples/example.fa $SWISS > examples/example.phmmer.out |
| 58 |
hmmsearch examples/example.hmm $SWISS > examples/example.hmmsearch.out |
| 59 |
~/releases/hmmer-2.3.2/src/hmmsearch examples/example.hmm2 $SWISS > examples/example.h2.out |
| 60 |
blastpgp -v 9999 -F F -q 1 -t 1 -d $SWISS -R examples/example-single.asnt > examples/example.psiblast.out |
| 61 |
|
| 62 |
################################################################ |
| 63 |
# Save outputs for regression |
| 64 |
|
| 65 |
pfx=regress |
| 66 |
mkdir $pfx |
| 67 |
cat examples/example.wu-blastp.out | ./blast2profmark > $pfx/wu-blastp-profmark.out |
| 68 |
cat examples/example.ncbi-blastp.out | ./blast2profmark > $pfx/ncbi-blastp-profmark.out |
| 69 |
cat examples/example.psiblast.out | ./blast2profmark > $pfx/psiblast-profmark.out |
| 70 |
cat examples/example.ssearch.out | ./fasta2profmark > $pfx/ssearch-profmark.out |
| 71 |
cat examples/example.fasta.out | ./fasta2profmark > $pfx/fasta-profmark.out |
| 72 |
cat examples/example.phmmer.out | ./hmmer2profmark > $pfx/phmmer-profmark.out |
| 73 |
cat examples/example.hmmsearch.out | ./hmmer2profmark > $pfx/hmmsearch-profmark.out |
| 74 |
cat examples/example.h2.out | ./h22profmark > $pfx/h2-profmark.out |
| 75 |
|
| 76 |
cat examples/example.wu-blastp.out | ./blast2tbl > $pfx/wu-blastp-tbl.out |
| 77 |
cat examples/example.ncbi-blastp.out | ./blast2tbl > $pfx/ncbi-blastp-tbl.out |
| 78 |
cat examples/example.psiblast.out | ./blast2tbl > $pfx/psiblast-tbl.out |
| 79 |
cat examples/example.ssearch.out | ./fasta2tbl > $pfx/ssearch-tbl.out |
| 80 |
cat examples/example.fasta.out | ./fasta2tbl > $pfx/fasta-tbl.out |
| 81 |
cat examples/example.phmmer.out | ./hmmer2tbl > $pfx/phmmer-tbl.out |
| 82 |
cat examples/example.hmmsearch.out | ./hmmer2tbl > $pfx/hmmsearch-tbl.out |
| 83 |
cat examples/example.h2.out | ./h22tbl > $pfx/h2-tbl.out |
| 84 |
|
| 85 |
################################################################ |
| 86 |
# Regression test of outputs |
| 87 |
|
| 88 |
pfx=tmp |
| 89 |
mkdir $pfx |
| 90 |
# Run the same stuff as above |
| 91 |
|
| 92 |
for prg in wu-blastp ncbi-blastp psiblast ssearch fasta phmmer hmmsearch h2 ; do |
| 93 |
diff --brief regress/$prg-profmark.out tmp/$prg-profmark.out |
| 94 |
diff --brief regress/$prg-tbl.out tmp/$prg-tbl.out |
| 95 |
done |
| 96 |
|
| 97 |
rm -rf tmp |
| 98 |
|
| 99 |
|
| 100 |
|