#Package provides sample data that are loaded with package loading.
data(recodedgen) #PLINK raw formatted data of 10 individiduals with 10 SNPs
data(snpgene) #SNP and its respective GENE annotated.
#Here 10 SNPs are shown annotated in five genes.
#A SNP can be annotated in multiple genes.
gene_annot_counts(recodedgen,snpgene) #run the function
#subset Genes
gene_annot_counts(recodedgen,snpgene,filter_gene=c("GENE1","GENE2"))
#Subset individuals
gene_annot_counts(recodedgen, snpgene,keep_indiv=c("IID_sample1","IID_sample8"))
#subset with genes and samples
gene_annot_counts(recodedgen,snpgene,filter_gene=c("GENE1","GENE2"),
keep_indiv=c("IID_sample1","IID_sample8"))
#impute missing using default method.
gene_annot_counts(recodedgen,snpgene,impute_missing=TRUE)
#Subset on individuals and impute for missing values. Default as mean
gene_annot_counts(recodedgen,snpgene,impute_missing=TRUE,
keep_indiv=c("IID_sample1","IID_sample2","IID_sample10"))
#impute using median method
gene_annot_counts(recodedgen,snpgene,impute_missing=TRUE,impute_method="median")
#end not RUN
Run the code above in your browser using DataLab