6d11e77112491e34dd9c1108c0a5b5a61dda2d1c
[samtools.git] / bcftools / bcftools.1
1 .TH bcftools 1 "16 March 2011" "bcftools" "Bioinformatics tools"
2 .SH NAME
3 .PP
4 bcftools - Utilities for the Binary Call Format (BCF) and VCF.
5 .SH SYNOPSIS
6 .PP
7 bcftools index in.bcf
8 .PP
9 bcftools view in.bcf chr2:100-200 > out.vcf
10 .PP
11 bcftools view -vc in.bcf > out.vcf 2> out.afs
12
13 .SH DESCRIPTION
14 .PP
15 Bcftools is a toolkit for processing VCF/BCF files, calling variants and
16 estimating site allele frequencies and allele frequency spectrums.
17
18 .SH COMMANDS AND OPTIONS
19
20 .TP 10
21 .B view
22 .B bcftools view
23 .RB [ \-AbFGNQSucgv ]
24 .RB [ \-D
25 .IR seqDict ]
26 .RB [ \-l
27 .IR listLoci ]
28 .RB [ \-s
29 .IR listSample ]
30 .RB [ \-i
31 .IR gapSNPratio ]
32 .RB [ \-t
33 .IR mutRate ]
34 .RB [ \-p
35 .IR varThres ]
36 .RB [ \-P
37 .IR prior ]
38 .RB [ \-1
39 .IR nGroup1 ]
40 .RB [ \-d
41 .IR minFrac ]
42 .RB [ \-U
43 .IR nPerm ]
44 .RB [ \-X
45 .IR permThres ]
46 .I in.bcf
47 .RI [ region ]
48
49 Convert between BCF and VCF, call variant candidates and estimate allele
50 frequencies.
51
52 .RS
53 .TP
54 .B Input/Output Options:
55 .TP 10
56 .B -A
57 Retain all possible alternate alleles at variant sites. By default, the view
58 command discards unlikely alleles.
59 .TP 10
60 .B -b
61 Output in the BCF format. The default is VCF.
62 .TP
63 .BI -D \ FILE
64 Sequence dictionary (list of chromosome names) for VCF->BCF conversion [null]
65 .TP
66 .B -F
67 Indicate PL is generated by r921 or before (ordering is different).
68 .TP
69 .B -G
70 Suppress all individual genotype information.
71 .TP
72 .BI -l \ FILE
73 List of sites at which information are outputted [all sites]
74 .TP
75 .B -N
76 Skip sites where the REF field is not A/C/G/T
77 .TP
78 .B -Q
79 Output the QCALL likelihood format
80 .TP
81 .BI -s \ FILE
82 List of samples to use. The first column in the input gives the sample names
83 and the second gives the ploidy, which can only be 1 or 2. When the 2nd column
84 is absent, the sample ploidy is assumed to be 2. In the output, the ordering of
85 samples will be identical to the one in
86 .IR FILE .
87 [null]
88 .TP
89 .B -S
90 The input is VCF instead of BCF.
91 .TP
92 .B -u
93 Uncompressed BCF output (force -b).
94 .TP
95 .B Consensus/Variant Calling Options:
96 .TP 10
97 .B -c
98 Call variants.
99 .TP
100 .BI -d \ FLOAT
101 When
102 .B -v
103 is in use, skip loci where the fraction of samples covered by reads is below FLOAT. [0]
104 .TP
105 .B -g
106 Call per-sample genotypes at variant sites (force -c)
107 .TP
108 .BI -i \ FLOAT
109 Ratio of INDEL-to-SNP mutation rate [0.15]
110 .TP
111 .BI -p \ FLOAT
112 A site is considered to be a variant if P(ref|D)<FLOAT [0.5]
113 .TP
114 .BI -P \ STR
115 Prior or initial allele frequency spectrum. If STR can be
116 .IR full ,
117 .IR cond2 ,
118 .I flat
119 or the file consisting of error output from a previous variant calling
120 run.
121 .TP
122 .BI -t \ FLOAT
123 Scaled muttion rate for variant calling [0.001]
124 .TP
125 .B -v
126 Output variant sites only (force -c)
127 .TP
128 .B Contrast Calling and Association Test Options:
129 .TP
130 .BI -1 \ INT
131 Number of group-1 samples. This option is used for dividing the samples into
132 two groups for contrast SNP calling or association test.
133 When this option is in use, the following VCF INFO will be outputted:
134 PC2, PCHI2 and QCHI2. [0]
135 .TP
136 .BI -U \ INT
137 Number of permutations for association test (effective only with
138 .BR -1 )
139 [0]
140 .TP
141 .BI -X \ FLOAT
142 Only perform permutations for P(chi^2)<FLOAT (effective only with
143 .BR -U )
144 [0.01]
145 .RE
146
147 .TP
148 .B index
149 .B bcftools index
150 .I in.bcf
151
152 Index sorted BCF for random access.
153 .RE
154
155 .TP
156 .B cat
157 .B bcftools cat
158 .I in1.bcf
159 .RI [ "in2.bcf " [ ... "]]]"
160
161 Concatenate BCF files. The input files are required to be sorted and
162 have identical samples appearing in the same order.
163 .RE
164
165 .SH BCFTOOLS SPECIFIC VCF TAGS
166
167 .TS
168 center box;
169 cb | cb | cb
170 l | l | l .
171 Tag     Format  Description
172 _
173 AF1     double  Max-likelihood estimate of the site allele frequency (AF) of the first ALT allele
174 CI95    double[2]       Equal-tail Bayesian credible interval of AF at the 95% level
175 DP      int     Raw read depth (without quality filtering)
176 DP4     int[4]  # high-quality reference forward bases, ref reverse, alternate for and alt rev bases
177 FQ      int     Consensus quality. Positive: sample genotypes different; negative: otherwise
178 MQ      int     Root-Mean-Square mapping quality of covering reads
179 PC2     int[2]  Phred probability of AF in group1 samples being larger (,smaller) than in group2
180 PCHI2   double  Posterior weighted chi^2 P-value between group1 and group2 samples
181 PV4     double[4]       P-value for strand bias, baseQ bias, mapQ bias and tail distance bias
182 QCHI2   int     Phred-scaled PCHI2
183 RP      int     # permutations yielding a smaller PCHI2
184 .TE