famSKATRC (version 1.0.3)

process_data: Process Data

Description

Processes the raw data included to produce data identical to the (also included) sample.ped.geno data set. This can be used for processing your own pedigrees with SNP data.

Usage

process_data(Data = read.table(system.file("extdata", "data",
                                            package = "famSKATRC"), header = TRUE))

Arguments

Data

A string, the path to the location of the data file you are processing, formatted as the included example, which can be loaded with: read.table(system.file("extdata", "data", package = "famSKATRC"), header = TRUE) and can be found in your filesystem at: system.file("extdata", "data", package = "famSKATRC")

Value

Returns the data frame with completed preprocessing changes for famSKATRC. Mainly reworking IDs so there are not duplicates.

See Also

famSKATRC

Examples

Run this code
# NOT RUN {
sample.ped.geno <- process_data()
## The function is currently defined as
function(Data = read.table(system.file("extdata", "data",
                                                package = "famSKATRC"), header = TRUE))
{
  Data[ , "IID"] = paste(Data[ , "FID"]  , Data[ , "IID"]  ,sep=".")
  Data[Data[,"FA"]!=0 , "FA"] = paste(Data[Data[,"FA"]!=0 , "FID"], Data[Data[,"FA"]!=0,
                                                                        "FA"]  ,sep=".")
  Data[Data[,"FA"]!=0 , "MO"] = paste(Data[Data[,"FA"]!=0 , "FID"], Data[Data[,"FA"]!=0,
                                                                        "MO"]  ,sep=".")
  return(Data)
}
# }

Run the code above in your browser using DataCamp Workspace