| 1 |
.\" Automatically generated by Pod::Man 2.23 (Pod::Simple 3.14) |
| 2 |
.\" |
| 3 |
.\" Standard preamble: |
| 4 |
.\" ======================================================================== |
| 5 |
.de Sp \" Vertical space (when we can't use .PP) |
| 6 |
.if t .sp .5v |
| 7 |
.if n .sp |
| 8 |
.. |
| 9 |
.de Vb \" Begin verbatim text |
| 10 |
.ft CW |
| 11 |
.nf |
| 12 |
.ne \\$1 |
| 13 |
.. |
| 14 |
.de Ve \" End verbatim text |
| 15 |
.ft R |
| 16 |
.fi |
| 17 |
.. |
| 18 |
.\" Set up some character translations and predefined strings. \*(-- will |
| 19 |
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left |
| 20 |
.\" double quote, and \*(R" will give a right double quote. \*(C+ will |
| 21 |
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and |
| 22 |
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, |
| 23 |
.\" nothing in troff, for use with C<>. |
| 24 |
.tr \(*W- |
| 25 |
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' |
| 26 |
.ie n \{\ |
| 27 |
. ds -- \(*W- |
| 28 |
. ds PI pi |
| 29 |
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch |
| 30 |
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch |
| 31 |
. ds L" "" |
| 32 |
. ds R" "" |
| 33 |
. ds C` "" |
| 34 |
. ds C' "" |
| 35 |
'br\} |
| 36 |
.el\{\ |
| 37 |
. ds -- \|\(em\| |
| 38 |
. ds PI \(*p |
| 39 |
. ds L" `` |
| 40 |
. ds R" '' |
| 41 |
'br\} |
| 42 |
.\" |
| 43 |
.\" Escape single quotes in literal strings from groff's Unicode transform. |
| 44 |
.ie \n(.g .ds Aq \(aq |
| 45 |
.el .ds Aq ' |
| 46 |
.\" |
| 47 |
.\" If the F register is turned on, we'll generate index entries on stderr for |
| 48 |
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index |
| 49 |
.\" entries marked with X<> in POD. Of course, you'll have to process the |
| 50 |
.\" output yourself in some meaningful fashion. |
| 51 |
.ie \nF \{\ |
| 52 |
. de IX |
| 53 |
. tm Index:\\$1\t\\n%\t"\\$2" |
| 54 |
.. |
| 55 |
. nr % 0 |
| 56 |
. rr F |
| 57 |
.\} |
| 58 |
.el \{\ |
| 59 |
. de IX |
| 60 |
.. |
| 61 |
.\} |
| 62 |
.\" |
| 63 |
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). |
| 64 |
.\" Fear. Run. Save yourself. No user-serviceable parts. |
| 65 |
. \" fudge factors for nroff and troff |
| 66 |
.if n \{\ |
| 67 |
. ds #H 0 |
| 68 |
. ds #V .8m |
| 69 |
. ds #F .3m |
| 70 |
. ds #[ \f1 |
| 71 |
. ds #] \fP |
| 72 |
.\} |
| 73 |
.if t \{\ |
| 74 |
. ds #H ((1u-(\\\\n(.fu%2u))*.13m) |
| 75 |
. ds #V .6m |
| 76 |
. ds #F 0 |
| 77 |
. ds #[ \& |
| 78 |
. ds #] \& |
| 79 |
.\} |
| 80 |
. \" simple accents for nroff and troff |
| 81 |
.if n \{\ |
| 82 |
. ds ' \& |
| 83 |
. ds ` \& |
| 84 |
. ds ^ \& |
| 85 |
. ds , \& |
| 86 |
. ds ~ ~ |
| 87 |
. ds / |
| 88 |
.\} |
| 89 |
.if t \{\ |
| 90 |
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" |
| 91 |
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' |
| 92 |
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' |
| 93 |
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' |
| 94 |
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' |
| 95 |
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' |
| 96 |
.\} |
| 97 |
. \" troff and (daisy-wheel) nroff accents |
| 98 |
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' |
| 99 |
.ds 8 \h'\*(#H'\(*b\h'-\*(#H' |
| 100 |
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] |
| 101 |
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' |
| 102 |
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' |
| 103 |
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] |
| 104 |
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] |
| 105 |
.ds ae a\h'-(\w'a'u*4/10)'e |
| 106 |
.ds Ae A\h'-(\w'A'u*4/10)'E |
| 107 |
. \" corrections for vroff |
| 108 |
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' |
| 109 |
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' |
| 110 |
. \" for low resolution devices (crt and lpr) |
| 111 |
.if \n(.H>23 .if \n(.V>19 \ |
| 112 |
\{\ |
| 113 |
. ds : e |
| 114 |
. ds 8 ss |
| 115 |
. ds o a |
| 116 |
. ds d- d\h'-1'\(ga |
| 117 |
. ds D- D\h'-1'\(hy |
| 118 |
. ds th \o'bp' |
| 119 |
. ds Th \o'LP' |
| 120 |
. ds ae ae |
| 121 |
. ds Ae AE |
| 122 |
.\} |
| 123 |
.rm #[ #] #H #V #F C |
| 124 |
.\" ======================================================================== |
| 125 |
.\" |
| 126 |
.IX Title "TFBS::DB::FlatFileDir 3" |
| 127 |
.TH TFBS::DB::FlatFileDir 3 "2005-01-04" "perl v5.12.4" "User Contributed Perl Documentation" |
| 128 |
.\" For nroff, turn off justification. Always turn off hyphenation; it makes |
| 129 |
.\" way too many mistakes in technical documents. |
| 130 |
.if n .ad l |
| 131 |
.nh |
| 132 |
.SH "NAME" |
| 133 |
TFBS::DB::FlatFileDir \- interface to a database of pattern matrices |
| 134 |
stored as a collection of flat files in a dedicated directory |
| 135 |
.SH "SYNOPSIS" |
| 136 |
.IX Header "SYNOPSIS" |
| 137 |
.IP "\(bu" 4 |
| 138 |
creating a database object by connecting to the existing directory |
| 139 |
.Sp |
| 140 |
.Vb 1 |
| 141 |
\& my $db = TFBS::DB::FlatFileDir\->connect("/home/boris/MatrixDir"); |
| 142 |
.Ve |
| 143 |
.IP "\(bu" 4 |
| 144 |
retrieving a TFBS::Matrix::* object from the database |
| 145 |
.Sp |
| 146 |
.Vb 2 |
| 147 |
\& # retrieving a PFM by ID |
| 148 |
\& my $pfm = $db\->get_Matrix_by_ID(\*(AqM00079\*(Aq,\*(AqPFM\*(Aq); |
| 149 |
\& |
| 150 |
\& #retrieving a PWM by name |
| 151 |
\& my $pwm = $db\->get_Matrix_by_name(\*(AqNF\-kappaB\*(Aq, \*(AqPWM\*(Aq); |
| 152 |
.Ve |
| 153 |
.IP "\(bu" 4 |
| 154 |
retrieving a set of matrices as a TFBS::MatrixSet object according to various criteria |
| 155 |
.Sp |
| 156 |
.Vb 4 |
| 157 |
\& # retrieving a set of PWMs from a list of IDs: |
| 158 |
\& my @IDlist = (\*(AqM0019\*(Aq, \*(AqM0045\*(Aq, \*(AqM0073\*(Aq, \*(AqM0101\*(Aq); |
| 159 |
\& my $matrixset = $db\->get_MatrixSet(\-IDs => \e@IDlist, |
| 160 |
\& \-matrixtype => "PWM"); |
| 161 |
\& |
| 162 |
\& # retrieving a set of ICMs from a list of names: |
| 163 |
\& my @namelist = (\*(Aqp50\*(Aq, \*(Aqp53\*(Aq, \*(AqHNF\-1\*(Aq. \*(AqGATA\-1\*(Aq, \*(AqGATA\-2\*(Aq, \*(AqGATA\-3\*(Aq); |
| 164 |
\& my $matrixset = $db\->get_MatrixSet(\-names => \e@namelist, |
| 165 |
\& \-matrixtype => "ICM"); |
| 166 |
\& |
| 167 |
\& # retrieving a set of all PFMs in the database |
| 168 |
\& my $matrixset = $db\->get_MatrixSet(\-matrixtype => "PFM"); |
| 169 |
.Ve |
| 170 |
.IP "\(bu" 4 |
| 171 |
creating a new FlatFileDir database in a new directory: |
| 172 |
.Sp |
| 173 |
.Vb 1 |
| 174 |
\& my $db = TFBS::DB::JASPAR2\->create("/home/boris/NewMatrixDir"); |
| 175 |
.Ve |
| 176 |
.IP "\(bu" 4 |
| 177 |
storing a matrix in the database: |
| 178 |
.Sp |
| 179 |
.Vb 2 |
| 180 |
\& #let $pfm is a TFBS::Matrix::PFM object |
| 181 |
\& $db\->store_Matrix($pfm); |
| 182 |
.Ve |
| 183 |
.SH "DESCRIPTION" |
| 184 |
.IX Header "DESCRIPTION" |
| 185 |
TFBS::DB::FlatFileDir is a read/write database interface module that |
| 186 |
retrieves and stores TFBS::Matrix::* and TFBS::MatrixSet |
| 187 |
objects in a set of flat files in a dedicated directory. It has a |
| 188 |
very simple structure and can be easily set up manually if desired. |
| 189 |
.SH "FEEDBACK" |
| 190 |
.IX Header "FEEDBACK" |
| 191 |
Please send bug reports and other comments to the author. |
| 192 |
.SH "AUTHOR \- Boris Lenhard" |
| 193 |
.IX Header "AUTHOR - Boris Lenhard" |
| 194 |
Boris Lenhard <[email protected]> |
| 195 |
.SH "APPENDIX" |
| 196 |
.IX Header "APPENDIX" |
| 197 |
The rest of the documentation details each of the object |
| 198 |
methods. Internal methods are preceded with an underscore. |
| 199 |
.SS "new" |
| 200 |
.IX Subsection "new" |
| 201 |
.Vb 8 |
| 202 |
\& Title : new |
| 203 |
\& Usage : my $db = TFBS::DB::FlatFileDir\->new(%args); |
| 204 |
\& Function: the formal constructor for the TFBS::DB::FlatFileDir object; |
| 205 |
\& most users will not use it \- they will use specialized |
| 206 |
\& I<connect> or I<create> constructors to create a |
| 207 |
\& database object |
| 208 |
\& Returns : a TFBS::DB::FlatFileDir object |
| 209 |
\& Args : \-dir # the directory containing flat files |
| 210 |
.Ve |
| 211 |
.SS "connect" |
| 212 |
.IX Subsection "connect" |
| 213 |
.Vb 8 |
| 214 |
\& Title : connect |
| 215 |
\& Usage : my $db = TFBS::DB::FlatFileDir\->connect($directory); |
| 216 |
\& Function: Creates a database object that retrieves TFBS::Matrix::* |
| 217 |
\& object data from or stores it in an existing directory |
| 218 |
\& Returns : a TFBS::DB::FlatFileDir object |
| 219 |
\& Args : ($directory) |
| 220 |
\& The name of the directory (possibly with fully qualified |
| 221 |
\& path). |
| 222 |
.Ve |
| 223 |
.SS "create" |
| 224 |
.IX Subsection "create" |
| 225 |
.Vb 9 |
| 226 |
\& Title : create |
| 227 |
\& Usage : my $newdb = TFBS::DB::FlatFileDir\->create($new_directory); |
| 228 |
\& Function: connects to the database server, creates a new directory, |
| 229 |
\& sets up a FlatFileDir database and returns a database |
| 230 |
\& object that interfaces the database |
| 231 |
\& Returns : a TFBS::DB::FlatFileDir object |
| 232 |
\& Args : ($new_directory) |
| 233 |
\& The name of the directory to create |
| 234 |
\& (possibly with fully qualified path). |
| 235 |
.Ve |
| 236 |
.SS "get_Matrix_by_ID" |
| 237 |
.IX Subsection "get_Matrix_by_ID" |
| 238 |
.Vb 10 |
| 239 |
\& Title : get_Matrix_by_ID |
| 240 |
\& Usage : my $pfm = $db\->get_Matrix_by_ID(\*(AqM00034\*(Aq, \*(AqPFM\*(Aq); |
| 241 |
\& Function: fetches matrix data under the given ID from the |
| 242 |
\& database and returns a TFBS::Matrix::* object |
| 243 |
\& Returns : a TFBS::Matrix::* object; the exact type of the |
| 244 |
\& object depending on the second argument (allowed |
| 245 |
\& values are \*(AqPFM\*(Aq, \*(AqICM\*(Aq, and \*(AqPWM\*(Aq); returns undef if |
| 246 |
\& matrix with the given ID is not found |
| 247 |
\& Args : (Matrix_ID, Matrix_type) |
| 248 |
\& Matrix_ID is a string; Matrix_type is one of the |
| 249 |
\& following: \*(AqPFM\*(Aq (raw position frequency matrix), |
| 250 |
\& \*(AqICM\*(Aq (information content matrix) or \*(AqPWM\*(Aq (position |
| 251 |
\& weight matrix) |
| 252 |
\& If Matrix_type is omitted, a PWM is retrieved by default. |
| 253 |
.Ve |
| 254 |
.SS "get_Matrix_by_name" |
| 255 |
.IX Subsection "get_Matrix_by_name" |
| 256 |
.Vb 10 |
| 257 |
\& Title : get_Matrix_by_name |
| 258 |
\& Usage : my $pfm = $db\->get_Matrix_by_name(\*(AqHNF\-1\*(Aq, \*(AqPWM\*(Aq); |
| 259 |
\& Function: fetches matrix data under the given name from the |
| 260 |
\& database and returns a TFBS::Matrix::* object |
| 261 |
\& Returns : a TFBS::Matrix::* object; the exact type of the object |
| 262 |
\& depending on the second argument (allowed values are |
| 263 |
\& \*(AqPFM\*(Aq, \*(AqICM\*(Aq, and \*(AqPWM\*(Aq) |
| 264 |
\& Args : (Matrix_name, Matrix_type) |
| 265 |
\& Matrix_name is a string; Matrix_type is one of the |
| 266 |
\& following: |
| 267 |
\& \*(AqPFM\*(Aq (raw position frequency matrix), |
| 268 |
\& \*(AqICM\*(Aq (information content matrix) or |
| 269 |
\& \*(AqPWM\*(Aq (position weight matrix) |
| 270 |
\& If Matrix_type is omitted, a PWM is retrieved by default. |
| 271 |
\& Warning : According to the current JASPAR2 data model, name is |
| 272 |
\& not necessarily a unique identifier. In the case where |
| 273 |
\& there are several matrices with the same name in the |
| 274 |
\& database, the function fetches the first one and prints |
| 275 |
\& a warning on STDERR. You have been warned. |
| 276 |
.Ve |
| 277 |
.SS "store_Matrix" |
| 278 |
.IX Subsection "store_Matrix" |
| 279 |
.Vb 6 |
| 280 |
\& Title : store_Matrix |
| 281 |
\& Usage : $db\->store_Matrix($matrixobj); |
| 282 |
\& Function: Stores the contents of a TFBS::Matrix::DB object in the database |
| 283 |
\& Returns : 0 on success; $@ contents on failure |
| 284 |
\& (this is too C\-like and may change in future versions) |
| 285 |
\& Args : ($matrixobj) # a TFBS::Matrix::* object |
| 286 |
.Ve |
| 287 |
.SS "delete_Matrix_having_ID" |
| 288 |
.IX Subsection "delete_Matrix_having_ID" |
| 289 |
.Vb 9 |
| 290 |
\& Title : delete_Matrix_having_ID |
| 291 |
\& Usage : $db\->delete_Matrix_with_ID(\*(AqM00045\*(Aq); |
| 292 |
\& Function: Deletes the matrix having the given ID from the database |
| 293 |
\& Returns : 0 on success; $@ contents on failure |
| 294 |
\& (this is too C\-like and may change in future versions) |
| 295 |
\& Args : (ID) |
| 296 |
\& A string |
| 297 |
\& Comment : Yeah, yeah, \*(Aqdelete_Matrix_having_ID\*(Aq is a stupid name |
| 298 |
\& for a method, but at least it should be obviuos what it does. |
| 299 |
.Ve |