From 257e1aa50801ccaa7a2da6df9bc51c9aba6c6bab Mon Sep 17 00:00:00 2001 From: Ararder <48621063+Ararder@users.noreply.github.com> Date: Wed, 24 Jul 2024 14:11:42 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20Ararder/?= =?UTF-8?q?ldsR@3f8b1286d0599af8a97968f2669ae02c5fab761f=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- articles/ldsR.html | 44 ++++++++++++++++++++++++++++---------------- pkgdown.yml | 2 +- reference/index.html | 6 ------ reference/munge.html | 2 +- search.json | 2 +- sitemap.xml | 1 - 6 files changed, 31 insertions(+), 26 deletions(-) diff --git a/articles/ldsR.html b/articles/ldsR.html index ab66e56..e88c431 100644 --- a/articles/ldsR.html +++ b/articles/ldsR.html @@ -66,26 +66,29 @@

Introduction

-

ldsR exposes six functions: 1. celltype_analysis() to -estimate partitioned heritability for many annotations one at a time 2. -ldsc_h2() to estimate heritability for a single trait 3. -ldsc_rg() to estimate the genetic correlation between two -traits 4. munge() to apply quality control filters to a -summary statistics file 5. parse_gwas() a function to read -in summary statistics in the many different formats they can be found in -the wild. 6. partitioned_h2() to estimate partitioned -heritability

+

ldsR exposes five functions:

+

1. celltype_analysis() to estimate partitioned +heritability for many annotations one at a time, while adjusting for a +common set of annotations

+

2. ldsc_h2() to estimate heritability for a single +trait

+

3. ldsc_rg() to estimate the genetic correlation between +two traits

+

4. munge() to apply quality control filters to a summary +statistics file

+

6. partitioned_h2() to estimate partitioned heritability +- OBS, correct enrichemnt estimates for overlapping annotations has not +yet been implemented.

Use ldsR to directly estimate heritability inside R

-

Tired of preparing your files for ldsc? Use ldsR to directly estimate -heritability inside R.

+

Estimate heritability with one line inside R.

ldsc_h2() has only one required argument, a dataframe with the columns SNP, Z and N. The ref-ld-chr and w-ld-chr files are shipped with the ldsR package, but you can also provide your own. By default -the, ldsR uses the ldscores derived from the European subset of 1000 +ldsR uses the ldscores derived from the European subset of 1000 Genomes.

 # example file, 100 000 rows to be lightweight.
@@ -190,8 +193,17 @@ 

Partitioned heritability
 partitioned_h2(
   sumstat1,
-  ldscore_dir = test_path("testdata/baseline")
-)

+ ldscore_dir = system.file("extdata", "baseline1.1_test", package = "ldsR") +) +#> Removed 449 rows after merging with weights +#> Removed 5961 rows after merging with ldscores +#> # A tibble: 4 × 8 +#> annot coef coef_se enrich prop z tot tot_se +#> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> +#> 1 Conserved_LindbladToh.bedL2 8.54e-7 2.55e-7 18.2 0.0212 3.35 0.339 0.0380 +#> 2 baseL2 2.65e-8 8.51e-9 0.563 0.827 3.12 0.339 0.0380 +#> 3 H3K4me1_peaks_Trynka.bedL2 6.92e-8 4.66e-8 1.47 0.140 1.48 0.339 0.0380 +#> 4 Coding_UCSC.bedL2 -2.28e-7 1.61e-7 -4.85 0.0118 -1.42 0.339 0.0380

Cell-type analysis @@ -209,8 +221,8 @@

Cell-type analysis
 celltype_analysis(
   sumstat1,
-  covariate_dir = test_path("testdata/baseline"),
-  ldscore_dir = test_path("testdata/superclusters")
+  covariate_dir = system.file("extdata", "baseline1.1_test", package = "ldsR"),
+  ldscore_dir = system.file("extdata", "superclusters", package = "ldsR")
 )