Description Usage Arguments Value Note Author(s) Examples
Fix start and stop signals
1 |
x |
An object of type |
An object of type feat
, in which CDS regions are ensured to
include start codons and exclude stop codons, as required by the GTF2 standard.
If x is stored as a pointer to an object stored in C, signals will be added to x.
Assumes at most one start_codon and at most one stop_codon per transcript.
Melissa J. Hubisz and Adam Siepel
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | exampleArchive <- system.file("extdata", "examples.zip", package="rphast")
featFile <- "gencode.ENr334.gp"
unzip(exampleArchive, featFile)
f <- read.feat(featFile)
f <- add.signals.feat(f)
# let's just look at one gene
geneNames <- tagval.feat(f, "transcript_id")
f <- f[geneNames==geneNames[1],]
# This features file already is correct, so let's mess it up to see
# how fix.start.stop can fix it:
#modify first CDS to not include start
startCodon <- f[f$feature=="start_codon",]
firstCds <- which(f$feature=="CDS" & f$start==startCodon$start)
f[firstCds,]$start <- startCodon$end+1
#modify last CDS to include stop
stopCodon <- f[f$feature=="stop_codon",]
lastCds <- which(f$feature=="CDS" & f$end+1==stopCodon$start)
f[lastCds,]$end <- stopCodon$end
# now call fix.start.stop to fix
f.fixed <- fix.start.stop.feat(f)
# first CDS has been fixed to include start codon
f[firstCds,]
f.fixed[firstCds,]
# last CDS has been fixed to not include stop codon
f[lastCds,]
f.fixed[lastCds,]
unlink(featFile)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.