[Genabel-commits] r2085 - pkg/MultiABEL/man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Mar 12 15:24:45 CET 2019


Author: shenxia
Date: 2019-03-12 15:24:44 +0100 (Tue, 12 Mar 2019)
New Revision: 2085

Added:
   pkg/MultiABEL/man/MV.cor.test.Rd
   pkg/MultiABEL/man/MultiSecondary.Rd
Log:
documentation added

Added: pkg/MultiABEL/man/MV.cor.test.Rd
===================================================================
--- pkg/MultiABEL/man/MV.cor.test.Rd	                        (rev 0)
+++ pkg/MultiABEL/man/MV.cor.test.Rd	2019-03-12 14:24:44 UTC (rev 2085)
@@ -0,0 +1,116 @@
+% Generated by roxygen2: do not edit by hand
+% Please edit documentation in R/MV.cor.test.R
+\name{MV.cor.test}
+\alias{MV.cor.test}
+\alias{MV.cor.test,}
+\alias{mv.cor.test}
+\title{Correlation replication test based on multivariate analysis results}
+\usage{
+MV.cor.test(marker, gwa.1, gwa.2, R.1, R.2, traits, nrep = 10000,
+  probs = c(0.025, 0.975), method = "kendall", plot = FALSE)
+}
+\arguments{
+\item{marker}{The SNP to be analyzed}
+
+\item{gwa.1}{GWAS summary statistics for sample 1, includes A1, A2 and two columns for each trait: beta and se}
+
+\item{gwa.2}{GWAS summary statistics for sample 2, includes A1, A2 and two columns for each trait: beta and se}
+
+\item{R.1}{Phenotypic correlation matrix for sample 1}
+
+\item{R.2}{Phenotypic correlation matrix for sample 2}
+
+\item{traits}{Traits to be analyzed}
+
+\item{nrep}{The number of Monte Carlo repetitions}
+
+\item{probs}{Percentiles of the endpoints of confidence interval}
+
+\item{method}{The method used for computing correlation coefficient}
+
+\item{plot}{If the results for making correlation test figure are needed}
+}
+\value{
+The function returns two lists of \code{res}, which includes 
+1) \code{correlation} Estimated correlation computed from original sample; 
+2) \code{ci.left} The value at left endpoint of confidence interval; 
+3) \code{ci.right} The value at right endpoint of confidence interval (Note: If there are only two traits, 
+then the ratio of correlation equals to one is provided instead of ci.left and ci.right),
+and \code{df.plot}, will be provided if \code{plot = TRUE}, includes 
+1) \code{traits} The name of traits in analysis;
+2) \code{rank.1} The rank of estimated effect sizes in sample 1;
+3) \code{rank.2} The rank of estimated effect sizes in sample 2;
+4) \code{mean.conc} The mean of concordant pairs in MC generated by the trait;
+5) \code{sd.conc} The standard deviation of concordant pairs in MC generated by the trait;
+6) \code{se.beta} The standard error of estimated effect sizes computed using inverse-variance weighting.
+}
+\description{
+This function is developed to implement correlation replication test based on MVA or cMVA results
+}
+\examples{
+\dontrun{
+
+data(example.MV.cor.test)
+
+## Six-trait correlation test ##
+traits <- c("HEIGHT", "BMI", "HIP", "WC", "WHR", "WEIGHT")
+set.seed(510)
+MV.cor.test(marker = "rs905938", gwa.1 = example.gwa.1, gwa.2 = example.gwa.2, R.1 = example.R.1,
+            R.2 = example.R.2, traits = traits, nrep = 10000)
+
+## Make correlation correlation test figure ##
+require(ggplot2)
+require(cowplot)
+
+set.seed(510)
+res.mv.cor <- MV.cor.test(marker = "rs905938", gwa.1 = example.gwa.1, gwa.2 = example.gwa.2, R.1 = example.R.1,
+                          R.2 = example.R.2, traits = traits, nrep = 10000, plot = TRUE)
+df.plot <- res.mv.cor$df.plot
+
+p1 <- ggplot()+ 
+  geom_point(data=df.plot, mapping=aes(x=rank.1, y=rank.2, color=traits), size=2) + 
+  geom_point(data=df.plot, mapping=aes(x=rank.1, y=rank.2, color=traits, size = se.beta), alpha = 0.2) + 
+  stat_smooth(data=df.plot, mapping=aes(x=rank.1, y=rank.2), method = "lm", se=FALSE, color="black", size=0.3, fullrange = TRUE) + 
+  coord_cartesian(xlim = c(0.5, 6.5), ylim = c(0.5, 6.5)) + xlim(0,200) + 
+  scale_size_continuous(range = c(3, 10)) +
+  theme(axis.text=element_text(size=10),
+        axis.title=element_text(size=14,face="bold"), 
+        strip.text.x = element_text(size = 16))+ 
+  theme(axis.title.x=element_blank(),axis.text.x=element_blank(),
+        axis.ticks.x=element_blank(),axis.title.y=element_blank(), legend.position = c(0.8,0.3), 
+        legend.background=element_rect(colour='NA', fill='transparent'), legend.key=element_blank(), 
+        legend.title=element_text(size=14), 
+        legend.text=element_text(size=12), legend.key.size = unit(1.4, 'lines')) + 
+  guides(colour = guide_legend(override.aes = list(alpha = 1)), size = FALSE) +
+  scale_colour_discrete(name = "Traits")
+
+p2 <- ggplot(data=df.plot, aes(x=rank.1,y=mean.conc)) +
+  coord_cartesian(xlim = c(0.5, 6.5), ylim = c(0, 5.5)) + 
+  geom_bar(stat = "identity", aes(fill=traits), width = 0.4) + theme(legend.position="none") + theme(
+    strip.background = element_blank(),
+    strip.text.x = element_blank()
+  ) + geom_errorbar(aes(ymin = mean.conc - sd.conc,ymax = mean.conc + sd.conc), width = 0.1)  + 
+  theme(axis.title.x=element_blank(),axis.text.x=element_blank(),
+        axis.ticks.x=element_blank(),axis.title.y=element_blank()) + 
+  theme(plot.margin = unit(c(0, 0, 0, 0), "cm"))
+
+require(cowplot)
+plot_grid(p1,p2,ncol=1,align = "v", rel_heights = c(2,1))
+
+}
+}
+\references{
+Zheng Ning, Yakov Tsepilov, Sodbo Zh. Sharapov, Alexander K. Grishenko, Masoud Shirali, Peter K. Joshi,
+James F. Wilson, Yudi Pawitan, Chris S. Haley, Yurii S. Aulchenko, Xia Shen (2018).
+Multivariate discovery, replication, and interpretation of pleiotropic loci using summary association statistics. \emph{Submitted}.
+}
+\seealso{
+\code{MultiSummary}
+}
+\author{
+Zheng Ning, Xia Shen
+}
+\keyword{correlation}
+\keyword{multivariate,}
+\keyword{replication,}
+\keyword{test}


Property changes on: pkg/MultiABEL/man/MV.cor.test.Rd
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Added: pkg/MultiABEL/man/MultiSecondary.Rd
===================================================================
--- pkg/MultiABEL/man/MultiSecondary.Rd	                        (rev 0)
+++ pkg/MultiABEL/man/MultiSecondary.Rd	2019-03-12 14:24:44 UTC (rev 2085)
@@ -0,0 +1,73 @@
+% Generated by roxygen2: do not edit by hand
+% Please edit documentation in R/MultiSecondary.R
+\name{MultiSecondary}
+\alias{MultiSecondary}
+\alias{MultiSecondary,}
+\alias{multi.secondary}
+\title{Conditional multivariate association analysis using summary statistics}
+\usage{
+MultiSecondary(gwa.region, LD.ref, snp.ref, R.ref, p.threshold = 5e-08,
+  tol = 0.8, traits, v_y = NULL, T2.return = FALSE)
+}
+\arguments{
+\item{gwa.region}{GWAS summary statistics, includes A1, A2 and three columns for each trait: beta, se and N}
+
+\item{LD.ref}{Regional LD matrix including SNPs in gwa.region}
+
+\item{snp.ref}{The reference alleles of SNPs in the reference LD correlation matrix. The names of the vector 
+should be SNP names in reference sample}
+
+\item{R.ref}{Shrinkage phenotypic correlation matrix, achieved from \code{load.summary()}}
+
+\item{p.threshold}{P-value threshold in conditional analysis}
+
+\item{tol}{Tolerance for multicollinearity}
+
+\item{traits}{Traits to be analyzed}
+
+\item{v_y}{The variance of the traits}
+
+\item{T2.return}{Returning conditional T2 statistic or not}
+}
+\value{
+The function returns a list with elements of \code{T2.sele}: The conditional test statistic of the selected variants. 
+It will be provided if \code{T2.return = TRUE}; \code{p.sele}: The conditional p-value of the selected variants;
+\code{b_joint.sele}: The conditional effect size of the selected variants; \code{se_b_joint.sele}: The conditional 
+standard error of the selected variants.
+}
+\description{
+This function is developed to implement cMVA based on multivariate results
+}
+\examples{
+\dontrun{
+data(example.MultiSecondary)
+##### 474 snps around rs905938 #####
+
+## Six-traits cMVA ##
+traits <- c("HEIGHT", "BMI", "HIP", "WC", "WHR", "WEIGHT")
+MultiSecondary(gwa.region = example.gwas, LD.ref = example.LD, 
+				  snp.ref = example.snp.ref, R.ref = example.R.ref,
+               p.threshold = 5e-8, tol = 0.9, traits = traits, T2.return = TRUE)
+
+## Three-traits cMVA ##
+traits <- c("HEIGHT", "BMI", "HIP")
+MultiSecondary(gwa.region = example.gwas, LD.ref = example.LD, 
+               snp.ref = example.snp.ref, R.ref = example.R.ref,
+               p.threshold = 5e-4, tol = 0.9, traits = traits, T2.return = TRUE)
+}
+}
+\references{
+Zheng Ning, Yakov Tsepilov, Sodbo Zh. Sharapov, Alexander K. Grishenko, Masoud Shirali, Peter K. Joshi,
+James F. Wilson, Yudi Pawitan, Chris S. Haley, Yurii S. Aulchenko, Xia Shen (2018).
+Multivariate discovery, replication, and interpretation of pleiotropic loci using summary association statistics. \emph{Submitted}.
+}
+\seealso{
+\code{MultiSummary}
+}
+\author{
+Zheng Ning, Xia Shen
+}
+\keyword{analysis}
+\keyword{conditional}
+\keyword{meta-analysis,}
+\keyword{multivariate,}


Property changes on: pkg/MultiABEL/man/MultiSecondary.Rd
___________________________________________________________________
Added: svn:mime-type
   + text/plain



More information about the Genabel-commits mailing list