Mock up a fragment file for examples and testing.
String containing a path to an output file.
Named integer vector containing the lengths of the reference sequences used for alignment. Vector names should correspond to the names of the sequences.
Integer scalar, the average number of fragments per cell.
Character vector containing the cell names. The length of this vector is used as the total number of cells.
Integer vector of length 2, containing the range of possible fragment widths in base pairs.
Integer vector of length 2, containing the range of the read count supporting each fragment.
Character vector of comments to be added to the start of the file.
Logical scalar indicating whether the output file should be compressed.
A fragment file is created at output.file. NULL is
invisibly returned.
temp <- tempfile(fileext=".fragments.gz")
mockFragmentFile(temp, c(chrA=1000, chrB=200000, chrC=200),
num.fragments=100, cell.names=LETTERS)
X <- read.table(temp)
head(X)
#> V1 V2 V3 V4 V5
#> 1 chrA 0 730 D 2
#> 2 chrA 0 579 S 9
#> 3 chrA 4 958 O 3
#> 4 chrA 5 149 C 1
#> 5 chrA 8 766 V 2
#> 6 chrA 8 680 S 5