read_metadt {CNVgears} | R Documentation

## Read sample file with minimal metadata

### Description

`read_medaDT` handles the input of the sample table (sampleID, sex, role, famID) in a standardized format.

### Usage

    read_metadt(
      DT_path,
      sample_ID_col = "sample_ID",
      sex_col = "sex",
      role_col = "role",
      fam_ID_col = "fam_ID"
    )

### Arguments

`DT_path` | path to the input file.
`sample_ID_col` | name of the columns containing the sample ID in the original file;
`sex_col` | name of the columns containing the sex information in the original file;
`role_col` | name of the columns containing the role information ID in the original file;
`fam_ID_col` | name of the columns containing the family ID in the original file;

### Details

This function is needed in the first step of virtually every analysis. The input data must have at least the following columns:

- sample ID, self describing;

- sex, ideally in 1/2 format, for males and females, however also "male"/"female" or "Male"/"Female" are accepted;

- role, role of the sample in the family, either "father", "mother", "proband" or "sibling";

- family ID, self describing.

Actual name and order of the columns in the file is not relevant since they are passed to the function via parameter. Since the function in this package are optimized for family based studies, family ID and role information for each sample are required, however if the user is interested only, as an example, in CNVRs computation, genic content annotation or identification of calls in IG regions and does not have such information "role" and famID can be "NA". Note that doing so some functions won't be usable.

### Value

cohort metatadata object, a `data.table`. Will be of the `SampleList` class in future versions.

### Examples

    DT <- read_metadt(DT_path = system.file("extdata", "cohort.ped", package = "CNVgears"),
    sample_ID_col = "Individual ID", fam_ID_col = "Family ID", sex_col = "Gender",
    role_col = "Role")

[Package CNVgears version 1.0.0 Index]