truncateSeq {spliceSites} | R Documentation

## truncateSeq method

### Description

truncateSeqs amino acid sequences at positions depicted by '*' (stop-codon).

### Usage

    truncateSeq(x,rme=TRUE,trunc=42L)

### Arguments

`x` | caRanges. Object in which amino-acid sequences are to be truncated.
`rme` | Logical. Default is TRUE. When TRUE, sites with resulting empty sequence (i.e. stop-codon upstream of the splice position) are removed from dataset.
`trunc` | Integer. ASCII code for character at which truncation should occur. Default value is 42='*' (stop-codon).

### Details

The function truncateSeqs the contained amino acid sequences. When the stop-codon is found on the left side of position, the function returns an empty sequence for that site. The position values for these records are also set to 0.

### Value

Object of same class as input.

### Author(s)

Wolfgang Kaisers

### Examples

    # A) Read gap-sites from BAM-file
    bam<-system.file("extdata","rna_fem.bam",package="spliceSites")
    reader<-bamReader(bam,idx=TRUE)
    ga<-alignGapList(reader)
    bamClose(reader)
    # B) Load DNA sequence
    dnafile<-system.file("extdata","dna_small.RData",package="spliceSites")
    load(dnafile)
    ucf<-system.file("extdata","uc_small.RData",package="spliceSites")
    uc<-loadGenome(ucf)
    # C) Calculate codon frame data and add DNA
    lj<-lJunc(ga,featlen=21,gaplen=21,strand='+')
    ljc<-lCodons(lj,frame=1,keepStrand=TRUE)
    cdr<-dnaRanges(ljc,dna_small)
    # D) Translate DNA to amino acid and truncate
    ar<-translate(cdr)
    tra<-truncateSeq(ar)

[Package spliceSites version 1.30.0 Index]