R/dropna_granges.R

Defines functions dropna_granges

dropna_granges <- function(gr,
                           cols="score"){
    
    cols <- cols[cols %in% names(GenomicRanges::mcols(gr))]
    for(cl in cols){ 
        gr <- gr[!is.na(GenomicRanges::mcols(gr)[["score"]]),]
    }
    return(gr)
}
neurogenomics/PeakyFinders documentation built on Oct. 14, 2024, 3:09 p.m.