Signac (version 0.2.4)

FilterFragments: FilterFragments

Description

Remove cells from a fragments file that are not present in a given list of cells. Note that this reads the whole fragments file into memory, so may require a lot of memory depending on the size of the fragments file.

Usage

FilterFragments(
  fragment.path,
  cells,
  output.path,
  assume.sorted = FALSE,
  compress = TRUE,
  index = TRUE,
  verbose = TRUE,
  ...
)

Arguments

fragment.path

Path to a tabix-indexed fragments file

cells

A vector of cells to retain

output.path

Name and path for output tabix file. A tabix index file will also be created in the same location, with the .tbi file extension.

assume.sorted

Assume sorted input and don't sort the filtered file. Can save a lot of time, but indexing will fail if assumption is wrong.

compress

Compress filtered fragments using bgzip (default TRUE)

index

Index the filtered tabix file (default TRUE)

verbose

Display messages

...

Additional arguments passed to fread

Value

None

Examples

Run this code
# NOT RUN {
fpath <- system.file("extdata", "fragments.tsv.gz", package="Signac")
output.path = file.path(tempdir(), "filtered.tsv")

FilterFragments(
  fragment.path = fpath,
  cells = colnames(atac_small),
  output.path = output.path
)
# }

Run the code above in your browser using DataCamp Workspace