Description Usage Arguments Value Examples
View source: R/readEnrichment.R
Read files created by initFiles and create an Enrichment object.
1 2 3 | readEnrichment(pattern = "Chrom", signalFile, transcriptFile = FALSE,
snpListDir, snpInfoDir, distThresh = 1000, sigThresh = 0.05,
LD = FALSE, ldDir = NULL, mc.cores = 1)
|
pattern |
A character string containing a expression to be matched with all chromosomes files
(e.g., |
signalFile |
The name of the signal file which the data are to be read from
(2 columns: "SNP" and "PVALUE"). Each row of the table appears as one line of the file.
If it does not contain an |
transcriptFile |
A character string naming a file or a data.frame with four columns:
Chromomosome, trancript's name, Starting and Ending positions.
|
snpListDir |
character: character string naming a directory
containing a list of SNPs for one or several chromosomes. |
snpInfoDir |
character: character string naming a directory containing the reference data in a PLINK format (.bed, .bim and .fam). |
distThresh |
numeric: maximal distance (kb) between SNP and gene.
|
sigThresh |
numeric: statistical threshold for signal (e.g., |
LD |
logical: |
ldDir |
character: character string naming a directory where the linkage disequilibrium files
should be read (default |
mc.cores |
numeric: the number of cores to use (default is |
Return an object of class Enrichment partly filled.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | if (interactive()) {
snpListDir <- system.file("extdata/List", package = "snpEnrichment")
signalFile <- system.file("extdata/Signal/toySignal.txt", package = "snpEnrichment")
snpInfoDir <- system.file("extdata/snpInfo", package = "snpEnrichment")
data(transcript)
transcriptFile <- transcript
initFiles(pattern = "Chrom", snpInfoDir, signalFile, mc.cores = 1)
toyData <- readEnrichment(
pattern = "Chrom",
signalFile,
transcriptFile,
snpListDir,
snpInfoDir,
distThresh = 1000,
sigThresh = 0.05,
LD = FALSE,
ldDir = NULL,
mc.cores = 1
)
toyData
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.