Skip to content

Commit

Permalink
GHA: add telemetry
Browse files Browse the repository at this point in the history
  • Loading branch information
js2264 committed Jun 27, 2023
1 parent 2f9308c commit 9947741
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 5 deletions.
7 changes: 2 additions & 5 deletions .github/workflows/rworkflows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,15 @@ jobs:
r: auto
cont: bioconductor/bioconductor_docker:RELEASE_3_17
rspm: https://packagemanager.rstudio.com/cran/__linux__/focal/release
# - os: macOS-latest
# bioc: devel
# r: auto
# cont: ~
# rspm: ~
- os: windows-latest
bioc: devel
r: auto
cont: ~
rspm: ~
steps:
- uses: runforesight/workflow-telemetry-action@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- uses: js2264/rworkflows@master
with:
run_bioccheck: ${{ true }}
Expand Down
Binary file not shown.
17 changes: 17 additions & 0 deletions R/HiCExperiment-class.R
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,23 @@ makeHiCExperimentFromGInteractions <- function(gi) {
pairsFile = pairsFile,
metadata = c(list(regions = bed), metadata)
)

## -- If imported data is all integers, run ICE and save `balanced`
s <- scores(x, 'count')
if (all(as.integer(s) == s)) {
if (requireNamespace("HiContacts", quietly = TRUE)) {
x <- HiContacts::normalize(x)
names(x@scores)[2] <- 'balanced'
}
else {
warning('Install `HiContacts` package (`BiocManager::install("HiContacts")`)\nto balance Hi-C data.')
}
}
else {
message("Imported data stored in `balanced` scores.")
names(x@scores)[1] <- 'balanced'
}

methods::validObject(x)
return(x)
}

0 comments on commit 9947741

Please sign in to comment.