Detect_Context: Detect sequence context (stranded)

View source: R/Detect_Context.R

Detect_ContextR Documentation

Detect sequence context (stranded)

Description

This function detects contexts and returns a vector of -1, 1 and 0 showing the presense and absense of the selected context. -1 and +1 shows the strand that cytosine is on. This function is not optimized for speed.

Usage

Detect_Context(ref_fasta, chr, pos, context)

Arguments

ref_fasta

fasta file

chr

chromosome(s) to be looked up

pos

position(s) to be looked up

context

context to be detected, accepts IUPAC nucleotide code, if more than 1 C in the context, the target C must be denoted by using an X, for example, "TCX" looks for cytosines preceded by TC. And "XC" looks for cytosines followed by a C.

Note

Corrently this function would return an error for out of bound ranges, such as positions at the edges of the sequence.

Examples

Detect_Context("./ref.fa",chr="chr2",pos=c(1234,2345),"WRCY") -> out


rayanramin/RamPack documentation built on Sept. 2, 2023, 1:20 a.m.