Skip to content

Commit

Permalink
Major fixes (see NEWS) for new version 0.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
mevers committed Oct 9, 2019
1 parent 90822a3 commit 17612a4
Show file tree
Hide file tree
Showing 49 changed files with 1,859 additions and 1,674 deletions.
Binary file removed .DS_Store
Binary file not shown.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ data/tx_hg38.RData
.Rproj.user
*.RData
*.Rproj

.DS_Store
7 changes: 4 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,27 @@ Maintainer: Maurits Evers <maurits.evers@anu.edu.au>
Description: Transcriptome-wide analysis of RNA modifications.
Imports:
AnnotationDbi,
beanplot,
Biostrings,
beanplot,
GenomeInfoDb,
gplots,
graphics,
grDevices,
methods,
RSQLite,
rtracklayer,
S4Vectors,
stats,
utils
Depends:
GenomicRanges,
GenomicFeatures,
IRanges
IRanges,
R (>= 3.5.0)
Suggests:
knitr,
testthat
License: GPL-3 | file LICENSE
LazyData: false
RoxygenNote: 6.1.1
Encoding: UTF-8
VignetteBuilder: knitr
15 changes: 7 additions & 8 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,15 @@ export(CheckClassTxLocRef)
export(CheckPkgDependencies)
export(CollapseTxBySec)
export(DedupeBasedOnNearestRef)
export(DownsampleTxLoc)
export(EstimateCIFromBS)
export(FilterTxLoc)
export(GenerateNull)
export(GetColPal)
export(GetEEJunct)
export(GetGC)
export(GetGeneIds)
export(GetRelDistNearest)
export(GetMotifLoc)
export(GetSplicingSites)
export(GetTxBySec)
export(GetTxDb)
Expand All @@ -24,20 +25,17 @@ export(IsEmptyChar)
export(LoadRefTx)
export(PerformSanityCheck)
export(PlotAbundance.generic)
export(PlotOverlap)
export(PlotGC)
export(PlotRelDistDistribution)
export(PlotRelDistEnrichment)
export(PlotSectionDistribution)
export(PlotSectionEnrichment)
export(PlotSeqLogo)
export(PlotSpatialDistribution)
export(PlotSpatialEnrichment)
export(PlotTxSecLength)
export(PlotTxSecLength.bean)
export(ReadBED)
export(SmartMap)
export(SubsampleTxLoc)
export(TxLoc2GRangesList)
export(Unfactor)
export(WriteBED)
export(WriteCSV)
Expand All @@ -46,6 +44,7 @@ exportMethods(GetId)
exportMethods(GetLoci)
exportMethods(GetNumberOfLoci)
exportMethods(GetRef)
exportMethods(GetRegions)
exportMethods(GetVersion)
exportMethods(show)
import(AnnotationDbi)
Expand All @@ -56,17 +55,17 @@ import(GenomicRanges)
import(IRanges)
import(RSQLite)
import(methods)
importFrom(Biostrings,letterFrequency)
importFrom(Biostrings,vmatchPattern)
importFrom(S4Vectors,DataFrame)
importFrom(S4Vectors,queryHits)
importFrom(S4Vectors,subjectHits)
importFrom(beanplot,beanplot)
importFrom(gplots,venn)
importFrom(grDevices,col2rgb)
importFrom(grDevices,rainbow)
importFrom(grDevices,rgb)
importFrom(graphics,abline)
importFrom(graphics,axis)
importFrom(graphics,barplot)
importFrom(graphics,boxplot)
importFrom(graphics,hist)
importFrom(graphics,legend)
importFrom(graphics,lines)
Expand Down
69 changes: 54 additions & 15 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -2,36 +2,75 @@

## Version 0.2.0

### Major

- Major changes to functions in BuildTx.R to reflect critical changes in
- RNAModR now requires R >= 3.5.0
- Major changes to functions in buildTxMethods.R to reflect critical changes in
`GenomicRanges_1.32.0` and `RMariaDB` that completely broke functionality
of `BuildTx`
- Major changes to structure of `txLoc` objects; `txLoc` is now a dressed
`list` of `DataFrame`s (instead of a dressed `list` of `data.frame`s). This
has the advantage that we can now store arbitrary R objects in columns, such
as `GRanges`, `DNAStringSet` etc.
- In `classes.R`: Added `show` method; this means that we can simply type the
name of the `txLoc` object into an R terminal, hit <Enter> and get a summary.

- In `classes.R`: Added `txLoc` S4 class method `show`; this means that we can
simply type the name of the `txLoc` object into an R terminal, hit <Enter>
and get a summary
- In `classes.R`: Removed `info` method
- In `classes.R`: Added `txLoc` S4 class method `GetRegions`
- In `classes.R`: Tidied roxygen2 documentation; all `txLoc` accessors are now
document under `txLoc-accessors` in the reference manual

- In `IO.R`: Renamed `WriteTxLocToBED` to `WriteBED`; chromosome names are
now always formatted in UCSC style (i.e. chr1, chr2, chrM, ...)
- In `IO.R`: Renamed `WriteTxLocToCSV` to `WriteCSV`
- In `IO.R`: Removed `WriteFeatToBED`
- In `IO.R`: Removed export of `ReadDBN` (which is needed by `GetMFE`, which
in turn is also not exported)
- In `IO.R`: Removed `WriteFeatToBED` and removed `rtracklayer` dependecy
- In `IO.R`: Removed `ReadDBN` (which was needed by `GetMFE`, which in turn
has also been removed)

- In `methods.R`: Removed `method = "perm"` from `GenerateNull`
- In `methods.R`: Removed `GetMFE`, because such functions should be managed
and defined on a per-use and per-user basis
- In `methods.R`: Removed `filter` argument from `GetMotifLoc`; this is
because filtering should be done through `FilterTxLoc`
- In `methods.R`: Removed `GenerateNull.new`, as it was a function for testing
purposes and served no real purpose
- In `methods.R`: Removed `GetLocus.MapFromTranscripts`, as it served no
purpose
- In `methods.R`: Refactored and tidied `GetGC`

- In `plot.R`: Removed `filter` argument from `PlotSectionDistribution`,
`PlotSpatialDistribution`, `PlotSectionEnrichment`, `PlotSpatialEnrichment`;
this is because filtering should be done through `FilterTxLoc`
- In `plot.R`: Removed `PlotTxSecLength` and `PlotTxSecLength.bean`, because
such functions should be managed and defined on a per-use and per-user basis.
`PlotSpatialDistribution`, `PlotSectionEnrichment`, `PlotSpatialEnrichment`,
`PlotGC`; this is because filtering should be done through `FilterTxLoc`
- In `plot.R`: Removed `PlotTxSecLength`, `PlotTxSecLength.bean` and
`PlotOverlap`, because such functions should be managed and defined on a
per-use and per-user basis
- In `plot.R`: Refactored and tidied `PlotSectionDistribution`
- In `plot.R`: Refactored and tidied `PlotSectionEnrichment`
- In `plot.R`: Refactored and tidied `PlotSpatialEnrichment`

### Minor
- In `helper.R`: Added `DownsampleTxLoc`; `DownsampleTxLoc` is a function that
downsamples the number of sites from on `txLoc` object to the number of sites
from a second `txLoc` object; downsampling is transcript region specific
- In `helper.R`: Tidied and refactored `SubsampleTxLoc`; `SubsampleTxLoc`
generates a subsample of sites per transcript region, based on a vector of
fractions
- In `helper.R`: Removed `internal` keyword from `FilterTxLoc`,
`SubsampleTxLoc`
- In `helper.R`: Refactored and tidied `FilterTxLoc`
- In `helper.R`: Fixed bug in `CheckClassTxLocConsistency` that prevented the
function from producing an error when regions did not match
- In `helper.R`: Removed `filter` argument from `TxLoc2GRangesList`; this is
because filtering should be done through `FilterTxLoc`
- In `helper.R`: `GetRelDistNearest` and `TxLoc2GRangesList` are now no
longer exported; this is because these functions should really never be
called directly by user.

- In `plot.R`: Tidied `PlotSectionDistribution`
- In `plot.R`: Tidied `PlotSectionEnrichment`
- Renamed "transcript sections" to "transcript regions" in all documentation
- Fixed "no visible binding for global variable <xyz>" issues that derive from
`with(..., x = xyz)` statements by setting `xyz <- NULL` (this is the
recommended `data.table` way)
- DESCRIPTION: Added `Encoding: UTF-8` to silence R CMD check and roxygen2 from
complaining about encoding


## Version 0.1.0

Expand Down
33 changes: 0 additions & 33 deletions R/IO.R
Original file line number Diff line number Diff line change
Expand Up @@ -203,36 +203,3 @@ WriteCSV <- function(txLoc,
cat(sprintf("Output in file %s.\n", file))

}


#' Read a DBN file.
#'
#' Read a DBN file. See 'Details'.
#'
#' The function reads in a DBN (dot-bracket) structure file, and
#' returns a \code{dataframe} with the following data columns:
#' \enumerate{
#' \item Column 1: Sequence ID
#' \item Column 2: Length of the sequence (in nt)
#' \item Column 3: Mean free energy (MFE)
#' }
#'
#' @param file A character string; specifies the input DBN file.
#'
#' @return A \code{dataframe} object. See 'Details'.
#'
#' @author Maurits Evers, \email{maurits.evers@@anu.edu.au}
ReadDBN <- function(file) {
if (!file.exists(file)) {
ss <- sprintf("Could not open %s.", file)
stop(ss)
}
d <- as.data.frame(matrix(readLines(file), ncol = 3, byrow = TRUE),
stringsAsFactors = FALSE)
d[, 1] <- gsub("^>", "", d[, 1])
d[, 2] <- nchar(d[, 2])
d[, 3] <- gsub("^[\\(\\.\\)]+\\s", "", d[, 3])
d[ ,3] <- as.numeric(gsub("[\\(\\)]", "", d[, 3]))
colnames(d) <- c("id", "siteSeqLength", "siteMFE")
return(d)
}
Loading

0 comments on commit 17612a4

Please sign in to comment.