Sample_sequence: Sample nucleotides or motifs on a subset of genome defined by...

Description Usage Arguments Value Examples

Description

sample_sequence is used to extract the regions of a query sequence mapped to user defined sub-regions of Genome.

Usage

1
2
sample_sequence(Sequence, Subset_GR, BSgnm, Fixed = F, N = NULL,
  Replace = F)

Arguments

Sequence

a character string indicating the query sequence or motifs; Rules in IUPAC_CODE_MAP is supported when Fixed = FALSE.

Subset_GR

the GRanges object used to define the subset of the genome.

BSgnm

the BSgenome object containing the sequence of the genome.

Fixed

FALSE to support the vague mapping rule of the chagracter string, default is FALSE.

N

number of ranges sampled, by default, it returns all the ranges without sampling.

Replace

whether sample with replacement or not, default is FALSE.

Value

a GRanges object contains the (sampled) mapped regions of the query sequence on the defined subset of the genome.

Examples

1
2
3
4
5
library(TxDb.Hsapiens.UCSC.hg19.knownGene)
library(BSgenome.Hsapiens.UCSC.hg19)
exons_hg19 <- exons(TxDb.Hsapiens.UCSC.hg19.knownGene)
Motif_exons_hg19 <- Sample_sequence_on_TXDB("RRACH",exons_hg19,Hsapiens,N = 100000)
#The command above sample 100000 regions of RRACH on exonic regions of hg19.

ZhenWei10/m6ALogisticModel documentation built on May 17, 2019, 10:11 p.m.