create.pool: Create a pool of barcode candidates.

Description Usage Arguments Value See Also Examples

View source: R/create.pool.R

Description

This function creates a vector of sequences of equal length with some filtering applied. These sequences function as the pool of candidate sequences from which an actual DNA barcode set may be constructed, for example by passing the pool as a parameter to the function create.dnabarcodes.

Sequences in the pool are constructed as all possible concatenations of n bases C,G,A, and T with some of them filtered out for various technical reasons.

Users of this package usually do not need to use this function as the function create.dnabarcodes already creates such a pool internally. However, there are some exceptions: A) The user might want to know the set of barcode candidates from which the final DNA barcode set was generated. B) The user might want apply some additional filtering to the pool before constructing a DNA barcode set.

Usage

1
create.pool(n, filter.triplets=TRUE, filter.gc=TRUE, filter.self_complementary=TRUE, cores=detectCores()/2)	

Arguments

n

The length of the sequences in the pool (should be smaller than 20)

filter.triplets

Should sequences that contain at least three repeated equal bases (e.g., AAA, TTT, CCC, or GGG) be filtered out?

filter.gc

Should sequences that have an unbalanced ratio of bases G or C versus A or T be filtered out?

filter.self_complementary

Should self complementary sequences be filtered out?

cores

The number of cores (CPUs) that will be used for parallel (openMP) calculations.

Value

A vector of characters representing the pool of barcode candidates.

See Also

create.dnabarcodes

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
create.pool(4)
length(create.pool(5))
length(create.pool(5, filter.triplets=FALSE, filter.gc=FALSE, filter.self_complementary=FALSE))
#
#
# Create pool, apply additional (useless) filters, create barcode set
pool <- create.pool(5)
length(pool) # 592
pool <- pool[grep("AT",pool,invert=TRUE)]
length(pool) # 468
create.dnabarcodes(5,pool=pool)

Example output

Loading required package: Matrix
Loading required package: parallel
sh: 1: cannot create /dev/null: Permission denied
sh: 1: wc: Permission denied
 [1] "GGAA" "CGAA" "GCAA" "CCAA" "GAGA" "CAGA" "AGGA" "TGGA" "ACGA" "GTGA"
[11] "CTGA" "GACA" "CACA" "AGCA" "ACCA" "TCCA" "GTCA" "CTCA" "GGTA" "CGTA"
[21] "GCTA" "CCTA" "GAAG" "CAAG" "AGAG" "TGAG" "ACAG" "TCAG" "GTAG" "AAGG"
[31] "TAGG" "ATGG" "TTGG" "AACG" "TACG" "ATCG" "TTCG" "GATG" "AGTG" "TGTG"
[41] "ACTG" "TCTG" "GTTG" "CTTG" "GAAC" "CAAC" "AGAC" "TGAC" "ACAC" "TCAC"
[51] "CTAC" "AAGC" "TAGC" "ATGC" "TTGC" "AACC" "TACC" "ATCC" "TTCC" "CATC"
[61] "AGTC" "TGTC" "ACTC" "TCTC" "GTTC" "CTTC" "GGAT" "CGAT" "GCAT" "CCAT"
[71] "GAGT" "CAGT" "AGGT" "TGGT" "TCGT" "GTGT" "CTGT" "GACT" "CACT" "TGCT"
[81] "ACCT" "TCCT" "GTCT" "CTCT" "GGTT" "CGTT" "GCTT" "CCTT"
sh: 1: cannot create /dev/null: Permission denied
sh: 1: wc: Permission denied
[1] 592
sh: 1: cannot create /dev/null: Permission denied
sh: 1: wc: Permission denied
[1] 1024
sh: 1: cannot create /dev/null: Permission denied
sh: 1: wc: Permission denied
[1] 592
[1] 468
sh: 1: cannot create /dev/null: Permission denied
sh: 1: wc: Permission denied
1) Creating pool ...  of size 468
2) Conway closing...  done 
 [1] "GAGAA" "AGCAA" "CCTAA" "CAAGA" "ACGGA" "GTCGA" "TGTGA" "GGACA" "CTGCA"
[10] "TACCA" "CGAAG" "TCGAG" "GTTAG" "TTAGG" "AACGG" "ACACG" "CAGTG" "TGCTG"
[19] "GCAAC" "CACAC" "AGAGC" "TAGGC" "CTTGC" "TCTCC" "GTGTC" "ACCTC" "TCCGT"
[28] "AAGCT" "CGTCT" "GACTT"

DNABarcodes documentation built on Nov. 8, 2020, 5 p.m.