match_control_group: Best matching control group by least sum of squares

Description Usage Arguments Details Value Examples

Description

The matchcontrolgroup function determines how well an NIPTSample fits within the NIPTControlGroup

Usage

1
2
match_control_group(nipt_sample, nipt_control_group, mode, n_of_samples,
  include_chromosomes = NULL, exclude_chromosomes = NULL)

Arguments

nipt_sample

The NIPTSample object that is the focus of the analysis

nipt_control_group

The NIPTControlGroup object used in the analysis

mode

The function mode. This can either be "subset" or "report". Mode "subset" means the return value will be a new 'NIPTControlGroup' object containing n samples. When mode "report" is used the output is a matrix containing the sum of squares score of the differences between the chromosomal fractions of the sample and the control for every control sample, sorted in increasing score.

n_of_samples

The length of the resulting NIPTControlGroup. Only applicable if mode "subset" is used.

include_chromosomes

integer. Include potential trisomic chromosomes into the comparison? Default = NULL, meaning chromosomes 13, 18 and 21 are not included

exclude_chromosomes

integer.Exclude other autosomal chromosomes besides chromosomes 13, 18 and 21? Default = NULL

Details

The 'matchcontrolgroup' function determines how well an NIPTSample fits within the NIPTControlGroup and, if needed, makes a subset 'NIPTControlGroup' of length n.

Value

The output for mode subset is a new 'NIPTControlGroup' composed of _n_ samples. The output for mode report is a matrix with a single column containing the sum of squares in ascending order.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run: 
##Mode report
scores_control_group <- matchcontrolgroup(nipt_sample = sample_of_interest, 
                                          nipt_control_group = control_group, 
                                          mode = "report", include_chromosomes = c(13,18))

##Mode subset
subset_control_group <- matchcontrolgroup(nipt_sample = sample_of_interest, 
                                          nipt_control_group = control_group, 
                                          mode = "subset", n_of_samples = 50)

## End(Not run) 

molgenis/NIPTeR documentation built on May 23, 2019, 6:02 a.m.