Description Usage Arguments Value Examples
Calculate the codon pair score of a sequence relative to a reference codon pair bias.
1 2 |
sequence |
Sequences can be input directly as a character string or as the file path to a fasta file. |
reference |
Reference CPB table. See |
start |
Nucleotide position in the sequence marking the region of the sequence to use for calculation. |
end |
Nucleotide position in the sequence marking the region of the sequence to use for calculation. |
draw |
If TRUE, a line plot showing the local CPS along the length of the sequence is output to the graphics device. |
windowSize |
CPS line plots are smoothed by locally weighted polynomial regression where |
silent |
If TRUE the progress bar is suppressed. |
An invisible list is returned:
averageCPS |
Average of the individual codon pair scores of the input sequence. |
totalCPS |
Numeric vector containing the individual codon pair scores along the sequence length. |
1 2 3 4 5 6 7 8 9 10 11 | fastaLocation <- system.file('tbevns5.fasta', package = 'CPBias')
tbev <- importFasta(fastaLocation)[[1]]
tbevCPS <- CPScalc(tbev, Homo.sapiens)
tbevCPS[[1]]
# Can plot a smoothed line plot with CPScalc output as it is done in
# CPSplot()
CPSx <- 1:length(tbevCPS[[2]])
smoothCPS <- loess(tbevCPS[[2]] ~ CPSx, span = (.05), degree = 2)
lineCPS <- predict(smoothCPS)
plot(lineCPS, type='l')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.