Skip to content

Commit

Permalink
Merge pull request #12 from bschilder/Revised
Browse files Browse the repository at this point in the history
Revised
  • Loading branch information
ftdbdl authored Mar 2, 2023
2 parents a4c61c9 + 1f60e9a commit 95b1b30
Show file tree
Hide file tree
Showing 42 changed files with 675 additions and 548 deletions.
15 changes: 6 additions & 9 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
Package: ThreeWayTest
Type: Package
Title: packageTitle
Version: 0.99.0
Title: ThreeWayTest
Version: 1.0.0
Authors@R: c(
person(given = "yourGivenName",
family = "yourFamilyName",
person(given = "Deliang",
family = "Bu",
role = c("cre"),
email = "[email protected]",
comment = c(ORCID = "yourOrcidId"))
email = "[email protected]",
comment = c(ORCID = "0000-0001-9939-5708"))
)
Description: Summary statistics-based association test for
identifying the pleiotropic effects with set of genetic variants.
Expand All @@ -17,10 +17,7 @@ Encoding: UTF-8
Depends: R (>= 4.0.2)
biocViews:
Imports:
matlib,
MASS,
MSKAT,
AssocTests
Suggests:
rworkflows,
methods,
Expand Down
16 changes: 11 additions & 5 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
# Generated by roxygen2: do not edit by hand

export(calculate_stat_T3)
export(myCCA)
export(quadratic_test)
export(standard_chisq)
export(true_cov_mat_generation_autoregressive)
export(MGAS)
export(TWT)
export(T_3)
export(T_eta)
export(approximate_distribution_coefficient_estimate_T3)
export(chisq_test)
export(coefficient_estimate)
export(gen_autoregressive)
export(generate_null_distribution_T3)
export(metaCCA)
importFrom(MASS,ginv)
importFrom(MASS,mvrnorm)
84 changes: 52 additions & 32 deletions R/data.R
Original file line number Diff line number Diff line change
@@ -1,8 +1,20 @@
#' data_matrix_final
#'
#' @description
#' matrix of real data.
#' (expand description)
#' Data matrix of Polyunsaturated fatty acids in real data analysis。
#' CHR is the chromesome number.
#' SNP is the number of SNP.
#' BP is the poisition of the SNP.
#' ANNOT is gene that this SNP is annoted to.
#' Other Allele is the allele that counts as 0.
#' Effect Allele is the allele that counts as 1.
#' MAF is the allele frequency of other allele.
#' The last 6 columns of wAA, wALA, wDHA, wEDA, wEPA and wLA is the
#' wald test statistics of 6 phenotypes: arachidonic acid,
#' alpha-linolenic acid, docosahexanoic acid, eicosadienoic acid
#' and eicosapentanoic acid.
#' For original data and more detailed data description, please visit:
#' https://grasp.nhlbi.nih.gov/FullResults.aspx. The data is in Year 2009 (2).
#' \code{
#' load(file.path("data","data_matrix_final.Rdata"))
#' usethis::use_data(data_matrix_final, overwrite = TRUE)
Expand All @@ -13,60 +25,68 @@
#' covariance_matrix_data
#'
#' @description
#' The used data for calculating phenotype covariance gene list.
#' (expand description)
#' Part of Polyunsaturated fatty acids data after LD pruning to calculate
#' phenotype covariance matrix. Detailed description is the same as
#' data_matrix_final.
#' \code{
#' load(file.path("data","covariance_matrix_estimated.Rdata"))
#' usethis::use_data(covariance_matrix_data, overwrite = TRUE)
#' }
#' @usage data("covariance_matrix_data")
"covariance_matrix_data"

#' final_1kg_genotype_correct_sub
#' selected_genotype
#'
#' @description
#' Note that the full \emph{final_1kg_genotype_correct.Rdat} is not
#' uploaded because of the size. Here we upload one part-version of this data
#' \emph{final_1kg_genotype_correct_sub.Rdata} and
#' a document on how to access the full data.
#' (add description)
#' 2504 samples in 1000 genomes project for
#' calculating covariance matrix of genotypes.
#' CHR is the chromesome number.
#' SNP is the number of SNP.
#' BP is the poisition of the SNP.
#' Counted is the allele that counts as 1.
#' ALT is the allele that counts as 0.
#' Due to R package limit of data, this is a part-version with 9 SNPs of gene
#' FADS2 to run getting_start.R in the vigneets.
#' For full Data, Please go https://github.com/bschilder/ThreeWayTest.
#' \code{
#' load(file.path("data","final_1kg_genotype_correct_sub.Rdata"))
#' usethis::use_data(final_1kg_genotype_correct_sub, overwrite = TRUE)
#' load(file.path("data","selected_genotype.Rdata"))
#' usethis::use_data(selected_genotype, overwrite = TRUE)
#' }
#' @usage data("final_1kg_genotype_correct_sub")
"final_1kg_genotype_correct_sub"

#' gene_length_list
#'
#' @description
#' (add description)
#' \code{
#' load(file.path("data","gene_length_list.Rdata"))
#' usethis::use_data(gene_length_list, overwrite = TRUE)
#' }
#' @usage data("gene_length_list")
"gene_length_list"
#' @usage data("selected_genotype")
"selected_genotype"

#' gene_list
#'
#' @description
#' (add description)
#' List of gene names for performing real data analysis.
#' \code{
#' load(file.path("data","gene_list.Rdata"))
#' usethis::use_data(gene_list, overwrite = TRUE)
#' }
#' @usage data("gene_list")
"gene_list"

#' snpinfo_12
#' gene_length_list
#'
#' @description
#' Number of SNPs contains in each gene.
#' \code{
#' load(file.path("data","gene_length_list.Rdata"))
#' usethis::use_data(gene_length_list, overwrite = TRUE)
#' }
#' @usage data("gene_length_list")
"gene_length_list"

#' PCA_result
#'
#' @description
#' (add description)
#' Principle components for population stratification used as
#' covariates in regression model. Here we use PCA_result$principal.coordinates
#' as the covariates in our regression model.
#' \code{
#' snpinfo_12 <- read.table(file.path("data","snpinfo_12.txt"), header = FALSE)
#' usethis::use_data(snpinfo_12, overwrite = TRUE)
#' load(file.path("data","PCA_result.Rdata"))
#' usethis::use_data(PCA_result, overwrite = TRUE)
#' }
#' @usage data("snpinfo_12")
"snpinfo_12"
#' @usage data("PCA_result")
"PCA_result"

Loading

0 comments on commit 95b1b30

Please sign in to comment.