From 3d343f4e4c8668123d90460f93885c89b459bc43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=C3=A1rbara=20Bitarello?= Date: Fri, 19 Apr 2024 19:19:22 -0400 Subject: [PATCH] Update ncd1.Rd --- man/ncd1.Rd | 66 +++++++---------------------------------------------- 1 file changed, 8 insertions(+), 58 deletions(-) diff --git a/man/ncd1.Rd b/man/ncd1.Rd index 653ffc52..6702d4a2 100644 --- a/man/ncd1.Rd +++ b/man/ncd1.Rd @@ -4,81 +4,31 @@ \alias{ncd1} \title{Calculate non-central statistic (NCD1)} \usage{ -ncd1( - x = x, - tf = 0.5, - fold = T, - w = 3000, - by.snp = TRUE, - mid = FALSE, - ncores = 2, - selectwin = "val", - targetpos = NULL, - minIS = 2, - label = NULL, - verbose = T -) - -ncd1( - x = x, - tf = 0.5, - fold = T, - w = 3000, - by.snp = TRUE, - mid = FALSE, - ncores = 2, - selectwin = "val", - targetpos = NULL, - minIS = 2, - label = NULL, - verbose = T -) +ncd1(x = x, tf = 0.5, w = 3000, ncores = 2, minIS = 2, by = "POS") } \arguments{ -\item{x}{A data.table object} - -\item{tf}{Target frequency} - -\item{fold}{Logical. If TRUE, NCD1 will use minor allele frequencies.} - -\item{w}{Window size in bp. Default is 1000} - -\item{by.snp}{Logical. If TRUE, windows are defined around each SNP -in the input data. Else, slidding windows in the range first pos:last pos -will be used.} - -\item{mid}{Logical. If TRUE runs NCD centered on a core SNP frequency instead of a pre-defined tf. Requires targetpos.} +\item{x}{A data.table object with +columns: CHR, POS, REF, ALT, tx_1 (number of alternate allele copies), +tn_1 (total number of alleles).} -\item{ncores}{Number of cores. Increasing this can spead things up for you. -Default is 4.} +\item{tf}{Target frequency.} -\item{selectwin}{Select window. "val" returns the window with the lowest test. "maf" returns the window -which has the lowest difference between its central MAF and the tf."mid" returns the window -centered closest on a value provided by the user under targetpos."all" returns all windows (idea for when the user wants to select windows after scanning a genome)} +\item{w}{Window size in bp. Default is 3000.} -\item{targetpos}{Position of the target SNP. Only needed for mid==T} +\item{ncores}{Number of cores. Increasing this can speed things up for you. +Default is 2.} \item{minIS}{Minimum number of informative sites. Default is 2. Windows with less informative sites than this threshold are discarded.} -\item{label}{An optional label to include as the last column of the output. Defaults to value in selectwin.} - -\item{verbose}{Logical. If TRUE, progress reports will be printed as the -function runs.} - \item{by}{Define how to scan the genome. "POS" (default) defined sliding windows based on w. "IS" defined windows around each informative site.} } \value{ A data.table object with columns: Win.ID, S (sites), IS (informative sites), tf, ncd1 - -A data.table object } \description{ -Calculate non-central statistic (NCD1) - Calculate non-central statistic (NCD1) } \examples{ ncd1(x=ncd1_input, tf=0.5, w=3000, ncores=2, minIS=8) -ncd1(x=ncd1_input, selectwin="mid", targetpos=15000, mid=TRUE) }