dot-stdGRL: Standadize ORF GrangesList

.stdGRLR Documentation

Standadize ORF GrangesList

Description

We modify the ORF GrangesList in the following ways: 1. If the names of the orfGRL are NULL, rename each element as "orf_1", "orf_2", etc; 2. Strands marked as "*" are replaced with "+"; 3. Remove elements with multiple chromosomes or strands (one ORF is on multiple chromosomes or different strands); 4. Remove elements where the ORF length is not divisible by 3; and 5. MOST IMPORTANTLY, if an ORF is on positive strand, sort by coordinates (seqnames, start, end) in ascending order. Otherwise, sort by coordinates (seqnames, end, start) in descending order. The purpose is to achieve the same behavior as cdsBy function in GenomicFeatures package.

Usage

.stdGRL(
  orfGRL,
  sameChr = TRUE,
  sameStrand = TRUE,
  orfLengthDivisibleBy3 = TRUE
)

Arguments

orfGRL

A GrangesList object of the ORFs.

sameChr

A logical variable indicating if or not filtering ORFs on multiple chromosomes. (Default: TRUE).

sameStrand

A logical variable indicating if or not filtering ORFs on different strands. (Default: TRUE).

orfLengthDivisibleBy3

A logical variable indicating if or not filtering ORFs where the ORF length is not divisible by 3. (Default: TRUE).

Value

A modified GrangesList object of the ORFs with changes stated above.


nzhang89/RiboSeeker documentation built on April 15, 2022, 10:18 a.m.