Description Usage Arguments Details Value Author(s) References See Also Examples
setAnnotation
: R implementation of setAnnotation
.
Fills in the tagSNV annotation of IBD segments
given in an object of the class IBDsegmentList
.
The annotation must be given in a file where the first column contains
the position of the SNV and the second the chromosome.
The other columns give the
annotation like "stop gain", "stop loss", "synonymous",
"non-synonymous", "exonic", "intronic", "intergenic", "promotor",
etc.
However other annotations like whether the minor allele is identical
to the Denisova or Neandertal base can be included.
1 2 | ## S4 method for signature 'IBDsegmentList,character'
setAnnotation(IBDsegmentList,filename)
|
IBDsegmentList |
object of class |
filename |
File containing the SNV annotations, where the first column contains the SNV position and the second the chromosome. |
Implementation in R.
object of class IBDsegmentList
in which the annotation for the
tagSNVs is set.
Sepp Hochreiter
S. Hochreiter et al., ‘FABIA: Factor Analysis for Bicluster Acquisition’, Bioinformatics 26(12):1520-1527, 2010.
IBDsegment-class
,
IBDsegmentList-class
,
analyzeIBDsegments
,
compareIBDsegmentLists
,
extractIBDsegments
,
findDenseRegions
,
hapFabia
,
hapFabiaVersion
,
hapRes
,
chr1ASW1000G
,
IBDsegmentList2excel
,
identifyDuplicates
,
iterateIntervals
,
makePipelineFile
,
matrixPlot
,
mergeIBDsegmentLists
,
mergedIBDsegmentList
,
plotIBDsegment
,
res
,
setAnnotation
,
setStatistics
,
sim
,
simu
,
simulateIBDsegmentsFabia
,
simulateIBDsegments
,
split_sparse_matrix
,
toolsFactorizationClass
,
vcftoFABIA
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | old_dir <- getwd()
setwd(tempdir())
data(hapRes)
res <- hapRes$res
sPF <- hapRes$sPF
annot <- hapRes$annot
nnL <- length(Z(res)[1,])
labelsA <- cbind(as.character(1:nnL),
as.character(1:nnL),as.character(1:nnL),
as.character(1:nnL))
resIBDsegmentList <-
extractIBDsegments(res=res,sPF=sPF,
annot=annot,chrom="1",labelsA=labelsA,
ps=0.9,psZ=0.8,inteA=50,thresA=6,mintagSNVs=6,
off=0,procMinIndivids=0.1,thresPrune=1e-3)
tagSNVPositions <-
tagSNVPositions(resIBDsegmentList[[1]])
snvR <- sample(min(tagSNVPositions):max(tagSNVPositions),
length(tagSNVPositions))
snvA <- sort(unique(c(tagSNVPositions,snvR)))
func = c("stopGain","stopLoss","synonymous",
"non-synonymous","-","-","-","-","-","-")
for (i in 1:length(snvA)) {
if (i>1) {
write(paste(snvA[i],"1",sample(func,1),sep=" "),
file="snvAnnotation.txt",ncolumns=100,append=TRUE)
} else {
write(paste(snvA[i],"1",sample(func,1),sep=" "),
file="snvAnnotation.txt",ncolumns=100,append=FALSE)
}
}
tagSNVAnno(resIBDsegmentList[[1]])
resIBDsegmentList <- setAnnotation(resIBDsegmentList,
filename="snvAnnotation.txt")
tagSNVAnno(resIBDsegmentList[[1]])
setwd(old_dir)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.