An S4 class to represent the RAIDS parameters
The chrInfo slot contains the length of the chromosomes. The
length of the chromosomes can be obtain through the
seqlengths library.
As example, for hg38 genome:
studyDFa data.frame containing the information about the
study associated to the analysed sample(s). The data.frame must have
those 3 columns: "study.id", "study.desc", "study.platform". All columns
must be in character strings (no factors). Default:
data.frame(study.id="NotDef", study.desc="NotDef",
study.platform="NotDef", stringsAsFactors=FALSE).
studyDFSyna data.frame containing the information about the
synthetic data to the analysed sample(s). The data.frame must have
those 3 columns: "study.id", "study.desc", "study.platform". All columns
must be in character strings (no factors). Default:
data.frame(study.id="NotDef.Synthetic",
study.desc="NotDef synthetic data", study.platform="Synthetic",
stringsAsFactors=FALSE).
pedStudya data.frame containing the information TODO
with those mandatory columns: "Name.ID",
"Case.ID", "Sample.Type", "Diagnosis", and "Source". All columns must be in
character strings (no factors). All row names should correspond to the
values in the "Name.ID" column.
Default: data.frame(Name.ID=c("ProfileId"), Case.ID=c("ProfileId"),
Sample.Type=c("type"), Diagnosis="NotDef", Source=c("NotDef"),
stringsAsFactors=FALSE, row.names = c("ProfileId")).
studyTypea single character string representing the type of
study. The possible choices are: "LD" and "GeneAware". The type of study
affects the way the estimation of the allelic fraction is done.
Default: "LD".
genoSourcea single character string corresponding to the type
of file with the genotype and the allele information of the profile that
will be provided in the 'profileFile' slot. The valid options are: "VCF",
"generic", "snp-pileup", and "bam". The "generic" format CSV file
must have at least these columns: 'Chromosome', 'Position', 'Ref', 'Alt',
'Count', 'File1R', and 'File1A'. The 'Count' is the depth at the
specified position; 'FileR' is the depth of the reference allele, and
'File1A' is the depth of the specific alternative allele.
Finally, in the case of a "VCF" file, the file must have at least those
genotype fields: GT, AD, and DP. Default: NULL.
blockTypeIda single character string corresponding to
the block type used to extract the block identifiers. The block type must
be present in the GDS Reference Annotation file.
Default: "GeneS.Ensembl.Hsapiens.v86".
referencea single character string with two possible values:
'1KGv1.0', '1k_hgdpV0.1'. It specifies the type of inference.
Default: "1KGv1.0".
genomea character string with one possible value:
'HG38'. It specifies the genome used. Default: "HG38".
chrInfoa vector of positive integer values
representing the length of the chromosomes. See 'details' section.
Default: seqlengths(Hsapiens)[seq_len(25)].
paramAncestrya list of parameters related to ancestry.
The list should contain those three entries: ScanBamParam,
PileupParam, and yieldSize.
Default: list(ScanBamParam=NULL, PileupParam=NULL,
yieldSize=10000000).
profileFilea character string representing the path to the
file with genotype and the allele information of the profile. The format
of the accepted file is determined by the value in the 'genoSource' slot.
A profile would have a file with extension "vcf.gz" when 'genoSource' slot
is "VCF". If 'genoSource' is "generic" or "snp-pileup", then ".txt.gz".
If 'genoSource' is "bam", then ".bam" (the file needs to be indexed with a
existing corresponding ".bai" file). Default: NULL.
profileFileGenonot used in the current version
pathProfileGDSa single character string representing the
path to the directory where the GDS Profile files will be created. If
specified, the directory must exist.
Default: NULL.
fileReferenceGDSa single character string representing
the file name of the Reference GDS file. If specified, the file
must exist. Default: NULL.
fileReferenceAnnotGDSa character string representing the
file name of the Population Reference GDS Annotation file. If specified,
the file must exist. Default: NULL.
inferenceTypea single character string representing the
genotype ancestry inference method. The two possible values:
'PCAknn' and 'haploAdmixture'. Default: "PCAknn".
sampleRefa vector of character strings that represent
a subset of sample identifiers from the GDS Reference File. Those samples
will be used for the ancestry inference. If NULL,
all the samples are retained. This is usefull if you want to removed some
specific samples (ex: samples with admixed ancestry).
Default: NULL.
batcha single positive integer representing the current
identifier for the batch. Beware, this field is not stored anymore.
Default: 1L.
prefixa single character string representing at the
beginning of the synthetic name id. Default: "1".
nbSima positive integer representing number of
replicated synthitic data (restricted to 1 for
the moment). Default: 1L.
posOffseta single integer that is added to the SNP position to
switch from 0-based to 1-based coordinate when needed (or reverse).
Default: -1L.
minCova single positive integer representing the minimum
required coverage. Default: 10L.
minProba single numeric between 0 and 1
representing the probability that the calculated genotype call is correct.
Default: 0.999.
seqErrora single numeric between 0 and 1
representing the probability of sequencing error.
Default: 0.001.
seqErrorSyna single numeric between 0 and 1
representing the probability of sequencing error for synthetic.
Default: 0.001.
pRecomba single positive numeric between 0 and
1 that represents the frequency of phase switching in the
synthetic profiles. Default: 0.01.
npa single positive integer specifying the number of
threads to be used. Default: 1L.
listPosa data.frame containing 2 columns named:
"snp.chromosome" and "snp.position". The first column,
called "snp.chromosome", contains the name of the chromosome where the
SNV is located. The second column, called "snp.position", contains the
position of the SNV on the chromosome. Default: NULL.
syntheticRefDFa data.frame containing a subset of
reference profiles for each sub-population present in the Reference GDS
file. The data.frame must have those columns:
a character string representing the sample
identifier.
a character string representing the
subcontinental population assigned to the sample.
a character string representing the
super-population assigned to the sample.
Default: NULL.
pruningMethoda single character string representing the
method that will be used to calculate the linkage disequilibrium in the
snpgdsLDpruning() function. The 4 possible values
are: "corr", "r", "dprime", and "composite". Default: "corr".
slideWindowMaxBPa single positive integer that represents
the maximum basepairs (bp) in the sliding window. This parameter is used
for the LD pruning done by the snpgdsLDpruning
function. Default: 500000L.
thresholdLDa single positive numeric value that represents
the LD threshold used in the snpgdsLDpruning
function. Default: sqrt(0.1).
specificSNVa data.frame containing 2 columns. The first
column, called "snp.chromosome" contains the name of the chromosome where
the SNV is located. The second column, called "snp.position", contains the
position of the SNV on the chromosome. Optionally, the column "snvKeep"
contains the SNV index in the reference or -1 if not in the reference. It
is used during the pruning step. Default: NULL.
genoTypea single character string representing the field
in the GDS profile file that contains all the genotype information.
Default: "geno.ref".
phaseTypea TODO. Default: "phase.ref".
phasea logical indicating TODO. Default: FALSE.
PCAmissingRatea positive numeric representing the maximum
missing rate retained accepted to use SNPs in the PCA analysis done
with the snpgdsPCA function. If NaN, no
missing threshold. Default: 0.025.
PCAalgorithma single character string representing the
algorithm to use with the snpgdsPCA function. The
algorithm must be implemented and available to the
snpgdsPCA function. The current options are:
'exact' or 'randomized'.
Default: "exact".
eigenCounta single integer indicating the number of
eigenvectors that will be in the output of the snpgdsPCA
function; if 'eigenCount' <= 0, then all eigenvectors are returned.
Default: 32L.
eigenCountSyna TODO. Default: 15L.
kLista vector of positive integer representing the
values tested for the K parameter. The K parameter represents the
number of neighbors used in the K-nearest neighbor analysis.
Default: seq(2L, 15L, 1L).
pcaLista vector of positive integer representing
the values tested for the D parameter. The D parameter represents the
number of dimensions used in the PCA analysis.
Default: seq(2L, 15L, 1L).
fieldPopInRefa single character string representing the name
of the column that contains the known ancestry for the reference profiles in
the Population Reference GDS file (corresponding to the
fileReferenceGDS parameter). Default: "superPop".
fieldPopInfAnca character string representing the name of
the column in the data frame that contains the inferred
super-population ancestry for the samples. The column should be
present in the data frame. Default: "superPop".
fieldSubPopa character string representing the name of
the column in the Population Reference GDS file (corresponding to the
fileReferenceGDS parameter) that contains the sub-population
information for the samples. The column should be present in the Population
Reference GDS file. Default: "pop.group".
anchorIda character string representing the name of the
identifier of the quasi non-admixed profile from the reference.
Default: "sp0.95v0.2".
pathADMIXTUREa character string representing the path pf
the software ADMIXTURE and the binary. If it use a function using ADMIXTURE, then
if it is null, it will try to find it with Sys.which("admixture").
Default: NULL.
seedADMIXTUREa single integer seed for
ADMIXTURE program. Default: 432L.
cleanADMIXTUREFilesa single logical indicating if RAIDS
removes ADMIXTURE files after processing. Default: TRUE.
verbosea logical indicating if message information should be
printed. Default: FALSE.