TileSeqs {DECIPHER} | R Documentation

## Form a Set of Tiles for Each Group of Sequences.

### Description

Creates a set of tiles that represent each group of sequences in the database for downstream applications.

### Usage

    TileSeqs(dbFile,
             tblName = "Seqs",
             identifier = "",
             minLength = 26,
             maxLength = 27,
             maxTilePermutations = 10,
             minCoverage = 0.9,
             add2tbl = FALSE,
             processors = 1,
             verbose = TRUE,
             ...)

### Arguments

`dbFile` | A SQLite connection object or a character string specifying the path to the database file.
`tblName` | Character string specifying the table of sequences to use for forming tiles.
`identifier` | Optional character string used to narrow the search results to those matching a specific identifier. If "" then all identifiers are selected.
`minLength` | Integer providing the minimum number of nucleotides in each tile. Typically the same or slightly less than `maxLength`.
`maxLength` | Integer providing the maximum number of nucleotides in each tile. Tiles are designed primarily for this length, which should ideally be slightly greater than the maximum length of oligos used in downstream functions.
`maxTilePermutations` | Integer specifying the maximum number of tiles in each target site.
`minCoverage` | Numeric providing the fraction of coverage that is desired for each target site in the group. For example, a `minCoverage` of 0.9 request that additional tiles are added until 90% of the group is represented by the tile permutations.
`add2tbl` | Logical or a character string specifying the table name in which to add the result.
`processors` | The number of processors to use, or `NULL` to automatically detect and use all available processors.
`verbose` | Logical indicating whether to display progress.
`...` | Additional arguments to be passed directly to `SearchDB`.

### Details

`TileSeqs` will create a set of overlapping tiles representing each target site in an alignment of sequences. The most common tile permutations are added until the desired minimum group coverage is obtained. The `dbFile` is assumed to contain `DNAStringSet` sequences (any U's are converted to T's).

Target sites with one more more tiles not meeting a set of requirements are marked with `misprime` equals `TRUE`. Requirements include minimum group coverage, minimum length, and maximum length. Additionally, tiles are required not to contain more than four runs of a single base or four di-nucleotide repeats.

### Value

A `data.frame` with a row for each tile, and multiple columns of information. The `row_names` column gives the row number. The `start`, `end`, `start_aligned`, and `end_aligned` columns provide positioning of the tile in a consensus sequence formed from the group. The column `misprime` is a logical specifying whether the tile meets the specified constraints. The columns `width` and `id` indicate the tile's length and group of origin, respectively.

The `coverage` field gives the fraction of sequences containing the tile in the group that encompass the tile's start and end positions in the alignment, whereas `groupCoverage` contains the fraction of all sequences in the group containing a tile at their respective target site. For example, if only a single sequence out of 10 has information (no gap) in the first alignment position, then `coverage` would be 100% (1.0), while `groupCoverage` would be 10% (0.1).

The final column, `target_site`, provides the sequence of the tile.

### Note

If `add2tbl` is `TRUE` then the tiles will be added to the database table that currently contains the sequences used for tiling. The added tiles may cause interference when querying a table of sequences. Therefore, it is recommended to add the tiles to their own table, for example, by using `add2tbl="Tiles"`.

### Author(s)

Erik Wright eswright@pitt.edu

### See Also

`DesignPrimers`

### Examples

    db <- system.file("extdata", "Bacteria_175seqs.sqlite", package="DECIPHER")
    tiles <- TileSeqs(db, identifier="Pseudomonadales")

[Package DECIPHER version 2.12.0 Index]