summary.jtGWAS: Summarize Jonckheere-Terpstra Test Statistics and P-Values

Description Usage Arguments Value Note See Also Examples

View source: R/summary.jtGWAS.R

Description

Summary method for jtGWAS results.

Usage

1
2
3
## S3 method for class 'jtGWAS'
summary(object, marker2Print=1:10, SNP2Print=1:10, 
				 printP=TRUE, outTopN=NA, subObj=FALSE, ...)	

Arguments

object

A jtGWAS object that is the return of method jtGWAS. Required.

marker2Print

Either a numeric or character vector that indicates the desired dependent variables to print. The default is 1:10. Set to NA to print full results. Optional.

SNP2Print

Either a numeric or character vector that indicates the desired independent variables to print. If outTopN=NA in function jtGWAS, i.e., the results are not sorted, both numeric and character vectors can be used to set the print range. The default range is 1:10. Set to NA to print full results. If outTopN!=NA in function jtGWAS, the range of SNP2Print refers to the range of top normalized statistics computed in jtGWAS and only numeric vectors are processed. Optional.

printP

A boolean indicating whether to print the p-value (TRUE) or the standardized statistics (FALSE). The default value is TRUE.

outTopN

An integer specifying the number of top hits to print in the summary, if the statistics were not sorted during the statistics evaluation (i.e., if outTopN=NA in function jtGWAS). Optional, and the default value is NA.

subObj

A boolean indicating whether to return a jtGWAS object subset per the requested summary (TRUE). Optional. The default value is FALSE (nothing is returned).

...

Additional arguments affecting the summary produced.

Value

If subObj=TRUE, this method returns a jtGWAS object matching the subset of statistics from object that are being printed. For example, if object is not sorted by top hits, summary(object, outTopN=10, subObj=TRUE) will print the summary and return a subset of object that contains only the top 10 SNPs for each marker. If subObj=FALSE, nothing is returned.

Note

This function prints a matrix or paired columns of SNP IDs and statistics/p-values to the log.

See Also

jtGWAS, pvalues

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
# Generate dummy data	
num_patient <- 100
num_marker 	<- 10
num_SNP     <- 500
set.seed(12345);
X_pat_mak <- matrix(rnorm(num_patient*num_marker), num_patient, num_marker)
G_pat_SNP <- matrix(rbinom(num_patient*num_SNP, 2, 0.5), num_patient, num_SNP)
colnames(X_pat_mak) <- colnames(X_pat_mak, do.NULL=FALSE, prefix="Mrk:")
colnames(G_pat_SNP) <- colnames(G_pat_SNP, do.NULL=FALSE, prefix="SNP:")

res <- jtGWAS(X_pat_mak, G_pat_SNP, outTopN=5)
summary(res, marker2Print=c("Mrk:1","Mrk:2"), SNP2Print=1:5, printP=FALSE)
summary(res, marker2Print=NA, SNP2Print=1:5, printP=FALSE)

res <- jtGWAS(X_pat_mak, G_pat_SNP, outTopN=NA)
summary(res, marker2Print=1:10, SNP2Print=1:10, printP=TRUE)
summary(res, marker2Print=c("Mrk:1","Mrk:2"), SNP2Print=c("SNP:1","SNP:2"), printP=TRUE) 

res <- jtGWAS(X_pat_mak, G_pat_SNP, outTopN=NA, standardized=FALSE)
summary(res, outTopN=10)

jtGWAS documentation built on May 1, 2019, 10:41 p.m.