Learn R Programming

PopGenome (version 2.7.5)

get.codons-methods: Detailed information about the nature of codon changes

Description

This generic function returns some information about the codon changes resulting from the observed SNPs.

Usage

# S4 method for GENOME
get.codons(object, regionID)

Arguments

object

an object of class "GENOME"

regionID

what region/alignment should be analyzed ?

Value

The function get.codons returns a data.frame with the following information

1

Position of the SNPs

2

Major Codon

3

Minor Codon

4

Major amino acid

5

Minor amino acid

6

synonymous (TRUE/FALSE)

7

Polarity of the major amino acid

8

Polarity of the minor amino acid

Details

The slot GENOME.class@region.data@synonymous and GENOME.class@region.data@codons have to be set. The data have to be read in with the correponding GFF file. The function set.synnonsyn(..., save.codons=TRUE) sets the syn/nonsny sites in case of SNP data and stores the corresponding codon changes.

Examples

Run this code
# NOT RUN {
# Alignments
# GENOME.class <- readData("FASTA",gffpath="GFF")
# get.codons(GENOME.class,1)
# SNP data
# GENOME.class <- readData("VCF",gffpath="GFF")
# GENOME.class <- set.synnonsyn(GENOME.class, ref.chr="ref.fas",save.codons=TRUE)
# get.codons(GENOME.class,1)

# }

Run the code above in your browser using DataLab