ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/bioseg/trunk/README.bioseg
(Generate patch)
# Line 24 | Line 24
24   file:
25      gzip -d < bioseg-x.y.tar.gz | tar xf -
26  
27 + (Or check-out from subversion with:
28 +   svn checkout svn://bioinformatics.org/svnroot/bioseg/trunk bioseg
29 + in the contrib directory)
30 +
31   To install the type, change to the bioseg directory and run
32  
33      make
34      make install
35  
36   The user running "make install" may need root access; depending on the
37 < configuration of PostgreSQL.
37 > configuration of PostgreSQL.  If so this may work:
38 >
39 >    sudo make install
40  
41   This only installs the type implementation and documentation.  To make the
42   type available in any particular database, do
# Line 51 | Line 57
57   If you have a full installation of PostgreSQL, including the pg_config
58   program, bioseg can be unpacked anywhere and built like:
59  
60 <     make USE_PGXS=t
61 <     make install USE_PGXS=t
60 >    make USE_PGXS=t clean
61 >    make USE_PGXS=t
62 >    make install USE_PGXS=t
63 >    (or: sudo make install USE_PGXS=t)
64  
65   and the type can then be installed in a particular database by any user with:
66  
# Line 62 | Line 70
70   SYNTAX
71   ======
72  
73 < The external representation of an interval is formed using one or two
73 > The user visible representation of an interval is formed using one or two
74   integers greater than 0 joined by the range operator ('..' or '...').
75   The first integer must be less than or equal to the second.
76  
77 < 11..22        An interval from 10 to 20 inclusive - length 11 (= 22-11+1)
77 >  11..22        An interval from 11 to 22 inclusive - length 12 (= 22-11+1)
78  
79 < 1...2         The same as 1..2
79 >  1...2         The same as 1..2
80  
81 < 50            The same as 50..50
81 >  50            The same as 50..50
82 >
83 > In a statement, bioseg values have the form:
84 >  '<start>..<end>'::bioseg
85 > or can be created with:
86 >  bioseg_create(start, end)
87 >
88 > For example:
89 >  CREATE TABLE test_bioseg (id integer, seg bioseg);
90 >  insert into test_bioseg values (1, '1000..2000'::bioseg);
91 > or, equivalently
92 >  insert into test_bioseg values (1, bioseg_create(1000, 2000));
93  
94  
95   USAGE
96   =====
97  
98 < Available operators include:
98 > See http://www.bioinformatics.org/bioseg/wiki/Main/BiosegUsage for usage
99 > examples.
100 >
101 > The following is a list of the available operators.  The [a, b] should be
102 > replaced in a statement with 'a..b'::bioseg or bioseg_create(a, b).
103  
104   [a, b] && [c, d]        Overlaps
105  
# Line 157 | Line 180
180   based" or "half-open intervals") run the build with INTERBASE_COORDS defined
181   in make, ie.:
182  
183 +    make clean
184      make INTERBASE_COORDS=t
185      make install INTERBASE_COORDS=t
186 +    (or: sudo make install INTERBASE_COORDS=t)
187  
188   This will compile and install the implementation for the "bioseg0" type.
189 < The "0" in the name being a mnemonic for "0-based".
189 > The "0" in the name is a mnemonic for "0-based".
190  
191 < Then restart PostgreSQL and run:
192 <    psql -d databasename < bioseg.sql
193 < as usual to install the type in the database.
191 > Then read "bioseg0.sql" into your database:
192 >    psql -d databasename < bioseg0.sql
193 > to install the type.
194 >
195 > The bioseg and bioseg0 types can be mixed in the same database.
196  
197 < Note
198 < ----
197 > Notes
198 > -----
199   In the interbase system '1..10'::bioseg0 and '10..20'::bioseg0 don't overlap,
200   whereas in the 1-based system '1..10'::bioseg and '10..20'::bioseg have a one
201   base overlap.  Also note that the length of '1..10'::bioseg0 is 9, whereas the
202   length of '1..10'::bioseg is 10.
203  
204 + Unlike the bioseg type the start and/or end of a bioseg0 can be negative, with
205 + the expected reults.
206 +  eg.   bioseg0_size('-10..10'::bioseg0) == 20
207 +
208   See:
209   http://www.gmod.org/wiki/index.php/Introduction_to_Chado#Interbase_Coordinates
210   for a longer discussion of the differences between the coordinate systems.
# Line 192 | Line 223
223  
224   Note from the author: Most of the code and all of the hard work needed to
225   implement BIOSEG was by Gene Selkov, Jr, author of the SEG type (contrib/seg
226 < in the PostgreSQL source).  All bugs are due to me.
226 > in the PostgreSQL source).  All bugs are due to me (kmr).
227 >
228 >
229 > THANKS
230 > ======
231 >
232 > Thanks to bioinformatics.org for hosting the project.
233  
234  
235   AUTHOR
236   ======
237  
238   Kim Rutherford <kmr@flymine.org>
239 +
240 + SEG code by Gene Selkov, Jr.
241 +

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines