diff --git a/README.md b/README.md index 9514ef8..8fbd9be 100644 --- a/README.md +++ b/README.md @@ -13,40 +13,53 @@ Fast and efficient summarization of generic bedGraph files from Bisufite sequenc ### Introduction -Bedgraph files generated by BS pipelines often come in various flavors. Critical downstream step requires aggregation of these files into methylation/coverage matrices. This step of data aggregation is done by Methrix, including many other useful downstream functions. +Bedgraph files generated by BS pipelines often come in various flavors. Critical downstream step requires aggregation of these files into methylation/coverage matrices. This step of data aggregation is done by `Methrix`, including many other useful downstream functions. -### Package overview and usage functions +### Package documentation -For more detailed documentation, see the [vignette](https://www.bioconductor.org/packages/release/bioc/vignettes/methrix/inst/doc/methrix.html). +* For a short and quick documentation, see the Bioconductor [vignette](https://www.bioconductor.org/packages/release/bioc/vignettes/methrix/inst/doc/methrix.html) -A examplary complete data analysis with steps from reading in to annotation and differential methylation calling can be find in our [best practice pipeline](https://compepigen.github.io/WGBS_best_practice/best_practices.html). +* A exemplary complete data analysis with steps from reading in to annotation and differential methylation calling can be find in our [WGBS best practices workflow](https://compepigen.github.io/methrix_docs/articles/methrix.html). +### Installation -
- -
+```r +if (!requireNamespace("BiocManager", quietly = TRUE)) + install.packages("BiocManager") -### Summary: +#Installing stable version from BioConductor +BiocManager::install("methrix") + +#Installing developmental version from GitHub +BiocManager::install("CompEpigen/methrix") +``` + +Ideally one should use the newest versions of R and [BioC](https://www.bioconductor.org/install/) versions. In case of the older versions (for e.g, R < 4.0), installing from BioConductor might lead to installing an older version of the package. In that case installing from GitHub might be easier since it is more merciful with regards to versions. + +### Features * Faster summarization of generic bedGraph files with `data.table` back-end * Fills missing CpGs from reference genome * Vectorized code (faster, memory expensive) and non-vectorized code (slower, minimal memory) * Built upon `SummarizedExperiment` with custom methods for CpG extraction, sub-setting, and filtering * Easy conversion to bsseq object for downstream analysis -* Extensive one click interactive html report generation +* Extensive one click interactive html report generation. See [here](https://compepigen.github.io/methrix_docs/articles/raw_report.html) for an example * Supports serialized arrays with `HDF5Array` and `saveHDF5SummarizedExperiment` ### Updates: -see [here](https://github.com/CompEpigen/methrix/blob/master/NEWS.md) +see [here](https://github.com/CompEpigen/methrix/blob/master/NEWS) -### Installation -```r -if (!requireNamespace("BiocManager", quietly = TRUE)) - install.packages("BiocManager") -BiocManager::install("CompEpigen/methrix") -``` -### Usage: +### Quick usage: + +Usage is simple and involves generating a methrix object using [read_bedgraphs()](https://compepigen.github.io/methrix_docs/reference/read_bedgraphs.html) command which can then be passed to all downstream analyses. + ++ +
+ +Below is the two step procedure to import WGBS bedGraph files. + #### Step-1: Extract all CpG loci from the reference genome ```r @@ -120,8 +133,3 @@ get_stats() #Estimate descriptive statistics of the object methrix2bsseq() #Convert methrix to bsseq object ``` - - -### Note - -***This repository is under active development*** diff --git a/vignettes/methrix.Rmd b/vignettes/methrix.Rmd index f776ab1..f429eff 100644 --- a/vignettes/methrix.Rmd +++ b/vignettes/methrix.Rmd @@ -27,13 +27,34 @@ options(tinytex.verbose = TRUE) ## Introduction -This vignette describes basic usage of the package intended to process several large [bedgraph](https://genome.ucsc.edu/goldenPath/help/bedgraph.html) files in R. `Methrix` provides set of function which allows easy importing of various flavors of bedgraphs generated by methylation callers, and many downstream analysis to be performed on large matrices. +`Methrix` provides set of function which allows easy importing of various flavors of bedgraphs generated by methylation callers, and many downstream analysis to be performed on large matrices. + +This vignette describes basic usage of the package intended to process several large [bedgraph](https://genome.ucsc.edu/goldenPath/help/bedgraph.html) files in R. In addition, a detailed exemplary complete data analysis with steps from reading in to annotation and differential methylation calling can be found in our [WGBS best practices workflow](https://compepigen.github.io/methrix_docs/articles/methrix.html) + ## Overview and usage functions of the package ![](overview.png) +### Installation + +```{r} +if (!requireNamespace("BiocManager", quietly = TRUE)) + install.packages("BiocManager") + +#Installing stable version from BioConductor +BiocManager::install("methrix") + +#Installing developmental version from GitHub +BiocManager::install("CompEpigen/methrix") +``` + +***NOTE*** + +Installation from BioConductor requires the BioC and R versions to be the newest. This arises from the restrictions imposed by BioConductor community which might cause package incompatibilities with the earlier versions of R (for e.g; R < 4.0). In that case installing from GitHub might be easier since it is much more merciful with regards to versions. + ## Reading bedgraph files + `read_bedgraphs` function is a versatile bedgraph reader intended to import bedgraph files generated virtually by any sort of methylation calling program. It requires user to provide indices for chromosome names, start position and other required fields. There are also presets available to import `bedgraphs` from most common programs such as `Bismark`, `MethylDackel`, and `MethylcTools`. ```{r, message=FALSE, warning=FALSE, eval=TRUE}