Commit a1bed8b2 authored by abrionne's avatar abrionne
Browse files

upstet print

parent c06a6116
......@@ -4,7 +4,7 @@ Title: Multiple genomic features annotations
Author: Aurelien Brionne [aut, cre]
Maintainer: Aurelien Brionne <aurelien.brionne@inra.fr>
Depends: R (>= 3.6)
Imports:AnnotationDbi,
Imports: AnnotationDbi,
BiocGenerics,
data.table,
GenomicFeatures,
......@@ -29,7 +29,7 @@ VignetteBuilder: knitr
License: GPL-3
URL: https://forgemia.inra.fr/aurelien.brionne/GenomeFeatures
BugReports: https://forgemia.inra.fr/aurelien.brionne/GenomeFeatures/issues
RoxygenNote: 6.1.1
RoxygenNote: 7.1.0
Collate:
'GFF_att.R'
'overlapped_genome_features.R'
......
......@@ -10,7 +10,7 @@
#' @importFrom data.table data.table rbindlist .SD .N := melt setorder dcast
#' @param peaks a \code{\link[base]{list}} of \code{\link[GenomicRanges]{GRanges}} objects elements provided by \code{\link{readPeakFile}}.
#' @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 figs_path the path where print the \code{\link[UpSetR]{upset}} 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
#' all needed features and peaks coordinates with \code{\link{genome_features_overlaps}}.
......@@ -29,7 +29,7 @@
#' @exportMethod genome_features_overlaps
setGeneric(
name="genome_features_overlaps",
def=function(peaks,features,figs_path="./data/figs/",ignore.strand=TRUE){
def=function(peaks,features,figs_path=".",ignore.strand=TRUE){
standardGeneric("genome_features_overlaps")
}
)
......@@ -371,16 +371,16 @@ setMethod(
# create upset
png(paste(figs_path,"upset_",x,".png",sep=""))
upset(
Data,sets=rev(names(Data)[-1]),
sets.bar.color=rev(colors),
keep.order = TRUE
print(
upset(
Data,sets=rev(names(Data)[-1]),
sets.bar.color=rev(colors),
keep.order = TRUE
)
)
dev.off()
})
## create overlapped_genome_features
# createoverlapped_ genome_features
new(
"overlapped_genome_features",
......
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Plot.R
\docType{methods}
\name{Plot}
\alias{Plot}
\alias{Plot,overlapped_genome_features-method}
......
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Table.R
\docType{methods}
\name{Table}
\alias{Table}
\alias{Table,overlapped_genome_features-method}
......
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/build_genome_features.R
\docType{methods}
\name{build_genome_features}
\alias{build_genome_features}
\alias{build_genome_features,TxDb-method}
\title{build a convenient genomic features object.}
\usage{
build_genome_features(txdb, features = c("promoter", "UTR5", "UTR3",
"exon", "intron", "cds", "downstream"),
parameters = list(promoter_ranges = list(upstream = 3000, downstream =
500), downstream_range = 1000))
build_genome_features(
txdb,
features = c("promoter", "UTR5", "UTR3", "exon", "intron", "cds", "downstream"),
parameters = list(promoter_ranges = list(upstream = 3000, downstream = 500),
downstream_range = 1000)
)
\S4method{build_genome_features}{TxDb}(txdb, features = c("promoter",
"UTR5", "UTR3", "exon", "intron", "cds", "downstream"),
parameters = list(promoter_ranges = list(upstream = 3000, downstream =
500), downstream_range = 1000))
\S4method{build_genome_features}{TxDb}(
txdb,
features = c("promoter", "UTR5", "UTR3", "exon", "intron", "cds", "downstream"),
parameters = list(promoter_ranges = list(upstream = 3000, downstream = 500),
downstream_range = 1000)
)
}
\arguments{
\item{txdb}{a txdb database built with \pkg{GenomicFeatures} (see example).}
......
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/genome_features_overlaps.R
\docType{methods}
\name{genome_features_overlaps}
\alias{genome_features_overlaps}
\alias{genome_features_overlaps,CompressedGRangesList,genome_features-method}
\title{find overlaps between genomic coordinates and features.}
\usage{
genome_features_overlaps(peaks, features, figs_path = "./data/figs/",
ignore.strand = TRUE)
genome_features_overlaps(
peaks,
features,
figs_path = ".",
ignore.strand = TRUE
)
\S4method{genome_features_overlaps}{CompressedGRangesList,genome_features}(peaks,
features, figs_path = "./data/figs/", ignore.strand = TRUE)
\S4method{genome_features_overlaps}{CompressedGRangesList,genome_features}(
peaks,
features,
figs_path = ".",
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{genome_features-class}} object.}
\item{figs_path}{the path where print the \code{\link[UpSetR]{upstet}} plots. ("./data/figs/", by default).}
\item{figs_path}{the path where print the \code{\link[UpSetR]{upset}} plots. ("./data/figs/", by default).}
\item{ignore.strand}{ignore peak coordinate orientation (defaul to 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