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