hpgl_arescore: Implement the arescan function in R

View source: R/helpers_misc.R

hpgl_arescoreR Documentation

Implement the arescan function in R

Description

This function was taken almost verbatim from AREScore() in SeqTools Available at: https://github.com/lianos/seqtools.git At least on my computer I could not make that implementation work So I rewrapped its apply() calls and am now hoping to extend its logic a little to make it more sensitive and get rid of some of the spurious parameters or at least make them more transparent.

Usage

hpgl_arescore(
  x,
  basal = 1,
  overlapping = 1.5,
  d1.3 = 0.75,
  d4.6 = 0.4,
  d7.9 = 0.2,
  within.AU = 0.3,
  aub.min.length = 10,
  aub.p.to.start = 0.8,
  aub.p.to.end = 0.55
)

Arguments

x

DNA/RNA StringSet containing the UTR sequences of interest

basal

I dunno.

overlapping

default = 1.5

d1.3

default = 0.75 These parameter names are so stupid, lets be realistic

d4.6

default = 0.4

d7.9

default = 0.2

within.AU

default = 0.3

aub.min.length

default = 10

aub.p.to.start

default = 0.8

aub.p.to.end

default = 0.55

Value

a DataFrame of scores

See Also

[IRanges] [Biostrings] [GenomicRanges]

Examples

## Not run: 
 ## Extract all the genes from my genome, pull a static region 120nt following the stop
 ## and test them for potential ARE sequences.
 ## FIXME: There may be an error in this example, another version I have
 ## handles the +/- strand genes separately, I need to return to this and check
 ## if it is providing the 5' UTR for 1/2 the genome, which would be
 ## unfortunate -- but the logic for testing remains the same.
 are_candidates <- hpgl_arescore(genome)
 utr_genes <- subset(lmajor_annotations, type == 'gene')
 threep <- GenomicRanges::GRanges(seqnames = Rle(utr_genes[,1]),
                                  ranges = IRanges(utr_genes[,3], end=(utr_genes[,3] + 120)),
                                  strand = Rle(utr_genes[,5]),
                                  name = Rle(utr_genes[,10]))
 threep_seqstrings <- Biostrings::getSeq(lm, threep)
 are_test <- hpgltools::hpgl_arescore(x = threep_seqstrings)
 are_genes <- rownames(are_test[ which(are_test$score > 0), ])

## End(Not run)

elsayed-lab/hpgltools documentation built on May 9, 2024, 5:02 a.m.