update docs
[MACS.git] / docs / source / docs / refinepeak.md
blobfe0dc67c2f248e9664223e9ae5ec1f5ff53753f1
1 # refinepeak
3 ## Overview
4 The `refinepeak` command is part of the MACS3 suite of tools and is
5 used to refine peak summits. It is particularly useful in ChIP-Seq
6 analysis where refining the peak summits can lead to more accurate
7 results. 
9 ## Detailed Description
11 The `refinepeak` command takes in a BED file containing peaks and raw
12 reads alignment, then produces an output BED file with refined peak
13 summits.  It will refine peak summits and give scores measuring the
14 balance of Watson/Crick tags, inspired by SPP. Basically, we assume
15 that a good summit in a peak region should have balanced Watson/Crick
16 tags around.
18 ## Command Line Options
20 Here is a brief overview of the `refinepeak` options:
22 - `-b`: Candidate peak file in BED format. REQUIRED.
23 - `-i` or `--ifile`: ChIP-seq alignment file. If multiple files are
24   given as '-t A B C', then they will all be read and combined. Note
25   that pair-end data is not supposed to work with this
26   command. REQUIRED. 
27 - `-f` or `--format`: Format of the tag file.
28   - `AUTO`: MACS3 will pick a format from "AUTO", "BED", "ELAND",
29     "ELANDMULTI", "ELANDEXPORT", "SAM", "BAM", "BOWTIE". Please check
30     the definition in the README file if you choose
31     ELAND/ELANDMULTI/ELANDEXPORT/SAM/BAM/BOWTIE. DEFAULT: "AUTO" 
32 - `-c` or `--cutoff`: Cutoff. Regions with SPP wtd score lower than
33   cutoff will not be considered. DEFAULT: 5 
34 - `-w` or `--window-size`: Scan window size on both sides of the
35   summit (default: 100bp) 
36 - `--buffer-size`: Buffer size for incrementally increasing the
37   internal array size to store read alignment information. In most
38   cases, you don't have to change this parameter. However, if there
39   are a large number of chromosomes/contigs/scaffolds in your
40   alignment, it's recommended to specify a smaller buffer size in
41   order to decrease memory usage (but it will take longer time to read
42   alignment files). Minimum memory requested for reading an alignment
43   file is about # of CHROMOSOME * BUFFER_SIZE * 8 Bytes. DEFAULT:
44   100000 
45 - `--verbose`: Set the verbose level. 0: only show critical messages,
46   1: show additional warning messages, 2: show process information, 3:
47   show debug messages. If you want to know where the duplicate reads
48   are, use 3. DEFAULT: 2 
49 - `--outdir`: If specified, all output files will be written to that
50   directory. Default: the current working directory 
51 - `-o` or `--ofile`: Output file name. Mutually exclusive with
52   --o-prefix. 
53 - `--o-prefix`: Output file prefix. Mutually exclusive with
54   -o/--ofile. 
56 ## Example Usage
58 Here is an example of how to use the `refinepeak` command:
60 ```bash
61 macs3 refinepeak -b peaks.bed -i alignment.bam -o refined_peaks.bed
62 ```
64 In this example, the program will refine the peak summits in the
65 `peaks.bed` file taking in the alignment file `alignment.bam`, and
66 write the result to `refined_peaks.bed`.