Skip to content

Commit

Permalink
Version 2.0 major update
Browse files Browse the repository at this point in the history
  • Loading branch information
Mirko Brüggemann committed Jun 22, 2023
1 parent 49d9240 commit 80de317
Show file tree
Hide file tree
Showing 61 changed files with 5,300 additions and 1,199 deletions.
64 changes: 63 additions & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,46 @@

export(BSFDataSet)
export(BSFDataSetFromBigWig)
export(BSFind)
export(annotateWithScore)
export(assignToGenes)
export(assignToTranscriptRegions)
export(bindingSiteCoveragePlot)
export(collapseReplicates)
export(coverageOverRanges)
export(duplicatedSitesPlot)
export(estimateBsWidth)
export(estimateBsWidthPlot)
export(exportToBED)
export(geneOverlapsPlot)
export(getMeta)
export(getRanges)
export(getSignal)
export(getSummary)
export(globalScorePlot)
export(makeBindingSites)
export(makeBsSummaryPlot)
export(mergeCrosslinkDiagnosticsPlot)
export(mergeSummaryPlot)
export(processingStepsFlowChart)
export(processingStepsTable)
export(pureClipGeneWiseFilter)
export(pureClipGlobalFilter)
export(pureClipGlobalFilterPlot)
export(rangeCoveragePlot)
export(reproducibilityFilter)
export(reproducibilityFilterPlot)
export(reproducibilitySamplesPlot)
export(reproducibiliyCutoffPlot)
export(setMeta)
export(setRanges)
export(setSignal)
export(setSummary)
export(supportRatio)
export(supportRatioPlot)
export(targetGeneSpectrumPlot)
export(transcriptRegionOverlapsPlot)
export(transcriptRegionSpectrumPlot)
exportMethods("[")
exportMethods(getMeta)
exportMethods(getRanges)
Expand All @@ -31,20 +52,61 @@ exportMethods(setRanges)
exportMethods(setSignal)
exportMethods(setSummary)
exportMethods(show)
import(ComplexHeatmap)
import(GenomicRanges)
import(Gviz)
import(ggplot2)
import(lifecycle)
import(methods)
import(rtracklayer)
import(tidyr)
importFrom(GenomeInfoDb,keepSeqlevels)
importFrom(GenomeInfoDb,seqlevels)
importFrom(GenomicFeatures,cds)
importFrom(GenomicFeatures,fiveUTRsByTranscript)
importFrom(GenomicFeatures,genes)
importFrom(GenomicFeatures,intronsByTranscript)
importFrom(GenomicFeatures,threeUTRsByTranscript)
importFrom(GenomicRanges,findOverlaps)
importFrom(IRanges,extractList)
importFrom(S4Vectors,queryHits)
importFrom(S4Vectors,subjectHits)
importFrom(dplyr,arrange)
importFrom(dplyr,bind_rows)
importFrom(dplyr,count)
importFrom(dplyr,desc)
importFrom(dplyr,everything)
importFrom(dplyr,filter)
importFrom(dplyr,group_by)
importFrom(dplyr,lead)
importFrom(dplyr,left_join)
importFrom(dplyr,mutate)
importFrom(dplyr,mutate_all)
importFrom(dplyr,n)
importFrom(dplyr,pull)
importFrom(dplyr,reframe)
importFrom(dplyr,rename)
importFrom(dplyr,rename_with)
importFrom(dplyr,row_number)
importFrom(dplyr,select)
importFrom(dplyr,slice)
importFrom(dplyr,slice_head)
importFrom(dplyr,slice_tail)
importFrom(dplyr,summarise)
importFrom(dplyr,summarize)
importFrom(dplyr,ungroup)
importFrom(ggforce,geom_mark_rect)
importFrom(grDevices,colorRampPalette)
importFrom(grid,gpar)
importFrom(kableExtra,kable)
importFrom(matrixStats,colSds)
importFrom(plyr,rbind.fill)
importFrom(rtracklayer,import)
importFrom(stats,density)
importFrom(stats,median)
importFrom(stats,quantile)
importFrom(stats,sd)
importFrom(tibble,add_row)
importFrom(tibble,rownames_to_column)
importFrom(tidyr,pivot_longer)
importFrom(utils,head)
importFrom(utils,tail)
7 changes: 5 additions & 2 deletions R/AllClasses.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ BSFDataSet <- setClass(
signal = "list",
summary = "data.frame",
params = "list",
plotData = "list"
plotData = "list",
results = "data.frame"
)
)
setValidity("BSFDataSet", function(object) {
Expand Down Expand Up @@ -196,6 +197,7 @@ BSFDataSet <- function(ranges, meta, signal, dropSeqlevels = TRUE, silent = FALS
summary = data.frame()
params = list()
plotData = list()
results = data.frame()

# construct final object
obj = new(
Expand All @@ -205,7 +207,8 @@ BSFDataSet <- function(ranges, meta, signal, dropSeqlevels = TRUE, silent = FALS
signal = signal,
summary = summary,
params = params,
plotData = plotData
plotData = plotData,
results = results
)
return(obj)
}
Expand Down
8 changes: 1 addition & 7 deletions R/CoverageFunctions.R
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ coverageOverRanges <- function(
)
}
if (returnOptions == "merge_positions_keep_replicates") {
covRet = .coverageOverRanges.merge_positions_keep_replicates( # TODO works for uneven ranges
covRet = .coverageOverRanges.merge_positions_keep_replicates(
sgn = sgn, rng = rng, method = method
)
}
Expand All @@ -125,10 +125,6 @@ coverageOverRanges <- function(
}
return(covRet)
}
# TODO
# output ranges are not sorted properly
# -> remove silent option -> warnings should always be shown


.coverageOverRanges.merge_positions_keep_replicates <- function(sgn, rng, method) {

Expand Down Expand Up @@ -186,9 +182,7 @@ coverageOverRanges <- function(
}
# sort ranges
rngCov = c(retCov)
rngCov = GenomeInfoDb::sortSeqlevels(rngCov)
rngCov = .sortRanges(rngCov)
# rngCov = sort(rngCov)

return(rngCov)
}
Expand Down
Loading

0 comments on commit 80de317

Please sign in to comment.