Learn R Programming

PopGenome (version 2.1.6)

readSNP: Read data in .SNP format

Description

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

Usage

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

Value

  • The function creates an object of class "GENOME" --------------------------------------------------------- Following Slots will be filled in the "GENOME" object --------------------------------------------------------- rll{ 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 }

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="" snp="" information="" of="" each="" individual="" have="" to="" be="" stored="" in="" one="" folder.="" 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.

Examples

Run this code
# 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

Run the code above in your browser using DataLab