diff --git a/dev/pkgdown.yml b/dev/pkgdown.yml index f4ffc6a..29428c6 100644 --- a/dev/pkgdown.yml +++ b/dev/pkgdown.yml @@ -2,7 +2,7 @@ pandoc: 3.1.11 pkgdown: 2.1.1 pkgdown_sha: ~ articles: {} -last_built: 2024-12-04T20:00Z +last_built: 2024-12-06T16:53Z urls: reference: https://huishenlab.github.io/iscream/reference article: https://huishenlab.github.io/iscream/articles diff --git a/dev/reference/query_all.html b/dev/reference/query_all.html index 58e5f66..bcbe1fa 100644 --- a/dev/reference/query_all.html +++ b/dev/reference/query_all.html @@ -170,11 +170,11 @@

Examples# make a vector of regions regions <- c("chr1:1-6", "chr1:7-10", "chr1:11-14") query_all(bedfiles, regions) -#> [20:00:08.804255] [iscream::query_all] [info] Querying 3 regions from 4 bedfiles +#> [16:53:54.509740] [iscream::query_all] [info] Querying 3 regions from 4 bedfiles #> -#> [20:00:08.804746] [iscream::query_all] [info] Creating metadata vectors -#> [20:00:08.804798] [iscream::query_all] [info] nrows 10000 - 9993 extra rows allocated with 0 resizes -#> [20:00:08.804804] [iscream::query_all] [info] Creating dense matrix +#> [16:53:54.510133] [iscream::query_all] [info] Creating metadata vectors +#> [16:53:54.510183] [iscream::query_all] [info] nrows 10000 - 9993 extra rows allocated with 0 resizes +#> [16:53:54.510188] [iscream::query_all] [info] Creating dense matrix #> $M #> a b c d #> chr1:2 1 0 0 1 diff --git a/dev/reference/summarize_regions.html b/dev/reference/summarize_regions.html index fa8a896..d23b4a2 100644 --- a/dev/reference/summarize_regions.html +++ b/dev/reference/summarize_regions.html @@ -71,7 +71,7 @@

Argumentsfun -

Function to apply over the region. See details.

+

Function(s) to apply over the region. See details.

aligner
@@ -177,8 +177,8 @@

Examples# make a vector of regions regions <- c("chr1:1-6", "chr1:7-10", "chr1:11-14") summarize_regions(bedfiles, regions) -#> [20:00:21.059893] [iscream::summarize_regions] [info] Summarizing 3 regions from 4 bedfiles -#> [20:00:21.059909] [iscream::summarize_regions] [info] using sum, mean, median, stddev, variance, min, max, range, cpg_count +#> [16:54:06.261831] [iscream::summarize_regions] [info] Summarizing 3 regions from 4 bedfiles +#> [16:54:06.261846] [iscream::summarize_regions] [info] using sum, mean, median, stddev, variance, min, max, range, cpg_count #> Feature Sample coverage.sum M.sum coverage.mean M.mean coverage.median #> 1 chr1:1-6 a 4 2 1.333333 0.6666667 1.0 #> 2 chr1:7-10 a 3 1 1.500000 0.5000000 1.5 @@ -218,64 +218,25 @@

Examples#> 10 1 2 2 1 1 2 #> 11 0 2 1 1 1 2 #> 12 1 1 1 0 0 1 -summarize_regions(bedfiles, regions, mval = FALSE) -#> [20:00:21.073411] [iscream::summarize_regions] [info] Summarizing 3 regions from 4 bedfiles -#> [20:00:21.073421] [iscream::summarize_regions] [info] using sum, mean, median, stddev, variance, min, max, range, cpg_count -#> Feature Sample coverage.sum beta.sum coverage.mean beta.mean -#> 1 chr1:1-6 a 4 2.0 1.333333 0.6666667 -#> 2 chr1:7-10 a 3 0.5 1.500000 0.2500000 -#> 3 chr1:11-14 a 5 2.0 2.500000 1.0000000 -#> 4 chr1:1-6 b 4 1.0 2.000000 0.5000000 -#> 5 chr1:7-10 b 1 1.0 1.000000 1.0000000 -#> 6 chr1:11-14 b 3 1.0 1.500000 0.5000000 -#> 7 chr1:1-6 c 2 1.0 2.000000 1.0000000 -#> 8 chr1:7-10 c 3 1.0 1.500000 0.5000000 -#> 9 chr1:11-14 c NA NA NA NA -#> 10 chr1:1-6 d 3 2.0 1.500000 1.0000000 -#> 11 chr1:7-10 d 3 0.5 1.500000 0.2500000 -#> 12 chr1:11-14 d 1 1.0 1.000000 1.0000000 -#> coverage.median beta.median coverage.stddev beta.stddev coverage.variance -#> 1 1.0 1.00 0.5773503 0.5773503 0.3333333 -#> 2 1.5 0.25 0.7071068 0.3535534 0.5000000 -#> 3 2.5 1.00 0.7071068 0.0000000 0.5000000 -#> 4 2.0 0.50 0.0000000 0.7071068 0.0000000 -#> 5 1.0 1.00 0.0000000 0.0000000 0.0000000 -#> 6 1.5 0.50 0.7071068 0.7071068 0.5000000 -#> 7 2.0 1.00 0.0000000 0.0000000 0.0000000 -#> 8 1.5 0.50 0.7071068 0.7071068 0.5000000 -#> 9 NA NA NA NA NA -#> 10 1.5 1.00 0.7071068 0.0000000 0.5000000 -#> 11 1.5 0.25 0.7071068 0.3535534 0.5000000 -#> 12 1.0 1.00 0.0000000 0.0000000 0.0000000 -#> beta.variance coverage.min beta.min coverage.max beta.max coverage.range -#> 1 0.3333333 1 0 2 1.0 1 -#> 2 0.1250000 1 0 2 0.5 1 -#> 3 0.0000000 2 1 3 1.0 1 -#> 4 0.5000000 2 0 2 1.0 0 -#> 5 0.0000000 1 1 1 1.0 0 -#> 6 0.5000000 1 0 2 1.0 1 -#> 7 0.0000000 2 1 2 1.0 0 -#> 8 0.5000000 1 0 2 1.0 1 -#> 9 NA NA NA NA NA NA -#> 10 0.0000000 1 1 2 1.0 1 -#> 11 0.1250000 1 0 2 0.5 1 -#> 12 0.0000000 1 1 1 1.0 0 -#> beta.range cpg_count -#> 1 1.0 3 -#> 2 0.5 2 -#> 3 0.0 2 -#> 4 1.0 2 -#> 5 0.0 1 -#> 6 1.0 2 -#> 7 0.0 1 -#> 8 1.0 2 -#> 9 NA NA -#> 10 0.0 2 -#> 11 0.5 2 -#> 12 0.0 1 +summarize_regions(bedfiles, regions, fun = c("mean", "stddev"), mval = FALSE) +#> [16:54:06.275140] [iscream::summarize_regions] [info] Summarizing 3 regions from 4 bedfiles +#> [16:54:06.275151] [iscream::summarize_regions] [info] using mean, stddev +#> Feature Sample coverage.mean beta.mean coverage.stddev beta.stddev +#> 1 chr1:1-6 a 1.333333 0.6666667 0.5773503 0.5773503 +#> 2 chr1:7-10 a 1.500000 0.2500000 0.7071068 0.3535534 +#> 3 chr1:11-14 a 2.500000 1.0000000 0.7071068 0.0000000 +#> 4 chr1:1-6 b 2.000000 0.5000000 0.0000000 0.7071068 +#> 5 chr1:7-10 b 1.000000 1.0000000 0.0000000 0.0000000 +#> 6 chr1:11-14 b 1.500000 0.5000000 0.7071068 0.7071068 +#> 7 chr1:1-6 c 2.000000 1.0000000 0.0000000 0.0000000 +#> 8 chr1:7-10 c 1.500000 0.5000000 0.7071068 0.7071068 +#> 9 chr1:11-14 c NA NA NA NA +#> 10 chr1:1-6 d 1.500000 1.0000000 0.7071068 0.0000000 +#> 11 chr1:7-10 d 1.500000 0.2500000 0.7071068 0.3535534 +#> 12 chr1:11-14 d 1.000000 1.0000000 0.0000000 0.0000000 summarize_regions(bedfiles, regions, fun = "sum") -#> [20:00:21.087559] [iscream::summarize_regions] [info] Summarizing 3 regions from 4 bedfiles -#> [20:00:21.087570] [iscream::summarize_regions] [info] using sum +#> [16:54:06.278380] [iscream::summarize_regions] [info] Summarizing 3 regions from 4 bedfiles +#> [16:54:06.278389] [iscream::summarize_regions] [info] using sum #> Feature Sample coverage.sum M.sum #> 1 chr1:1-6 a 4 2 #> 2 chr1:7-10 a 3 1 diff --git a/dev/search.json b/dev/search.json index 34be542..563e73c 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. Jacob Morrison. Author. Hui Shen. Thesis advisor, funder.","code":""},{"path":"https://huishenlab.github.io/iscream/dev/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Eapen J, Morrison 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 and Jacob Morrison}, 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--119","dir":"","previous_headings":"Installation > System dependencies","what":"htslib >= 1.19","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 built manually: https://www.htslib.org/download/. header files 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":"gcc","dir":"","previous_headings":"Installation > System dependencies","what":"GCC","title":"Integrating Single-Cell Results for Exploring and Analyzing Methylation","text":"GNU GCC must installed OpenMP support. usually installed default Linux systems, may need manually installed MacOS use iscream multiple threads1.","code":""},{"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, prealloc, 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 prealloc number rows initialize matrices nthreads Set number threads use overriding \"iscream.threads\" option. See ?set_threads information.","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/Cpp_query_chroms.html","id":null,"dir":"Reference","previous_headings":"","what":"Query the chromosomes or seqnames from a vector of files — Cpp_query_chroms","title":"Query the chromosomes or seqnames from a vector of files — Cpp_query_chroms","text":"Query chromosomes seqnames vector files","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/Cpp_query_chroms.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Query the chromosomes or seqnames from a vector of files — Cpp_query_chroms","text":"","code":"Cpp_query_chroms(bedfile_vec, nthreads)"},{"path":"https://huishenlab.github.io/iscream/dev/reference/Cpp_query_chroms.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Query the chromosomes or seqnames from a vector of files — Cpp_query_chroms","text":"bedfile_vec vector bedfile paths","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/Cpp_query_chroms.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Query the chromosomes or seqnames from a vector of files — Cpp_query_chroms","text":"vector seqnames","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/Cpp_query_interval.html","id":null,"dir":"Reference","previous_headings":"","what":"Get reads from a single genomic region from one tabixed bed file to return as CharacterVector — Cpp_query_interval","title":"Get reads from a single genomic region from one tabixed bed file to return as CharacterVector — Cpp_query_interval","text":"Get reads single genomic region one tabixed bed file return CharacterVector","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/Cpp_query_interval.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get reads from a single genomic region from one tabixed bed file to return as CharacterVector — Cpp_query_interval","text":"","code":"Cpp_query_interval(bedfile, regions)"},{"path":"https://huishenlab.github.io/iscream/dev/reference/Cpp_query_interval.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get reads from a single genomic region from one tabixed bed file to return as CharacterVector — Cpp_query_interval","text":"bedfile name bed file - must corresponding tabix file name .tbi extension regions vector region strings form \"chr:start-end\"","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/Cpp_summarize_regions.html","id":null,"dir":"Reference","previous_headings":"","what":"Apply a function over CpGs within features — Cpp_summarize_regions","title":"Apply a function over CpGs within features — Cpp_summarize_regions","text":"function called summarize_regions() since sanity checks C++ side.","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/Cpp_summarize_regions.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Apply a function over CpGs within features — Cpp_summarize_regions","text":"","code":"Cpp_summarize_regions( bedfiles, regions, fun_vec, mval, bismark, region_rownames = FALSE, nthreads = 1L )"},{"path":"https://huishenlab.github.io/iscream/dev/reference/Cpp_summarize_regions.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Apply a function over CpGs within features — Cpp_summarize_regions","text":"bedfiles vector bedfile paths regions vector genomic regions fun_vec Vector armadillo-supported stats functions apply CpGs ' regions: \"sum\", \"mean\", \"median\", \"stddev\", \"variance\" \"cpg_count\", \"min\",\"max\", \"range\". mval Calculates M values TRUE, use beta values FALSE bismark input bismark column format instead BISCUIT region_rownames Whether set rownames regions strings. necessary regions vector unnamed. names, \"Feature\" column set names rownames set regions string nthreads Number cores use. See details.","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/Cpp_summarize_regions.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Apply a function over CpGs within features — Cpp_summarize_regions","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/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/dot-get_threads.html","id":null,"dir":"Reference","previous_headings":"","what":"Get the number of threads to use in functions from param or option — .get_threads","title":"Get the number of threads to use in functions from param or option — .get_threads","text":"Get number threads use functions param option","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/dot-get_threads.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get the number of threads to use in functions from param or option — .get_threads","text":"","code":".get_threads(nthreads)"},{"path":"https://huishenlab.github.io/iscream/dev/reference/get_df_string.html","id":null,"dir":"Reference","previous_headings":"","what":"DataFrame to region strings — get_df_string","title":"DataFrame to region strings — get_df_string","text":"Convert DataFrame vector strings. Set feature names \"name\" column","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/get_df_string.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"DataFrame to region strings — get_df_string","text":"","code":"get_df_string(regions_df)"},{"path":"https://huishenlab.github.io/iscream/dev/reference/get_df_string.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"DataFrame to region strings — get_df_string","text":"regions_df data frame \"chr\", \"start\" \"end\" columns","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/get_df_string.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"DataFrame to region strings — get_df_string","text":"character vector","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/get_granges_string.html","id":null,"dir":"Reference","previous_headings":"","what":"GRanges to region strings — get_granges_string","title":"GRanges to region strings — get_granges_string","text":"Convert GRanges object vector strings","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/get_granges_string.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"GRanges to region strings — get_granges_string","text":"","code":"get_granges_string(gr, sep = c(\":\", \"-\"))"},{"path":"https://huishenlab.github.io/iscream/dev/reference/get_granges_string.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"GRanges to region strings — get_granges_string","text":"gr GRanges object sep Vector separators use genomic string. First element used separate chromosome coordinates, second separator used separate start end coordinates.","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/get_granges_string.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"GRanges to region strings — get_granges_string","text":"character vector","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/get_granges_string.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"GRanges to region strings — get_granges_string","text":"function adapted stuart-lab/signac.","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":"Gets number threads iscream currently set use, whether \"iscream.threads\" option set many threads available use. set number threads use set_threads() 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 = number threads iscream use opt_set = whether option set user avail_threads = number available threads reported parallelly::availableCores","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, aligner = \"biscuit\", merged = TRUE, sparse = FALSE, prealloc = 10000, 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, data frame GenomicRanges genomic regions. See details. aligner aligner used produce BED files - one \"biscuit\", \"bismark\", \"bsbolt\". merged Whether input strands merged/collapsed sparse Whether return M coverage matrices sparse matrices (\"dgCMatrix\"). Set TRUE scWGBS data prealloc number rows initialize matrices . number methyltion loci approximately known, can reduce runtime fewer resizes need made. 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":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Query all CpGs from input genomic regions — query_all","text":"input regions may string vector form \"chr:start-end\" GRanges object. data frame provided, must \"chr\", \"start\", \"end\" columns.","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(read.table(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) #> [20:00:08.804255] [iscream::query_all] [info] Querying 3 regions from 4 bedfiles #> #> [20:00:08.804746] [iscream::query_all] [info] Creating metadata vectors #> [20:00:08.804798] [iscream::query_all] [info] nrows 10000 - 9993 extra rows allocated with 0 resizes #> [20:00:08.804804] [iscream::query_all] [info] Creating dense matrix #> $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/query_chroms.html","id":null,"dir":"Reference","previous_headings":"","what":"Query the chromosomes or seqnames from a vector of files — query_chroms","title":"Query the chromosomes or seqnames from a vector of files — query_chroms","text":"Query chromosomes seqnames vector files","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/query_chroms.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Query the chromosomes or seqnames from a vector of files — query_chroms","text":"","code":"query_chroms(bedfiles, nthreads = NULL)"},{"path":"https://huishenlab.github.io/iscream/dev/reference/query_chroms.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Query the chromosomes or seqnames from a vector of files — query_chroms","text":"bedfiles vector bedfile paths nthreads Set number threads use overriding \"iscream.threads\" option. See ?set_threads information.","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/query_chroms.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Query the chromosomes or seqnames from a vector of files — query_chroms","text":"vector seqnames","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/scan_tabix.html","id":null,"dir":"Reference","previous_headings":"","what":"Get namde list of reads from a single genomic region from one tabixed bed file — scan_tabix","title":"Get namde list of reads from a single genomic region from one tabixed bed file — scan_tabix","text":"Get namde list reads single genomic region one tabixed bed file","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/scan_tabix.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get namde list of reads from a single genomic region from one tabixed bed file — scan_tabix","text":"","code":"scan_tabix(bedfile, regions)"},{"path":"https://huishenlab.github.io/iscream/dev/reference/scan_tabix.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get namde list of reads from a single genomic region from one tabixed bed file — scan_tabix","text":"bedfile name bed file - must corresponding tabix file name .tbi extension regions vector region strings form \"chr:start-end\"","code":""},{"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":"Sets \"iscream.threads\" option n_threads. see many threads available see ?get_threads().","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. get_threads() function uses parallelly::availableCores() report number available threads. Although OpenMP can detect number available cores, 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 multithreading: tabix() query_chroms() query_all() summarize_regions()","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/summarize_regions.html","id":null,"dir":"Reference","previous_headings":"","what":"Summarize CpGs methylation information over genomic regions — summarize_regions","title":"Summarize CpGs methylation information over genomic regions — summarize_regions","text":"Run summarizing functions CpGs bedfiles across genomic regions. Parallelized across files using threads \"iscream.threads\" option.","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/summarize_regions.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Summarize CpGs methylation information over genomic regions — summarize_regions","text":"","code":"summarize_regions( bedfiles, regions, fun = \"all\", aligner = \"biscuit\", mval = TRUE, set_region_rownames = FALSE, nthreads = NULL )"},{"path":"https://huishenlab.github.io/iscream/dev/reference/summarize_regions.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Summarize CpGs methylation information over genomic regions — summarize_regions","text":"bedfiles vector bedfile paths regions vector, data frame GenomicRanges genomic regions. See details. fun Function apply region. See details. aligner aligner used produce BED files - one \"biscuit\", \"bismark\", \"bsbolt\". 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 regions want regions strings 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/summarize_regions.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Summarize CpGs methylation information over genomic regions — summarize_regions","text":"data.frame","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/summarize_regions.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Summarize CpGs methylation information over genomic regions — summarize_regions","text":"input regions may string vector form \"chr:start-end\" GRanges object. data frame provided, must \"chr\", \"start\", \"end\" columns. string vector GenomicRanges inputs named, names used describe feature output dataframe. input dataframes 'name' column, used populate output's feature column. Supported fun arguments given . functions, setting mval = FALSE use beta values instead M value: Sum: \"sum\" Mean: \"mean\" Median: \"median\" Standard deviation: \"stddev\" Variance: \"variance\" Minimum: \"min\" Maximum: \"max\" Range: \"range\" . CpGs region: \"cpg_count\" summarizing computations backed Armadillo library. See https://arma.sourceforge.net/docs.html#stats_fns futher details supported functions","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/summarize_regions.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Summarize CpGs methylation information over genomic regions — summarize_regions","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(read.table(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\") summarize_regions(bedfiles, regions) #> [20:00:21.059893] [iscream::summarize_regions] [info] Summarizing 3 regions from 4 bedfiles #> [20:00:21.059909] [iscream::summarize_regions] [info] using sum, mean, median, stddev, variance, min, max, range, cpg_count #> Feature Sample coverage.sum M.sum coverage.mean M.mean coverage.median #> 1 chr1:1-6 a 4 2 1.333333 0.6666667 1.0 #> 2 chr1:7-10 a 3 1 1.500000 0.5000000 1.5 #> 3 chr1:11-14 a 5 5 2.500000 2.5000000 2.5 #> 4 chr1:1-6 b 4 2 2.000000 1.0000000 2.0 #> 5 chr1:7-10 b 1 1 1.000000 1.0000000 1.0 #> 6 chr1:11-14 b 3 1 1.500000 0.5000000 1.5 #> 7 chr1:1-6 c 2 2 2.000000 2.0000000 2.0 #> 8 chr1:7-10 c 3 1 1.500000 0.5000000 1.5 #> 9 chr1:11-14 c NA NA NA NA NA #> 10 chr1:1-6 d 3 3 1.500000 1.5000000 1.5 #> 11 chr1:7-10 d 3 1 1.500000 0.5000000 1.5 #> 12 chr1:11-14 d 1 1 1.000000 1.0000000 1.0 #> M.median coverage.stddev M.stddev coverage.variance M.variance coverage.min #> 1 1.0 0.5773503 0.5773503 0.3333333 0.3333333 1 #> 2 0.5 0.7071068 0.7071068 0.5000000 0.5000000 1 #> 3 2.5 0.7071068 0.7071068 0.5000000 0.5000000 2 #> 4 1.0 0.0000000 1.4142136 0.0000000 2.0000000 2 #> 5 1.0 0.0000000 0.0000000 0.0000000 0.0000000 1 #> 6 0.5 0.7071068 0.7071068 0.5000000 0.5000000 1 #> 7 2.0 0.0000000 0.0000000 0.0000000 0.0000000 2 #> 8 0.5 0.7071068 0.7071068 0.5000000 0.5000000 1 #> 9 NA NA NA NA NA NA #> 10 1.5 0.7071068 0.7071068 0.5000000 0.5000000 1 #> 11 0.5 0.7071068 0.7071068 0.5000000 0.5000000 1 #> 12 1.0 0.0000000 0.0000000 0.0000000 0.0000000 1 #> M.min coverage.max M.max coverage.range M.range cpg_count #> 1 0 2 1 1 1 3 #> 2 0 2 1 1 1 2 #> 3 2 3 3 1 1 2 #> 4 0 2 2 0 2 2 #> 5 1 1 1 0 0 1 #> 6 0 2 1 1 1 2 #> 7 2 2 2 0 0 1 #> 8 0 2 1 1 1 2 #> 9 NA NA NA NA NA NA #> 10 1 2 2 1 1 2 #> 11 0 2 1 1 1 2 #> 12 1 1 1 0 0 1 summarize_regions(bedfiles, regions, mval = FALSE) #> [20:00:21.073411] [iscream::summarize_regions] [info] Summarizing 3 regions from 4 bedfiles #> [20:00:21.073421] [iscream::summarize_regions] [info] using sum, mean, median, stddev, variance, min, max, range, cpg_count #> Feature Sample coverage.sum beta.sum coverage.mean beta.mean #> 1 chr1:1-6 a 4 2.0 1.333333 0.6666667 #> 2 chr1:7-10 a 3 0.5 1.500000 0.2500000 #> 3 chr1:11-14 a 5 2.0 2.500000 1.0000000 #> 4 chr1:1-6 b 4 1.0 2.000000 0.5000000 #> 5 chr1:7-10 b 1 1.0 1.000000 1.0000000 #> 6 chr1:11-14 b 3 1.0 1.500000 0.5000000 #> 7 chr1:1-6 c 2 1.0 2.000000 1.0000000 #> 8 chr1:7-10 c 3 1.0 1.500000 0.5000000 #> 9 chr1:11-14 c NA NA NA NA #> 10 chr1:1-6 d 3 2.0 1.500000 1.0000000 #> 11 chr1:7-10 d 3 0.5 1.500000 0.2500000 #> 12 chr1:11-14 d 1 1.0 1.000000 1.0000000 #> coverage.median beta.median coverage.stddev beta.stddev coverage.variance #> 1 1.0 1.00 0.5773503 0.5773503 0.3333333 #> 2 1.5 0.25 0.7071068 0.3535534 0.5000000 #> 3 2.5 1.00 0.7071068 0.0000000 0.5000000 #> 4 2.0 0.50 0.0000000 0.7071068 0.0000000 #> 5 1.0 1.00 0.0000000 0.0000000 0.0000000 #> 6 1.5 0.50 0.7071068 0.7071068 0.5000000 #> 7 2.0 1.00 0.0000000 0.0000000 0.0000000 #> 8 1.5 0.50 0.7071068 0.7071068 0.5000000 #> 9 NA NA NA NA NA #> 10 1.5 1.00 0.7071068 0.0000000 0.5000000 #> 11 1.5 0.25 0.7071068 0.3535534 0.5000000 #> 12 1.0 1.00 0.0000000 0.0000000 0.0000000 #> beta.variance coverage.min beta.min coverage.max beta.max coverage.range #> 1 0.3333333 1 0 2 1.0 1 #> 2 0.1250000 1 0 2 0.5 1 #> 3 0.0000000 2 1 3 1.0 1 #> 4 0.5000000 2 0 2 1.0 0 #> 5 0.0000000 1 1 1 1.0 0 #> 6 0.5000000 1 0 2 1.0 1 #> 7 0.0000000 2 1 2 1.0 0 #> 8 0.5000000 1 0 2 1.0 1 #> 9 NA NA NA NA NA NA #> 10 0.0000000 1 1 2 1.0 1 #> 11 0.1250000 1 0 2 0.5 1 #> 12 0.0000000 1 1 1 1.0 0 #> beta.range cpg_count #> 1 1.0 3 #> 2 0.5 2 #> 3 0.0 2 #> 4 1.0 2 #> 5 0.0 1 #> 6 1.0 2 #> 7 0.0 1 #> 8 1.0 2 #> 9 NA NA #> 10 0.0 2 #> 11 0.5 2 #> 12 0.0 1 summarize_regions(bedfiles, regions, fun = \"sum\") #> [20:00:21.087559] [iscream::summarize_regions] [info] Summarizing 3 regions from 4 bedfiles #> [20:00:21.087570] [iscream::summarize_regions] [info] using sum #> Feature Sample coverage.sum M.sum #> 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 NA NA #> 10 chr1:1-6 d 3 3 #> 11 chr1:7-10 d 3 1 #> 12 chr1:11-14 d 1 1"},{"path":"https://huishenlab.github.io/iscream/dev/reference/tabix.html","id":null,"dir":"Reference","previous_headings":"","what":"Query lines from a tabixed bedfile — tabix","title":"Query lines from a tabixed bedfile — tabix","text":"Query lines tabixed bedfile","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/tabix.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Query lines from a tabixed bedfile — tabix","text":"","code":"tabix( bedfiles, regions, aligner = \"biscuit\", colnames = NULL, raw = FALSE, nthreads = NULL )"},{"path":"https://huishenlab.github.io/iscream/dev/reference/tabix.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Query lines from a tabixed bedfile — tabix","text":"bedfiles bedfiles queried regions vector genomic region strings aligner aligner used produce BED files - one \"biscuit\", \"bismark\", \"bsbolt\". set result data.table's column names based argument. colnames vector column names result data.table. Set bedfile supported aligners general bedfile. raw Set true give named list raw strings regions style Rsamtools::scanTabix instead data.table nthreads Set number threads use overriding \"iscream.threads\" option. See ?set_threads information.","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/tabix.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Query lines from a tabixed bedfile — tabix","text":"data.table","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/tabix.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Query lines from a tabixed bedfile — tabix","text":"","code":"bedfiles <- system.file(\"extdata\", package = \"iscream\") |> list.files(pattern = \"[a|b|c|d].bed.gz$\", full.names = TRUE) regions <- c(\"chr1:1-6\", \"chr1:7-10\", \"chr1:11-14\") tabix(bedfiles[1], regions, colnames = c(\"chr\", \"start\", \"end\", \"beta\", \"coverage\")) #> chr start end beta coverage #> #> 1: chr1 1 2 1.0 1 #> 2: chr1 3 4 1.0 1 #> 3: chr1 5 6 0.0 2 #> 4: chr1 7 8 0.0 1 #> 5: chr1 9 10 0.5 2 #> 6: chr1 11 12 1.0 2 #> 7: chr1 13 14 1.0 3"},{"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_aligner_or_stop.html","id":null,"dir":"Reference","previous_headings":"","what":"Validate provided aligner — verify_aligner_or_stop","title":"Validate provided aligner — verify_aligner_or_stop","text":"\"biscuit\", \"bismark\", \"bsbolt\" currently supported","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/verify_aligner_or_stop.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Validate provided aligner — verify_aligner_or_stop","text":"","code":"verify_aligner_or_stop(aligner)"},{"path":"https://huishenlab.github.io/iscream/dev/reference/verify_aligner_or_stop.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Validate provided aligner — verify_aligner_or_stop","text":"aligner input alinger","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/verify_aligner_or_stop.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Validate provided aligner — verify_aligner_or_stop","text":"true; quits input among supported_aligners","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_filetype.html","id":null,"dir":"Reference","previous_headings":"","what":"Verify that the input bedfiles are of the type specified by the input aligner — verify_filetype","title":"Verify that the input bedfiles are of the type specified by the input aligner — verify_filetype","text":"Verify input bedfiles type specified input aligner","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/verify_filetype.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Verify that the input bedfiles are of the type specified by the input aligner — verify_filetype","text":"","code":"verify_filetype(bedfiles, aligner, stop_on_error = FALSE)"},{"path":"https://huishenlab.github.io/iscream/dev/reference/verify_filetype.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Verify that the input bedfiles are of the type specified by the input aligner — verify_filetype","text":"bedfiles vector bedfile paths aligner aligner chosen stop_on_error Whether warn stop aligner-filename mismatch","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/verify_filetype.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Verify that the input bedfiles are of the type specified by the input aligner — verify_filetype","text":"TRUE input bedfiles associated tabix index file. 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. Jacob Morrison. Author. Hui Shen. Thesis advisor, funder.","code":""},{"path":"https://huishenlab.github.io/iscream/dev/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Eapen J, Morrison 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 and Jacob Morrison}, 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--119","dir":"","previous_headings":"Installation > System dependencies","what":"htslib >= 1.19","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 built manually: https://www.htslib.org/download/. header files 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":"gcc","dir":"","previous_headings":"Installation > System dependencies","what":"GCC","title":"Integrating Single-Cell Results for Exploring and Analyzing Methylation","text":"GNU GCC must installed OpenMP support. usually installed default Linux systems, may need manually installed MacOS use iscream multiple threads1.","code":""},{"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, prealloc, 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 prealloc number rows initialize matrices nthreads Set number threads use overriding \"iscream.threads\" option. See ?set_threads information.","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/Cpp_query_chroms.html","id":null,"dir":"Reference","previous_headings":"","what":"Query the chromosomes or seqnames from a vector of files — Cpp_query_chroms","title":"Query the chromosomes or seqnames from a vector of files — Cpp_query_chroms","text":"Query chromosomes seqnames vector files","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/Cpp_query_chroms.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Query the chromosomes or seqnames from a vector of files — Cpp_query_chroms","text":"","code":"Cpp_query_chroms(bedfile_vec, nthreads)"},{"path":"https://huishenlab.github.io/iscream/dev/reference/Cpp_query_chroms.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Query the chromosomes or seqnames from a vector of files — Cpp_query_chroms","text":"bedfile_vec vector bedfile paths","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/Cpp_query_chroms.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Query the chromosomes or seqnames from a vector of files — Cpp_query_chroms","text":"vector seqnames","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/Cpp_query_interval.html","id":null,"dir":"Reference","previous_headings":"","what":"Get reads from a single genomic region from one tabixed bed file to return as CharacterVector — Cpp_query_interval","title":"Get reads from a single genomic region from one tabixed bed file to return as CharacterVector — Cpp_query_interval","text":"Get reads single genomic region one tabixed bed file return CharacterVector","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/Cpp_query_interval.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get reads from a single genomic region from one tabixed bed file to return as CharacterVector — Cpp_query_interval","text":"","code":"Cpp_query_interval(bedfile, regions)"},{"path":"https://huishenlab.github.io/iscream/dev/reference/Cpp_query_interval.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get reads from a single genomic region from one tabixed bed file to return as CharacterVector — Cpp_query_interval","text":"bedfile name bed file - must corresponding tabix file name .tbi extension regions vector region strings form \"chr:start-end\"","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/Cpp_summarize_regions.html","id":null,"dir":"Reference","previous_headings":"","what":"Apply a function over CpGs within features — Cpp_summarize_regions","title":"Apply a function over CpGs within features — Cpp_summarize_regions","text":"function called summarize_regions() since sanity checks C++ side.","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/Cpp_summarize_regions.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Apply a function over CpGs within features — Cpp_summarize_regions","text":"","code":"Cpp_summarize_regions( bedfiles, regions, fun_vec, mval, bismark, region_rownames = FALSE, nthreads = 1L )"},{"path":"https://huishenlab.github.io/iscream/dev/reference/Cpp_summarize_regions.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Apply a function over CpGs within features — Cpp_summarize_regions","text":"bedfiles vector bedfile paths regions vector genomic regions fun_vec Vector armadillo-supported stats functions apply CpGs ' regions: \"sum\", \"mean\", \"median\", \"stddev\", \"variance\" \"cpg_count\", \"min\",\"max\", \"range\". mval Calculates M values TRUE, use beta values FALSE bismark input bismark column format instead BISCUIT region_rownames Whether set rownames regions strings. necessary regions vector unnamed. names, \"Feature\" column set names rownames set regions string nthreads Number cores use. See details.","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/Cpp_summarize_regions.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Apply a function over CpGs within features — Cpp_summarize_regions","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/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/dot-get_threads.html","id":null,"dir":"Reference","previous_headings":"","what":"Get the number of threads to use in functions from param or option — .get_threads","title":"Get the number of threads to use in functions from param or option — .get_threads","text":"Get number threads use functions param option","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/dot-get_threads.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get the number of threads to use in functions from param or option — .get_threads","text":"","code":".get_threads(nthreads)"},{"path":"https://huishenlab.github.io/iscream/dev/reference/get_df_string.html","id":null,"dir":"Reference","previous_headings":"","what":"DataFrame to region strings — get_df_string","title":"DataFrame to region strings — get_df_string","text":"Convert DataFrame vector strings. Set feature names \"name\" column","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/get_df_string.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"DataFrame to region strings — get_df_string","text":"","code":"get_df_string(regions_df)"},{"path":"https://huishenlab.github.io/iscream/dev/reference/get_df_string.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"DataFrame to region strings — get_df_string","text":"regions_df data frame \"chr\", \"start\" \"end\" columns","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/get_df_string.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"DataFrame to region strings — get_df_string","text":"character vector","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/get_granges_string.html","id":null,"dir":"Reference","previous_headings":"","what":"GRanges to region strings — get_granges_string","title":"GRanges to region strings — get_granges_string","text":"Convert GRanges object vector strings","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/get_granges_string.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"GRanges to region strings — get_granges_string","text":"","code":"get_granges_string(gr, sep = c(\":\", \"-\"))"},{"path":"https://huishenlab.github.io/iscream/dev/reference/get_granges_string.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"GRanges to region strings — get_granges_string","text":"gr GRanges object sep Vector separators use genomic string. First element used separate chromosome coordinates, second separator used separate start end coordinates.","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/get_granges_string.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"GRanges to region strings — get_granges_string","text":"character vector","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/get_granges_string.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"GRanges to region strings — get_granges_string","text":"function adapted stuart-lab/signac.","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":"Gets number threads iscream currently set use, whether \"iscream.threads\" option set many threads available use. set number threads use set_threads() 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 = number threads iscream use opt_set = whether option set user avail_threads = number available threads reported parallelly::availableCores","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, aligner = \"biscuit\", merged = TRUE, sparse = FALSE, prealloc = 10000, 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, data frame GenomicRanges genomic regions. See details. aligner aligner used produce BED files - one \"biscuit\", \"bismark\", \"bsbolt\". merged Whether input strands merged/collapsed sparse Whether return M coverage matrices sparse matrices (\"dgCMatrix\"). Set TRUE scWGBS data prealloc number rows initialize matrices . number methyltion loci approximately known, can reduce runtime fewer resizes need made. 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":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Query all CpGs from input genomic regions — query_all","text":"input regions may string vector form \"chr:start-end\" GRanges object. data frame provided, must \"chr\", \"start\", \"end\" columns.","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(read.table(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) #> [16:53:54.509740] [iscream::query_all] [info] Querying 3 regions from 4 bedfiles #> #> [16:53:54.510133] [iscream::query_all] [info] Creating metadata vectors #> [16:53:54.510183] [iscream::query_all] [info] nrows 10000 - 9993 extra rows allocated with 0 resizes #> [16:53:54.510188] [iscream::query_all] [info] Creating dense matrix #> $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/query_chroms.html","id":null,"dir":"Reference","previous_headings":"","what":"Query the chromosomes or seqnames from a vector of files — query_chroms","title":"Query the chromosomes or seqnames from a vector of files — query_chroms","text":"Query chromosomes seqnames vector files","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/query_chroms.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Query the chromosomes or seqnames from a vector of files — query_chroms","text":"","code":"query_chroms(bedfiles, nthreads = NULL)"},{"path":"https://huishenlab.github.io/iscream/dev/reference/query_chroms.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Query the chromosomes or seqnames from a vector of files — query_chroms","text":"bedfiles vector bedfile paths nthreads Set number threads use overriding \"iscream.threads\" option. See ?set_threads information.","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/query_chroms.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Query the chromosomes or seqnames from a vector of files — query_chroms","text":"vector seqnames","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/scan_tabix.html","id":null,"dir":"Reference","previous_headings":"","what":"Get namde list of reads from a single genomic region from one tabixed bed file — scan_tabix","title":"Get namde list of reads from a single genomic region from one tabixed bed file — scan_tabix","text":"Get namde list reads single genomic region one tabixed bed file","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/scan_tabix.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get namde list of reads from a single genomic region from one tabixed bed file — scan_tabix","text":"","code":"scan_tabix(bedfile, regions)"},{"path":"https://huishenlab.github.io/iscream/dev/reference/scan_tabix.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get namde list of reads from a single genomic region from one tabixed bed file — scan_tabix","text":"bedfile name bed file - must corresponding tabix file name .tbi extension regions vector region strings form \"chr:start-end\"","code":""},{"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":"Sets \"iscream.threads\" option n_threads. see many threads available see ?get_threads().","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. get_threads() function uses parallelly::availableCores() report number available threads. Although OpenMP can detect number available cores, 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 multithreading: tabix() query_chroms() query_all() summarize_regions()","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/summarize_regions.html","id":null,"dir":"Reference","previous_headings":"","what":"Summarize CpGs methylation information over genomic regions — summarize_regions","title":"Summarize CpGs methylation information over genomic regions — summarize_regions","text":"Run summarizing functions CpGs bedfiles across genomic regions. Parallelized across files using threads \"iscream.threads\" option.","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/summarize_regions.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Summarize CpGs methylation information over genomic regions — summarize_regions","text":"","code":"summarize_regions( bedfiles, regions, fun = \"all\", aligner = \"biscuit\", mval = TRUE, set_region_rownames = FALSE, nthreads = NULL )"},{"path":"https://huishenlab.github.io/iscream/dev/reference/summarize_regions.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Summarize CpGs methylation information over genomic regions — summarize_regions","text":"bedfiles vector bedfile paths regions vector, data frame GenomicRanges genomic regions. See details. fun Function(s) apply region. See details. aligner aligner used produce BED files - one \"biscuit\", \"bismark\", \"bsbolt\". 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 regions want regions strings 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/summarize_regions.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Summarize CpGs methylation information over genomic regions — summarize_regions","text":"data.frame","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/summarize_regions.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Summarize CpGs methylation information over genomic regions — summarize_regions","text":"input regions may string vector form \"chr:start-end\" GRanges object. data frame provided, must \"chr\", \"start\", \"end\" columns. string vector GenomicRanges inputs named, names used describe feature output dataframe. input dataframes 'name' column, used populate output's feature column. Supported fun arguments given . functions, setting mval = FALSE use beta values instead M value: Sum: \"sum\" Mean: \"mean\" Median: \"median\" Standard deviation: \"stddev\" Variance: \"variance\" Minimum: \"min\" Maximum: \"max\" Range: \"range\" . CpGs region: \"cpg_count\" summarizing computations backed Armadillo library. See https://arma.sourceforge.net/docs.html#stats_fns futher details supported functions","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/summarize_regions.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Summarize CpGs methylation information over genomic regions — summarize_regions","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(read.table(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\") summarize_regions(bedfiles, regions) #> [16:54:06.261831] [iscream::summarize_regions] [info] Summarizing 3 regions from 4 bedfiles #> [16:54:06.261846] [iscream::summarize_regions] [info] using sum, mean, median, stddev, variance, min, max, range, cpg_count #> Feature Sample coverage.sum M.sum coverage.mean M.mean coverage.median #> 1 chr1:1-6 a 4 2 1.333333 0.6666667 1.0 #> 2 chr1:7-10 a 3 1 1.500000 0.5000000 1.5 #> 3 chr1:11-14 a 5 5 2.500000 2.5000000 2.5 #> 4 chr1:1-6 b 4 2 2.000000 1.0000000 2.0 #> 5 chr1:7-10 b 1 1 1.000000 1.0000000 1.0 #> 6 chr1:11-14 b 3 1 1.500000 0.5000000 1.5 #> 7 chr1:1-6 c 2 2 2.000000 2.0000000 2.0 #> 8 chr1:7-10 c 3 1 1.500000 0.5000000 1.5 #> 9 chr1:11-14 c NA NA NA NA NA #> 10 chr1:1-6 d 3 3 1.500000 1.5000000 1.5 #> 11 chr1:7-10 d 3 1 1.500000 0.5000000 1.5 #> 12 chr1:11-14 d 1 1 1.000000 1.0000000 1.0 #> M.median coverage.stddev M.stddev coverage.variance M.variance coverage.min #> 1 1.0 0.5773503 0.5773503 0.3333333 0.3333333 1 #> 2 0.5 0.7071068 0.7071068 0.5000000 0.5000000 1 #> 3 2.5 0.7071068 0.7071068 0.5000000 0.5000000 2 #> 4 1.0 0.0000000 1.4142136 0.0000000 2.0000000 2 #> 5 1.0 0.0000000 0.0000000 0.0000000 0.0000000 1 #> 6 0.5 0.7071068 0.7071068 0.5000000 0.5000000 1 #> 7 2.0 0.0000000 0.0000000 0.0000000 0.0000000 2 #> 8 0.5 0.7071068 0.7071068 0.5000000 0.5000000 1 #> 9 NA NA NA NA NA NA #> 10 1.5 0.7071068 0.7071068 0.5000000 0.5000000 1 #> 11 0.5 0.7071068 0.7071068 0.5000000 0.5000000 1 #> 12 1.0 0.0000000 0.0000000 0.0000000 0.0000000 1 #> M.min coverage.max M.max coverage.range M.range cpg_count #> 1 0 2 1 1 1 3 #> 2 0 2 1 1 1 2 #> 3 2 3 3 1 1 2 #> 4 0 2 2 0 2 2 #> 5 1 1 1 0 0 1 #> 6 0 2 1 1 1 2 #> 7 2 2 2 0 0 1 #> 8 0 2 1 1 1 2 #> 9 NA NA NA NA NA NA #> 10 1 2 2 1 1 2 #> 11 0 2 1 1 1 2 #> 12 1 1 1 0 0 1 summarize_regions(bedfiles, regions, fun = c(\"mean\", \"stddev\"), mval = FALSE) #> [16:54:06.275140] [iscream::summarize_regions] [info] Summarizing 3 regions from 4 bedfiles #> [16:54:06.275151] [iscream::summarize_regions] [info] using mean, stddev #> Feature Sample coverage.mean beta.mean coverage.stddev beta.stddev #> 1 chr1:1-6 a 1.333333 0.6666667 0.5773503 0.5773503 #> 2 chr1:7-10 a 1.500000 0.2500000 0.7071068 0.3535534 #> 3 chr1:11-14 a 2.500000 1.0000000 0.7071068 0.0000000 #> 4 chr1:1-6 b 2.000000 0.5000000 0.0000000 0.7071068 #> 5 chr1:7-10 b 1.000000 1.0000000 0.0000000 0.0000000 #> 6 chr1:11-14 b 1.500000 0.5000000 0.7071068 0.7071068 #> 7 chr1:1-6 c 2.000000 1.0000000 0.0000000 0.0000000 #> 8 chr1:7-10 c 1.500000 0.5000000 0.7071068 0.7071068 #> 9 chr1:11-14 c NA NA NA NA #> 10 chr1:1-6 d 1.500000 1.0000000 0.7071068 0.0000000 #> 11 chr1:7-10 d 1.500000 0.2500000 0.7071068 0.3535534 #> 12 chr1:11-14 d 1.000000 1.0000000 0.0000000 0.0000000 summarize_regions(bedfiles, regions, fun = \"sum\") #> [16:54:06.278380] [iscream::summarize_regions] [info] Summarizing 3 regions from 4 bedfiles #> [16:54:06.278389] [iscream::summarize_regions] [info] using sum #> Feature Sample coverage.sum M.sum #> 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 NA NA #> 10 chr1:1-6 d 3 3 #> 11 chr1:7-10 d 3 1 #> 12 chr1:11-14 d 1 1"},{"path":"https://huishenlab.github.io/iscream/dev/reference/tabix.html","id":null,"dir":"Reference","previous_headings":"","what":"Query lines from a tabixed bedfile — tabix","title":"Query lines from a tabixed bedfile — tabix","text":"Query lines tabixed bedfile","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/tabix.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Query lines from a tabixed bedfile — tabix","text":"","code":"tabix( bedfiles, regions, aligner = \"biscuit\", colnames = NULL, raw = FALSE, nthreads = NULL )"},{"path":"https://huishenlab.github.io/iscream/dev/reference/tabix.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Query lines from a tabixed bedfile — tabix","text":"bedfiles bedfiles queried regions vector genomic region strings aligner aligner used produce BED files - one \"biscuit\", \"bismark\", \"bsbolt\". set result data.table's column names based argument. colnames vector column names result data.table. Set bedfile supported aligners general bedfile. raw Set true give named list raw strings regions style Rsamtools::scanTabix instead data.table nthreads Set number threads use overriding \"iscream.threads\" option. See ?set_threads information.","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/tabix.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Query lines from a tabixed bedfile — tabix","text":"data.table","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/tabix.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Query lines from a tabixed bedfile — tabix","text":"","code":"bedfiles <- system.file(\"extdata\", package = \"iscream\") |> list.files(pattern = \"[a|b|c|d].bed.gz$\", full.names = TRUE) regions <- c(\"chr1:1-6\", \"chr1:7-10\", \"chr1:11-14\") tabix(bedfiles[1], regions, colnames = c(\"chr\", \"start\", \"end\", \"beta\", \"coverage\")) #> chr start end beta coverage #> #> 1: chr1 1 2 1.0 1 #> 2: chr1 3 4 1.0 1 #> 3: chr1 5 6 0.0 2 #> 4: chr1 7 8 0.0 1 #> 5: chr1 9 10 0.5 2 #> 6: chr1 11 12 1.0 2 #> 7: chr1 13 14 1.0 3"},{"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_aligner_or_stop.html","id":null,"dir":"Reference","previous_headings":"","what":"Validate provided aligner — verify_aligner_or_stop","title":"Validate provided aligner — verify_aligner_or_stop","text":"\"biscuit\", \"bismark\", \"bsbolt\" currently supported","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/verify_aligner_or_stop.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Validate provided aligner — verify_aligner_or_stop","text":"","code":"verify_aligner_or_stop(aligner)"},{"path":"https://huishenlab.github.io/iscream/dev/reference/verify_aligner_or_stop.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Validate provided aligner — verify_aligner_or_stop","text":"aligner input alinger","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/verify_aligner_or_stop.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Validate provided aligner — verify_aligner_or_stop","text":"true; quits input among supported_aligners","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_filetype.html","id":null,"dir":"Reference","previous_headings":"","what":"Verify that the input bedfiles are of the type specified by the input aligner — verify_filetype","title":"Verify that the input bedfiles are of the type specified by the input aligner — verify_filetype","text":"Verify input bedfiles type specified input aligner","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/verify_filetype.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Verify that the input bedfiles are of the type specified by the input aligner — verify_filetype","text":"","code":"verify_filetype(bedfiles, aligner, stop_on_error = FALSE)"},{"path":"https://huishenlab.github.io/iscream/dev/reference/verify_filetype.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Verify that the input bedfiles are of the type specified by the input aligner — verify_filetype","text":"bedfiles vector bedfile paths aligner aligner chosen stop_on_error Whether warn stop aligner-filename mismatch","code":""},{"path":"https://huishenlab.github.io/iscream/dev/reference/verify_filetype.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Verify that the input bedfiles are of the type specified by the input aligner — verify_filetype","text":"TRUE input bedfiles associated tabix index file. FALSE ","code":""}]