This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| hola | |
| === | |
| asfd | |
| ```{r} | |
| print('hola') | |
| x <- 1 | |
| x |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## Fix as best as possible the bug in calculatePvalues() regarding the default | |
| ## maxRegionGap value. | |
| ## Usage: | |
| # Step 1: open R in the main results folder | |
| # Step 2: use fixChrs() with options of your choice | |
| # fixChrs('chr') | |
| ## Alternatively use fixRegions() manually and re-run | |
| ## bumphunter::annotateNearest() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## Visualizing the error | |
| ## Modified from https://github.com/lcolladotor/derfinderPlot/blob/master/tests/testthat/test_adv-plotCluster.R | |
| library('derfinder') | |
| ## Collapse the coverage information | |
| collapsedFull <- collapseFullCoverage(list(genomeDataRaw), verbose=TRUE) | |
| ## Calculate library size adjustments | |
| sampleDepths <- sampleDepth(collapsedFull, probs=c(0.5), nonzero=TRUE, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| > ## Visualizing the error | |
| > ## Modified from https://github.com/lcolladotor/derfinderPlot/blob/master/tests/testthat/test_adv-plotCluster.R | |
| > | |
| > library('derfinder') | |
| > | |
| > ## Collapse the coverage information | |
| > collapsedFull <- collapseFullCoverage(list(genomeDataRaw), verbose=TRUE) | |
| 2014-11-22 17:38:06 collapseFullCoverage: Sorting fullCov | |
| 2014-11-22 17:38:06 collapseFullCoverage: Collapsing chromosomes information by sample | |
| > |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| title: "test" | |
| output: pdf_document | |
| --- | |
| This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see <http://rmarkdown.rstudio.com>. | |
| When you click the **Knit** button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this: | |
| ```{r} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ R | |
| R version 3.1.1 Patched (2014-10-16 r66782) -- "Sock it to Me" | |
| Copyright (C) 2014 The R Foundation for Statistical Computing | |
| Platform: x86_64-unknown-linux-gnu (64-bit) | |
| R is free software and comes with ABSOLUTELY NO WARRANTY. | |
| You are welcome to redistribute it under certain conditions. | |
| Type 'license()' or 'licence()' for distribution details. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| > library('GenomicRanges') | |
| Loading required package: BiocGenerics | |
| Loading required package: parallel | |
| Attaching package: ‘BiocGenerics’ | |
| The following objects are masked from ‘package:parallel’: | |
| clusterApply, clusterApplyLB, clusterCall, clusterEvalQ, | |
| clusterExport, clusterMap, parApply, parCapply, parLapply, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| library('derfinder') | |
| library('BiocParallel') | |
| ## Check that the cluster is correctly defined | |
| ## Aka, that it's a MulticoreParam class instead of the default SnowParam | |
| x <- derfinder:::.define_cluster(BPPARAM.custom = MulticoreParam(workers = 2)) | |
| x | |
| ## Collapse the coverage information | |
| collapsedFull <- collapseFullCoverage(list(genomeData$coverage), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| library('BiocParallel') | |
| ## Run bplapply example code with MulticoreParam | |
| system.time(result <- bplapply(1:10, function(v) { | |
| message("working") ## 10 tasks | |
| sqrt(v) | |
| }, BPPARAM = MulticoreParam(workers = 2))) | |
| result[[1]] | |
| ## Run bplapply example code with SnowParam |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| > x <- parallel::mclapply(1:10, sqrt) | |
| > cl <- parallel::makeCluster(10, "PSOCK") | |
| Loading required package: colorout | |
| Loading required package: colorout | |
| Loading required package: colorout | |
| Loading required package: colorout | |
| Loading required package: colorout | |
| Loading required package: colorout | |
| Loading required package: colorout | |
| Loading required package: colorout |