Learn R Programming

PopGenome (version 1.2.6)

splitting.data-methods: Splitting data into subsites

Description

This generic function splits the data in subsites, if gff/gtf information is present or positions are defined.

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
scanning the whole data by concatenating the regions. If FALSE, the regions are scaned seperately

Value

  • returned value is an modified object of class "GENOME"

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