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.
FilterFragments( fragment.path, cells, output.path, assume.sorted = FALSE, compress = TRUE, index = TRUE, verbose = TRUE, ... )
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 |
None
# \donttest{ 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 )#>#>#>#>#>#># }