Learn R Programming

HTRX (version 1.2.4)

htrx_nfeatures: Total number of features for HTRX

Description

The total number of features in principle from haplotypes (i.e. interactions between SNPs) generated by Haplotype Trend Regression with eXtra flexibility (HTRX) .

Usage

htrx_nfeatures(nsnp, max_int = NULL, htr = FALSE)

Value

htrx_nfeatures returns a positive integer giving the total number of features that each analysis includes.

Arguments

nsnp

a positive integer giving the number of single nucleotide polymorphisms (SNPs) included in the haplotypes.

max_int

a positive integer which specifies the maximum number of SNPs that can interact. If no value is given (by default), interactions between all the SNPs will be considered.

htr

logical. If htr=TRUE, the function returns the total number of features for HTR. By default, htr=FALSE.

Details

The total number of features in principle is 3nsnp-1 for haplotypes containing interactions between all different numbers of SNPs. However, if max_int < nsnp, i.e. only the interactions between at most max_int SNPs are investigated, there will be fewer total number of features.

Examples

Run this code
## the total number of haplotypes consisted of 6 SNPs
## for at most 3-SNP interactions
htrx_nfeatures(nsnp=6,max_int=3)

Run the code above in your browser using DataLab