Commit ed786dfb authored by Aurelien Brionne's avatar Aurelien Brionne
Browse files

intron1 adding

parent e0f5d3c7
Package: GenomeFeatures Package: GenomeFeatures
Version: 1.0 Version: 1.1
Title: Multiple genomic features annotations Title: Multiple genomic features annotations
Author: Aurelien Brionne [aut, cre] Author: Aurelien Brionne [aut, cre]
Maintainer: Aurelien Brionne <aurelien.brionne@inrae.fr> Maintainer: Aurelien Brionne <aurelien.brionne@inrae.fr>
...@@ -29,11 +29,7 @@ VignetteBuilder: knitr ...@@ -29,11 +29,7 @@ VignetteBuilder: knitr
License: GPL-3 License: GPL-3
URL: https://forgemia.inra.fr/aurelien.brionne/GenomeFeatures URL: https://forgemia.inra.fr/aurelien.brionne/GenomeFeatures
BugReports: https://forgemia.inra.fr/aurelien.brionne/GenomeFeatures/issues BugReports: https://forgemia.inra.fr/aurelien.brionne/GenomeFeatures/issues
<<<<<<< HEAD
RoxygenNote: 7.1.1 RoxygenNote: 7.1.1
=======
RoxygenNote: 7.1.0
>>>>>>> a1bed8b25cbc1b31ad4c962fe03a6ea43d5110f6
Collate: Collate:
'GFF_att.R' 'GFF_att.R'
'overlapped_genome_features.R' 'overlapped_genome_features.R'
......
...@@ -16,6 +16,5 @@ AutoAppendNewline: Yes ...@@ -16,6 +16,5 @@ AutoAppendNewline: Yes
StripTrailingWhitespace: Yes StripTrailingWhitespace: Yes
BuildType: Package BuildType: Package
PackageUseDevtools: Yes
PackageInstallArgs: --no-multiarch --with-keep.source PackageInstallArgs: --no-multiarch --with-keep.source
PackageRoxygenize: rd,collate,namespace PackageRoxygenize: rd,collate,namespace
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
#' @importFrom data.table data.table := .N like #' @importFrom data.table data.table := .N like
#' @param txdb a txdb database built with \pkg{GenomicFeatures} (see example). #' @param txdb a txdb database built with \pkg{GenomicFeatures} (see example).
#' @param features a \code{\link[base]{vector}} of features \code{\link[base]{character}} with by #' @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"). #' default all the availables features ("promoter", "UTR5", "UTR3", "exon", "intron","intron1", "cds", and "downstream").
#' @param parameters a \code{\link[base]{list}} of parameters to use in order to define promoter and #' @param parameters a \code{\link[base]{list}} of parameters to use in order to define promoter and
#' downstream ranges distance to TSS (Transcript Start Site) or TES (Transcript End Site). #' downstream ranges distance to TSS (Transcript Start Site) or TES (Transcript End Site).
#' \itemize{ #' \itemize{
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
setGeneric( setGeneric(
name="build_genome_features", name="build_genome_features",
def=function( def=function(
txdb,features=c("promoter","UTR5","UTR3","exon","intron","cds","downstream"), txdb,features=c("promoter","UTR5","UTR3","exon","intron","intron1","cds","downstream"),
parameters=list(promoter_ranges=list(upstream=3000,downstream=500),downstream_range=1000)){ parameters=list(promoter_ranges=list(upstream=3000,downstream=500),downstream_range=1000)){
standardGeneric("build_genome_features") standardGeneric("build_genome_features")
} }
...@@ -369,8 +369,9 @@ setMethod( ...@@ -369,8 +369,9 @@ setMethod(
## Introns ## Introns
introns=NULL;introns_DT=NULL introns=NULL;introns_DT=NULL
intron1=NULL;intron1_DT=NULL
if("intron"%in%features){ if("intron"%in%features | "intron1"%in%features){
# get introns # get introns
introns<-intronsByTranscript(txdb,use.names=FALSE) introns<-intronsByTranscript(txdb,use.names=FALSE)
...@@ -436,6 +437,19 @@ setMethod( ...@@ -436,6 +437,19 @@ setMethod(
group_name=NULL group_name=NULL
) )
] ]
if("intron1"%in%features){
# locate intron 1
pos<-grepl("intron1/",introns_DT[,feature])
# substet intron1
intron1_DT<-introns_DT[pos]
# get intron1 GRan
intron1<-introns[pos]
}
} }
## CDS ## CDS
...@@ -585,6 +599,7 @@ setMethod( ...@@ -585,6 +599,7 @@ setMethod(
UTR3=list(GRanges=UTR3,DT=UTR3_DT), UTR3=list(GRanges=UTR3,DT=UTR3_DT),
exon=list(GRanges=exons,DT=exons_DT), exon=list(GRanges=exons,DT=exons_DT),
intron=list(GRanges=introns,DT=introns_DT), intron=list(GRanges=introns,DT=introns_DT),
intron1=list(GRanges=intron1,DT=intron1_DT),
cds=list(GRanges=cds,DT=cds_DT), cds=list(GRanges=cds,DT=cds_DT),
downstream=list(GRanges=downstream,DT=downstream_DT), downstream=list(GRanges=downstream,DT=downstream_DT),
gene_table=gene_table gene_table=gene_table
......
...@@ -17,6 +17,7 @@ setClass("genome_features", ...@@ -17,6 +17,7 @@ setClass("genome_features",
UTR5="list", UTR5="list",
exon="list", exon="list",
intron="list", intron="list",
intron1="list",
cds="list", cds="list",
UTR3="list", UTR3="list",
downstream="list", downstream="list",
......
...@@ -24,7 +24,7 @@ remotes::install_gitlab( ...@@ -24,7 +24,7 @@ remotes::install_gitlab(
devtools::build("GenomeFeatures") devtools::build("GenomeFeatures")
# install package (from R console) # install package (from R console)
install.packages("GenomeFeatures_1.0.tar.gz", repos = NULL, type = "source") install.packages("GenomeFeatures_1.1.tar.gz", repos = NULL, type = "source")
``` ```
## Quick overview ## Quick overview
......
...@@ -7,14 +7,16 @@ ...@@ -7,14 +7,16 @@
\usage{ \usage{
build_genome_features( build_genome_features(
txdb, txdb,
features = c("promoter", "UTR5", "UTR3", "exon", "intron", "cds", "downstream"), features = c("promoter", "UTR5", "UTR3", "exon", "intron", "intron1", "cds",
"downstream"),
parameters = list(promoter_ranges = list(upstream = 3000, downstream = 500), parameters = list(promoter_ranges = list(upstream = 3000, downstream = 500),
downstream_range = 1000) downstream_range = 1000)
) )
\S4method{build_genome_features}{TxDb}( \S4method{build_genome_features}{TxDb}(
txdb, txdb,
features = c("promoter", "UTR5", "UTR3", "exon", "intron", "cds", "downstream"), features = c("promoter", "UTR5", "UTR3", "exon", "intron", "intron1", "cds",
"downstream"),
parameters = list(promoter_ranges = list(upstream = 3000, downstream = 500), parameters = list(promoter_ranges = list(upstream = 3000, downstream = 500),
downstream_range = 1000) downstream_range = 1000)
) )
...@@ -23,7 +25,7 @@ build_genome_features( ...@@ -23,7 +25,7 @@ build_genome_features(
\item{txdb}{a txdb database built with \pkg{GenomicFeatures} (see example).} \item{txdb}{a txdb database built with \pkg{GenomicFeatures} (see example).}
\item{features}{a \code{\link[base]{vector}} of features \code{\link[base]{character}} with by \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").} default all the availables features ("promoter", "UTR5", "UTR3", "exon", "intron","intron1", "cds", and "downstream").}
\item{parameters}{a \code{\link[base]{list}} of parameters to use in order to define promoter and \item{parameters}{a \code{\link[base]{list}} of parameters to use in order to define promoter and
downstream ranges distance to TSS (Transcript Start Site) or TES (Transcript End Site). downstream ranges distance to TSS (Transcript Start Site) or TES (Transcript End Site).
......
...@@ -8,22 +8,14 @@ ...@@ -8,22 +8,14 @@
genome_features_overlaps( genome_features_overlaps(
peaks, peaks,
features, features,
<<<<<<< HEAD
figs_path = "./data/figs/",
=======
figs_path = ".", figs_path = ".",
>>>>>>> a1bed8b25cbc1b31ad4c962fe03a6ea43d5110f6
ignore.strand = TRUE ignore.strand = TRUE
) )
\S4method{genome_features_overlaps}{CompressedGRangesList,genome_features}( \S4method{genome_features_overlaps}{CompressedGRangesList,genome_features}(
peaks, peaks,
features, features,
<<<<<<< HEAD
figs_path = "./data/figs/",
=======
figs_path = ".", figs_path = ".",
>>>>>>> a1bed8b25cbc1b31ad4c962fe03a6ea43d5110f6
ignore.strand = TRUE 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