Learn R Programming

PopGenome (version 2.1.6)

set.synnonsyn-methods: Set synonymous positions for SNP data

Description

This generic function classifies the observed biallelic positions read from SNP data files into synonymous and non-synonymous SNPs.

Usage

## S3 method for class 'GENOME':
set.synnonsyn(object,ref.chr,save.codons=FALSE)

Arguments

object
an object of class "GENOME"
ref.chr
the reference chromosome in FASTA format
save.codons
save codon changes

Value

  • The return value is a modified object of class "GENOME" storing syn/nonsyn informations in the slot GENOME.class@region.data@synonymous for each SNP. (1=synonymous,0=non-synonymous) When save.codons is TRUE the SNP related codon changes are saved in the corresponding slot GENOME.class@region.data@codons. (see also get.codons(), codontable() and codonise64())

Examples

Run this code
# GENOME.class <- readData("VCF",format="VCF",gffpath="GFF.Folder")
# GENOME.class <- set.synnonsyn(GENOME.class,ref.chr="ref.fas")
# GENOME.class@region.data@synonymous

Run the code above in your browser using DataLab