### Learn Chromatin State Model with Custom Parameters Source: https://context7.com/jernst98/chromhmm/llms.txt Use this command to learn a ChromHMM model with specified parameters for bin size, maximum iterations, and prior probabilities. Requires input binary data directory and output directory. ```bash java -mx8000M -jar ChromHMM.jar LearnModel \ -b 200 \ -r 500 \ -d 0.001 \ -p 0 \ -i MyExperiment \ binary_data_dir \ output_dir \ 10 \ hg38 ``` -------------------------------- ### Learn Chromatin State Model with Posterior Output and Custom Initialization Source: https://context7.com/jernst98/chromhmm/llms.txt This command learns a ChromHMM model, enabling posterior probability output and custom initialization methods. It allows for specifying random initialization and a seed for reproducibility. Requires input binary data directory and output directory. ```bash java -mx16000M -jar ChromHMM.jar LearnModel \ -init random \ -s 12345 \ -printposterior \ -printstatebyline \ -color 0,0,255 \ binary_data_dir \ output_dir \ 20 \ mm10 ``` -------------------------------- ### Initialize Chromatin State Model from Existing Model Source: https://context7.com/jernst98/chromhmm/llms.txt Load and fine-tune an existing ChromHMM model. This is useful for transferring learned states or refining models with new data. Specify the path to the existing model file and custom parameters for fine-tuning. Requires input binary data directory and output directory. ```bash java -mx8000M -jar ChromHMM.jar LearnModel \ -init load \ -m existing_model.txt \ -e 0.02 \ -t 0.5 \ binary_data_dir \ output_dir \ 15 \ hg19 ``` -------------------------------- ### Generate Basic Browser Files Source: https://context7.com/jernst98/chromhmm/llms.txt Create BED files for UCSC Genome Browser visualization from segmentation data. This is the basic command for generating dense and expanded tracks. Requires the segmentation file, a prefix for browser tracks, and an output directory. ```bash java -jar ChromHMM.jar MakeBrowserFiles \ GM12878_15_segments.bed \ GM12878_ChromHMM \ GM12878_browser ``` -------------------------------- ### Generate Browser Files with Gzip Output and Low Memory Source: https://context7.com/jernst98/chromhmm/llms.txt Create browser-compatible BED files using low memory mode and gzip compression for output. This command also disables the browser header. Requires segmentation data, a prefix for browser tracks, and an output directory. ```bash java -jar ChromHMM.jar MakeBrowserFiles \ -gzip \ -lowmem \ -nobrowserheader \ combined_segments.bed \ AllCells_ChromHMM \ AllCells_browser ``` -------------------------------- ### Learn Chromatin State Model in Low-Memory Mode Source: https://context7.com/jernst98/chromhmm/llms.txt Optimize memory usage for large datasets during ChromHMM model learning. This mode enables gzip compression and disables automatic file opening and browser display. Requires input binary data directory and output directory. ```bash java -mx4000M -jar ChromHMM.jar LearnModel \ -lowmem \ -gzip \ -noautoopen \ -nobrowser \ binary_data_dir \ output_dir \ 25 \ hg38 ``` -------------------------------- ### Apply Learned Model for Basic Segmentation Source: https://context7.com/jernst98/chromhmm/llms.txt Use this command to apply a pre-learned ChromHMM model to binarized data, generating genome segmentations. This is the basic usage without additional options. Requires the model file, input binary data directory, and output directory. ```bash java -jar ChromHMM.jar MakeSegmentation \ model_15.txt \ binary_data_dir \ segmentation_output_dir ``` -------------------------------- ### Display ChromHMM Version Source: https://context7.com/jernst98/chromhmm/llms.txt Displays the current version of the ChromHMM tool. The output includes the version number and copyright information. ```bash java -jar ChromHMM.jar Version ``` -------------------------------- ### Generate Browser Files with Custom Colors and Labels Source: https://context7.com/jernst98/chromhmm/llms.txt Create UCSC Genome Browser tracks with custom state colors and labels. Requires files mapping states to RGB colors and descriptive labels, along with the segmentation data. ```bash java -jar ChromHMM.jar MakeBrowserFiles \ -c state_colors.txt \ -m state_labels.txt \ -n 15 \ K562_15_segments.bed \ K562_ChromHMM \ K562_browser ``` -------------------------------- ### Segmentation with Custom Bin Size and Chromosome Lengths Source: https://context7.com/jernst98/chromhmm/llms.txt Apply a ChromHMM model to binarized data, specifying a custom bin size and providing a file with chromosome lengths. This allows for precise control over the segmentation process. Requires the model file, input binary data directory, and output directory. ```bash java -jar ChromHMM.jar MakeSegmentation \ -b 100 \ -l CHROMSIZES/hg38.txt \ -f input_file_list.txt \ model_10.txt \ binary_data_dir \ segmentation_output_dir ``` -------------------------------- ### Low-Memory Segmentation with Gzip Output Source: https://context7.com/jernst98/chromhmm/llms.txt Perform ChromHMM segmentation with optimized memory usage and gzip compression for output files. Useful for large datasets. Allows specifying a custom input prefix. Requires the model file, input binary data directory, and output directory. ```bash java -jar ChromHMM.jar MakeSegmentation \ -lowmem \ -gzip \ -i NewCellType \ model_15.txt \ binary_data_dir \ segmentation_output_dir ``` -------------------------------- ### LearnModel - Chromatin State Model Learning Source: https://context7.com/jernst98/chromhmm/llms.txt Learn a chromatin state model from binarized ChIP-seq data. Supports various options for customization, including memory usage, initialization, and output formats. ```APIDOC ## LearnModel - Chromatin State Model Learning This command learns a chromatin state model from binarized ChIP-seq data. It offers several options for customization, including memory allocation, initialization methods, and output details. ### Method `java -jar ChromHMM.jar LearnModel` ### Parameters #### Command-line Arguments - `java -mx`: Maximum memory allocation for the Java Virtual Machine (e.g., `-mx8000M`). - `-b `: Bin size for data processing (e.g., `-b 200`). - `-r `: Number of initializations to run (e.g., `-r 500`). - `-d `: Delta parameter for EM algorithm (e.g., `-d 0.001`). - `-p `: Number of threads to use (e.g., `-p 0` for auto-detection). - `-i `: Experiment name prefix for output files (e.g., `-i MyExperiment`). - `-init `: Initialization method (`random`, `load`). - `-s `: Random seed for initialization (e.g., `-s 12345`). - `-printposterior`: Output posterior probabilities for each state. - `-printstatebyline`: Output state information per line. - `-color `: Custom color for states in output (e.g., `-color 0,0,255`). - `-lowmem`: Enable low-memory mode for large datasets. - `-gzip`: Compress output files using gzip. - `-noautoopen`: Disable automatic opening of output files. - `-nobrowser`: Disable browser view generation. - `-init load`: Initialize from an existing model. - `-m `: Path to the existing model file for loading. - `-e `: Parameter epsilon for EM algorithm. - `-t `: Parameter tau for EM algorithm. #### Positional Arguments - `binary_data_dir` (string): Directory containing binarized data. - `output_dir` (string): Directory to save output files. - `num_states` (integer): The desired number of chromatin states. - `genome_assembly` (string): The genome assembly (e.g., `hg38`, `mm10`). ### Output Files - `model_.txt`: Full model parameters. - `emissions_.txt/png/svg`: Emission probabilities heatmap. - `transitions_.txt/png/svg`: Transition probabilities heatmap. - `*_segments.bed`: Genome segmentation files. - `*_dense.bed`, `*_expanded.bed`: UCSC browser tracks. - `*_overlap.txt/png`: Enrichment analysis results. - `webpage_.html`: Summary report. ### Examples **Model learning with custom parameters:** ```bash java -mx8000M -jar ChromHMM.jar LearnModel \ -b 200 \ -r 500 \ -d 0.001 \ -p 0 \ -i MyExperiment \ binary_data_dir \ output_dir \ 10 \ hg38 ``` **Model learning with posterior output and custom initialization:** ```bash java -mx16000M -jar ChromHMM.jar LearnModel \ -init random \ -s 12345 \ -printposterior \ -printstatebyline \ -color 0,0,255 \ binary_data_dir \ output_dir \ 20 \ mm10 ``` **Low-memory mode for large datasets:** ```bash java -mx4000M -jar ChromHMM.jar LearnModel \ -lowmem \ -gzip \ -noautoopen \ -nobrowser \ binary_data_dir \ output_dir \ 25 \ hg38 ``` **Initialize from existing model:** ```bash java -mx8000M -jar ChromHMM.jar LearnModel \ -init load \ -m existing_model.txt \ -e 0.02 \ -t 0.5 \ binary_data_dir \ output_dir \ 15 \ hg19 ``` ``` -------------------------------- ### Generate Segmentations with Posterior Probabilities Source: https://context7.com/jernst98/chromhmm/llms.txt Apply a ChromHMM model to binarized data and output posterior probabilities for each state. This provides a more detailed view of state assignments. Requires the model file, input binary data directory, and output directory. ```bash java -jar ChromHMM.jar MakeSegmentation \ -printposterior \ -printstatebyline \ model_15.txt \ binary_data_dir \ segmentation_output_dir ``` -------------------------------- ### Compare Emission Parameters Between Models Source: https://context7.com/jernst98/chromhmm/llms.txt Compares emission parameters between models to assess similarity and identify corresponding states. Useful for comparing models across different cell types or datasets. ```bash java -jar ChromHMM.jar CompareModels \ reference_emissions.txt \ comparison_model.txt \ comparison_output ``` ```bash java -jar ChromHMM.jar CompareModels \ -color 0,128,255 \ reference_emissions.txt \ model_dir \ multi_comparison_output ``` ```bash java -jar ChromHMM.jar CompareModels \ -noimage \ emissions_15.txt \ other_emissions_15.txt \ comparison_results ``` -------------------------------- ### Binarize BED Files to Binary Data Source: https://context7.com/jernst98/chromhmm/llms.txt Converts aligned reads in BED format to binary presence/absence data. Uses a Poisson background model with optional control data. Supports custom bin sizes, gzipped output, and signal export. ```bash java -jar ChromHMM.jar BinarizeBed \ CHROMSIZES/hg19.txt \ /path/to/bed_files \ cellmarkfiletable.txt \ output_binary_dir ``` ```bash java -jar ChromHMM.jar BinarizeBed \ -b 100 \ -c /path/to/control_files \ -p 0.0001 \ -f 1.5 \ CHROMSIZES/hg19.txt \ /path/to/bed_files \ cellmarkfiletable.txt \ output_binary_dir ``` ```bash java -jar ChromHMM.jar BinarizeBed \ -gzip \ -t /path/to/signal_output \ -o /path/to/control_signal_output \ CHROMSIZES/hg38.txt \ /path/to/bed_files \ cellmarkfiletable.txt \ output_binary_dir ``` -------------------------------- ### MakeBrowserFiles - Generate UCSC Genome Browser Tracks Source: https://context7.com/jernst98/chromhmm/llms.txt Creates browser-compatible BED files from segmentation files for visualization in the UCSC Genome Browser. Generates both dense and expanded views with customizable colors and labels. ```APIDOC ## MakeBrowserFiles - Generate UCSC Genome Browser Tracks Creates browser-compatible BED files from segmentation files for visualization in the UCSC Genome Browser. This command generates both dense (single-track) and expanded (multi-track) views, with options for customizing colors and labels. ### Method `java -jar ChromHMM.jar MakeBrowserFiles` ### Parameters #### Command-line Arguments - `-c `: Path to a file containing state color definitions (tab-separated: State R G B). - `-m `: Path to a file containing state label definitions (tab-separated: State Label). - `-n `: Number of states in the model (e.g., `-n 15`). - `-gzip`: Compress output files using gzip. - `-lowmem`: Enable low-memory mode for large datasets. - `-nobrowserheader`: Do not include a browser header line in the output BED files. #### Positional Arguments - `segments_file` (string): Path to the genome segmentation file (e.g., `GM12878_15_segments.bed`). - `track_name` (string): Name for the browser track (e.g., `GM12878_ChromHMM`). - `output_prefix` (string): Prefix for the output BED files (e.g., `GM12878_browser`). ### Color Mapping File Format (tab-separated): ``` State R G B E1 255 0 0 E2 0 255 0 E3 0 0 255 ``` ### Label Mapping File Format (tab-separated): ``` State Label E1 Active_Promoter E2 Strong_Enhancer E3 Heterochromatin ``` ### Examples **Basic browser file generation:** ```bash java -jar ChromHMM.jar MakeBrowserFiles \ GM12878_15_segments.bed \ GM12878_ChromHMM \ GM12878_browser ``` **With custom colors and labels:** ```bash java -jar ChromHMM.jar MakeBrowserFiles \ -c state_colors.txt \ -m state_labels.txt \ -n 15 \ K562_15_segments.bed \ K562_ChromHMM \ K562_browser ``` **Gzipped output with low memory mode:** ```bash java -jar ChromHMM.jar MakeBrowserFiles \ -gzip \ -lowmem \ -nobrowserheader \ combined_segments.bed \ AllCells_ChromHMM \ AllCells_browser ``` ``` -------------------------------- ### MakeSegmentation - Apply Learned Model to Data Source: https://context7.com/jernst98/chromhmm/llms.txt Applies a previously learned ChromHMM model to binarized data to generate genome segmentations. Useful for applying the same model to new cell types or datasets without retraining. ```APIDOC ## MakeSegmentation - Apply Learned Model to Data Applies a previously learned ChromHMM model to binarized data to generate genome segmentations. This is useful for applying the same model to new cell types or datasets without retraining. ### Method `java -jar ChromHMM.jar MakeSegmentation` ### Parameters #### Command-line Arguments - `-printposterior`: Output posterior probabilities for each state. - `-printstatebyline`: Output state information per line. - `-lowmem`: Enable low-memory mode for large datasets. - `-gzip`: Compress output files using gzip. - `-i `: Experiment name prefix for output files (e.g., `-i NewCellType`). - `-b `: Bin size for data processing (e.g., `-b 100`). - `-l `: Path to chromosome sizes file (e.g., `-l CHROMSIZES/hg38.txt`). - `-f `: Path to input file list (e.g., `-f input_file_list.txt`). #### Positional Arguments - `model_file` (string): Path to the learned ChromHMM model file (e.g., `model_15.txt`). - `binary_data_dir` (string): Directory containing binarized data. - `segmentation_output_dir` (string): Directory to save segmentation output files. ### Examples **Basic segmentation:** ```bash java -jar ChromHMM.jar MakeSegmentation \ model_15.txt \ binary_data_dir \ segmentation_output_dir ``` **Segmentation with posterior probabilities:** ```bash java -jar ChromHMM.jar MakeSegmentation \ -printposterior \ -printstatebyline \ model_15.txt \ binary_data_dir \ segmentation_output_dir ``` **Low-memory segmentation with gzip output:** ```bash java -jar ChromHMM.jar MakeSegmentation \ -lowmem \ -gzip \ -i NewCellType \ model_15.txt \ binary_data_dir \ segmentation_output_dir ``` **Segmentation with custom bin size and chromosome lengths:** ```bash java -jar ChromHMM.jar MakeSegmentation \ -b 100 \ -l CHROMSIZES/hg38.txt \ -f input_file_list.txt \ model_10.txt \ binary_data_dir \ segmentation_output_dir ``` ``` -------------------------------- ### Learn Hidden Markov Model Source: https://context7.com/jernst98/chromhmm/llms.txt Learns a multivariate Hidden Markov Model from binarized chromatin data to discover chromatin states. Automatically generates segmentation files, browser tracks, and enrichment analyses. ```bash java -mx4000M -jar ChromHMM.jar LearnModel \ binary_data_dir \ output_dir \ 15 \ hg19 ``` -------------------------------- ### Binarize Pre-computed Signal Data Source: https://context7.com/jernst98/chromhmm/llms.txt Converts pre-computed signal files into binary format using specified thresholds. Supports Poisson significance, fold-enrichment, or absolute signal levels. Can output gzipped files. ```bash java -jar ChromHMM.jar BinarizeSignal \ -p 0.0001 \ /path/to/signal_dir \ /path/to/control_dir \ output_binary_dir ``` ```bash java -jar ChromHMM.jar BinarizeSignal \ -f 2.0 \ /path/to/signal_dir \ /path/to/control_dir \ output_binary_dir ``` ```bash java -jar ChromHMM.jar BinarizeSignal \ -g 5.0 \ -gzip \ /path/to/signal_dir \ /path/to/control_dir \ output_binary_dir ``` -------------------------------- ### Binarize BAM Files to Binary Data Source: https://context7.com/jernst98/chromhmm/llms.txt Converts aligned reads in BAM format directly to binary presence/absence data. Supports paired-end reads, mixed single/paired-end data, and various read shifting options. Can also perform peak-based binarization. ```bash java -jar ChromHMM.jar BinarizeBam \ CHROMSIZES/hg38.txt \ /path/to/bam_files \ cellmarkfiletable.txt \ output_binary_dir ``` ```bash java -jar ChromHMM.jar BinarizeBam \ -paired \ CHROMSIZES/hg38.txt \ /path/to/bam_files \ cellmarkfiletable.txt \ output_binary_dir ``` ```bash java -jar ChromHMM.jar BinarizeBam \ -mixed \ -b 200 \ -n 100 \ -gzip \ CHROMSIZES/mm10.txt \ /path/to/bam_files \ cellmarkfiletable.txt \ output_binary_dir ``` ```bash java -jar ChromHMM.jar BinarizeBam \ -peaks \ -center \ CHROMSIZES/hg19.txt \ /path/to/peak_files \ cellmarkfiletable.txt \ output_binary_dir ``` -------------------------------- ### Compute Overlap Enrichment with State Labels and Uniform Scale Source: https://context7.com/jernst98/chromhmm/llms.txt Calculate overlap enrichment using state labels for clarity and apply a uniform scale to the enrichment visualization. Requires segmentation data, annotation coordinates, and a file mapping states to labels. ```bash java -jar ChromHMM.jar OverlapEnrichment \ -labels \ -m state_labels.txt \ -uniformscale \ segments.bed \ COORDS/hg19 \ labeled_enrichments ``` -------------------------------- ### Compute Overlap Enrichment with Custom Parameters Source: https://context7.com/jernst98/chromhmm/llms.txt Perform overlap enrichment analysis with custom parameters, including bin size, low memory mode, a title for the output, and custom colors for visualization. Requires segmentation data and annotation coordinates. ```bash java -jar ChromHMM.jar OverlapEnrichment \ -b 200 \ -lowmem \ -t "GM12878 State Enrichments" \ -color 255,0,0 \ GM12878_15_segments.bed \ COORDS/hg19 \ GM12878_enrichments ``` -------------------------------- ### Evaluate Model on Feature Subset Source: https://context7.com/jernst98/chromhmm/llms.txt Evaluates model performance on a subset of marks, generating confusion matrices. Useful for identifying minimal informative mark combinations. ```bash java -jar ChromHMM.jar EvalSubset \ model_15.txt \ binary_data_dir \ segmentation_dir \ confusion_output \ "10010110" ``` ```bash java -jar ChromHMM.jar EvalSubset \ -readposterior \ model_15.txt \ binary_data_dir \ POSTERIOR \ confusion_output \ "11111100" ``` ```bash java -jar ChromHMM.jar EvalSubset \ -lowmem \ -append \ -noimage \ model_15.txt \ binary_data_dir \ segmentation_dir \ all_confusion \ "11110000" ``` -------------------------------- ### Reorder Model States Source: https://context7.com/jernst98/chromhmm/llms.txt Reorders states in a learned model based on emission similarity, transition patterns, or a user-specified order. Generates new visualizations and can apply labels to states. ```bash java -jar ChromHMM.jar Reorder \ -stateordering emission \ model_15.txt \ reordered_output_dir ``` ```bash java -jar ChromHMM.jar Reorder \ -stateordering transition \ model_15.txt \ reordered_output_dir ``` ```bash java -jar ChromHMM.jar Reorder \ -o state_ordering.txt \ -m state_labels.txt \ -i labeled \ model_15.txt \ labeled_output_dir ``` ```bash java -jar ChromHMM.jar Reorder \ -o state_ordering.txt \ -r segments.bed segments_relabeled.bed \ model_15.txt \ reordered_dir ``` -------------------------------- ### Convert Gene Table with Custom Options Source: https://context7.com/jernst98/chromhmm/llms.txt Converts gene tables to ChromHMM format using custom chromosome lengths and output directories. Specify input file, output prefix, and assembly. ```bash java -jar ChromHMM.jar ConvertGeneTable \ -l CHROMSIZES/hg38.txt \ -u /custom/COORDS \ -v /custom/ANCHORFILES \ -w 2000 \ refGene.txt \ Custom \ hg38 ``` ```bash java -jar ChromHMM.jar ConvertGeneTable \ -biggenepred \ -gzip \ bigGenePred.txt \ BigGene \ hg38 ``` ```bash java -jar ChromHMM.jar ConvertGeneTable \ -nobin \ -noheader \ genePred_nobin.txt \ NoBin \ mm10 ``` -------------------------------- ### Compute Overlap Enrichment Using Posterior Probabilities Source: https://context7.com/jernst98/chromhmm/llms.txt Perform overlap enrichment analysis using posterior probability files generated by ChromHMM. This method accounts for uncertainty in state assignments. Requires posterior probability files, annotation coordinates, and a list of annotations. ```bash java -jar ChromHMM.jar OverlapEnrichment \ -posterior \ -a GM12878 \ -f annotation_list.txt \ POSTERIOR/GM12878 \ COORDS/hg38 \ posterior_enrichments ``` -------------------------------- ### Merge Binary Files from Parallel Processing Source: https://context7.com/jernst98/chromhmm/llms.txt Merges binary files generated from parallel processing back into complete chromosome files. Supports merging signal and control signal files, and row splitting. ```bash java -jar ChromHMM.jar MergeBinary \ split_binary_dir \ merged_binary_dir ``` ```bash java -jar ChromHMM.jar MergeBinary \ -splitrows \ split_binary_dir \ merged_binary_dir ``` ```bash java -jar ChromHMM.jar MergeBinary \ -t signal \ split_signal_dir \ merged_signal_dir ``` ```bash java -jar ChromHMM.jar MergeBinary \ -t controlsignal \ split_control_dir \ merged_control_dir ``` -------------------------------- ### Compute Basic Overlap Enrichment Source: https://context7.com/jernst98/chromhmm/llms.txt Calculate the fold enrichment of chromatin states with genomic annotations. This command requires the segmentation file and a directory containing annotation coordinates. The output includes enrichment matrices and heatmaps. ```bash java -jar ChromHMM.jar OverlapEnrichment \ GM12878_15_segments.bed \ COORDS/hg19 \ GM12878_enrichments ``` -------------------------------- ### Convert Gene Annotations to ChromHMM Format Source: https://context7.com/jernst98/chromhmm/llms.txt Converts gene tables from UCSC Genome Browser genePred format into coordinate and anchor files for enrichment analysis. Generates TSS, TES, gene body, and exon annotations. ```bash java -jar ChromHMM.jar ConvertGeneTable \ refGene.txt \ MyAnnotation \ hg38 ``` -------------------------------- ### Compute Neighborhood Enrichment Source: https://context7.com/jernst98/chromhmm/llms.txt Computes enrichment of chromatin states around genomic anchor points. Use for analyzing spatial patterns of chromatin states relative to features like TSS. ```bash java -jar ChromHMM.jar NeighborhoodEnrichment \ GM12878_15_segments.bed \ ANCHORFILES/hg19/RefSeqTSS.hg19.txt.gz \ GM12878_TSS_neighborhood ``` ```bash java -jar ChromHMM.jar NeighborhoodEnrichment \ -l 20 \ -r 20 \ -s 200 \ -b 200 \ segments.bed \ anchor_positions.txt \ neighborhood_output ``` ```bash java -jar ChromHMM.jar NeighborhoodEnrichment \ -l 10 \ -r 10 \ -t "TSS Enrichment Profile" \ -color 0,100,255 \ segments.bed \ ANCHORFILES/hg38/RefSeqTSS.hg38.txt.gz \ TSS_enrichments ``` ```bash java -jar ChromHMM.jar NeighborhoodEnrichment \ -nostrand \ -lowmem \ -m state_labels.txt \ segments.bed \ custom_anchors.txt \ bidirectional_enrichments ``` ```bash java -jar ChromHMM.jar NeighborhoodEnrichment \ -posterior \ -a GM12878 \ -signal \ POSTERIOR/GM12878 \ TES_anchors.txt \ TES_posterior_neighborhood ``` -------------------------------- ### Compute Enrichment Relative to Annotation Centers Source: https://context7.com/jernst98/chromhmm/llms.txt Calculate overlap enrichment relative to the centers of genomic annotations, with specified upstream and downstream distances. This is useful for analyzing features like transcription factor binding sites. Requires segmentation data and annotation coordinates. ```bash java -jar ChromHMM.jar OverlapEnrichment \ -center \ -s -1000 \ -e 1001 \ segments.bed \ /path/to/annotations \ center_enrichments ``` -------------------------------- ### OverlapEnrichment - Compute State Enrichments for Genomic Annotations Source: https://context7.com/jernst98/chromhmm/llms.txt Calculates fold enrichment of each chromatin state with external genomic annotations. Essential for interpreting the biological meaning of discovered chromatin states. ```APIDOC ## OverlapEnrichment - Compute State Enrichments for Genomic Annotations Calculates the fold enrichment of each chromatin state with external genomic annotations (e.g., gene promoters, CpG islands, repetitive elements). This analysis is essential for interpreting the biological meaning of discovered chromatin states. ### Method `java -jar ChromHMM.jar OverlapEnrichment` ### Parameters #### Command-line Arguments - `-b `: Bin size for background calculation (e.g., `-b 200`). - `-lowmem`: Enable low-memory mode for large datasets. - `-t `: Title for the enrichment plot (e.g., `-t "GM12878 State Enrichments"`). - `-color `: Custom color for enrichment plots (e.g., `-color 255,0,0`). - `-center`: Center annotations around their midpoint for enrichment calculation. - `-s `: Start offset for centering (e.g., `-s -1000`). - `-e `: End offset for centering (e.g., `-e 1001`). - `-posterior`: Use posterior probabilities for enrichment calculation. - `-a `: Annotation prefix for posterior calculation (e.g., `-a GM12878`). - `-f `: Path to a file listing annotations to use (e.g., `-f annotation_list.txt`). - `-labels`: Use state labels instead of state numbers in output. - `-m `: Path to a file containing state label definitions (tab-separated: State Label). - `-uniformscale`: Use a uniform scale for all enrichment plots. #### Positional Arguments - `segments_file` (string): Path to the genome segmentation file (e.g., `GM12878_15_segments.bed`) or posterior probability directory. - `annotation_dir` (string): Directory containing genomic annotation files (e.g., `COORDS/hg19`) or chromosome sizes file. - `output_prefix` (string): Prefix for the output enrichment files (e.g., `GM12878_enrichments`). ### Output Files - `*_overlap.txt`: Tab-delimited enrichment matrix. - `*_overlap.png`: Enrichment heatmap image. - `*_overlap.svg`: Vector graphics heatmap. ### Examples **Basic overlap enrichment:** ```bash java -jar ChromHMM.jar OverlapEnrichment \ GM12878_15_segments.bed \ COORDS/hg19 \ GM12878_enrichments ``` **Enrichment with custom parameters:** ```bash java -jar ChromHMM.jar OverlapEnrichment \ -b 200 \ -lowmem \ -t "GM12878 State Enrichments" \ -color 255,0,0 \ GM12878_15_segments.bed \ COORDS/hg19 \ GM12878_enrichments ``` **Enrichment relative to annotation centers:** ```bash java -jar ChromHMM.jar OverlapEnrichment \ -center \ -s -1000 \ -e 1001 \ segments.bed \ /path/to/annotations \ center_enrichments ``` **Enrichment using posterior probabilities:** ```bash java -jar ChromHMM.jar OverlapEnrichment \ -posterior \ -a GM12878 \ -f annotation_list.txt \ POSTERIOR/GM12878 \ COORDS/hg38 \ posterior_enrichments ``` **With state labels and uniform scale:** ```bash java -jar ChromHMM.jar OverlapEnrichment \ -labels \ -m state_labels.txt \ -uniformscale \ segments.bed \ COORDS/hg19 \ labeled_enrichments ``` ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.