This function will take a single large bed file that is annotated with a column grouping different sets of similar regions, and split it into separate files for use with the LOLA collection format.

splitFileIntoCollection(filename, splitCol, collectionFolder = NULL,
  filenamePrepend = "")

Arguments

filename

the file to split

splitCol

factor column that groups the lines in the file by set. It should be an integer.

collectionFolder

name of folder to place the new split files.

filenamePrepend

string to prepend to the filenames. Defaults to blank.

Value

No return value.

Examples

combFile = system.file("extdata", "examples/combined_regions.bed", package="LOLA") splitFileIntoCollection(combFile, 4)
#> Warning: '/sfs/lustre/scratch/ns5bc/code/LOLA/inst/extdata/examples/combined_regions.bed_collection' already exists
#> Integer splitFactor, changed to: V4
#> enhancer
#> insulator
#> promoter
#> Collection written to /sfs/lustre/scratch/ns5bc/code/LOLA/inst/extdata/examples/combined_regions.bed_collection