Description Usage Arguments Value Author(s) Examples
Takes a recoded (0,1,2) data.table and returns a vector of fraction of het SNPs for each row Calculates fraction of called SNPs that were called as heterozygous (value of 1) Doesn't include NA calls in calculation
1 | calcHet(genoTable)
|
genoTable |
Data table where SNPs are rows and lines are columns, no metadata columns. Coded as 0,1,2. |
Returns of vector of same length as input with translated values.
Greg Ziegler
1 2 3 4 5 6 7 | alleleTable <- cbind(snpInfo,calcHet(genoTable))
hetThreshold <- 0.1 #change hets to NA for a snp if there are higher than this percentage of hets
length(alleleTable$FracHet[which(alleleTable$FracHet>=0.1)])
alleleTable[,discard := (FracHet>=hetThreshold)]
GenotypeData[which(alleleTable$discard==TRUE)][GenotypeData[which(alleleTable$discard==TRUE)]==1] <- NA
alleleTable[, discard := NULL]
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.