snp.subset: function to subset objects of class scan.gwaa and...

Description Usage Arguments Value Author(s) See Also Examples

View source: R/snp.subset.R

Description

Computing objects of class scan.gwaa may take long, especially when haplotypic analysis is performed. Therefore this function helps substracting results on some region (indicated by list of SNPs)

Usage

1
snp.subset(data, snpsubset)

Arguments

data

object of class scan.gwaa-class or check.marker-class

snpsubset

character vector of snps to select

Value

Object of class scan.gwaa-class or check.marker-class

Author(s)

Yurii Aulchenko

See Also

scan.gwaa-class, check.marker-class

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
require(GenABEL.data)
data(srdta)
# processing check.marker object
#mc <- check.marker(data=srdta@gtdata[,1:100],redundant="all",maf=0.01,
# minconcordance=0.9,fdr=.1,ibs.mrk=0)
mc <- check.marker(data=srdta@gtdata[,1:100],maf=0.01,fdr=.1,ibs.mrk=0)
summary(mc)
#plot(mc)
mc1 <- snp.subset(mc,snps=srdta@gtdata@snpnames[20:50])
summary(mc1)
#plot(mc1)
# processing scan.gwaa object
a <- qtscore(qt3~sex+age,data=srdta)
plot(a)
a1 <- snp.subset(a,snps=srdta@gtdata@snpnames[10:20])
plot(a1)

Example output

Loading required package: MASS
Loading required package: GenABEL.data
Excluding people/markers with extremely low call rate...
100 markers and 2500 people in total
0 people excluded because of call rate < 0.1 
0 markers excluded because of call rate < 0.1 
Passed: 100 markers and 2500 people

RUN 1 
100 markers and 2500 people in total
0 (0%) markers excluded as having low (<1%) minor allele frequency
37 (37%) markers excluded because of low (<95%) call rate
2 (2%) markers excluded because they are out of HWE (FDR <0.1)
823 (32.92%) people excluded because of low (<95%) call rate
Mean autosomal HET is 0.3487854 (s.e. 0.1133168)
0 people excluded because too high autosomal heterozygosity (FDR <1%)
In total, 61 (61%) markers passed all criteria
In total, 1677 (67.08%) people passed all criteria

RUN 2 
61 markers and 1677 people in total
0 (0%) markers excluded as having low (<1%) minor allele frequency
0 (0%) markers excluded because of low (<95%) call rate
0 (0%) markers excluded because they are out of HWE (FDR <0.1)
0 (0%) people excluded because of low (<95%) call rate
Mean autosomal HET is 0.3492996 (s.e. 0.1143979)
0 people excluded because too high autosomal heterozygosity (FDR <1%)
In total, 61 (100%) markers passed all criteria
In total, 1677 (100%) people passed all criteria
$`Per-SNP fails statistics`
          NoCall NoMAF NoHWE Redundant Xsnpfail
NoCall        37     0     0         0        0
NoMAF         NA     0     0         0        0
NoHWE         NA    NA     2         0        0
Redundant     NA    NA    NA         0        0
Xsnpfail      NA    NA    NA        NA        0

$`Per-person fails statistics`
            IDnoCall HetFail IBSFail isfemale ismale isXXY otherSexErr
IDnoCall         823       0       0        0      0     0           0
HetFail           NA       0       0        0      0     0           0
IBSFail           NA      NA       0        0      0     0           0
isfemale          NA      NA      NA        0      0     0           0
ismale            NA      NA      NA       NA      0     0           0
isXXY             NA      NA      NA       NA     NA     0           0
otherSexErr       NA      NA      NA       NA     NA    NA           0

$`Per-SNP fails statistics`
          NoCall NoMAF NoHWE Redundant Xsnpfail
NoCall        11     0     0         0        0
NoMAF         NA     0     0         0        0
NoHWE         NA    NA     0         0        0
Redundant     NA    NA    NA         0        0
Xsnpfail      NA    NA    NA        NA        0

$`Per-person fails statistics`
            IDnoCall HetFail IBSFail isfemale ismale isXXY otherSexErr
IDnoCall           0       0       0        0      0     0           0
HetFail           NA       0       0        0      0     0           0
IBSFail           NA      NA       0        0      0     0           0
isfemale          NA      NA      NA        0      0     0           0
ismale            NA      NA      NA       NA      0     0           0
isXXY             NA      NA      NA       NA     NA     0           0
otherSexErr       NA      NA      NA       NA     NA    NA           0

Warning messages:
1: In qtscore(qt3 ~ sex + age, data = srdta) :
  11 observations deleted due to missingness
2: In qtscore(qt3 ~ sex + age, data = srdta) :
  Lambda estimated < 1, set to 1

GenABEL documentation built on May 30, 2017, 3:36 a.m.

Related to snp.subset in GenABEL...