| generateMapSnvSel | R Documentation |
The function applies a cut-off filter to the SNP information file to retain only the SNP that have a frequency superior or equal to the specified cut-off in at least one super population. The information about the retained SNPs is saved in a RDS format file. A RDS file containing the indexes of the retained SNP is also created.
generateMapSnvSel(cutOff = 0.01, fileSNV, fileLSNP, fileFREQ)
cutOff |
a single |
fileSNV |
a |
fileLSNP |
a |
fileFREQ |
a |
The filtered SNP information RDS file (parameter fileFREQ), contains
a data.frame with those columns:
CHROM a character string representing the chromosome where
the SNV is located.
POS a character string representing the SNV position on the
chromosome.
REF a character string representing the reference DNA base
for the SNV.
ALT a character string representing the alternative DNA base
for the SNV.\
EAS_AF a character string representing the allele frequency
of the EAS super population.
AFR_AF a character string representing the allele frequency
of the AFR super population.
AMR_AF a character string representing the allele frequency
of the AMR super population.
SAS_AF a character string representing the allele frequency
of the SAS super population.
The integer 0 when successful.
Pascal Belleau, Astrid DeschĂȘnes and Alexander Krasnitz
## Needed package
library(withr)
## Path to the demo pedigree file is located in this package
data.dir <- system.file("extdata", package="RAIDS")
## Demo SNV information file used as input
snvFile <- file.path(data.dir, "matFreqSNV_Demo.txt.bz2")
## Temporary output files
## The first file contains the indexes of the retained SNPs
## The second file contains the filtered SNP information
snpIndexFile <- local_file(file.path(data.dir, "listSNP_TEMP.rds"))
filterSNVFile <- local_file(file.path(data.dir, "mapSNVSel_TEMP.rds"))
## Create a data.frame containing the information of the retained
## samples (samples with existing genotyping files)
generateMapSnvSel(cutOff=0.01, fileSNV=snvFile,
fileLSNP=snpIndexFile, fileFREQ=filterSNVFile)
## Remove temporary files
deferred_run()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.