sample_chromosome_intervals: Helper function to sample random intervals of length...

View source: R/sample_chromosome_intervals.R

sample_chromosome_intervalsR Documentation

Helper function to sample random intervals of length interval_width from chromosomes

Description

This function samples a random locus given the chromosome lenght (chr_size) and interval_width from a chromosome

Usage

sample_chromosome_intervals(
  chr_size,
  interval_width,
  strand,
  size,
  replace = TRUE,
  prob = NULL
)

Arguments

chr_size

an integer value defining the length of the chromosome.

interval_width

the length of the interval that shall be sampled.

strand

from which strand should the interval be sampled? Options are:

  • strand = "plus"

  • strand = "minus"

size

a non-negative integer giving the number of sequences that shall be sampled from random genomic loci.

replace

logical value indicating whether sampling should be with replacement. Default: replace = TRUE.

prob

a vector of probability weights for obtaining the elements of the vector being sampled. Default is prob = NULL.

Author(s)

Hajk-Georg Drost


HajkD/metablastr documentation built on Sept. 14, 2023, 5:26 p.m.