File: README

package info (click to toggle)
gff2aplot 2.0-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 1,652 kB
  • ctags: 274
  • sloc: perl: 5,373; ansic: 802; makefile: 117
file content (244 lines) | stat: -rw-r--r-- 8,275 bytes parent folder | download | duplicates (9)
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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
##################################################
#
# README wublast
#
# This README runs as a shell script.
# Here you can find the commands
# we used to produce all the figures for:
#
#   "WU-BLAST Analysis of two Homologous Genes"
# 
# USAGE: bash README > .log 2>&1
#
# $Id: README,v 1.1 2003/03/04 18:55:02 jabril Exp $
#
##################################################

#
# Original Files
#
# ANNOTATION: taf6.hs.gene.gff  taf6.mm.gene.gff
# ALIGNMENT:  taf6.mmhs.genomic.blastn  taf6.mmhs.genomic.tblastx
#

#
echo "#  -> Running parseblast: BLAST -> GFF" ;
#
$BIN/parseblast.pl --verbose --no-frame --aplot             \
                   -- taf6.mmhs.genomic.blastn              \
                    > taf6.mmhs.genomic.blastn.aplot.gff    \
                   2> taf6.mmhs.genomic.blastn.aplotgff.log ;
#
$BIN/parseblast.pl --verbose --no-frame            \
                   --fullgff --compact-tags        \
                   -- taf6.mmhs.genomic.blastn     \
                    > taf6.mmhs.genomic.blastn.gff \
                   2> taf6.mmhs.genomic.blastn.log ;
#
$BIN/parseblast.pl --verbose --no-frame --fullgff       \
                   -- taf6.mmhs.genomic.blastn          \
                    > taf6.mmhs.genomic.blastn.full.gff \
                   2> taf6.mmhs.genomic.blastn.full.log ;
#
$BIN/parseblast.pl --verbose --no-frame --aplot              \
                   -- taf6.mmhs.genomic.tblastx              \
                    > taf6.mmhs.genomic.tblastx.aplot.gff    \
                   2> taf6.mmhs.genomic.tblastx.aplotgff.log ;
#
$BIN/parseblast.pl --verbose --no-frame --fullgff   \
                   -- taf6.mmhs.genomic.tblastx     \
                    > taf6.mmhs.genomic.tblastx.gff \
                   2> taf6.mmhs.genomic.tblastx.log ;

#
echo "#  -> Running gff2aplot: GFF -> PS" ;
#
$BIN/gff2aplot.pl                   \
    --verbose                       \
    -- taf6.mmhs.genomic.blastn.gff \
       taf6.mm.gene.gff             \
       taf6.hs.gene.gff             \
     > taf6.mmhs.genomic.blastn.ps  \
    2> taf6.mmhs.genomic.blastn.log ;
#
$BIN/gff2aplot.pl                         \
    --verbose                             \
    -- taf6.mmhs.genomic.blastn.aplot.gff \
       taf6.mm.gene.gff                   \
       taf6.hs.gene.gff                   \
     > taf6.mmhs.genomic.blastn.aplot.ps  \
    2> taf6.mmhs.genomic.blastn.aplot.log ;
#
$BIN/gff2aplot.pl                    \
    --verbose                        \
    --show-percent-box               \
    -- taf6.mmhs.genomic.tblastx.gff \
       taf6.mm.gene.gff              \
       taf6.hs.gene.gff              \
     > taf6.mmhs.genomic.tblastx.ps  \
    2> taf6.mmhs.genomic.tblastx.log ;
#
$BIN/gff2aplot.pl                          \
    --verbose                              \
    --show-percent-box                     \
    -- taf6.mmhs.genomic.tblastx.aplot.gff \
       taf6.mm.gene.gff                    \
       taf6.hs.gene.gff                    \
     > taf6.mmhs.genomic.tblastx.aplot.ps  \
    2> taf6.mmhs.genomic.tblastx.aplot.log ;

# Extra customization
cat > taf6.tblastx.rc <<'+++EOF+++'
#
# L #
percent_box_label=SIMILARITY
percent_box_label_fontsize=10pt
percent_box_score_range=0..1000
major_tickmark_score=250
ribbon_color_merge=on
color_merge_factor=2
# group_y_label_angle=315
#
# G #
/.*M.musculus.*/::group_label=taf6 (M.musculus)
/.*H.sapiens.*/::group_label=taf6 (H.sapiens)
#
# F #
/[it].*exon/::feature_color=darkred
utrexon::feature_color=lightgrey
initialexon::feature_shape=half_arrow_end
terminalexon::feature_shape=half_arrow
/.*exon/::show_ribbons=on
/.*exon/::ribbon_style=ribbons
/[it].*exon/::ribbon_color=verylightred
utrexon::ribbon_color=verylightgrey
+++EOF+++
#
echo "#  -> Running gff2aplot + customization" ;
#
$BIN/gff2aplot.pl                              \
    --verbose                                  \
    --title 'Hsap/Mmus taf6 Orthologous Gene'  \
    --subtitle 'Figure displays BLASTN results for this genomic region.' \
    --show-percent-box                         \
    --custom-filename taf6.tblastx.rc          \
    -- taf6.mmhs.genomic.blastn.aplot.gff      \
       taf6.mm.gene.gff                        \
       taf6.hs.gene.gff                        \
     > taf6.mmhs.genomic.blastn.aplot_conf.ps  \
    2> taf6.mmhs.genomic.blastn.aplot_conf.log ;
#
$BIN/gff2aplot.pl                               \
    --verbose                                   \
    --title 'Hsap/Mmus taf6 Orthologous Gene'   \
    --subtitle 'Figure displays TBLASTX results for this genomic region.' \
    --show-percent-box                          \
    --custom-filename taf6.tblastx.rc           \
    -- taf6.mmhs.genomic.tblastx.aplot.gff      \
       taf6.mm.gene.gff                         \
       taf6.hs.gene.gff                         \
     > taf6.mmhs.genomic.tblastx.aplot_conf.ps  \
    2> taf6.mmhs.genomic.tblastx.aplot_conf.log ;
#
echo "#  -> Merging data..." ;
#
$BIN/gff2aplot.pl                          \
    --verbose                              \
    --title 'Hsap/Mmus taf6 Orthologous Gene'           \
    --subtitle 'Merging BLASTN and TBLASTX alignments.' \
    --show-percent-box                     \
    --custom-filename taf6.tblastx.rc      \
    -- taf6.mmhs.genomic.blastn.aplot.gff  \
       taf6.mmhs.genomic.tblastx.aplot.gff \
       taf6.mm.gene.gff                    \
       taf6.hs.gene.gff                    \
     > taf6.mmhs.genomic.blast.merge.ps    \
    2> taf6.mmhs.genomic.blast.merge.log ;
#
$BIN/gff2aplot.pl                                    \
    --verbose                                        \
    --title 'Hsap/Mmus taf6 Orthologous Gene'        \
    --subtitle 'BLASTN alignments shown in green, TBLASTX results in blue.' \
    --show-percent-box                               \
    --custom-filename taf6.tblastx.rc                \
    --source-var 'BLASTN::alignment_color=darkgreen' \
    --source-var 'TBLASTX::alignment_color=darkblue' \
    -- taf6.mmhs.genomic.blastn.aplot.gff            \
       taf6.mmhs.genomic.tblastx.aplot.gff           \
       taf6.mm.gene.gff                              \
       taf6.hs.gene.gff                              \
     > taf6.mmhs.genomic.blast.merge_conf.ps         \
    2> taf6.mmhs.genomic.blast.merge_conf.log ;

#
#
# Preparing web images
#
filenames () {
  cat << 'EOF';
taf6.mmhs.genomic.blastn
taf6.mmhs.genomic.tblastx
taf6.mmhs.genomic.blastn.aplot
taf6.mmhs.genomic.tblastx.aplot
taf6.mmhs.genomic.blastn.aplot_conf
taf6.mmhs.genomic.tblastx.aplot_conf
taf6.mmhs.genomic.blast.merge
taf6.mmhs.genomic.blast.merge_conf
EOF
};
#
# echo "# Using \"ghostscript\" to obtain JPEG images from PS files" ;
echo "# Using \"ghostscript\" to obtain PNG images from PS files" ;
#
GS=`which gs || echo "gs"`;
MG=`which mogrify || echo "mogrify"`;
CV=`which convert || echo "convert"`;
#
filenames | while read n ;
  do {
    echo "# -> $n" ;
    $GS -dBATCH -dNOPAUSE -r300        \
        -sPAPERSIZE=a4 -sDEVICE=png16m \
        -sOutputFile=$n.png $n.ps      ;
    cp -v $n.png $n.s.png ;
    # mogrify is a ImageMagick tool that allow us to transform images on batch,
    # large high-resolution jpeg files are scaled down to thumbnail resolution (2479x3508=>123x175)
    # it overwrites original file (so that we previously get a renamed copy for each jpeg to process).
    $MG -verbose -geometry 5% $n.s.png ;
    #
    # $GS -dBATCH -dNOPAUSE -r300      \
    #     -sPAPERSIZE=a4 -sDEVICE=jpeg \
    #     -sOutputFile=$n.jpg $n.ps    ;
    # png large version is pretty smaller than jpeg
    # cp -v $n.jpg $n.s.jpg ;
    # $MG -verbose -geometry 5% $n.s.jpg ;
    };
  done ;
$CV 'vid:*.s.png'  wublast.summary.png
#
echo "# Using \"ghostscript\" to obtain PDF documents from PS files" ;
#
filenames | while read n ;
  do {
    echo "# -> $n" ;
    $GS -dBATCH -dNOPAUSE -r300          \
        -sPAPERSIZE=a4 -sDEVICE=pdfwrite \
        -sOutputFile=$n.pdf $n.ps        ;
    };
  done ;
#
#
# echo "# LaTeXing all figures together..." ;
#
# latex wublast.tex;
# dvips wublast.dvi -o wublast.ps;
#
#
echo "###" ;
echo "### TOTAL TIME: $SECONDS seconds..." ;
#
#
# That's all folks... ;^D
#
#        >> Copyleft (C) 2002/2003 - Josep F. Abril <<
#