Commit 6255cc8f authored by Aurelien Brionne's avatar Aurelien Brionne
Browse files

genome_feaures_overlaps update

parent 33f2cb04
......@@ -10,8 +10,7 @@
#' @importFrom UpSetR upset
#' @import data.table
#' @param peaks a \code{\link[base]{list}} of \code{\link[GenomicRanges]{GRanges}} objects elements provided by \code{\link{readPeakFile}}.
#' @param features a \code{\link[base]{vector}} of features \code{\link[base]{character}} with by
#' default all the availables features ("promoter", "UTR5", "UTR3", "exon", "intron", "cds", and "downstream").
#' @param features a \code{\link{genome_features-class}} object.
#' @param figs_path the path where print the \code{\link[UpSetR]{upstet}} plots. ("./data/figs/", by default).
#' @param ignore.strand ignore peak coordinate orientation (defaul to TRUE).
#' @details This method build a convenient genomic features object, in order to be used for finding overlaps beetween
......@@ -25,12 +24,12 @@
#' peaks,
#' features,
#' figs_path="./data/output/",
#' ignore.strand = T
#' ignore.strand = TRUE
#' )
#' @name genome_features_overlaps
#' @rdname genome_features_overlaps-methods
#' @exportMethod genome_features_overlaps
setGeneric(name="genome_features_overlaps",def=function(peaks,features=base::c("promoter", "UTR5", "UTR3", "exon", "intron", "cds", "downstream"),figs_path="./data/figs/",ignore.strand=TRUE){
setGeneric(name="genome_features_overlaps",def=function(peaks,features,figs_path="./data/figs/",ignore.strand=TRUE){
standardGeneric("genome_features_overlaps")
})
......@@ -39,7 +38,8 @@ setGeneric(name="genome_features_overlaps",def=function(peaks,features=base::c("
setMethod(
"genome_features_overlaps",
methods::signature(
peaks="list"
peaks="CompressedGRangesList",
features="genome_features"
),
definition=function(peaks,features,figs_path,ignore.strand){
......
......@@ -3,22 +3,20 @@
\docType{methods}
\name{genome_features_overlaps}
\alias{genome_features_overlaps}
\alias{genome_features_overlaps,list-method}
\alias{genome_features_overlaps,CompressedGRangesList,genome_features-method}
\title{find overlaps between genomic coordinates and features.}
\usage{
genome_features_overlaps(peaks, features = base::c("promoter", "UTR5",
"UTR3", "exon", "intron", "cds", "downstream"),
figs_path = "./data/figs/", ignore.strand = TRUE)
genome_features_overlaps(peaks, features, figs_path = "./data/figs/",
ignore.strand = TRUE)
\S4method{genome_features_overlaps}{list}(peaks,
features = base::c("promoter", "UTR5", "UTR3", "exon", "intron", "cds",
"downstream"), figs_path = "./data/figs/", ignore.strand = TRUE)
\S4method{genome_features_overlaps}{CompressedGRangesList,genome_features}(peaks,
features, figs_path = "./data/figs/", ignore.strand = TRUE)
}
\arguments{
\item{peaks}{a \code{\link[base]{list}} of \code{\link[GenomicRanges]{GRanges}} objects elements provided by \code{\link{readPeakFile}}.}
\item{features}{a \code{\link[base]{vector}} of features \code{\link[base]{character}} with by
default all the availables features ("promoter", "UTR5", "UTR3", "exon", "intron", "cds", and "downstream").}
\item{features}{a \code{\link{genome_features-class}} object.}
\item{figs_path}{the path where print the \code{\link[UpSetR]{upstet}} plots. ("./data/figs/", by default).}
......@@ -40,6 +38,6 @@ features_overlaps<-GenomeFeatures::genome_features_overlaps(
peaks,
features,
figs_path="./data/output/",
ignore.strand = T
ignore.strand = TRUE
)
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment