Learn R Programming

kmeRtone (version 1.0)

Kmer_Table: A R6 class wrapper for data.table

Description

A R6 class wrapper for data.table

A R6 class wrapper for data.table

Arguments

Public fields

DT

data.table of k-mers

Methods


Method new()

initialize empty data.table of k-mers

Usage

Kmer_Table$new()


Method print()

Print method.

Usage

Kmer_Table$print()


Method remove_N()

Remove unknown base N.

Usage

Kmer_Table$remove_N()


Method filter_central_pattern()

Filter out k-mers without defined central patterns.

Usage

Kmer_Table$filter_central_pattern(central.pattern, k)

Arguments

central.pattern

Central pattern.

k

Length of k-mer.

Returns

None.


Method update_count()

Update count for existed k-mers in the table.

Usage

Kmer_Table$update_count(kmers, is.strand.sensitive, strand)

Arguments

kmers

K-mer table with new count to be added to the main table.

is.strand.sensitive

Does strand polarity matter?

strand

If yes, what is the strand refers to? "+" or "-".

Returns

None.


Method update_row()

Add new rows for new k-mers with their respective counts that is not existed yet in the main table.

Usage

Kmer_Table$update_row(kmers, is.strand.sensitive, strand)

Arguments

kmers

K-mer table with new k-mers to be added to the main table.

is.strand.sensitive

Does strand polarity matter?

strand

If yes, what is the strand refers to? "+" or "-".

Returns

None.


Method clone()

The objects of this class are cloneable with this method.

Usage

Kmer_Table$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Details

A way to grow data.table in different environment but still retaining access to it. A temporary fix until data.table developer develop update row by reference.