From 8f58206958147aa0b97b2765dfa3cd65c79eaa35 Mon Sep 17 00:00:00 2001 From: jamespeapen <39574560+jamespeapen@users.noreply.github.com> Date: Wed, 28 Aug 2024 19:25:57 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20huishenl?= =?UTF-8?q?ab/iscream@18970bdcaf679328365387cc0b021d0f4dcf0f95=20?= =?UTF-8?q?=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dev/pkgdown.yml | 2 +- dev/reference/index.html | 119 ---------------------------------- dev/reference/query_all.html | 2 +- dev/reference/region_map.html | 6 +- dev/search.json | 2 +- dev/sitemap.xml | 19 ------ 6 files changed, 6 insertions(+), 144 deletions(-) diff --git a/dev/pkgdown.yml b/dev/pkgdown.yml index b12b8cd..8fb8978 100644 --- a/dev/pkgdown.yml +++ b/dev/pkgdown.yml @@ -2,7 +2,7 @@ pandoc: 3.1.11 pkgdown: 2.1.0 pkgdown_sha: ~ articles: {} -last_built: 2024-08-28T18:44Z +last_built: 2024-08-28T19:25Z urls: reference: https://huishenlab.github.io/iscream/reference article: https://huishenlab.github.io/iscream/articles diff --git a/dev/reference/index.html b/dev/reference/index.html index a1aec0f..7ebe801 100644 --- a/dev/reference/index.html +++ b/dev/reference/index.html @@ -110,125 +110,6 @@

Logging
Set logging level
-
-

Experimental

- - - - -
- - - - -
- - decode_beta() - -
-
Beta value decoder
-
- - decode_cov() - -
-
Coverage value decoder
-
- - decode_m() - -
-
M value decoder
-
- - decoder() - -
-
Get decoded values
-
- - joiner() - -
-
Cpg and sample joiner
-
- - make_beta_mat() - -
-
Beta matrix
-
- - make_bsseq_hm() - -
-
Make a BSSeq object
-
- - make_bsseq_lm() - -
-
Make a BSSeq object using less memory
-
- - make_coverage_mat() - -
-
Cov matrix
-
- - make_m_mat() - -
-
M value matrix
-
- - make_meth_mat() - -
-
Methylation matrix
-
- - make_sparse_mat() - -
-
Sparse Methylation matrix
-
- - make_sparse_mat_bs() - -
-
BSSeq Sparse Methylation matrix
-
- - read_sample() - -
-
Sample reader
-
- - read_sample_bs() - -
-
BSSeq Sample reader
-
- - vdecoder() - -
-
Vector Decoder
-
- - vdouble_decoder() - -
-
Double Vector Decoder
-
- - vencoder() - -
-
Vector Encoder
diff --git a/dev/reference/query_all.html b/dev/reference/query_all.html index 9f3d297..c6c5c67 100644 --- a/dev/reference/query_all.html +++ b/dev/reference/query_all.html @@ -149,7 +149,7 @@

Examples# make a vector of regions regions <- c("chr1:1-6", "chr1:7-10", "chr1:11-14") query_all(bedfiles, regions) -#> [18:44:25.651777] [iscream::query_all] [info] Querying 3 regions from 4 bedfiles +#> [19:25:41.281923] [iscream::query_all] [info] Querying 3 regions from 4 bedfiles #> #> $M #> a b c d diff --git a/dev/reference/region_map.html b/dev/reference/region_map.html index 3109a18..e449c3e 100644 --- a/dev/reference/region_map.html +++ b/dev/reference/region_map.html @@ -160,7 +160,7 @@

Examples# make a vector of regions regions <- c("chr1:1-6", "chr1:7-10", "chr1:11-14") region_map(bedfiles, regions) -#> [18:44:39.085400] [iscream::region_map] [info] Aggregating 3 regions from 4 bedfiles +#> [19:25:54.191224] [iscream::region_map] [info] Aggregating 3 regions from 4 bedfiles #> #> Feature Cell coverage M #> 1 chr1:1-6 a 4 2 @@ -176,7 +176,7 @@

Examples#> 11 chr1:7-10 d 3 1 #> 12 chr1:11-14 d 1 1 region_map(bedfiles, regions, mval = FALSE) -#> [18:44:39.087853] [iscream::region_map] [info] Aggregating 3 regions from 4 bedfiles +#> [19:25:54.193726] [iscream::region_map] [info] Aggregating 3 regions from 4 bedfiles #> #> Feature Cell coverage beta #> 1 chr1:1-6 a 4 2.0 @@ -192,7 +192,7 @@

Examples#> 11 chr1:7-10 d 3 0.5 #> 12 chr1:11-14 d 1 1.0 region_map(bedfiles, regions, fun = "average") -#> [18:44:39.090068] [iscream::region_map] [info] Averaging 3 regions from 4 bedfiles +#> [19:25:54.195976] [iscream::region_map] [info] Averaging 3 regions from 4 bedfiles #> #> Feature Cell coverage M #> 1 chr1:1-6 a 1.333333 0.6666667 diff --git a/dev/search.json b/dev/search.json index c064dfb..a25381e 100644 --- a/dev/search.json +++ b/dev/search.json @@ -1 +1 @@ -[{"path":"https://huishenlab.github.io/iscream/dev/LICENSE.html","id":null,"dir":"","previous_headings":"","what":"MIT License","title":"MIT License","text":"Copyright (c) 2023 iscream authors Permission hereby granted, free charge, person obtaining copy software associated documentation files (“Software”), deal Software without restriction, including without limitation rights use, copy, modify, merge, publish, distribute, sublicense, /sell copies Software, permit persons Software furnished , subject following conditions: copyright notice permission notice shall included copies substantial portions Software. SOFTWARE PROVIDED “”, WITHOUT WARRANTY KIND, EXPRESS IMPLIED, INCLUDING LIMITED WARRANTIES MERCHANTABILITY, FITNESS PARTICULAR PURPOSE NONINFRINGEMENT. EVENT SHALL AUTHORS COPYRIGHT HOLDERS LIABLE CLAIM, DAMAGES LIABILITY, WHETHER ACTION CONTRACT, TORT OTHERWISE, ARISING , CONNECTION SOFTWARE USE DEALINGS SOFTWARE.","code":""},{"path":"https://huishenlab.github.io/iscream/dev/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"James Eapen. Author, maintainer.","code":""},{"path":"https://huishenlab.github.io/iscream/dev/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Eapen J (2024). iscream: Integrating Single-Cell Results Exploring Analyzing Methylation. R package version 0.0.0.9000, https://github.com/huishenlab/iscream/, https://huishenlab.github.io/iscream/.","code":"@Manual{, title = {iscream: Integrating Single-Cell Results for Exploring and Analyzing Methylation}, author = {James Eapen}, year = {2024}, note = {R package version 0.0.0.9000, https://github.com/huishenlab/iscream/}, url = {https://huishenlab.github.io/iscream/}, }"},{"path":"https://huishenlab.github.io/iscream/dev/index.html","id":"iscream-","dir":"","previous_headings":"","what":"iscream","title":"Integrating Single-Cell Results for Exploring and Analyzing Methylation","text":"Integrating Single-Cell Results Exploring Analyzing Methylation Analysis visualization Whole Genome Bisulfite Sequencing (WGBS) data requires reading aligned sequencing data formats existing packages like BSseq scMET can analyze. Getting data -disk formats like bedfiles matrix methylation values can difficult , nearly 30 million CpGs, WGBS data can quite large. iscream aims efficiently read alinged (sc)WGBS data formats can used packages. iscream uses htslib query genomic regions make matrices BSSeq aggregate methylated reads scMET.","code":""},{"path":[]},{"path":[]},{"path":"https://huishenlab.github.io/iscream/dev/index.html","id":"htslib","dir":"","previous_headings":"Installation > System dependencies","what":"htslib","title":"Integrating Single-Cell Results for Exploring and Analyzing Methylation","text":"iscream depends htslib header files. may installed package manager: ubuntu/debian: libhts-dev fedora/RHEL: htslib-devel brew: htslib nixpkgs: htslib may also found among HPC modules - make sure PKG_CONFIG_PATH environment variable includes pkgconfig location installation htslib. can verify htslib development libraries installed pkg-config:","code":"pkg-config --cflags --libs htslib"},{"path":"https://huishenlab.github.io/iscream/dev/index.html","id":"github","dir":"","previous_headings":"Installation","what":"GitHub","title":"Integrating Single-Cell Results for Exploring and Analyzing Methylation","text":"can install development version Github cloning repo running can also use R devtools package: pak:","code":"git clone https://github.com/huishenlab/iscream R CMD INSTALL iscream devtools::install_github(\"huishenlab/iscream\") pak::pkg_install(\"huishenlab/iscream\")"},{"path":"https://huishenlab.github.io/iscream/dev/index.html","id":"usage","dir":"","previous_headings":"Installation","what":"Usage","title":"Integrating Single-Cell Results for Exploring and Analyzing Methylation","text":"user guide available package website. Bug reports may submitted GitHub issues.","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/Cpp_query_all.html","id":null,"dir":"Reference","previous_headings":"","what":"Make a Bsseq object — Cpp_query_all","title":"Make a Bsseq object — Cpp_query_all","text":"Make Bsseq object","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/Cpp_query_all.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Make a Bsseq object — Cpp_query_all","text":"","code":"Cpp_query_all(bedfiles, regions, bismark, merged, sparse, nthreads)"},{"path":"https://huishenlab.github.io/iscream/dev/reference/Cpp_query_all.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Make a Bsseq object — Cpp_query_all","text":"bedfiles vector bedfiles regions vector regions bismark Whether input bismark coverage file nthreads Set number threads use overriding \"iscream.threads\" option. See ?set_threads information.","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/Cpp_region_map.html","id":null,"dir":"Reference","previous_headings":"","what":"Apply a function over CpGs within features — Cpp_region_map","title":"Apply a function over CpGs within features — Cpp_region_map","text":"function called region_map() since sanity checks C++ side.","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/Cpp_region_map.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Apply a function over CpGs within features — Cpp_region_map","text":"","code":"Cpp_region_map( bedfiles, regions, fun, mval, bismark, region_rownames = FALSE, nthreads = 1L )"},{"path":"https://huishenlab.github.io/iscream/dev/reference/Cpp_region_map.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Apply a function over CpGs within features — Cpp_region_map","text":"bedfiles vector bedfile paths regions vector genomic regions fun One supported functions apply CpGs regions: \"aggregate\", \"average\". mval Calculates M values TRUE, use beta values FALSE region_rownames Whether set rownames regions strings nthreads Number cores use. See details.","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/Cpp_region_map.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Apply a function over CpGs within features — Cpp_region_map","text":"optimal number threads depends number bedfiles, set half available OpenMP cores. See ?get_threads details. can manaully set set_threads().","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/Cpp_set_log_level.html","id":null,"dir":"Reference","previous_headings":"","what":"spdlog Logging Lever Setter — Cpp_set_log_level","title":"spdlog Logging Lever Setter — Cpp_set_log_level","text":"helper function turn logging level given string current logging level","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/Cpp_set_log_level.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"spdlog Logging Lever Setter — Cpp_set_log_level","text":"","code":"Cpp_set_log_level(name)"},{"path":"https://huishenlab.github.io/iscream/dev/reference/Cpp_set_log_level.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"spdlog Logging Lever Setter — Cpp_set_log_level","text":"name string logging level. Value understood , decreasing verbosity ‘trace’, ‘debug’, ‘info’, ‘warning’, ‘error’, ‘critical’, ‘’. Unrecognised names equivalent ‘’.","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/Cpp_set_log_level.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"spdlog Logging Lever Setter — Cpp_set_log_level","text":"Nothing returned.","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/check_files_exist.html","id":null,"dir":"Reference","previous_headings":"","what":"Check that files exist — check_files_exist","title":"Check that files exist — check_files_exist","text":"Check files exist","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/check_files_exist.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check that files exist — check_files_exist","text":"","code":"check_files_exist(files_vec, error_file_prefix = \"Bedfile\")"},{"path":"https://huishenlab.github.io/iscream/dev/reference/check_files_exist.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check that files exist — check_files_exist","text":"files_vec vector file paths error_file_prefix Error message prefix 'Bedfile' vs 'Tabix file'","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/check_files_exist.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check that files exist — check_files_exist","text":"TRUE input bedfiles associated tabix index file. FALSE ","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/check_thread_count.html","id":null,"dir":"Reference","previous_headings":"","what":"Check that the required threads are available — check_thread_count","title":"Check that the required threads are available — check_thread_count","text":"Check required threads available","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/check_thread_count.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check that the required threads are available — check_thread_count","text":"","code":"check_thread_count( n_threads, avail_threads = availableCores(), opt_set = FALSE )"},{"path":"https://huishenlab.github.io/iscream/dev/reference/check_thread_count.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check that the required threads are available — check_thread_count","text":"n_threads number threads check availability avail_threads number threads available system. Defaults parallelly::availableCores() opt_set Whether iscream.threads options set","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/check_thread_count.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check that the required threads are available — check_thread_count","text":"n_threads requested number threads available stops ","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/decode_beta.html","id":null,"dir":"Reference","previous_headings":"","what":"Beta value decoder — decode_beta","title":"Beta value decoder — decode_beta","text":"Beta value decoder","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/decode_beta.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Beta value decoder — decode_beta","text":"","code":"decode_beta(encoded)"},{"path":"https://huishenlab.github.io/iscream/dev/reference/decode_beta.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Beta value decoder — decode_beta","text":"encoded bit-packed beta cov Int","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/decode_beta.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Beta value decoder — decode_beta","text":"beta value","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/decode_cov.html","id":null,"dir":"Reference","previous_headings":"","what":"Coverage value decoder — decode_cov","title":"Coverage value decoder — decode_cov","text":"Coverage value decoder","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/decode_cov.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Coverage value decoder — decode_cov","text":"","code":"decode_cov(encoded)"},{"path":"https://huishenlab.github.io/iscream/dev/reference/decode_cov.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Coverage value decoder — decode_cov","text":"encoded bit-packed beta cov Int","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/decode_cov.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Coverage value decoder — decode_cov","text":"coverage value","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/decode_m.html","id":null,"dir":"Reference","previous_headings":"","what":"M value decoder — decode_m","title":"M value decoder — decode_m","text":"M value decoder","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/decode_m.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"M value decoder — decode_m","text":"","code":"decode_m(encoded)"},{"path":"https://huishenlab.github.io/iscream/dev/reference/decode_m.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"M value decoder — decode_m","text":"encoded bit-packed beta cov Int","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/decode_m.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"M value decoder — decode_m","text":"M value","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/decoder.html","id":null,"dir":"Reference","previous_headings":"","what":"Get decoded values — decoder","title":"Get decoded values — decoder","text":"Get decoded values encoded data.table methylation matrix","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/decoder.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get decoded values — decoder","text":"","code":"decoder(encoded_matrix, measure, sparse = TRUE)"},{"path":"https://huishenlab.github.io/iscream/dev/reference/decoder.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get decoded values — decoder","text":"encoded_matrix matrix bit-packed beta cov values measure required decoded value: 1 beta, 2 coverage 3 M sparse Whether matrix sparse matrix object","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/decoder.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get decoded values — decoder","text":"data.table beta, coverage M value sample","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/get_log_level.html","id":null,"dir":"Reference","previous_headings":"","what":"Get the current log level — get_log_level","title":"Get the current log level — get_log_level","text":"Can handle spdlogs levels, iscream functions supports \"info\" \"debug\"","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/get_log_level.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get the current log level — get_log_level","text":"","code":"get_log_level()"},{"path":"https://huishenlab.github.io/iscream/dev/reference/get_log_level.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get the current log level — get_log_level","text":"current logging level string","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/get_omp_threads.html","id":null,"dir":"Reference","previous_headings":"","what":"Get the number of available threads from OpenMP. — get_omp_threads","title":"Get the number of available threads from OpenMP. — get_omp_threads","text":"queries number available threads usign OpenMP, reliably provide accurate available thread count. get reliable count accounts environment variables HPC schedulers, use get_threads()`. function pulled github.com/rdatatable/data.table","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/get_omp_threads.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get the number of available threads from OpenMP. — get_omp_threads","text":"","code":"get_omp_threads(verbose)"},{"path":"https://huishenlab.github.io/iscream/dev/reference/get_omp_threads.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get the number of available threads from OpenMP. — get_omp_threads","text":"verbose Whether verbose available omp threads","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/get_omp_threads.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get the number of available threads from OpenMP. — get_omp_threads","text":"","code":"get_omp_threads(verbose = TRUE) #> OpenMP version (_OPENMP) 201511 #> omp_get_num_procs() 4 #> omp_get_thread_limit() 2147483647 #> omp_get_max_threads() 4 #> [1] 4"},{"path":"https://huishenlab.github.io/iscream/dev/reference/get_threads.html","id":null,"dir":"Reference","previous_headings":"","what":"Get the number of available threads — get_threads","title":"Get the number of available threads — get_threads","text":"function sets number threads iscream uses 1 iscream.threads option set. set number threads use setDTthreads set iscream.threads option ~/.Rprofile. See ?set_threads information.","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/get_threads.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get the number of available threads — get_threads","text":"","code":"get_threads()"},{"path":"https://huishenlab.github.io/iscream/dev/reference/get_threads.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get the number of available threads — get_threads","text":"named vector: use_threads = iscream.threads option, whether option set user, available threads system","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/get_threads.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get the number of available threads — get_threads","text":"","code":"get_threads() #> use_threads opt_set avail_threads #> 1 1 4"},{"path":"https://huishenlab.github.io/iscream/dev/reference/joiner.html","id":null,"dir":"Reference","previous_headings":"","what":"Cpg and sample joiner — joiner","title":"Cpg and sample joiner — joiner","text":"Takes sample data.table joins CpG index table chromosome start columns","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/joiner.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Cpg and sample joiner — joiner","text":"","code":"joiner(cpg_table, sample_dt, sample_name)"},{"path":"https://huishenlab.github.io/iscream/dev/reference/joiner.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Cpg and sample joiner — joiner","text":"cpg_table table CpG loci existing samples sample_dt sample data table read_sample sample_name name sample getting joined","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/joiner.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Cpg and sample joiner — joiner","text":"cpg_table sample_table tacked ","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/make_beta_mat.html","id":null,"dir":"Reference","previous_headings":"","what":"Beta matrix — make_beta_mat","title":"Beta matrix — make_beta_mat","text":"Make cov matrix methylation matrix. Wrapper decoder.","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/make_beta_mat.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Beta matrix — make_beta_mat","text":"","code":"make_beta_mat(encoded_matrix)"},{"path":"https://huishenlab.github.io/iscream/dev/reference/make_beta_mat.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Beta matrix — make_beta_mat","text":"encoded_matrix matrix CpG loci samples encoded beta values","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/make_beta_mat.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Beta matrix — make_beta_mat","text":"data.table coverage values sample","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/make_bsseq_hm.html","id":null,"dir":"Reference","previous_headings":"","what":"Make a BSSeq object — make_bsseq_hm","title":"Make a BSSeq object — make_bsseq_hm","text":"Create BSSeq object using encoded sparse methylation matrix. method uses memory make_bsseq_lm since uses dense coverage methylation matrices creating BSSeq object.","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/make_bsseq_hm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Make a BSSeq object — make_bsseq_hm","text":"","code":"make_bsseq_hm(sp, sample_list)"},{"path":"https://huishenlab.github.io/iscream/dev/reference/make_bsseq_hm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Make a BSSeq object — make_bsseq_hm","text":"sp sparse matrix/long table CpG loci samples encoded beta values sample_list list sample names bed files","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/make_bsseq_hm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Make a BSSeq object — make_bsseq_hm","text":"BSSeq object","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/make_bsseq_lm.html","id":null,"dir":"Reference","previous_headings":"","what":"Make a BSSeq object using less memory — make_bsseq_lm","title":"Make a BSSeq object using less memory — make_bsseq_lm","text":"Create BSSeq object using encoded sparse methylation matrix. method uses less memory make_bsseq_hm since uses sparse coverage methylation matrices creating BSseq object. however slower BSseq object creation.","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/make_bsseq_lm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Make a BSSeq object using less memory — make_bsseq_lm","text":"","code":"make_bsseq_lm( sparse_mat, sample_list, cov_filename = \"cov.mtx.gz\", m_filename = \"M.mtx.gz\" )"},{"path":"https://huishenlab.github.io/iscream/dev/reference/make_bsseq_lm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Make a BSSeq object using less memory — make_bsseq_lm","text":"sparse_mat sparse matrix/long table CpG loci samples beta cov values sample_list list sample names bed files cov_filename Filename write coverage matrix market file m_filename Filename write M matrix market file ","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/make_bsseq_lm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Make a BSSeq object using less memory — make_bsseq_lm","text":"BSSeq object","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/make_coverage_mat.html","id":null,"dir":"Reference","previous_headings":"","what":"Cov matrix — make_coverage_mat","title":"Cov matrix — make_coverage_mat","text":"Make cov matrix methylation matrix. Wrapper decoder.","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/make_coverage_mat.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Cov matrix — make_coverage_mat","text":"","code":"make_coverage_mat(encoded_matrix)"},{"path":"https://huishenlab.github.io/iscream/dev/reference/make_coverage_mat.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Cov matrix — make_coverage_mat","text":"encoded_matrix matrix CpG loci samples encoded beta values","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/make_coverage_mat.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Cov matrix — make_coverage_mat","text":"data.table coverage values sample","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/make_m_mat.html","id":null,"dir":"Reference","previous_headings":"","what":"M value matrix — make_m_mat","title":"M value matrix — make_m_mat","text":"Make beta matrix methylation matrix. Wrapper decoder.","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/make_m_mat.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"M value matrix — make_m_mat","text":"","code":"make_m_mat(encoded_matrix)"},{"path":"https://huishenlab.github.io/iscream/dev/reference/make_m_mat.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"M value matrix — make_m_mat","text":"encoded_matrix matrix CpG loci samples encoded beta values","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/make_m_mat.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"M value matrix — make_m_mat","text":"data.table M values sample","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/make_meth_mat.html","id":null,"dir":"Reference","previous_headings":"","what":"Methylation matrix — make_meth_mat","title":"Methylation matrix — make_meth_mat","text":"Make methylation matrix given scWGBS sample bed files","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/make_meth_mat.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Methylation matrix — make_meth_mat","text":"","code":"make_meth_mat( sample_list, sample_path, cpg_bed_file, file_ext = \".bed.gz\", merged = FALSE )"},{"path":"https://huishenlab.github.io/iscream/dev/reference/make_meth_mat.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Methylation matrix — make_meth_mat","text":"sample_list list sample names bed files sample_path Path directory containing sample bed files cpg_bed_file gzipped bed file CpG loci. used make matrix index file_ext extension cpg index sample files merged Whether bed files CPs merged unmerged","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/make_sparse_mat.html","id":null,"dir":"Reference","previous_headings":"","what":"Sparse Methylation matrix — make_sparse_mat","title":"Sparse Methylation matrix — make_sparse_mat","text":"Make sparse methylation matrix given scWGBS sample bed files. matrix sparse stores cpg locus id, sample id associated endcoded beta coverage value. true sparse matrix find Matrix package functions associated .","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/make_sparse_mat.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Sparse Methylation matrix — make_sparse_mat","text":"","code":"make_sparse_mat( cpg_bed_file, sample_list, sample_path, to_mm = TRUE, file_ext = \".bed.gz\" )"},{"path":"https://huishenlab.github.io/iscream/dev/reference/make_sparse_mat.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Sparse Methylation matrix — make_sparse_mat","text":"cpg_bed_file gzipped bed file CpG loci. used make matrix index sample_list list sample names bed files sample_path Path directory containing sample bed files to_mm Whether write matrix matrix market file file_ext file extension sample files","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/make_sparse_mat_bs.html","id":null,"dir":"Reference","previous_headings":"","what":"BSSeq Sparse Methylation matrix — make_sparse_mat_bs","title":"BSSeq Sparse Methylation matrix — make_sparse_mat_bs","text":"Make sparse methylation matrix given scWGBS sample bed files. matrix sparse stores cpg locus id, sample id associated endcoded beta coverage value. true sparse matrix find Matrix package functions associated .","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/make_sparse_mat_bs.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"BSSeq Sparse Methylation matrix — make_sparse_mat_bs","text":"","code":"make_sparse_mat_bs( cpg_bed_file, sample_list, sample_path, file_ext = \".bed.gz\" )"},{"path":"https://huishenlab.github.io/iscream/dev/reference/make_sparse_mat_bs.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"BSSeq Sparse Methylation matrix — make_sparse_mat_bs","text":"cpg_bed_file gzipped bed file CpG loci. used make matrix index sample_list list sample names bed files sample_path Path directory containing sample bed files file_ext file extension sample files","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/mm_writer.html","id":null,"dir":"Reference","previous_headings":"","what":"Matrix Market writer — mm_writer","title":"Matrix Market writer — mm_writer","text":"Write sparse matrix data.table disk Matrix Market format.","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/mm_writer.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Matrix Market writer — mm_writer","text":"","code":"mm_writer(DT, row_count, col_count, filename, compress = TRUE)"},{"path":"https://huishenlab.github.io/iscream/dev/reference/mm_writer.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Matrix Market writer — mm_writer","text":"DT data.table entries matrix write row_count number rows matrix - nrow(DT) col_count number columns matrix - ncol(DT) filename name file write compress Whether write gzip compressed file ","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/mm_writer.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Matrix Market writer — mm_writer","text":"row data.table form: row_num col_num value function requires row_count col_count number entries can calculated input data.table.","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/query_all.html","id":null,"dir":"Reference","previous_headings":"","what":"Query all CpGs from input genomic regions — query_all","title":"Query all CpGs from input genomic regions — query_all","text":"Queries provided regions produces M Coverage matrices genomic positions. Parallelized across files using threads \"iscream.threads\" option. output query_all may used create BSseq object: .call(BSseq, query_all(...)).","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/query_all.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Query all CpGs from input genomic regions — query_all","text":"","code":"query_all( bedfiles, regions, bismark = FALSE, merged = TRUE, sparse = FALSE, nthreads = NULL )"},{"path":"https://huishenlab.github.io/iscream/dev/reference/query_all.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Query all CpGs from input genomic regions — query_all","text":"bedfiles vector bedfile paths regions vector genomic regions strings bismark Whether input bismark coverage file merged Whether input strands merged/collapsed sparse Whether return M coverage matrices sparse matrices (\"dgCMatrix\"). Set TRUE scWGBS data nthreads Set number threads use overriding \"iscream.threads\" option. See ?set_threads information.","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/query_all.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Query all CpGs from input genomic regions — query_all","text":"named list M coverage matrices character vector chromosomes numeric vector corresponding CpG base positions character vector input sample names","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/query_all.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Query all CpGs from input genomic regions — query_all","text":"","code":"bedfiles <- system.file(\"extdata\", package = \"iscream\") |> list.files(pattern = \"[a|b|c|d].bed.gz$\", full.names = TRUE) # examine the bedfiles colnames <- c(\"chr\", \"start\", \"end\", \"beta\", \"coverage\") lapply(bedfiles, function(i) knitr::kable(data.table::fread(i, col.names = colnames))) #> [[1]] #> #> #> |chr | start| end| beta| coverage| #> |:----|-----:|---:|----:|--------:| #> |chr1 | 1| 2| 1.0| 1| #> |chr1 | 3| 4| 1.0| 1| #> |chr1 | 5| 6| 0.0| 2| #> |chr1 | 7| 8| 0.0| 1| #> |chr1 | 9| 10| 0.5| 2| #> |chr1 | 11| 12| 1.0| 2| #> |chr1 | 13| 14| 1.0| 3| #> #> [[2]] #> #> #> |chr | start| end| beta| coverage| #> |:----|-----:|---:|----:|--------:| #> |chr1 | 1| 2| 0| 2| #> |chr1 | 5| 6| 1| 2| #> |chr1 | 7| 8| 1| 1| #> |chr1 | 11| 12| 0| 2| #> |chr1 | 13| 14| 1| 1| #> #> [[3]] #> #> #> |chr | start| end| beta| coverage| #> |:----|-----:|---:|----:|--------:| #> |chr1 | 3| 4| 1| 2| #> |chr1 | 7| 8| 0| 2| #> |chr1 | 9| 10| 1| 1| #> #> [[4]] #> #> #> |chr | start| end| beta| coverage| #> |:----|-----:|---:|----:|--------:| #> |chr1 | 1| 2| 1.0| 1| #> |chr1 | 3| 4| 1.0| 2| #> |chr1 | 7| 8| 0.0| 1| #> |chr1 | 9| 10| 0.5| 2| #> |chr1 | 13| 14| 1.0| 1| #> # make a vector of regions regions <- c(\"chr1:1-6\", \"chr1:7-10\", \"chr1:11-14\") query_all(bedfiles, regions) #> [18:44:25.651777] [iscream::query_all] [info] Querying 3 regions from 4 bedfiles #> #> $M #> a b c d #> chr1:2 1 0 0 1 #> chr1:4 1 0 2 2 #> chr1:6 0 2 0 0 #> chr1:8 0 1 0 0 #> chr1:10 1 0 1 1 #> chr1:12 2 0 0 0 #> chr1:14 3 1 0 1 #> #> $Cov #> a b c d #> chr1:2 1 2 0 1 #> chr1:4 1 0 2 2 #> chr1:6 2 2 0 0 #> chr1:8 1 1 2 1 #> chr1:10 2 0 1 2 #> chr1:12 2 2 0 0 #> chr1:14 3 1 0 1 #> #> $pos #> [1] 1 3 5 7 9 11 13 #> #> $chr #> [1] \"chr1\" \"chr1\" \"chr1\" \"chr1\" \"chr1\" \"chr1\" \"chr1\" #> #> $sampleNames #> [1] \"a\" \"b\" \"c\" \"d\" #> # for BSseq object run if (FALSE) { # \\dontrun{ library(bsseq) do.call(BSseq, query_all(bedfiles, regions)) } # }"},{"path":"https://huishenlab.github.io/iscream/dev/reference/read_sample.html","id":null,"dir":"Reference","previous_headings":"","what":"Sample reader — read_sample","title":"Sample reader — read_sample","text":"Reads scWGBS data sample bed file generates data.table","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/read_sample.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Sample reader — read_sample","text":"","code":"read_sample(sample_name, merged)"},{"path":"https://huishenlab.github.io/iscream/dev/reference/read_sample.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Sample reader — read_sample","text":"sample_name name sample bed file merged Whether bed file CGs merged unmerged","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/read_sample.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Sample reader — read_sample","text":"sample data.table","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/read_sample_bs.html","id":null,"dir":"Reference","previous_headings":"","what":"BSSeq Sample reader — read_sample_bs","title":"BSSeq Sample reader — read_sample_bs","text":"Reads scWGBS data sample bed file generates data.table","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/read_sample_bs.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"BSSeq Sample reader — read_sample_bs","text":"","code":"read_sample_bs(sample_name, merged)"},{"path":"https://huishenlab.github.io/iscream/dev/reference/read_sample_bs.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"BSSeq Sample reader — read_sample_bs","text":"sample_name name sample bed file merged Whether bed file CGs merged unmerged","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/read_sample_bs.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"BSSeq Sample reader — read_sample_bs","text":"sample data.table","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/region_map.html","id":null,"dir":"Reference","previous_headings":"","what":"Run a defined function over genomic regions — region_map","title":"Run a defined function over genomic regions — region_map","text":"Run function CpGs bedfiles across genomic regions. Currently supported functions aggregate average. Parallelized across files using threads \"iscream.threads\" option.","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/region_map.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Run a defined function over genomic regions — region_map","text":"","code":"region_map( bedfiles, regions, fun = \"aggregate\", bismark = FALSE, mval = TRUE, set_region_rownames = FALSE, nthreads = NULL )"},{"path":"https://huishenlab.github.io/iscream/dev/reference/region_map.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Run a defined function over genomic regions — region_map","text":"bedfiles vector bedfile paths regions vector genomic regions strings. named vector provided, names used feature column instead genomic regions string fun Function apply region. See details. bismark Whether input bismark coverage file mval Whether calculate M value (coverage \\(\\times \\beta\\)) use beta value applying function. set_region_rownames Use region strings returned data frame's rownames. Can useful named vector regions want rownames feature names. nthreads Set number threads use overriding \"iscream.threads\" option. See ?set_threads information.","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/region_map.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Run a defined function over genomic regions — region_map","text":"data.frame","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/region_map.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Run a defined function over genomic regions — region_map","text":"Available functions: \"aggregate\" sums values region aggregated beta values mval = FALSE aggregated M values mval = TRUE \"average\" averages values region average beta values mval = FALSE average M values mval = TRUE","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/region_map.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Run a defined function over genomic regions — region_map","text":"","code":"bedfiles <- system.file(\"extdata\", package = \"iscream\") |> list.files(pattern = \"[a|b|c|d].bed.gz$\", full.names = TRUE) # examine the bedfiles colnames <- c(\"chr\", \"start\", \"end\", \"beta\", \"coverage\") lapply(bedfiles, function(i) knitr::kable(data.table::fread(i, col.names = colnames))) #> [[1]] #> #> #> |chr | start| end| beta| coverage| #> |:----|-----:|---:|----:|--------:| #> |chr1 | 1| 2| 1.0| 1| #> |chr1 | 3| 4| 1.0| 1| #> |chr1 | 5| 6| 0.0| 2| #> |chr1 | 7| 8| 0.0| 1| #> |chr1 | 9| 10| 0.5| 2| #> |chr1 | 11| 12| 1.0| 2| #> |chr1 | 13| 14| 1.0| 3| #> #> [[2]] #> #> #> |chr | start| end| beta| coverage| #> |:----|-----:|---:|----:|--------:| #> |chr1 | 1| 2| 0| 2| #> |chr1 | 5| 6| 1| 2| #> |chr1 | 7| 8| 1| 1| #> |chr1 | 11| 12| 0| 2| #> |chr1 | 13| 14| 1| 1| #> #> [[3]] #> #> #> |chr | start| end| beta| coverage| #> |:----|-----:|---:|----:|--------:| #> |chr1 | 3| 4| 1| 2| #> |chr1 | 7| 8| 0| 2| #> |chr1 | 9| 10| 1| 1| #> #> [[4]] #> #> #> |chr | start| end| beta| coverage| #> |:----|-----:|---:|----:|--------:| #> |chr1 | 1| 2| 1.0| 1| #> |chr1 | 3| 4| 1.0| 2| #> |chr1 | 7| 8| 0.0| 1| #> |chr1 | 9| 10| 0.5| 2| #> |chr1 | 13| 14| 1.0| 1| #> # make a vector of regions regions <- c(\"chr1:1-6\", \"chr1:7-10\", \"chr1:11-14\") region_map(bedfiles, regions) #> [18:44:39.085400] [iscream::region_map] [info] Aggregating 3 regions from 4 bedfiles #> #> Feature Cell coverage M #> 1 chr1:1-6 a 4 2 #> 2 chr1:7-10 a 3 1 #> 3 chr1:11-14 a 5 5 #> 4 chr1:1-6 b 4 2 #> 5 chr1:7-10 b 1 1 #> 6 chr1:11-14 b 3 1 #> 7 chr1:1-6 c 2 2 #> 8 chr1:7-10 c 3 1 #> 9 chr1:11-14 c 0 0 #> 10 chr1:1-6 d 3 3 #> 11 chr1:7-10 d 3 1 #> 12 chr1:11-14 d 1 1 region_map(bedfiles, regions, mval = FALSE) #> [18:44:39.087853] [iscream::region_map] [info] Aggregating 3 regions from 4 bedfiles #> #> Feature Cell coverage beta #> 1 chr1:1-6 a 4 2.0 #> 2 chr1:7-10 a 3 0.5 #> 3 chr1:11-14 a 5 2.0 #> 4 chr1:1-6 b 4 1.0 #> 5 chr1:7-10 b 1 1.0 #> 6 chr1:11-14 b 3 1.0 #> 7 chr1:1-6 c 2 1.0 #> 8 chr1:7-10 c 3 1.0 #> 9 chr1:11-14 c 0 0.0 #> 10 chr1:1-6 d 3 2.0 #> 11 chr1:7-10 d 3 0.5 #> 12 chr1:11-14 d 1 1.0 region_map(bedfiles, regions, fun = \"average\") #> [18:44:39.090068] [iscream::region_map] [info] Averaging 3 regions from 4 bedfiles #> #> Feature Cell coverage M #> 1 chr1:1-6 a 1.333333 0.6666667 #> 2 chr1:7-10 a 1.500000 0.5000000 #> 3 chr1:11-14 a 2.500000 2.5000000 #> 4 chr1:1-6 b 2.000000 1.0000000 #> 5 chr1:7-10 b 1.000000 1.0000000 #> 6 chr1:11-14 b 1.500000 0.5000000 #> 7 chr1:1-6 c 2.000000 2.0000000 #> 8 chr1:7-10 c 1.500000 0.5000000 #> 9 chr1:11-14 c 0.000000 0.0000000 #> 10 chr1:1-6 d 1.500000 1.5000000 #> 11 chr1:7-10 d 1.500000 0.5000000 #> 12 chr1:11-14 d 1.000000 1.0000000"},{"path":"https://huishenlab.github.io/iscream/dev/reference/set_log_level.html","id":null,"dir":"Reference","previous_headings":"","what":"Set logging level — set_log_level","title":"Set logging level — set_log_level","text":"Set logging level","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/set_log_level.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Set logging level — set_log_level","text":"","code":"set_log_level(level = \"info\")"},{"path":"https://huishenlab.github.io/iscream/dev/reference/set_log_level.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Set logging level — set_log_level","text":"level logging verbosity level use \"info\": default gives provides basic information number files regions used function \"debug\": verbose row allocations, many CpGs found region, filename parsing etc. mode used one thread R output messages multiple threads without crashing.","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/set_log_level.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Set logging level — set_log_level","text":"None; sets log level provided level","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/set_log_level.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Set logging level — set_log_level","text":"","code":"set_log_level(\"info\")"},{"path":"https://huishenlab.github.io/iscream/dev/reference/set_threads.html","id":null,"dir":"Reference","previous_headings":"","what":"Set the number of available threads — set_threads","title":"Set the number of available threads — set_threads","text":"function sets 'iscream.threads' option n_threads. see many threads available see parallelly::availableCores.","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/set_threads.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Set the number of available threads — set_threads","text":"","code":"set_threads(n_threads)"},{"path":"https://huishenlab.github.io/iscream/dev/reference/set_threads.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Set the number of available threads — set_threads","text":"n_threads number threads use","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/set_threads.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Set the number of available threads — set_threads","text":"NULL. Sets iscream.threads option requested number threads available","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/set_threads.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Set the number of available threads — set_threads","text":"iscream uses OpenMP parallelize certain functions. can use many threads available system varying degrees performance improvements. parallelly::availableCores() function report number available threads. get information OpenMP threads, run get_omp_threads(verbose = TRUE). However, high preformance computers (HPCs) resource allocating job schedulers like SLURM, OpenMP may detect available threads across HPC limit cores allocated scheduler. system administrator set limits, may result job taking resources jobs. limits, trying use threads available reduce iscream's performance. Job schedulers typically environment variable (e.g. SLURM_CPUS_ON_NODE SLURM) gives actual number available cores. , hyperthreaded systems, count may double available processors. Using hyperthreading guarantee performance improvement - may better set number threads half reported number. parallelly::availableCores() takes HPC scheduler/CRAN/Bioconductor limits account reporting number available threads may reliably report hyperthreading ('system' 'nproc'). set number threads without call set_threads() every session, put .Rprofile See help('Rprofile') information startup options. Functions currently using OpenMP: region_map() query_all()","code":"options(iscream.threads = [n_threads])"},{"path":"https://huishenlab.github.io/iscream/dev/reference/set_threads.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Set the number of available threads — set_threads","text":"","code":"(ncores <- parallelly::availableCores()) #> system #> 4 if (FALSE) { # \\dontrun{ set_threads(ncores) } # }"},{"path":"https://huishenlab.github.io/iscream/dev/reference/validate_log_level.html","id":null,"dir":"Reference","previous_headings":"","what":"Validate provided logging level — validate_log_level","title":"Validate provided logging level — validate_log_level","text":"\"info\" \"debug\" currently supported, \"debug\" supported using 1 thread","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/validate_log_level.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Validate provided logging level — validate_log_level","text":"","code":"validate_log_level(level = get_log_level(), n_threads)"},{"path":"https://huishenlab.github.io/iscream/dev/reference/validate_log_level.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Validate provided logging level — validate_log_level","text":"level logging level validate n_threads number threads next iscream function call use","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/validate_log_level.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Validate provided logging level — validate_log_level","text":"None; sets log level provide level","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/validate_log_level.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Validate provided logging level — validate_log_level","text":"","code":"set_log_level(\"info\")"},{"path":"https://huishenlab.github.io/iscream/dev/reference/vdecoder.html","id":null,"dir":"Reference","previous_headings":"","what":"Vector Decoder — vdecoder","title":"Vector Decoder — vdecoder","text":"function unpacks encoded \\(\\beta\\) coverage values encoded column methylation matrix.","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/vdecoder.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Vector Decoder — vdecoder","text":"","code":"vdecoder(encoded, measure)"},{"path":"https://huishenlab.github.io/iscream/dev/reference/vdecoder.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Vector Decoder — vdecoder","text":"encoded encoded sample column data.table methylation matrix CpG loci samples measure required decoded value: 1 beta, 2 coverage 3 M","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/vdecoder.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Vector Decoder — vdecoder","text":"IntegerVector unpacked beta, coverage M values","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/vdouble_decoder.html","id":null,"dir":"Reference","previous_headings":"","what":"Double Vector Decoder — vdouble_decoder","title":"Double Vector Decoder — vdouble_decoder","text":"function unpacks encoded \\(\\beta\\) coverage values encoded column methylation matrix. vdecoder, accepts double columns","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/vdouble_decoder.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Double Vector Decoder — vdouble_decoder","text":"","code":"vdouble_decoder(encoded, measure)"},{"path":"https://huishenlab.github.io/iscream/dev/reference/vdouble_decoder.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Double Vector Decoder — vdouble_decoder","text":"encoded encoded sample column data.table methylation matrix CpG loci samples measure required decoded value: 1 beta, 2 coverage 3 M","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/vdouble_decoder.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Double Vector Decoder — vdouble_decoder","text":"DoubleVector unpacked beta, coverage M values","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/vencoder.html","id":null,"dir":"Reference","previous_headings":"","what":"Vector Encoder — vencoder","title":"Vector Encoder — vencoder","text":"Bit-packs vector beta coverage values","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/vencoder.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Vector Encoder — vencoder","text":"","code":"vencoder(beta_col, cov_col)"},{"path":"https://huishenlab.github.io/iscream/dev/reference/vencoder.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Vector Encoder — vencoder","text":"beta_col Name column containing beta values cov_col Name column containing coverage values","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/verify_files_or_stop.html","id":null,"dir":"Reference","previous_headings":"","what":"Verify that bedfiles are tabixed — verify_files_or_stop","title":"Verify that bedfiles are tabixed — verify_files_or_stop","text":"Verify bedfiles tabixed","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/verify_files_or_stop.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Verify that bedfiles are tabixed — verify_files_or_stop","text":"","code":"verify_files_or_stop(bedfiles, verify_tabix = TRUE)"},{"path":"https://huishenlab.github.io/iscream/dev/reference/verify_files_or_stop.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Verify that bedfiles are tabixed — verify_files_or_stop","text":"bedfiles vector bedfile paths verify_tabix Whether verify presence tabix files","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/verify_files_or_stop.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Verify that bedfiles are tabixed — verify_files_or_stop","text":"TRUE input bedfiles associated tabix index file. FALSE ","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/verify_regions_or_stop.html","id":null,"dir":"Reference","previous_headings":"","what":"Verify that regions are valid — verify_regions_or_stop","title":"Verify that regions are valid — verify_regions_or_stop","text":"Verify regions valid","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/verify_regions_or_stop.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Verify that regions are valid — verify_regions_or_stop","text":"","code":"verify_regions_or_stop(regions)"},{"path":"https://huishenlab.github.io/iscream/dev/reference/verify_regions_or_stop.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Verify that regions are valid — verify_regions_or_stop","text":"regions vector genomic regions","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/verify_regions_or_stop.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Verify that regions are valid — verify_regions_or_stop","text":"TRUE input regions start 'chr' FALSE ","code":""}] +[{"path":"https://huishenlab.github.io/iscream/dev/LICENSE.html","id":null,"dir":"","previous_headings":"","what":"MIT License","title":"MIT License","text":"Copyright (c) 2023 iscream authors Permission hereby granted, free charge, person obtaining copy software associated documentation files (“Software”), deal Software without restriction, including without limitation rights use, copy, modify, merge, publish, distribute, sublicense, /sell copies Software, permit persons Software furnished , subject following conditions: copyright notice permission notice shall included copies substantial portions Software. SOFTWARE PROVIDED “”, WITHOUT WARRANTY KIND, EXPRESS IMPLIED, INCLUDING LIMITED WARRANTIES MERCHANTABILITY, FITNESS PARTICULAR PURPOSE NONINFRINGEMENT. EVENT SHALL AUTHORS COPYRIGHT HOLDERS LIABLE CLAIM, DAMAGES LIABILITY, WHETHER ACTION CONTRACT, TORT OTHERWISE, ARISING , CONNECTION SOFTWARE USE DEALINGS SOFTWARE.","code":""},{"path":"https://huishenlab.github.io/iscream/dev/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"James Eapen. Author, maintainer.","code":""},{"path":"https://huishenlab.github.io/iscream/dev/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Eapen J (2024). iscream: Integrating Single-Cell Results Exploring Analyzing Methylation. R package version 0.0.0.9000, https://github.com/huishenlab/iscream/, https://huishenlab.github.io/iscream/.","code":"@Manual{, title = {iscream: Integrating Single-Cell Results for Exploring and Analyzing Methylation}, author = {James Eapen}, year = {2024}, note = {R package version 0.0.0.9000, https://github.com/huishenlab/iscream/}, url = {https://huishenlab.github.io/iscream/}, }"},{"path":"https://huishenlab.github.io/iscream/dev/index.html","id":"iscream-","dir":"","previous_headings":"","what":"iscream","title":"Integrating Single-Cell Results for Exploring and Analyzing Methylation","text":"Integrating Single-Cell Results Exploring Analyzing Methylation Analysis visualization Whole Genome Bisulfite Sequencing (WGBS) data requires reading aligned sequencing data formats existing packages like BSseq scMET can analyze. Getting data -disk formats like bedfiles matrix methylation values can difficult , nearly 30 million CpGs, WGBS data can quite large. iscream aims efficiently read alinged (sc)WGBS data formats can used packages. iscream uses htslib query genomic regions make matrices BSSeq aggregate methylated reads scMET.","code":""},{"path":[]},{"path":[]},{"path":"https://huishenlab.github.io/iscream/dev/index.html","id":"htslib","dir":"","previous_headings":"Installation > System dependencies","what":"htslib","title":"Integrating Single-Cell Results for Exploring and Analyzing Methylation","text":"iscream depends htslib header files. may installed package manager: ubuntu/debian: libhts-dev fedora/RHEL: htslib-devel brew: htslib nixpkgs: htslib may also found among HPC modules - make sure PKG_CONFIG_PATH environment variable includes pkgconfig location installation htslib. can verify htslib development libraries installed pkg-config:","code":"pkg-config --cflags --libs htslib"},{"path":"https://huishenlab.github.io/iscream/dev/index.html","id":"github","dir":"","previous_headings":"Installation","what":"GitHub","title":"Integrating Single-Cell Results for Exploring and Analyzing Methylation","text":"can install development version Github cloning repo running can also use R devtools package: pak:","code":"git clone https://github.com/huishenlab/iscream R CMD INSTALL iscream devtools::install_github(\"huishenlab/iscream\") pak::pkg_install(\"huishenlab/iscream\")"},{"path":"https://huishenlab.github.io/iscream/dev/index.html","id":"usage","dir":"","previous_headings":"Installation","what":"Usage","title":"Integrating Single-Cell Results for Exploring and Analyzing Methylation","text":"user guide available package website. Bug reports may submitted GitHub issues.","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/Cpp_query_all.html","id":null,"dir":"Reference","previous_headings":"","what":"Make a Bsseq object — Cpp_query_all","title":"Make a Bsseq object — Cpp_query_all","text":"Make Bsseq object","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/Cpp_query_all.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Make a Bsseq object — Cpp_query_all","text":"","code":"Cpp_query_all(bedfiles, regions, bismark, merged, sparse, nthreads)"},{"path":"https://huishenlab.github.io/iscream/dev/reference/Cpp_query_all.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Make a Bsseq object — Cpp_query_all","text":"bedfiles vector bedfiles regions vector regions bismark Whether input bismark coverage file nthreads Set number threads use overriding \"iscream.threads\" option. See ?set_threads information.","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/Cpp_region_map.html","id":null,"dir":"Reference","previous_headings":"","what":"Apply a function over CpGs within features — Cpp_region_map","title":"Apply a function over CpGs within features — Cpp_region_map","text":"function called region_map() since sanity checks C++ side.","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/Cpp_region_map.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Apply a function over CpGs within features — Cpp_region_map","text":"","code":"Cpp_region_map( bedfiles, regions, fun, mval, bismark, region_rownames = FALSE, nthreads = 1L )"},{"path":"https://huishenlab.github.io/iscream/dev/reference/Cpp_region_map.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Apply a function over CpGs within features — Cpp_region_map","text":"bedfiles vector bedfile paths regions vector genomic regions fun One supported functions apply CpGs regions: \"aggregate\", \"average\". mval Calculates M values TRUE, use beta values FALSE region_rownames Whether set rownames regions strings nthreads Number cores use. See details.","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/Cpp_region_map.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Apply a function over CpGs within features — Cpp_region_map","text":"optimal number threads depends number bedfiles, set half available OpenMP cores. See ?get_threads details. can manaully set set_threads().","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/Cpp_set_log_level.html","id":null,"dir":"Reference","previous_headings":"","what":"spdlog Logging Lever Setter — Cpp_set_log_level","title":"spdlog Logging Lever Setter — Cpp_set_log_level","text":"helper function turn logging level given string current logging level","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/Cpp_set_log_level.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"spdlog Logging Lever Setter — Cpp_set_log_level","text":"","code":"Cpp_set_log_level(name)"},{"path":"https://huishenlab.github.io/iscream/dev/reference/Cpp_set_log_level.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"spdlog Logging Lever Setter — Cpp_set_log_level","text":"name string logging level. Value understood , decreasing verbosity ‘trace’, ‘debug’, ‘info’, ‘warning’, ‘error’, ‘critical’, ‘’. Unrecognised names equivalent ‘’.","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/Cpp_set_log_level.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"spdlog Logging Lever Setter — Cpp_set_log_level","text":"Nothing returned.","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/check_files_exist.html","id":null,"dir":"Reference","previous_headings":"","what":"Check that files exist — check_files_exist","title":"Check that files exist — check_files_exist","text":"Check files exist","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/check_files_exist.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check that files exist — check_files_exist","text":"","code":"check_files_exist(files_vec, error_file_prefix = \"Bedfile\")"},{"path":"https://huishenlab.github.io/iscream/dev/reference/check_files_exist.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check that files exist — check_files_exist","text":"files_vec vector file paths error_file_prefix Error message prefix 'Bedfile' vs 'Tabix file'","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/check_files_exist.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check that files exist — check_files_exist","text":"TRUE input bedfiles associated tabix index file. FALSE ","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/check_thread_count.html","id":null,"dir":"Reference","previous_headings":"","what":"Check that the required threads are available — check_thread_count","title":"Check that the required threads are available — check_thread_count","text":"Check required threads available","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/check_thread_count.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check that the required threads are available — check_thread_count","text":"","code":"check_thread_count( n_threads, avail_threads = availableCores(), opt_set = FALSE )"},{"path":"https://huishenlab.github.io/iscream/dev/reference/check_thread_count.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check that the required threads are available — check_thread_count","text":"n_threads number threads check availability avail_threads number threads available system. Defaults parallelly::availableCores() opt_set Whether iscream.threads options set","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/check_thread_count.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check that the required threads are available — check_thread_count","text":"n_threads requested number threads available stops ","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/get_log_level.html","id":null,"dir":"Reference","previous_headings":"","what":"Get the current log level — get_log_level","title":"Get the current log level — get_log_level","text":"Can handle spdlogs levels, iscream functions supports \"info\" \"debug\"","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/get_log_level.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get the current log level — get_log_level","text":"","code":"get_log_level()"},{"path":"https://huishenlab.github.io/iscream/dev/reference/get_log_level.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get the current log level — get_log_level","text":"current logging level string","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/get_omp_threads.html","id":null,"dir":"Reference","previous_headings":"","what":"Get the number of available threads from OpenMP. — get_omp_threads","title":"Get the number of available threads from OpenMP. — get_omp_threads","text":"queries number available threads usign OpenMP, reliably provide accurate available thread count. get reliable count accounts environment variables HPC schedulers, use get_threads()`. function pulled github.com/rdatatable/data.table","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/get_omp_threads.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get the number of available threads from OpenMP. — get_omp_threads","text":"","code":"get_omp_threads(verbose)"},{"path":"https://huishenlab.github.io/iscream/dev/reference/get_omp_threads.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get the number of available threads from OpenMP. — get_omp_threads","text":"verbose Whether verbose available omp threads","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/get_omp_threads.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get the number of available threads from OpenMP. — get_omp_threads","text":"","code":"get_omp_threads(verbose = TRUE) #> OpenMP version (_OPENMP) 201511 #> omp_get_num_procs() 4 #> omp_get_thread_limit() 2147483647 #> omp_get_max_threads() 4 #> [1] 4"},{"path":"https://huishenlab.github.io/iscream/dev/reference/get_threads.html","id":null,"dir":"Reference","previous_headings":"","what":"Get the number of available threads — get_threads","title":"Get the number of available threads — get_threads","text":"function sets number threads iscream uses 1 iscream.threads option set. set number threads use setDTthreads set iscream.threads option ~/.Rprofile. See ?set_threads information.","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/get_threads.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get the number of available threads — get_threads","text":"","code":"get_threads()"},{"path":"https://huishenlab.github.io/iscream/dev/reference/get_threads.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get the number of available threads — get_threads","text":"named vector: use_threads = iscream.threads option, whether option set user, available threads system","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/get_threads.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get the number of available threads — get_threads","text":"","code":"get_threads() #> use_threads opt_set avail_threads #> 1 1 4"},{"path":"https://huishenlab.github.io/iscream/dev/reference/query_all.html","id":null,"dir":"Reference","previous_headings":"","what":"Query all CpGs from input genomic regions — query_all","title":"Query all CpGs from input genomic regions — query_all","text":"Queries provided regions produces M Coverage matrices genomic positions. Parallelized across files using threads \"iscream.threads\" option. output query_all may used create BSseq object: .call(BSseq, query_all(...)).","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/query_all.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Query all CpGs from input genomic regions — query_all","text":"","code":"query_all( bedfiles, regions, bismark = FALSE, merged = TRUE, sparse = FALSE, nthreads = NULL )"},{"path":"https://huishenlab.github.io/iscream/dev/reference/query_all.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Query all CpGs from input genomic regions — query_all","text":"bedfiles vector bedfile paths regions vector genomic regions strings bismark Whether input bismark coverage file merged Whether input strands merged/collapsed sparse Whether return M coverage matrices sparse matrices (\"dgCMatrix\"). Set TRUE scWGBS data nthreads Set number threads use overriding \"iscream.threads\" option. See ?set_threads information.","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/query_all.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Query all CpGs from input genomic regions — query_all","text":"named list M coverage matrices character vector chromosomes numeric vector corresponding CpG base positions character vector input sample names","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/query_all.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Query all CpGs from input genomic regions — query_all","text":"","code":"bedfiles <- system.file(\"extdata\", package = \"iscream\") |> list.files(pattern = \"[a|b|c|d].bed.gz$\", full.names = TRUE) # examine the bedfiles colnames <- c(\"chr\", \"start\", \"end\", \"beta\", \"coverage\") lapply(bedfiles, function(i) knitr::kable(data.table::fread(i, col.names = colnames))) #> [[1]] #> #> #> |chr | start| end| beta| coverage| #> |:----|-----:|---:|----:|--------:| #> |chr1 | 1| 2| 1.0| 1| #> |chr1 | 3| 4| 1.0| 1| #> |chr1 | 5| 6| 0.0| 2| #> |chr1 | 7| 8| 0.0| 1| #> |chr1 | 9| 10| 0.5| 2| #> |chr1 | 11| 12| 1.0| 2| #> |chr1 | 13| 14| 1.0| 3| #> #> [[2]] #> #> #> |chr | start| end| beta| coverage| #> |:----|-----:|---:|----:|--------:| #> |chr1 | 1| 2| 0| 2| #> |chr1 | 5| 6| 1| 2| #> |chr1 | 7| 8| 1| 1| #> |chr1 | 11| 12| 0| 2| #> |chr1 | 13| 14| 1| 1| #> #> [[3]] #> #> #> |chr | start| end| beta| coverage| #> |:----|-----:|---:|----:|--------:| #> |chr1 | 3| 4| 1| 2| #> |chr1 | 7| 8| 0| 2| #> |chr1 | 9| 10| 1| 1| #> #> [[4]] #> #> #> |chr | start| end| beta| coverage| #> |:----|-----:|---:|----:|--------:| #> |chr1 | 1| 2| 1.0| 1| #> |chr1 | 3| 4| 1.0| 2| #> |chr1 | 7| 8| 0.0| 1| #> |chr1 | 9| 10| 0.5| 2| #> |chr1 | 13| 14| 1.0| 1| #> # make a vector of regions regions <- c(\"chr1:1-6\", \"chr1:7-10\", \"chr1:11-14\") query_all(bedfiles, regions) #> [19:25:41.281923] [iscream::query_all] [info] Querying 3 regions from 4 bedfiles #> #> $M #> a b c d #> chr1:2 1 0 0 1 #> chr1:4 1 0 2 2 #> chr1:6 0 2 0 0 #> chr1:8 0 1 0 0 #> chr1:10 1 0 1 1 #> chr1:12 2 0 0 0 #> chr1:14 3 1 0 1 #> #> $Cov #> a b c d #> chr1:2 1 2 0 1 #> chr1:4 1 0 2 2 #> chr1:6 2 2 0 0 #> chr1:8 1 1 2 1 #> chr1:10 2 0 1 2 #> chr1:12 2 2 0 0 #> chr1:14 3 1 0 1 #> #> $pos #> [1] 1 3 5 7 9 11 13 #> #> $chr #> [1] \"chr1\" \"chr1\" \"chr1\" \"chr1\" \"chr1\" \"chr1\" \"chr1\" #> #> $sampleNames #> [1] \"a\" \"b\" \"c\" \"d\" #> # for BSseq object run if (FALSE) { # \\dontrun{ library(bsseq) do.call(BSseq, query_all(bedfiles, regions)) } # }"},{"path":"https://huishenlab.github.io/iscream/dev/reference/region_map.html","id":null,"dir":"Reference","previous_headings":"","what":"Run a defined function over genomic regions — region_map","title":"Run a defined function over genomic regions — region_map","text":"Run function CpGs bedfiles across genomic regions. Currently supported functions aggregate average. Parallelized across files using threads \"iscream.threads\" option.","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/region_map.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Run a defined function over genomic regions — region_map","text":"","code":"region_map( bedfiles, regions, fun = \"aggregate\", bismark = FALSE, mval = TRUE, set_region_rownames = FALSE, nthreads = NULL )"},{"path":"https://huishenlab.github.io/iscream/dev/reference/region_map.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Run a defined function over genomic regions — region_map","text":"bedfiles vector bedfile paths regions vector genomic regions strings. named vector provided, names used feature column instead genomic regions string fun Function apply region. See details. bismark Whether input bismark coverage file mval Whether calculate M value (coverage \\(\\times \\beta\\)) use beta value applying function. set_region_rownames Use region strings returned data frame's rownames. Can useful named vector regions want rownames feature names. nthreads Set number threads use overriding \"iscream.threads\" option. See ?set_threads information.","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/region_map.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Run a defined function over genomic regions — region_map","text":"data.frame","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/region_map.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Run a defined function over genomic regions — region_map","text":"Available functions: \"aggregate\" sums values region aggregated beta values mval = FALSE aggregated M values mval = TRUE \"average\" averages values region average beta values mval = FALSE average M values mval = TRUE","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/region_map.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Run a defined function over genomic regions — region_map","text":"","code":"bedfiles <- system.file(\"extdata\", package = \"iscream\") |> list.files(pattern = \"[a|b|c|d].bed.gz$\", full.names = TRUE) # examine the bedfiles colnames <- c(\"chr\", \"start\", \"end\", \"beta\", \"coverage\") lapply(bedfiles, function(i) knitr::kable(data.table::fread(i, col.names = colnames))) #> [[1]] #> #> #> |chr | start| end| beta| coverage| #> |:----|-----:|---:|----:|--------:| #> |chr1 | 1| 2| 1.0| 1| #> |chr1 | 3| 4| 1.0| 1| #> |chr1 | 5| 6| 0.0| 2| #> |chr1 | 7| 8| 0.0| 1| #> |chr1 | 9| 10| 0.5| 2| #> |chr1 | 11| 12| 1.0| 2| #> |chr1 | 13| 14| 1.0| 3| #> #> [[2]] #> #> #> |chr | start| end| beta| coverage| #> |:----|-----:|---:|----:|--------:| #> |chr1 | 1| 2| 0| 2| #> |chr1 | 5| 6| 1| 2| #> |chr1 | 7| 8| 1| 1| #> |chr1 | 11| 12| 0| 2| #> |chr1 | 13| 14| 1| 1| #> #> [[3]] #> #> #> |chr | start| end| beta| coverage| #> |:----|-----:|---:|----:|--------:| #> |chr1 | 3| 4| 1| 2| #> |chr1 | 7| 8| 0| 2| #> |chr1 | 9| 10| 1| 1| #> #> [[4]] #> #> #> |chr | start| end| beta| coverage| #> |:----|-----:|---:|----:|--------:| #> |chr1 | 1| 2| 1.0| 1| #> |chr1 | 3| 4| 1.0| 2| #> |chr1 | 7| 8| 0.0| 1| #> |chr1 | 9| 10| 0.5| 2| #> |chr1 | 13| 14| 1.0| 1| #> # make a vector of regions regions <- c(\"chr1:1-6\", \"chr1:7-10\", \"chr1:11-14\") region_map(bedfiles, regions) #> [19:25:54.191224] [iscream::region_map] [info] Aggregating 3 regions from 4 bedfiles #> #> Feature Cell coverage M #> 1 chr1:1-6 a 4 2 #> 2 chr1:7-10 a 3 1 #> 3 chr1:11-14 a 5 5 #> 4 chr1:1-6 b 4 2 #> 5 chr1:7-10 b 1 1 #> 6 chr1:11-14 b 3 1 #> 7 chr1:1-6 c 2 2 #> 8 chr1:7-10 c 3 1 #> 9 chr1:11-14 c 0 0 #> 10 chr1:1-6 d 3 3 #> 11 chr1:7-10 d 3 1 #> 12 chr1:11-14 d 1 1 region_map(bedfiles, regions, mval = FALSE) #> [19:25:54.193726] [iscream::region_map] [info] Aggregating 3 regions from 4 bedfiles #> #> Feature Cell coverage beta #> 1 chr1:1-6 a 4 2.0 #> 2 chr1:7-10 a 3 0.5 #> 3 chr1:11-14 a 5 2.0 #> 4 chr1:1-6 b 4 1.0 #> 5 chr1:7-10 b 1 1.0 #> 6 chr1:11-14 b 3 1.0 #> 7 chr1:1-6 c 2 1.0 #> 8 chr1:7-10 c 3 1.0 #> 9 chr1:11-14 c 0 0.0 #> 10 chr1:1-6 d 3 2.0 #> 11 chr1:7-10 d 3 0.5 #> 12 chr1:11-14 d 1 1.0 region_map(bedfiles, regions, fun = \"average\") #> [19:25:54.195976] [iscream::region_map] [info] Averaging 3 regions from 4 bedfiles #> #> Feature Cell coverage M #> 1 chr1:1-6 a 1.333333 0.6666667 #> 2 chr1:7-10 a 1.500000 0.5000000 #> 3 chr1:11-14 a 2.500000 2.5000000 #> 4 chr1:1-6 b 2.000000 1.0000000 #> 5 chr1:7-10 b 1.000000 1.0000000 #> 6 chr1:11-14 b 1.500000 0.5000000 #> 7 chr1:1-6 c 2.000000 2.0000000 #> 8 chr1:7-10 c 1.500000 0.5000000 #> 9 chr1:11-14 c 0.000000 0.0000000 #> 10 chr1:1-6 d 1.500000 1.5000000 #> 11 chr1:7-10 d 1.500000 0.5000000 #> 12 chr1:11-14 d 1.000000 1.0000000"},{"path":"https://huishenlab.github.io/iscream/dev/reference/set_log_level.html","id":null,"dir":"Reference","previous_headings":"","what":"Set logging level — set_log_level","title":"Set logging level — set_log_level","text":"Set logging level","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/set_log_level.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Set logging level — set_log_level","text":"","code":"set_log_level(level = \"info\")"},{"path":"https://huishenlab.github.io/iscream/dev/reference/set_log_level.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Set logging level — set_log_level","text":"level logging verbosity level use \"info\": default gives provides basic information number files regions used function \"debug\": verbose row allocations, many CpGs found region, filename parsing etc. mode used one thread R output messages multiple threads without crashing.","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/set_log_level.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Set logging level — set_log_level","text":"None; sets log level provided level","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/set_log_level.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Set logging level — set_log_level","text":"","code":"set_log_level(\"info\")"},{"path":"https://huishenlab.github.io/iscream/dev/reference/set_threads.html","id":null,"dir":"Reference","previous_headings":"","what":"Set the number of available threads — set_threads","title":"Set the number of available threads — set_threads","text":"function sets 'iscream.threads' option n_threads. see many threads available see parallelly::availableCores.","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/set_threads.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Set the number of available threads — set_threads","text":"","code":"set_threads(n_threads)"},{"path":"https://huishenlab.github.io/iscream/dev/reference/set_threads.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Set the number of available threads — set_threads","text":"n_threads number threads use","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/set_threads.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Set the number of available threads — set_threads","text":"NULL. Sets iscream.threads option requested number threads available","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/set_threads.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Set the number of available threads — set_threads","text":"iscream uses OpenMP parallelize certain functions. can use many threads available system varying degrees performance improvements. parallelly::availableCores() function report number available threads. get information OpenMP threads, run get_omp_threads(verbose = TRUE). However, high preformance computers (HPCs) resource allocating job schedulers like SLURM, OpenMP may detect available threads across HPC limit cores allocated scheduler. system administrator set limits, may result job taking resources jobs. limits, trying use threads available reduce iscream's performance. Job schedulers typically environment variable (e.g. SLURM_CPUS_ON_NODE SLURM) gives actual number available cores. , hyperthreaded systems, count may double available processors. Using hyperthreading guarantee performance improvement - may better set number threads half reported number. parallelly::availableCores() takes HPC scheduler/CRAN/Bioconductor limits account reporting number available threads may reliably report hyperthreading ('system' 'nproc'). set number threads without call set_threads() every session, put .Rprofile See help('Rprofile') information startup options. Functions currently using OpenMP: region_map() query_all()","code":"options(iscream.threads = [n_threads])"},{"path":"https://huishenlab.github.io/iscream/dev/reference/set_threads.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Set the number of available threads — set_threads","text":"","code":"(ncores <- parallelly::availableCores()) #> system #> 4 if (FALSE) { # \\dontrun{ set_threads(ncores) } # }"},{"path":"https://huishenlab.github.io/iscream/dev/reference/validate_log_level.html","id":null,"dir":"Reference","previous_headings":"","what":"Validate provided logging level — validate_log_level","title":"Validate provided logging level — validate_log_level","text":"\"info\" \"debug\" currently supported, \"debug\" supported using 1 thread","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/validate_log_level.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Validate provided logging level — validate_log_level","text":"","code":"validate_log_level(level = get_log_level(), n_threads)"},{"path":"https://huishenlab.github.io/iscream/dev/reference/validate_log_level.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Validate provided logging level — validate_log_level","text":"level logging level validate n_threads number threads next iscream function call use","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/validate_log_level.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Validate provided logging level — validate_log_level","text":"None; sets log level provide level","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/validate_log_level.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Validate provided logging level — validate_log_level","text":"","code":"set_log_level(\"info\")"},{"path":"https://huishenlab.github.io/iscream/dev/reference/verify_files_or_stop.html","id":null,"dir":"Reference","previous_headings":"","what":"Verify that bedfiles are tabixed — verify_files_or_stop","title":"Verify that bedfiles are tabixed — verify_files_or_stop","text":"Verify bedfiles tabixed","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/verify_files_or_stop.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Verify that bedfiles are tabixed — verify_files_or_stop","text":"","code":"verify_files_or_stop(bedfiles, verify_tabix = TRUE)"},{"path":"https://huishenlab.github.io/iscream/dev/reference/verify_files_or_stop.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Verify that bedfiles are tabixed — verify_files_or_stop","text":"bedfiles vector bedfile paths verify_tabix Whether verify presence tabix files","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/verify_files_or_stop.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Verify that bedfiles are tabixed — verify_files_or_stop","text":"TRUE input bedfiles associated tabix index file. FALSE ","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/verify_regions_or_stop.html","id":null,"dir":"Reference","previous_headings":"","what":"Verify that regions are valid — verify_regions_or_stop","title":"Verify that regions are valid — verify_regions_or_stop","text":"Verify regions valid","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/verify_regions_or_stop.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Verify that regions are valid — verify_regions_or_stop","text":"","code":"verify_regions_or_stop(regions)"},{"path":"https://huishenlab.github.io/iscream/dev/reference/verify_regions_or_stop.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Verify that regions are valid — verify_regions_or_stop","text":"regions vector genomic regions","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/verify_regions_or_stop.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Verify that regions are valid — verify_regions_or_stop","text":"TRUE input regions start 'chr' FALSE ","code":""}] diff --git a/dev/sitemap.xml b/dev/sitemap.xml index 8fb4a12..ec80093 100644 --- a/dev/sitemap.xml +++ b/dev/sitemap.xml @@ -8,34 +8,15 @@ https://huishenlab.github.io/iscream/dev/reference/Cpp_set_log_level.html https://huishenlab.github.io/iscream/dev/reference/check_files_exist.html https://huishenlab.github.io/iscream/dev/reference/check_thread_count.html -https://huishenlab.github.io/iscream/dev/reference/decode_beta.html -https://huishenlab.github.io/iscream/dev/reference/decode_cov.html -https://huishenlab.github.io/iscream/dev/reference/decode_m.html -https://huishenlab.github.io/iscream/dev/reference/decoder.html https://huishenlab.github.io/iscream/dev/reference/get_log_level.html https://huishenlab.github.io/iscream/dev/reference/get_omp_threads.html https://huishenlab.github.io/iscream/dev/reference/get_threads.html https://huishenlab.github.io/iscream/dev/reference/index.html -https://huishenlab.github.io/iscream/dev/reference/joiner.html -https://huishenlab.github.io/iscream/dev/reference/make_beta_mat.html -https://huishenlab.github.io/iscream/dev/reference/make_bsseq_hm.html -https://huishenlab.github.io/iscream/dev/reference/make_bsseq_lm.html -https://huishenlab.github.io/iscream/dev/reference/make_coverage_mat.html -https://huishenlab.github.io/iscream/dev/reference/make_m_mat.html -https://huishenlab.github.io/iscream/dev/reference/make_meth_mat.html -https://huishenlab.github.io/iscream/dev/reference/make_sparse_mat.html -https://huishenlab.github.io/iscream/dev/reference/make_sparse_mat_bs.html -https://huishenlab.github.io/iscream/dev/reference/mm_writer.html https://huishenlab.github.io/iscream/dev/reference/query_all.html -https://huishenlab.github.io/iscream/dev/reference/read_sample.html -https://huishenlab.github.io/iscream/dev/reference/read_sample_bs.html https://huishenlab.github.io/iscream/dev/reference/region_map.html https://huishenlab.github.io/iscream/dev/reference/set_log_level.html https://huishenlab.github.io/iscream/dev/reference/set_threads.html https://huishenlab.github.io/iscream/dev/reference/validate_log_level.html -https://huishenlab.github.io/iscream/dev/reference/vdecoder.html -https://huishenlab.github.io/iscream/dev/reference/vdouble_decoder.html -https://huishenlab.github.io/iscream/dev/reference/vencoder.html https://huishenlab.github.io/iscream/dev/reference/verify_files_or_stop.html https://huishenlab.github.io/iscream/dev/reference/verify_regions_or_stop.html