sliding.window.transform-methods: Sliding Window Transformation

Description Usage Arguments Value Note Examples

Description

This generic function transforms an existing object of class "GENOME" into another object of class "GENOME", in which each region corresponds to one window. This allows to apply the full spectrum of PopGenome methods to sliding window data.

Usage

1
2
3
4
5
6
7
## S4 method for signature '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

scan the complete data by concatenating the regions in "object". If FALSE, each region is scanned seperately.

Value

The function creates a transformed object of class "GENOME".

Note

If you want to scan regions seperately (whole.data=FALSE), you may not use the big.data option in the readData function. PopGenome will scan the data from position 1 to the last observed SNP if start or end-positions are not specified.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
# 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)
# [email protected]
# 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)
# [email protected]

PopGenome documentation built on May 20, 2018, 5:03 p.m.