Learn R Programming

PopGenome (version 1.2.6)

sliding.window.transform-methods: Sliding Window Transformation.

Description

This generic function transforms the existing object of class "GENOME" in another object of class "GENOME", so that sliding window calculations become possible without loosing the method-capacity of the PopGenome environment.

Usage

## S3 method for class 'GENOME':
sliding.window.transform(object, 
	width=7, jump=5, 
	type=1,
	start.pos=FALSE,end.pos=FALSE,
	whole.data=TRUE
	)

Arguments

object
an object of class "GENOME"
width
window size. default:7
jump
jump size. default:5
type
1 scan only biallelic positions (SNPs), 2 scan the genome. default:1
start.pos
start position !
end.pos
end position !
whole.data
scanning the whole data by concatenating the regions. If FALSE, the regions are scaned seperately

Value

  • The function creates an transformed object of class "GENOME"

Examples

Run this code
# GENOME.class       <- readData("...\Alignments")
# slide.GENOME.class <- sliding.window.transform(GENOME.class)
# slide.GENOME.class <- sliding.window.transform(GENOME.class,100,100)
# slide.GENOME.class <- neutrality.stats(slide.GENOME.class)
# slide.GENOME.class@region.names
# values             <- get.neutrality(slide.GENOME.class)
# GENOME.class       <- readSNP("Arabidopsis", CHR=1)
# GENOME.slide       <- sliding.window.transform(GENOME.split, 10000, 10000, type=2,
# start.pos=10000000, end.pos=12000000)
# GENOME.slide@region.names

Run the code above in your browser using DataLab