Package: chromstaR 1.31.0

Aaron Taudt

chromstaR: Combinatorial and Differential Chromatin State Analysis for ChIP-Seq Data

This package implements functions for combinatorial and differential analysis of ChIP-seq data. It includes uni- and multivariate peak-calling, export to genome browser viewable files, and functions for enrichment analyses.

Authors:Aaron Taudt, Maria Colome Tatche, Matthias Heinig, Minh Anh Nguyen

chromstaR_1.31.0.tar.gz
chromstaR_1.31.0.zip(r-4.5)chromstaR_1.31.0.zip(r-4.4)chromstaR_1.31.0.zip(r-4.3)
chromstaR_1.31.0.tgz(r-4.4-arm64)chromstaR_1.31.0.tgz(r-4.4-x86_64)chromstaR_1.31.0.tgz(r-4.3-arm64)chromstaR_1.31.0.tgz(r-4.3-x86_64)
chromstaR_1.31.0.tar.gz(r-4.5-noble)chromstaR_1.31.0.tar.gz(r-4.4-noble)
chromstaR_1.31.0.tgz(r-4.4-emscripten)chromstaR_1.31.0.tgz(r-4.3-emscripten)
chromstaR.pdf |chromstaR.html
chromstaR/json (API)
NEWS

# Install 'chromstaR' in R:
install.packages('chromstaR', repos = c('https://bioc.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/ataudt/chromstar/issues

Uses libs:
  • c++– GNU Standard C++ Library v3
  • openmp– GCC OpenMP (GOMP) support library
Datasets:

On BioConductor:chromstaR-1.31.0(bioc 3.20)chromstaR-1.30.0(bioc 3.19)

bioconductor-package

39 exports 1.08 score 78 dependencies 3 mentions

Last updated 2 months agofrom:3f120edda0

Exports:bin2decbinReadscallPeaksMultivariatecallPeaksReplicatescallPeaksUnivariatechangeFDRchangeMaxPostCutoffchangePostCutoffChromstarcollapseBinscombineMultivariatesdec2binexportCombinationsexportCountsexportGRangesAsBedFileexportPeaksfixedWidthBinsgenomicFrequenciesgetCombinationsgetDistinctColorsgetStateColorsheatmapCombinationsheatmapCountCorrelationheatmapTransitionProbsloadHmmsFromFilesplotEnrichCountHeatmapplotEnrichmentplotExpressionplotFoldEnrichHeatmapplotGenomeBrowserplotHistogramreadBamFileAsGRangesreadBedFileAsGRangesreadCustomBedFileremoveConditionstateBrewertransitionFrequenciesunis2pseudomultivariableWidthBins

Dependencies:abindaskpassbamsignalsBHBiobaseBiocGenericsBiocParallelBiostringsbitopschromstaRDataclicodetoolscolorspacecpp11crayoncurlDelayedArraydoParallelfansifarverforeachformatRfutile.loggerfutile.optionsGenomeInfoDbGenomeInfoDbDataGenomicAlignmentsGenomicRangesggplot2gluegtablehttrIRangesisobanditeratorsjsonlitelabelinglambda.rlatticelifecyclemagrittrMASSMatrixMatrixGenericsmatrixStatsmgcvmimemunsellmvtnormnlmeopensslpillarpkgconfigplyrR6RColorBrewerRcppreshape2RhtslibrlangRsamtoolsS4ArraysS4VectorsscalessnowSparseArraystringistringrSummarizedExperimentsystibbleUCSC.utilsutf8vctrsviridisLitewithrXVectorzlibbioc

The chromstaR user's guide

Rendered fromchromstaR.Rnwusingknitr::knitron Jun 17 2024.

Last update: 2021-11-03
Started: 2015-02-23

Readme and manuals

Help Manual

Help pageTopics
Combinatorial and differential chromatin state analysis for ChIP-seq datachromstaR-package chromstaR
Binned read countsbinned.data
Convert aligned reads from various file formats into read counts in equidistant binsbinning binReads
Fit a Hidden Markov Model to multiple ChIP-seq samplescallPeaksMultivariate
Fit a multivariate Hidden Markov Model to multiple ChIP-seq replicatescallPeaksReplicates
Fit a Hidden Markov Model to a ChIP-seq sample.callPeaksUnivariate
Fit a Hidden Markov Model to a ChIP-seq sample.callPeaksUnivariateAllChr
Adjust sensitivity of peak detectionchangeFDR changeMaxPostCutoff
Change the posterior cutoff of a Hidden Markov ModelchangePostCutoff
Wrapper function for the 'chromstaR' packageChromstar
chromstaR objectschromstaR-objects
Collapse consecutive binscollapseBins
Get the (decimal) combinatorial states of a list of univariate HMM modelscombinatorialStates
Combined multivariate HMM objectcombinedHMM combinedMultiHMM
Combine combinatorial states from several MultivariatescombineMultivariates
Conversion of decimal and binary statesbin2dec conversion dec2bin
Enrichment analysisenrichment_analysis plotEnrichCountHeatmap plotEnrichment plotFoldEnrichHeatmap
Enrichment of (combinatorial) states for genomic annotationsenrichmentAtAnnotation
Experiment data tableexperiment.table
Export genome browser uploadable filesexportCombinations exportCounts exportFiles exportPeaks
Export genome browser viewable filesexportGRangesAsBedFile
Make fixed-width binsfixedWidthBins
Gene coordinates for rn4genes_rn4
Frequencies of combinatorial statesgenomicFrequencies
Get combinationsgetCombinations
Get distinct colorsgetDistinctColors
Get state colorsgetStateColors
Plot a heatmap of combinatorial statesheatmapCombinations
Read count correlation heatmapheatmapCountCorrelation
Heatmap of transition probabilitiesheatmapTransitionProbs
Load 'chromstaR' objects from fileloadHmmsFromFiles
Merge several 'multiHMM's into one objectmergeChroms
Combined multivariate HMM for demonstration purposesmodel.combined
Multivariate HMM for demonstration purposesmodel.multivariate
Univariate HMM for demonstration purposesmodel.univariate
Multivariate HMM objectmulti.hmm multiHMM
Multivariate segmentationmultivariateSegmentation
Overlap with expression dataplotExpression
#' Plot a genome browser view #' #' Plot a simple genome browser view. This is useful for scripted genome browser snapshots. #' #' @param counts A 'GRanges-class' object with meta-data column 'counts'. #' @param peaklist A named list() of 'GRanges-class' objects containing peak coordinates. #' @param chr,start,end Chromosome, start and end coordinates for the plot. #' @param countcol A character giving the color for the counts. #' @param peakcols A character vector with colors for the peaks in 'peaklist'. #' @param style One of 'c('peaks', 'density')'. #' @param peakTrackHeight Relative height of the tracks given in 'peaklist' compared to the 'counts'. #' @return A 'ggplot' object. #' @examples #'## Get an example multiHMM ## #'file <- system.file("data","multivariate_mode-combinatorial_condition-SHR.RData", #' package="chromstaR") #'model <- get(load(file)) #'## Plot genome browser snapshot #'bins <- model$bins #'bins$counts <- model$bins$counts.rpkm[,1] #'plotGenomeBrowser(counts=bins, peaklist=model$peaks, #' chr='chr12', start=1, end=1e6) #' plotGenomeBrowser2 <- function(counts, peaklist=NULL, chr, start, end, countcol='black', peakcols=NULL, style='peaks', peakTrackHeight=5) ## Select ranges to plot ranges2plot <- reduce(counts[counts@seqnames == chr & start(counts) >= start & start(counts) <= end]) ## Counts counts <- subsetByOverlaps(counts, ranges2plot) if (style == 'peaks') df <- data.frame(x=(start(counts)+end(counts))/2, counts=counts$counts) # plot triangles centered at middle of the bin ggplt <- ggplot(df) + geom_area(aes_string(x='x', y='counts')) + theme(panel.grid = element_blank(), panel.background = element_blank(), axis.text.x = element_blank(), axis.title = element_blank(), axis.ticks.x = element_blank(), axis.line = element_blank()) maxcounts <- max(counts$counts) ggplt <- ggplt + scale_y_continuous(breaks=c(0, maxcounts)) else if (style == 'density') df <- data.frame(xmin=start(counts), xmax=end(counts), counts=counts$counts) ggplt <- ggplot(df) + geom_rect(aes_string(xmin='xmin', xmax='xmax', ymin=0, ymax=4, alpha='counts')) + theme(panel.grid = element_blank(), panel.background = element_blank(), axis.text = element_blank(), axis.title = element_blank(), axis.ticks = element_blank(), axis.line = element_blank()) else stop("Unknown value '", style, "' for parameter 'style'. Must be one of c('peaks', 'density').") ## Peaks if (!is.null(peaklist)) if (is.null(peakcols)) peakcols <- getDistinctColors(length(peaklist)) for (i1 in 1:length(peaklist)) p <- peakTrackHeight peaks <- subsetByOverlaps(peaklist[[i1]], ranges2plot) if (length(peaks) > 0) df <- data.frame(start=start(peaks), end=end(peaks), ymin=-p*i1, ymax=-p*i1+0.9*p) ggplt <- ggplt + geom_rect(data=df, mapping=aes_string(xmin='start', xmax='end', ymin='ymin', ymax='ymax'), col=peakcols[i1], fill=peakcols[i1]) trackname <- names(peaklist)[i1] df <- data.frame(x=start(counts)[1], y=-p*i1+0.5*p, label=trackname) ggplt <- ggplt + geom_text(data=df, mapping=aes_string(x='x', y='y', label='label'), vjust=0.5, hjust=0.5, col=peakcols[i1]) return(ggplt) Plot a genome browser viewplotGenomeBrowser
Histogram of binned read counts with fitted mixture distributionplotHistogram
Histograms of binned read counts with fitted mixture distributionplotHistograms
chromstaR plotting functionsplotting
Print combinedMultiHMM objectprint.combinedMultiHMM
Print multiHMM objectprint.multiHMM
Print uniHMM objectprint.uniHMM
Import BAM file into GRangesreadBamFileAsGRanges
Import BED file into GRangesreadBedFileAsGRanges
Read chromstaR configuration filereadConfig
Read bed-file into GRangesreadCustomBedFile
Remove condition from modelremoveCondition
Find the best bin size for a given datasetscanBinsizes
chromstaR scoresdifferentialScoreMax differentialScoreSum scores
Simulate multivariate datasimulateMultivariate
Simulate read coordinatessimulateReadsFromCounts
Simulate univariate datasimulateUnivariate
Obtain combinatorial states from specificationstate.brewer
Obtain combinatorial states from experiment tablestateBrewer
Normalize read countssubsample
Transition frequencies of combinatorial statestransitionFrequencies
Univariate HMM objectuni.hmm uniHMM
Combine univariate HMMs to a multivariate HMMunis2pseudomulti
Make variable-width binsvariableWidthBins
Write chromstaR configuration filewriteConfig
The Zero-inflated Negative Binomial Distributiondzinbinom pzinbinom qzinbinom rzinbinom zinbinom