Last data update: 2014.03.03

R: Filter genotype contents of an smlSet according to certain...
MAFfilterR Documentation

Filter genotype contents of an smlSet according to certain SNP allele frequency features.

Description

Filter genotype contents of an smlSet according to certain SNP allele frequency features.

Usage

MAFfilter(x, lower = 0, upper = 1)

GTFfilter(x, lower = 0)

dropMonomorphies(sms)

Arguments

x

smlSet-class instance

sms

smlSet-class instance

lower

lower bound on MAF or GTF to allow retention of associated locus

upper

upper bound on MAF or GTF to allow retention of associated locus

Details

uses col.summary to compute MAF or GTF. dropMonomorphies also uses col.summary.

Value

smlSet-class instance

Author(s)

VJ Carey <stvjc@channing.harvard.edu>

Examples

if (file.exists(system.file("parts/20.rda", package="GGtools"))) {
 c20 = getSS("GGtools", "20")
 c20
 c20f = MAFfilter(c20, lower=.05)
 c20f
 }

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(GGBase)
Loading required package: snpStats
Loading required package: survival
Loading required package: Matrix
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/GGBase/MAFfilter.Rd_%03d_medium.png", width=480, height=480)
> ### Name: MAFfilter
> ### Title: Filter genotype contents of an smlSet according to certain SNP
> ###   allele frequency features.
> ### Aliases: MAFfilter GTFfilter dropMonomorphies
> ### Keywords: models
> 
> ### ** Examples
> 
> if (file.exists(system.file("parts/20.rda", package="GGtools"))) {
+  c20 = getSS("GGtools", "20")
+  c20
+  c20f = MAFfilter(c20, lower=.05)
+  c20f
+  }
SnpMatrix-based genotype set:
number of samples:  90 
number of chromosomes present:  1 
annotation: illuminaHumanv1.db 
Expression data dims: 47293 x 90 
Total number of SNP: 55039 
Phenodata: An object of class 'AnnotatedDataFrame'
  sampleNames: NA06985 NA06991 ... NA12892 (90 total)
  varLabels: famid persid ... male (7 total)
  varMetadata: labelDescription
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>