An S4 class to represent the RAIDS parameters

Details

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:


if (requireNamespace("Seqinfo", quietly=TRUE) &&
     requireNamespace("BSgenome.Hsapiens.UCSC.hg38", quietly=TRUE)) {
     chrInfo <- Seqinfo::seqlengths(BSgenome.Hsapiens.UCSC.hg38::Hsapiens)[1:25]
}

Slots

studyDF

a 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).

studyDFSyn

a 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).

pedStudy

a 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")).

studyType

a 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".

genoSource

a 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.

blockTypeId

a 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".

reference

a single character string with two possible values: '1KGv1.0', '1k_hgdpV0.1'. It specifies the type of inference. Default: "1KGv1.0".

genome

a character string with one possible value: 'HG38'. It specifies the genome used. Default: "HG38".

chrInfo

a vector of positive integer values representing the length of the chromosomes. See 'details' section. Default: seqlengths(Hsapiens)[seq_len(25)].

paramAncestry

a 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).

profileFile

a 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.

profileFileGeno

not used in the current version

pathProfileGDS

a 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.

fileReferenceGDS

a single character string representing the file name of the Reference GDS file. If specified, the file must exist. Default: NULL.

fileReferenceAnnotGDS

a character string representing the file name of the Population Reference GDS Annotation file. If specified, the file must exist. Default: NULL.

inferenceType

a single character string representing the genotype ancestry inference method. The two possible values: 'PCAknn' and 'haploAdmixture'. Default: "PCAknn".

sampleRef

a 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.

batch

a single positive integer representing the current identifier for the batch. Beware, this field is not stored anymore. Default: 1L.

prefix

a single character string representing at the beginning of the synthetic name id. Default: "1".

nbSim

a positive integer representing number of replicated synthitic data (restricted to 1 for the moment). Default: 1L.

posOffset

a single integer that is added to the SNP position to switch from 0-based to 1-based coordinate when needed (or reverse). Default: -1L.

minCov

a single positive integer representing the minimum required coverage. Default: 10L.

minProb

a single numeric between 0 and 1 representing the probability that the calculated genotype call is correct. Default: 0.999.

seqError

a single numeric between 0 and 1 representing the probability of sequencing error. Default: 0.001.

seqErrorSyn

a single numeric between 0 and 1 representing the probability of sequencing error for synthetic. Default: 0.001.

pRecomb

a single positive numeric between 0 and 1 that represents the frequency of phase switching in the synthetic profiles. Default: 0.01.

np

a single positive integer specifying the number of threads to be used. Default: 1L.

listPos

a 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.

syntheticRefDF

a 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:

sample.id

a character string representing the sample identifier.

pop.group

a character string representing the subcontinental population assigned to the sample.

superPop

a character string representing the super-population assigned to the sample.

Default: NULL.

pruningMethod

a 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".

slideWindowMaxBP

a 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.

thresholdLD

a single positive numeric value that represents the LD threshold used in the snpgdsLDpruning function. Default: sqrt(0.1).

specificSNV

a 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.

genoType

a single character string representing the field in the GDS profile file that contains all the genotype information. Default: "geno.ref".

phaseType

a TODO. Default: "phase.ref".

phase

a logical indicating TODO. Default: FALSE.

PCAmissingRate

a 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.

PCAalgorithm

a 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".

eigenCount

a 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.

eigenCountSyn

a TODO. Default: 15L.

kList

a 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).

pcaList

a 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).

fieldPopInRef

a 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".

fieldPopInfAnc

a 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".

fieldSubPop

a 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".

anchorId

a character string representing the name of the identifier of the quasi non-admixed profile from the reference. Default: "sp0.95v0.2".

pathADMIXTURE

a 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.

seedADMIXTURE

a single integer seed for ADMIXTURE program. Default: 432L.

cleanADMIXTUREFiles

a single logical indicating if RAIDS removes ADMIXTURE files after processing. Default: TRUE.

verbose

a logical indicating if message information should be printed. Default: FALSE.

Author

Pascal Belleau, Astrid Deschênes and Alexander Krasnitz