readSNP: Read data in .SNP format

Description Usage Arguments Details Value Examples

View source: R/readSNP.R

Description

This function reads data in .SNP (quality_variant) format, as distributed by the 1001 Genomes project (Arabidopsis).

Usage

1
2
3
4
5
readSNP(folder,populations=FALSE,outgroup=FALSE,gffpath=FALSE,
	CHR=FALSE,ref.chr=FALSE,snp.window.size=FALSE,
	parallized=FALSE,ffpackagebool=TRUE,
	include.unknown=FALSE
	)

Arguments

folder

the basepath of the variant_calls

outgroup

vector of outgroup sequences

populations

list of populations

gffpath

the corresponding GFF file

CHR

which chromosome ?, default: all chromosomes

ref.chr

reference chromosome (to classify synonymous/non-synonymous positions)

snp.window.size

scan SNP chunks

parallized

multicore computation

ffpackagebool

use the ff-package to save memory space. (slower)

include.unknown

include positions with unknown nucleotides

Details

The ff-package we use to store the SNP information limits the data size to
individuals * (number of SNPs) <= .Machine$integer.max
The text files containing the SNP information of each individual have to be stored in one folder.
The slots transitions, biallelic.sites, and biallelic.substitutions of the class
"regions.data" will be filled.
At this time, if a GFF/GTF is used the data should be organized in a way that
the "CHR" is a numerical value. The prefix "Chr" or "chr" is also supported.

Value

The function creates an object of class "GENOME"

———————————————————
Following Slots will be filled in the "GENOME" object
———————————————————

Slot Description
1. n.sites total number of sites
2. n.biallelic.sites number of biallelic sites
3. region.data some detailed information about the data read
4. region.names names of regions

Examples

1
2
3
4
5
6
7
8
# GENOME.class <- readSNP("...\SNPData")
# GENOME.class <- readSNP("...\SNPData", CHR=1)
# GENOME.class <- readSNP("...\SNPData", CHR=1, gffpath="Gff_file.gff")
# GENOME.class
# GENOME.class <- neutrality.stats(GENOME.class,FAST=TRUE)
# show the result:
# get.sum.data(GENOME.class)
# GENOME.class@region.data

PopGenome documentation built on Feb. 1, 2020, 1:07 a.m.