Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev max cells #1556

Merged
merged 2 commits into from
Aug 11, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 25 additions & 8 deletions R/ArchRBrowser.R
Original file line number Diff line number Diff line change
Expand Up @@ -677,6 +677,8 @@ ArchRBrowserTrack <- function(...){
#' @param downstream The number of basepairs downstream of the transcription start site of `geneSymbol` to extend the plotting window.
#' If `region` is supplied, this argument is ignored.
#' @param tileSize The numeric width of the tile/bin in basepairs for plotting ATAC-seq signal tracks. All insertions in a single bin will be summed.
#' @param maxCells The maximum number of cells to use for obtaining data to plot as a bulk track. Using more cells can increase the resolution of your plots
#' at the expense of increased processing time.
#' @param minCells The minimum number of cells contained within a cell group to allow for this cell group to be plotted. This argument can be
#' used to exclude pseudo-bulk replicates generated from low numbers of cells.
#' @param normMethod The name of the column in `cellColData` by which normalization should be performed. The recommended and default value
Expand Down Expand Up @@ -729,7 +731,8 @@ plotBrowserTrack <- function(
log2Norm = TRUE,
upstream = 50000,
downstream = 50000,
tileSize = 250,
tileSize = 250,
maxCells = 500,
minCells = 25,
normMethod = "ReadsInTSS",
highlight = NULL,
Expand Down Expand Up @@ -763,6 +766,7 @@ plotBrowserTrack <- function(
.validInput(input = upstream, name = "upstream", valid = c("integer"))
.validInput(input = downstream, name = "downstream", valid = c("integer"))
.validInput(input = tileSize, name = "tileSize", valid = c("integer"))
.validInput(input = maxCells, name = "maxCells", valid = c("integer"))
.validInput(input = minCells, name = "minCells", valid = c("integer"))
.validInput(input = normMethod, name = "normMethod", valid = c("character"))
.validInput(input = highlight, name = "highlight", valid = c("granges", "null"))
Expand Down Expand Up @@ -832,7 +836,8 @@ plotBrowserTrack <- function(
region = region[x],
tileSize = tileSize,
groupBy = groupBy,
threads = threads,
threads = threads,
maxCells = maxCells,
minCells = minCells,
pal = pal,
ylim = ylim,
Expand Down Expand Up @@ -1005,7 +1010,8 @@ plotBrowserTrack <- function(
.bulkTracks <- function(
ArchRProj = NULL,
region = NULL,
tileSize = 100,
tileSize = 100,
maxCells = 500,
minCells = 25,
groupBy = "Clusters",
useGroups = NULL,
Expand Down Expand Up @@ -1037,6 +1043,7 @@ plotBrowserTrack <- function(
groupBy = groupBy,
normMethod = normMethod,
useGroups = useGroups,
maxCells = maxCells,
minCells = minCells,
region = region,
tileSize = tileSize,
Expand Down Expand Up @@ -1098,7 +1105,9 @@ plotBrowserTrack <- function(
.gg_guides(fill = FALSE, colour = FALSE) + ggtitle(title)

#Determine Whether To Highlight
highlight <- subsetByOverlaps(highlight, region, ignore.strand=TRUE)
if(!is.null(highlight)) {
highlight <- subsetByOverlaps(highlight, region, ignore.strand=TRUE)
}
if(length(highlight) > 0){

#Data Frame
Expand Down Expand Up @@ -1455,7 +1464,9 @@ plotBrowserTrack <- function(
}

#Determine Whether To Highlight
highlight <- subsetByOverlaps(highlight, region, ignore.strand=TRUE)
if(!is.null(highlight)) {
highlight <- subsetByOverlaps(highlight, region, ignore.strand=TRUE)
}
if(length(highlight) > 0){

#Data Frame
Expand Down Expand Up @@ -1588,7 +1599,9 @@ plotBrowserTrack <- function(
}

#Determine Whether To Highlight
highlight <- subsetByOverlaps(highlight, region, ignore.strand=TRUE)
if(!is.null(highlight)) {
highlight <- subsetByOverlaps(highlight, region, ignore.strand=TRUE)
}
if(length(highlight) > 0){

#Data Frame
Expand Down Expand Up @@ -1739,7 +1752,9 @@ plotBrowserTrack <- function(
}

#Determine Whether To Highlight
highlight <- subsetByOverlaps(highlight, region, ignore.strand=TRUE)
if(!is.null(highlight)) {
highlight <- subsetByOverlaps(highlight, region, ignore.strand=TRUE)
}
if(length(highlight) > 0){

#Data Frame
Expand Down Expand Up @@ -1922,7 +1937,9 @@ plotBrowserTrack <- function(
.gg_guides(fill = FALSE, colour = FALSE) + ggtitle(title)

#Determine Whether To Highlight
highlight <- subsetByOverlaps(highlight, region, ignore.strand=TRUE)
if(!is.null(highlight)) {
highlight <- subsetByOverlaps(highlight, region, ignore.strand=TRUE)
}
if(length(highlight) > 0){

#Data Frame
Expand Down