lrCodons {spliceSites} | R Documentation

## lrCodon methods

### Description

The `lrCodon` function works on `gapSites` objects. `gapSites` manage data on align-gaps which represent data on RNA splice sites. On the contained ranges the function can have two effects: an upstream frame-shift of 0 to 2 positions and a downstream trim to full codons (i.e. (end-start+1)%%3==0). The strand argument controls direction of effects: '+' strand mode means left frame-shift and right truncation. '-' strand mode means right frame-shift and left truncation.

### Usage

    lrCodons(x,frame=1L,strand="+")

### Arguments

`x` | gapSites. Object in which codon positions are calculated
`frame` | Numeric. Default is 1. Accepted values are 1,2 or 3. The value causes a frame-shift of size (frame-1).
`strand` | Character or numeric. Default is '+' which is equivalent to 0. Any other value will be interpreted as '-' which is equivalent to 1.

### Details

The function causes an upstream frameshift and a downstream truncation. `gapSites` objects contain data on gap aligns which represent a related pair of exon-intron boundaries. The returned object is of the same class as the input. Supplemented DNA sequence `gapSites` objects will omit introns and will represent the 'spliced' DNA around the splice site. `lrCodon` function is intended to shift coordinates, so that the resulting DNA-sequence can readily be translated in a putative amino-acid sequence which contains the splice-site.

### Author(s)

Wolfgang Kaisers

### Examples

    # A) Create gapSites object
    bam<-system.file("extdata","rna_fem.bam",package="spliceSites")
    reader<-bamReader(bam,idx=TRUE)
    ga<-alignGapList(reader)
    bamClose(reader)

    # B) lr-Junctions for '+' -strand
    lrj<-lrJunc(ga,lfeatlen=6,rfeatlen=6,strand='+')
    lr1<-lrCodons(lrj,frame=1)
    lr2<-lrCodons(lrj,frame=2)
    lr3<-lrCodons(lrj,frame=3)
    lr<-c(lr1,lr2,lr3)

    # C) lr-Junctions for '-' -strand
    lrj<-lrJunc(ga,lfeatlen=6,rfeatlen=6,strand='-')
    lr1<-lrCodons(lrj,frame=1)
    lr2<-lrCodons(lrj,frame=2)
    lr3<-lrCodons(lrj,frame=3)
    lr<-c(lr1,lr2,lr3)

[Package spliceSites version 1.31.0 Index]