MACS3.Signal.CallPeakUnit module
Compute MACS3 peak-calling scores and helper statistics.
This code is free software; you can redistribute it and/or modify it under the terms of the BSD License (see the file LICENSE included with the distribution).
- class MACS3.Signal.CallPeakUnit.CallerFromAlignments
Bases:
objectCompute pileups, scores, and peaks from FWTrack/PETrack alignments.
- treat
Treatment track (FWTrack or PETrackI/PETrackII).
- ctrl
Control track (FWTrack or PETrackI/PETrackII).
- d
Fragment extension size for treatment (unused in PE mode).
- ctrl_d_s
Fragment extension size for control.
- treat_scaling_factor
Scaling factor for treatment.
- ctrl_scaling_factor_s
Scaling factors for control.
- lambda_bg
Minimum local bias to fill missing values.
- chromosomes
Common chromosome names in treat/control.
- pseudocount
Pseudocount used for logLR/FE/logFE calculations.
- bedGraph_filename_prefix
Prefix for pileup/lambda bedGraph outputs.
- end_shift
Shift applied to read ends before extension.
- trackline
Whether to emit UCSC track lines in bedGraph outputs.
- save_bedGraph
Whether to save pileup/lambda bedGraph files.
- save_SPMR
Whether to save pileup normalized per million reads.
- no_lambda_flag
Whether to ignore local lambda (use global only).
- PE_mode
Whether treatment is paired-end.
- call_broadpeaks(scoring_function_symbols, lvl1_cutoff_s, lvl2_cutoff_s, min_length=200, lvl1_max_gap=50, lvl2_max_gap=400, cutoff_analysis=False)
This function try to find enriched regions within which, scores are continuously higher than a given cutoff for level 1, and link them using the gap above level 2 cutoff with a maximum length of lvl2_max_gap.
- Parameters:
scoring_function_symbols (list) – Symbols for score functions. Use
'p'(pscore),'q'(qscore),'f'(fold change), or's'(subtraction). Example:['p', 'q'].lvl1_cutoff_s (list) – Cutoffs for highly enriched regions.
lvl2_cutoff_s (list) – Cutoffs for linkage regions.
min_length (cython.int) – Minimum peak length.
lvl1_max_gap (cython.int) – Maximum gap to merge nearby peaks.
lvl2_max_gap (cython.int) – Maximum length of linkage regions.
cutoff_analysis (bool) – Whether to compute cutoff-vs-peak metrics.
- Returns:
(PeakIO, BroadPeakIO)for level-1 peaks and broad regions.- Return type:
tuple
Examples
lvl1, broad = caller.call_broadpeaks(['p'], [5.0], [2.0])
- call_peaks(scoring_function_symbols, score_cutoff_s, min_length=200, max_gap=50, call_summits=False, cutoff_analysis=False)
Call narrow peaks for all chromosomes.
- Parameters:
scoring_function_symbols (list) – Symbols for score functions. Use
'p'(pscore),'q'(qscore),'f'(fold change), or's'(subtraction). Example:['p', 'q'].score_cutoff_s (list) – Cutoff values corresponding to
scoring_function_symbols.min_length (cython.int) – Minimum peak length.
max_gap (cython.int) – Maximum gap of insignificant regions within a peak.
call_summits (bool) – Whether to call sub-peaks (summits).
cutoff_analysis (bool) – Whether to compute cutoff-vs-peak metrics.
- Returns:
Collection of called peaks.
- Return type:
Examples
peaks = caller.call_peaks(['p'], [5.0], min_length=200)
- destroy()
Remove temporary pileup files created during peak calling.
- enable_trackline()
Enable UCSC track line output when writing bedGraphs.
- set_pseudocount(pseudocount)
Update the pseudocount used in scoring.