getPeriodicityWithIterations: A function to compute PSDs with iterations

View source: R/iterations.R

getPeriodicityWithIterationsR Documentation

A function to compute PSDs with iterations

Description

This function computes PSD values of a given k-mer of interest in a set of input sequences. It also iterates the PSD calculation process over shuffled sequences, if n_shuffling is used.

Usage

getPeriodicityWithIterations(x, ...)

## S3 method for class 'DNAStringSet'
getPeriodicityWithIterations(
  x,
  motif,
  n_shuffling = 10,
  cores_shuffling = 1,
  cores_computing = 1,
  order = 1,
  verbose = 1,
  ...
)

## S3 method for class 'GRanges'
getPeriodicityWithIterations(x, genome, ...)

Arguments

x

DNAStringSet, sequences of interest

...

Arguments passed to S3 methods

motif

character, k-mer of interest

n_shuffling

integer, Number of shuffling

cores_shuffling

integer, Number of cores used for shuffling

cores_computing

integer, split the workload over several processors using BiocParallel

order

Integer, which order to take into consideration for shuffling (ushuffle python library must be installed for orders > 1)

verbose

integer, Should the function be verbose?

genome

genome ID, BSgenome or DNAStringSet object (optional, if x is a GRanges)

Value

Several metrics

Methods (by class)

  • DNAStringSet: S3 method for DNAString

  • GRanges: S3 method for GRanges

Examples

data(ce11_proms_seqs)
res <- getPeriodicityWithIterations(
    ce11_proms_seqs[1:10], 
    genome = 'BSgenome.Celegans.UCSC.ce11', 
    motif = 'TT', 
    cores_shuffling = 1
)
res$observed_PSD
res$shuffled_PSD

js2264/periodicDNA documentation built on Nov. 3, 2022, 10:47 p.m.