Learn R Programming

PopGenome (version 2.1.6)

splitting.data-methods: Split data into subsites

Description

This generic function splits the data into subsites, if GFF/GTF information is present or if positions are defined accordingly.

Usage

## S3 method for class 'GENOME':
splitting.data(object,subsites=FALSE,positions=FALSE,type=1,
          whole.data=TRUE)

Arguments

object
an object of class "GENOME"
positions
list of positions
subsites
"exon": SNPs in exon regions. "intron": SNPs in intron regions. "coding": SNPs in coding regions (CDS). "utr": SNPs in UTR regions. "gene": SNPs in genes.
type
1: SNP positions 2: Genome positions
whole.data
Scan the whole data by concatenating the regions. If FALSE, the regions are scanned seperately

Value

  • The return value is a modified object of class "GENOME".

Details

Note, if whole.data=FALSE data with n.biallelic.sites==0 should be removed.

Examples

Run this code
# GENOME.class <- readData("\home\Alignments")
# GENOME.class
# GENOME.class.split <- splitting.data(GENOME.class,subsites="exon")
# GENOME.class.split@region.names
# GENOME.class.split <- splitting.data(GENOME.class,positions=list(1:7,8:12))
# GENOME.class.split <- splitting.data(GENOME.class,
# positions=list(2000:3000,12000:13000),type=2)
# GENOME.class.split

Run the code above in your browser using DataLab