checkCTSSs {CAGEfightR} | R Documentation |
Checks whether a file (or GRanges/GPos) contains data formatted in the same manner as CAGE Transcription Start Sites (CTSSs): Each basepair of the genome is associated with a single integer count.
checkCTSSs(object) ## S4 method for signature 'ANY' checkCTSSs(object) ## S4 method for signature 'GRanges' checkCTSSs(object) ## S4 method for signature 'character' checkCTSSs(object) ## S4 method for signature 'GPos' checkCTSSs(object) ## S4 method for signature 'BigWigFile' checkCTSSs(object)
object |
BigWigFile, character, GRanges or GPos: Path to the file storing CTSSs, or an already improted GRanges/GPos. |
TRUE if CTSSs are correctly formatted, otherwise a (hopefully) informative error is thrown.
In the case that a character is supplied pointing to a file, checkCTSSs will not check any extensions, but simply try to read it using rtracklayer::import. This means that checkCTSSs can technically analyze BED-files, although CAGEfightR can only import CTSSs from BigWig or bedGraph files.
if (.Platform$OS.type != "windows") { # Load example data data('exampleDesign') bw_plus <- system.file('extdata', exampleDesign$BigWigPlus, package = 'CAGEfightR') bw_plus <- BigWigFileList(bw_plus) # Check raw file checkCTSSs(bw_plus[[1]]) # Import first, then check gr <- import(bw_plus[[1]]) checkCTSSs(gr) }