Description Usage Arguments Details Value References See Also Examples
View source: R/create.anno.mat.R
This method creates a SNP level annotation matrix using 454 ENCODE functional annotations (Pickrell, 2016) that can be then passed to anno.create function to create a annotatedSNPset object.
1 2 | create.anno.mat(snp,base.path='annotation-',fl.suffix=".txt",ncols=454,
start.anno=4,snp.col=3,header=TRUE,index=NULL)
|
snp |
A character vector of rsIDs |
base.path |
The path of the files (physical location on the user's computer) where the ENCODE annotations are stored.Annotation file of J^{th} chromosome must contain 'chrJ' term in its file name.If the location of an Encode file of chromosome 22 is '/home/Encode/anno-chr22.Encode.txt',then |
fl.suffix |
Suffix of the ENCODE annotations files.If an Encode file is 'anno-chr22.Encode.txt',
then |
ncols |
Total number of columns in ENCODE annotations files. |
start.anno |
Column number that indicates starting of annotation column in ENCODE annotations files. |
snp.col |
Column Number or Column Name that indicates the rsIDs in ENCODE annotations files. |
header |
Logical value to indicate column names of ENCODE annotation files.Default is TRUE. |
index |
An index file or NULL. See details. |
To run this function, all the 24 ENCODE annotation files (Pickrell, 2016) for the different chromosomes should be downloaded an uncompressed before running this function or user can use his/her own ENCODE annotation file.If the 'annotaion-CHR.txt' files are not found at the base.path
for any of the chromosomes required, the function terminates with an error. Initially input rsIDs of i^{th} chromosome are matched to SNPs of the annotation file of i^{th} chromosome. Matching entries from each of the chromosomes are extracted, merged and returned as an annotation matrix. If the codeindex is NULL, an index file((A list of choromosome wise SNPs of all ENCODE annotation files) is created and returned. For faster execution, it is recomended to create the index file for the first time and use the same in future.
It returns a R list containning the following items.
anno.mat |
Annotation matrix of input SNPs |
snp.count |
Chromosome wise summary matrix(total No. Input SNPs and Matched SNPs) |
miss.snp |
A list of chromosome wise input SNPs that are not annotated (missing from file specified by base.path) |
miss.dbsnp |
A vector of input SNPs missing in dbSnp |
index |
R list of length 22. |
'https://github.com/joepickrell/fgwas/'
1 2 3 4 5 6 7 8 9 10 | ## Not run:
### Following block of codes may several minutes to complete ###
snpfile <- system.file("sampleData", "snpData.rda", package="GKnowMTest")
load(snpfile) ## loads snpdf
res=create.anno.mat(rownames(snpdf),base.path="/home/Datasets/Encode/",
fl.suffix=".annot.wdist.wcoding")
anm=res[[1]] #anm is the annotation matrix
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.