-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid downloading tons of data on GHA and when building the package. …
…Instead, use pre-computed files. This shoudl resolve https://github.com/LieberInstitute/recountWorkflow/actions/runs/9174682873/job/25226047568#step:15:347. Related to lawremi/rtracklayer#83
- Loading branch information
1 parent
6c083de
commit 8f2540a
Showing
6 changed files
with
79 additions
and
22 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,4 @@ | |
.RData | ||
.Ruserdata | ||
recountWorkflow.Rproj | ||
SRP045638 |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
library("recount") | ||
|
||
## Normally, one can use rtracklayer::import() to access remote parts of BigWig | ||
## files without having to download the complete files. However, as of | ||
## 2024-05-20 this doesn't seem to be working well. So this is a workaround to | ||
## issue https://github.com/lawremi/rtracklayer/issues/83 | ||
download_study("SRP045638", type = "mean") | ||
|
||
## Define expressed regions for study SRP045638, only for chromosome 21 | ||
regions <- expressed_regions("SRP045638", "chr21", | ||
cutoff = 5L, | ||
maxClusterGap = 3000L, | ||
outdir = "SRP045638" | ||
) | ||
|
||
saveRDS(regions, file = here::here("vignettes", "regions_unfilt_2024-05-21.rds")) | ||
|
||
|
||
## Normally, one can use rtracklayer::import() to access remote parts of BigWig | ||
## files without having to download the complete files. However, as of | ||
## 2024-05-20 this doesn't seem to be working well. So this is a workaround to | ||
## issue https://github.com/lawremi/rtracklayer/issues/83 | ||
download_study("SRP045638", type = "samples") | ||
|
||
## Compute coverage matrix for study SRP045638, only for chromosome 21 | ||
## Takes about 4 minutes | ||
rse_er <- coverage_matrix("SRP045638", "chr21", regions, | ||
chunksize = 2000, verboseLoad = FALSE, scale = FALSE, | ||
outdir = "SRP045638" | ||
) | ||
|
||
saveRDS(rse_er, file = here::here("vignettes", "rse_er_raw_2024-05-21.rds")) | ||
|
||
|
||
## Get the bp coverage data for the plots | ||
library("derfinder") | ||
regionCov <- getRegionCoverage( | ||
regions = regions_resized, files = bws, | ||
targetSize = 40 * 1e6 * 100, | ||
totalMapped = colData(rse_er_scaled)$auc, | ||
verbose = FALSE | ||
) | ||
|
||
saveRDS(regionCov, file = here::here("vignettes", "regionCov_2024-05-21.rds")) |
This file contains 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
Binary file not shown.
Binary file not shown.
Binary file not shown.