Skip to contents

Create a track with smoothed marginal counts from an ScCounts/McCounts object

Usage

mcc_to_marginal_track(
  mc_counts,
  track,
  metacells = NULL,
  resolution = 20,
  window_size = 100,
  overwrite = FALSE,
  normalize = TRUE,
  normed_track = paste0(track, "_normed"),
  smoothed_track = paste0(track, "_smoothed"),
  ...
)

scc_to_marginal_track(
  sc_counts,
  track,
  cells = NULL,
  resolution = 10,
  window_size = 100,
  overwrite = FALSE,
  normalize = TRUE,
  normed_track = paste0(track, "_normed"),
  ...
)

Arguments

mc_counts

An McCounts object

track

The name of the track to create.

metacells

The metacells for which to create the track. If NULL, all metacells will be used.

resolution

The resolution of each track (default: 20bp)

window_size

The size of the window used to smooth the counts. The counts of at position i are smoothed by a sum of the counts of i - window_size, i + window_size. If NULL - the counts are not smoothed.

overwrite

Whether to overwrite existing tracks.

normalize

Normalize each metacell by the sum of its counts.

normed_track

The name of the normalized track to be created.

smoothed_track

The name of the smoothed track to be created. The original track is normalized by this track. If NULL, a temporary track is created.

...

Arguments passed on to normalize_marginal

orig_track

The original track to be normalized.

iterator

The iterator used for smoothing the track.

floor_percentile

The percentile used to calculate the floored smoothed track value.

sc_counts

An ScCounts object

cells

The cells for which to create the track.

Value

None.

Examples

if (FALSE) {
mcc_to_marginal_track(mc_counts, "pbmc_mc.marginal")
}