exportPrimers: Export TAP-seq primers

Description Usage Arguments Value Functions Examples

Description

A set of functions for TAP-seq primer export. Convert primers stored in TsIO or TsIOList objects to a simple data.frame for easier export. Or create BED format tracks for primers and write them to files for viewing in a genome browser (e.g. IGV).

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
createPrimerTrack(object, color = 1)

## S4 method for signature 'TsIO'
createPrimerTrack(object, color = 1)

## S4 method for signature 'TsIOList'
createPrimerTrack(object, color = 1)

exportPrimerTrack(..., con)

primerDataFrame(object)

## S4 method for signature 'TsIO'
primerDataFrame(object)

## S4 method for signature 'TsIOList'
primerDataFrame(object)

Arguments

object

A TsIO or TsIOList object containing designed primers.

color

Color used for the track (Default: black). Can be any of the three kinds of R color specifications.

...

One or more primer BED tracks created by createPrimerTrack.

con

Connection to which tracks are written. Typically a .bed file.

Value

For createPrimerTrack a data.frame with the primer track in BED format.

Functions

Examples

 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
# chr11 primers example data
data("chr11_primers")

# pick best primers based on predicted off-targets
best_primers <- pickPrimers(chr11_primers, n = 1, by = "off_targets")

# primers data can be exported to a simple data.frame to e.g. write them to a .csv file
primers_df <- primerDataFrame(best_primers)
head(primers_df)


# primer binding sites in transcript sequences can be converted to genomic coordinates to create
# a BED track to visualize primers in a genome browser (e.g. IGV)

# create primer BED track with a fancy color
track <- createPrimerTrack(best_primers[1:5], color = "steelblue3")

# tracks can be written to .bed files using a little helper function (replace con = "" by a file)
exportPrimerTrack(track, con = "")

## Not run: 
# one can easily export primer tracks for multiple TsIO or TsIOList objects (e.g. inner and
# outer nested primers) to one .bed file using different colors for each object. see vignette for
# a practical example:
vignette("tapseq_primer_design", package = "TAPseq")

obj1 <- best_primers[1:5]
obj2 <- best_primers[6:10]
exportPrimerTrack(createPrimerTrack(obj1, color = "steelblue3"),
                  createPrimerTrack(obj2, color = "goldenrod1"),
                  con = "path/to/file.bed")


## End(Not run)

TAPseq documentation built on Nov. 8, 2020, 7:51 p.m.