num2base | R Documentation |
Convert numeric (0/1) coded genotype to base (A/T/C/G) coded
num2base(hap, ref, alt)
hap |
a dataframe of consensus haplotypes |
ref |
a character represents reference allele |
alt |
a character represents alternative allele |
a dataframe containing converted haplotypes
Ruidong Li
ref <- sample(c('A','T'),500, replace=TRUE) alt <- sample(c('C','G'),500, replace=TRUE) consensusHap <- data.frame(hap1=rep(0,500),hap2=rep(1,500), total=rep(5,500),rate=rep(1,500), confidence=rep('F',500), stringsAsFactors = FALSE) rownames(consensusHap) <- seq_len(500) hap <- num2base(hap=consensusHap, ref=ref, alt=alt)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.