Learn R Programming

PopGenome (version 2.1.6)

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

## S3 method for class '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
  • 1Position of the SNPs
  • 2Major Codon
  • 3Minor Codon
  • 4Major amino acid
  • 5Minor amino acid
  • 6synonymous (TRUE/FALSE)
  • 7Polarity of the major amino acid
  • 8Polarity 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
# 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