Skip to content

Commit

Permalink
STAARpipelineSummary v0.9.6
Browse files Browse the repository at this point in the history
  • Loading branch information
xihaoli committed Apr 16, 2022
2 parents 3c957ef + a4d745a commit 3fafd16
Show file tree
Hide file tree
Showing 34 changed files with 202 additions and 208 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Package: STAARpipelineSummary
Type: Package
Title: Summarization and Visualization of Analysis Results Generated by STAARpipeline
Version: 0.9.6
Date: 2022-02-17
Date: 2022-04-16
Author: Xihao Li [aut, cre], Zilin Li [aut, cre]
Maintainer: Xihao Li <xihaoli@g.harvard.edu>, Zilin Li <li@hsph.harvard.edu>
Description: An R package for summarizing analysis results generated by STAARpipeline.
Expand Down
8 changes: 3 additions & 5 deletions R/Annotate_Single_Variants.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#' Functionally annotate a list of variants.
#' Functionally annotate a list of variants
#'
#' The \code{Annotate_Single_Variants} function takes in a list of variants to functionally annotate the input variants
#' @param agds_dir file directory of annotated GDS (aGDS) files for all chromosomes (1-22).
Expand All @@ -7,14 +7,14 @@
#' @param QC_label channel name of the QC label in the GDS/aGDS file (default = "annotation/filter").
#' @param Annotation_dir channel name of the annotations in the aGDS file (default = "annotation/info/FunctionalAnnotation").
#' @param Annotation_name_catalog a data frame containing the annotation names and the corresponding channel names in the aGDS file.
#' @param Annotation_name a vector of annotation names used in STAAR (default = NULL).
#' @param Annotation_name a vector of qualitative/quantitative annotation names user wants to extract.
#' @return a data frame containing the basic information (chromosome, position, reference allele and alternative allele)
#' and annotation scores for the input variants.
#' @export

Annotate_Single_Variants <- function(agds_dir,single_variants_list,
QC_label="annotation/filter",Annotation_dir="annotation/info/FunctionalAnnotation",
Annotation_name_catalog,Annotation_name=NULL){
Annotation_name_catalog,Annotation_name){

single_variants_list_info <- single_variants_list[,c("CHR","POS","REF","ALT")]

Expand Down Expand Up @@ -76,5 +76,3 @@ Annotate_Single_Variants <- function(agds_dir,single_variants_list,
return(single_variants_list_info_annotation)
}



4 changes: 2 additions & 2 deletions R/Dynamic_Window_Results_Summary.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#' Summarize the results of dynamic window analysis generated by \code{STAARpipeline} package and
#' perform conditional analysis for (unconditionally) significant genetic regions by adjusting for a given list of known variants.
#' perform conditional analysis for (unconditionally) significant genetic regions by adjusting for a given list of known variants
#'
#' The \code{Dynamic_Window_Results_Summary} function takes in the results of dynamic window analysis generated by \code{STAARpipeline} package,
#' the object from fitting the null model, and the set of known variants to be adjusted for in conditional analysis
Expand Down Expand Up @@ -171,7 +171,7 @@ Dynamic_Window_Results_Summary <- function(agds_dir,jobs_num,input_path,output_p
emthr_genome <- apply(SCANG_B_emthr,2,max)

thr <- quantile(emthr_genome,1-alpha)
SCANG_B_res <- SCANG_B_res[SCANG_B_res[,1]>thr,]
SCANG_B_res <- SCANG_B_res[SCANG_B_res[,1]>thr,,drop=FALSE]

if(length(SCANG_B_res)>=6)
{
Expand Down
4 changes: 2 additions & 2 deletions R/Gene_Centric_Coding_Info.R
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#' @param geno_missing_imputation method of handling missing genotypes. Either "mean" or "minor" (default = "mean").
#' @param Annotation_dir channel name of the annotations in the aGDS file (default = "annotation/info/FunctionalAnnotation").
#' @param Annotation_name_catalog a data frame containing the name and the corresponding channel name in the aGDS file.
#' @param Annotation_name a vector of annotation names used in STAAR (default = NULL).
#' @param Annotation_name a vector of qualitative/quantitative annotation names user wants to extract.
#' @return a data frame containing the basic information (chromosome, position, reference allele and alternative allele),
#' unconditional and conditional the score test p-values,
#' and annotation scores for the rare variants of the input coding mask.
Expand All @@ -33,7 +33,7 @@ Gene_Centric_Coding_Info <- function(category=c("plof","plof_ds","missense","dis
chr,genofile,obj_nullmodel,gene_name,known_loci=NULL,rare_maf_cutoff=0.01,
method_cond=c("optimal","naive"),
QC_label="annotation/filter",variant_type=c("SNV","Indel","variant"),geno_missing_imputation=c("mean","minor"),
Annotation_dir="annotation/info/FunctionalAnnotation",Annotation_name_catalog,Annotation_name=NULL){
Annotation_dir="annotation/info/FunctionalAnnotation",Annotation_name_catalog,Annotation_name){

## evaluate choices
category <- match.arg(category)
Expand Down

0 comments on commit 3fafd16

Please sign in to comment.