readsima {genomic}R Documentation

Read data file in sima format

Description

Reads a single dataset in sima format.

Usage

readsima(filename, pops = TRUE,skip=1)

Arguments

filename filename of the data file
pops Do we have population information?
skip How many lines to skip before dataset

Value

A list with

d haplotype data in rows
positions Positions of the simulation SNPs
locations

{label for the population (min 0)}

Author(s)

Ian J. Wilson

Examples

##---- Should be DIRECTLY executable !! ----
##-- ==>  Define data, use random,
##--    or do  help(data=index)  for the standard data sets.
cat(paste(c("3 5","1 0 0 0 1","0 1 1 1 0"
,"1 1 1 1 0","5","0.01 0.4 0.5 0.7 0.9","3","0 0 1"),sep="\n")
,file="/tmp/tmpfile")
readsima("/tmp/tmpfile",skip=0)

[Package genomic version 1.0 Index]