JPRED-2 Add alscript to the Git repository
[jpred.git] / sources / alscript / doc / alscript / subsection3_11_1.html
1 <HEAD>
2 <TITLE> Basic Use</TITLE>
3 </HEAD>
4 <BODY><P>
5  <HR> <A NAME=tex2html246 HREF=subsection3_11_2.html><IMG ALIGN=MIDDLE SRC="http://geoff.biop.ox.ac.uk/latex2html/next_motif.gif"></A> <A NAME=tex2html244 HREF=section3_11.html><IMG ALIGN=MIDDLE SRC="http://geoff.biop.ox.ac.uk/latex2html/up_motif.gif"></A> <A NAME=tex2html238 HREF=section3_11.html><IMG ALIGN=MIDDLE SRC="http://geoff.biop.ox.ac.uk/latex2html/previous_motif.gif"></A> <A NAME=tex2html248 HREF=tableofcontents3_1.html><IMG ALIGN=MIDDLE SRC="http://geoff.biop.ox.ac.uk/latex2html/contents_motif.gif"></A> <BR>
6 <B> Next:</B> <A NAME=tex2html247 HREF=subsection3_11_2.html> More complex effects </A>
7 <B>Up:</B> <A NAME=tex2html245 HREF=section3_11.html> Running ALSCRIPT</A>
8 <B> Previous:</B> <A NAME=tex2html239 HREF=section3_11.html> Running ALSCRIPT</A>
9 <HR> <P>
10 <H2><A NAME=SECTION00011100000000000000> Basic Use</A></H2>
11 <P>
12 I recommend you read through this section, then scan the commands in
13 <A HREF=subsection3_16_1.html#app1>ALSCRIPT Command Summary</A> to get a feel for what ALSCRIPT can do.
14 <P>
15 See <A HREF=subsection3_16_8.html#app7>Alternative ways of invoking ALSCRIPT</A>.  In this section, the
16 interactive method is described.  The QUICK START method shown in
17 <A HREF=subsection3_16_8.html#app7>Alternative ways of invoking ALSCRIPT</A>
18 is useful to format a sequence alignment quickly 
19 using standard pointsize and shading.
20 <P>
21 ALSCRIPT is designed to work with AMPS block file format multiple
22 alignments.  If you have a multiple alignment generated by CLUSTAL V
23 or the GCG package, then it must be translated to AMPS block file
24 format.
25 <P>
26 To translate a GCG .MSF file: Type:  msf2blc.
27 To translate a CLUSTAL PIR format file, or any PIR format file:  clus2blc.
28 <P>
29 Both programs prompt for the name of an input file, and an output
30 block file name.   A good convention to follow is to name all blockfiles
31 with the extension &quot;.blc&quot;.
32 <P>
33 To run ALSCRIPT simply type:
34 <P>
35 alscript
36 <P>
37 you will then be prompted for the name of the ALSCRIPT command file.
38 Having typed the filename, the commands will be executed as you have
39 specified.
40 <P>
41 A Simple Command File (example.als)
42 <P>
43 The file example.blc contains a small multiple sequence alignment.
44 The following ALSCRIPT command file will convert this into a
45 PostScript alignment file in 12 point Helvetica.
46 <P>
47 <PRE><TT>
48 #Comments in ALSCRIPT command files start with a #
49 #
50 #Commands are free format - separated by blank, tab or comma characters
51 #
52 BLOCK_FILE      example.blc             #define the block file to format
53 OUTPUT_FILE     example.ps              #where to put the result
54 LANDSCAPE                               #landscape paper orientation
55 POINTSIZE 12                            #12 point default pointsize
56 DEFINE_FONT 0 Helvetica DEFAULT         #set font 0 to be Helvetica
57 SETUP                                   #Tell the program to get on with it.</TT></PRE>
58 <P>
59 Now try changing the POINTSIZE value to 5 ALSCRIPT will re-format the
60 alignment to make best use of the available paper.
61 <P>
62 These are all STEP 1 commands - they refer to overall layout, and system
63 settings - for example, the paper size or maximum sequence length. 
64 Other  commonly used STEP 1 commands are IDENT_WIDTH which reserves more
65 or less  width for the sequence identifier codes, NUMBER_SEQS which adds
66 a  number to each sequence and LINE_WIDTH_FACTOR which allows the
67 thickness of all boxing lines to be adjusted.  See  
68 <A HREF=subsection3_16_1.html#app1>ALSCRIPT Command Summary</A>
69 for details of these and all other  STEP 1 commands.
70 <P>
71 The simple example outlined above can be modified with a variety of 
72 STEP 2 commands.
73 <P>
74 for example file example2.als:
75 <P>
76 <PRE><TT>
77 # FILE example2.als
78 #
79 #Commands are free format - separated by blank, tab or comma characters
80 #
81 BLOCK_FILE      example.blc             #define the block file to format
82 OUTPUT_FILE     example2.ps             #where to put the result
83 LANDSCAPE                               #landscape paper orientation
84 POINTSIZE 12                            #12 point default pointsize
85 DEFINE_FONT 0 Helvetica DEFAULT         #set font 0 to be Helvetica
86 DEFINE_FONT 1 Helvetica REL 0.5         #set font 1 to be half sized Helvetica
87 DEFINE_FONT 3 Helvetica-Bold DEFAULT    #set font 3 to be Bold Helvetica
88 DEFINE_FONT 4 Times-BoldItalic DEFAULT  #font 4 is Times-BoldItalic
89 NUMBER_SEQS                             #Number the sequences at left hand side
90 SETUP                                   #Tell the program to get on with it.
91 #
92 #step 2 commands come after the SETUP command 
93 #
94 #Here are some examples...
95 #
96 SURROUND_CHARS GP ALL           #draw lines around all G and P
97 SHADE_CHARS ILVW ALL 0.6        #shade all I L V and W with value 0.6
98 BOX_REGION 1 1 2 20 0.8         #rectangular box from positions 1 to 2 of sequences 1 to 20
99 FONT_CHARS C ALL 3              #Use font 3 (BOLD Helvetica) for C characters
100 ID_FONT ALL 1                   #set identifiers in font 1</TT></PRE>
101 <P>
102 There are many possible ways of combining these commands and the
103 others shown in 
104 <A HREF=subsection3_16_1.html#app1>ALSCRIPT Command Summary</A>.
105 In general, if you apply multiple
106 commands to the same residue, the effect of the last applied command
107 persists where there would otherwise be a conflict.  Thus the
108 intersection of two overlapping SHADed regions would be shaded
109 according to the second SHADE command, not some mixture of the two.
110 Similarly for FONT commands.  BOX and SURROUND commands behave in the
111 opposite sense, all BOXing and SURROUNDing persists regardless of how
112 many commands you issue.  This makes it possible for example, to
113 SURROUND two different sets of residues as follows:
114 <P>
115 <PRE><TT>
116
117 SURROUND_CHARS DE ALL
118 SURROUND_CHARS DEHKR ALL</TT></PRE>
119 <P>
120 This would result in D and E characters being partitioned from the rest as well
121 as D E H K R characters (see Example output).
122 <P>
123 <HR> <A NAME=tex2html246 HREF=subsection3_11_2.html><IMG ALIGN=MIDDLE SRC="http://geoff.biop.ox.ac.uk/latex2html/next_motif.gif"></A> <A NAME=tex2html244 HREF=section3_11.html><IMG ALIGN=MIDDLE SRC="http://geoff.biop.ox.ac.uk/latex2html/up_motif.gif"></A> <A NAME=tex2html238 HREF=section3_11.html><IMG ALIGN=MIDDLE SRC="http://geoff.biop.ox.ac.uk/latex2html/previous_motif.gif"></A> <A NAME=tex2html248 HREF=tableofcontents3_1.html><IMG ALIGN=MIDDLE SRC="http://geoff.biop.ox.ac.uk/latex2html/contents_motif.gif"></A> <BR>
124 <B> Next:</B> <A NAME=tex2html247 HREF=subsection3_11_2.html> More complex effects </A>
125 <B>Up:</B> <A NAME=tex2html245 HREF=section3_11.html> Running ALSCRIPT</A>
126 <B> Previous:</B> <A NAME=tex2html239 HREF=section3_11.html> Running ALSCRIPT</A>
127 <HR> <P>
128 <HR>
129
130 </BODY>
131 <P><ADDRESS>
132 gjb@bioch.ox.ac.uk
133 </ADDRESS>