~ubuntu-branches/ubuntu/raring/bedtools/raring

« back to all changes in this revision

Viewing changes to docs/content/annotateBed.rst

  • Committer: Package Import Robot
  • Author(s): Charles Plessy
  • Date: 2012-11-04 17:59:41 UTC
  • mfrom: (1.1.9)
  • Revision ID: package-import@ubuntu.com-20121104175941-hahqzy1w8uy650z0
Tags: 2.17.0-1
bb9012e Imported Upstream version 2.16.2.
9006b23 Imported Upstream version 2.17.0.
9112569 Documented BEDTools license as a whole.
325689c Removed Pre-Depends: dpkg (>= 1.15.6).
a781b14 Conforms with Policy 3.9.4.
84b1167 Use Debhelper 9. 
0bf572d Distribute the test suite.
422cd34 Bash completion for BEDTools.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
###############
 
2
5.24 annotateBed
 
3
###############
 
4
**annotateBed** annotates one BED/VCF/GFF file with the coverage and number of overlaps observed
 
5
from multiple other BED/VCF/GFF files. In this way, it allows one to ask to what degree one feature
 
6
coincides with multiple other feature types with a single command.
 
7
 
 
8
==========================================================================
 
9
5.24.1 Usage and option summary
 
10
==========================================================================
 
11
Usage:
 
12
::
 
13
  annotateBed [OPTIONS] -i <BED/GFF/VCF> -files FILE1 FILE2 FILE3 ... FILEn
 
14
  
 
15
  
 
16
===========================      ===============================================================================================================================================================================================================
 
17
 Option                           Description
 
18
 
 
19
===========================      ===============================================================================================================================================================================================================
 
20
**-namesr**                                      A list of names (one per file) to describe each file in -i. These names will be printed as a header line. 
 
21
**-counts**                                          Report the count of features in each file that overlap -i. Default behavior is to report the fraction of -i covered by each file.
 
22
**-both**                        Report the count of features followed by the % coverage for each annotation file. Default is to report solely the fraction of -i covered by each file.
 
23
**-s**                           Force strandedness. That is, only include hits in A that overlap B on the same strand. By default, hits are included without respect to strand.
 
24
===========================      ===============================================================================================================================================================================================================
 
25
 
 
26
 
 
27
 
 
28
 
 
29
 
 
30
==========================================================================
 
31
5.24.2 Default behavior - annotate one file with coverage from others.
 
32
==========================================================================
 
33
By default, the fraction of each feature covered by each annotation file is reported after the complete
 
34
feature in the file to be annotated.
 
35
::
 
36
  cat variants.bed
 
37
  chr1 100  200   nasty 1  -
 
38
  chr2 500  1000  ugly  2  +
 
39
  chr3 1000 5000  big   3  -
 
40
 
 
41
  cat genes.bed
 
42
  chr1 150  200   geneA 1  +
 
43
  chr1 175  250   geneB 2  +
 
44
  chr3 0    10000 geneC 3  -
 
45
 
 
46
  cat conserve.bed
 
47
  chr1 0    10000 cons1 1  +
 
48
  chr2 700  10000 cons2 2  -
 
49
  chr3 4000 10000 cons3 3  +
 
50
 
 
51
  cat known_var.bed
 
52
  chr1 0    120   known1   -
 
53
  chr1 150  160   known2   -
 
54
  chr2 0    10000 known3   +
 
55
 
 
56
  annotateBed -i variants.bed -files genes.bed conserv.bed known_var.bed
 
57
  chr1 100  200  nasty 1 -  0.500000  1.000000  0.300000
 
58
  chr2 500  1000 ugly  2 +  0.000000  0.600000  1.000000
 
59
  chr3 1000 5000 big   3 -  1.000000  0.250000  0.000000
 
60
 
 
61
 
 
62
==========================================================================
 
63
5.24.3 Report the count of hits from the annotation files
 
64
==========================================================================
 
65
Figure:
 
66
::
 
67
  annotateBed -counts -i variants.bed -files genes.bed conserv.bed known_var.bed
 
68
  chr1 100  200  nasty 1 - 2 1 2
 
69
  chr2 500  1000 ugly  2 + 0 1 1
 
70
  chr3 1000 5000 big   3 - 1 1 0
 
71
 
 
72
 
 
73
 
 
74
==========================================================================
 
75
5.24.4 Report both the count of hits and the fraction covered from the annotation files
 
76
==========================================================================
 
77
Figure:
 
78
::
 
79
  annotateBed -both -i variants.bed -files genes.bed conserv.bed known_var.bed
 
80
  #chr start end  name  score +/-  cnt1 pct1     cnt2 pct2     cnt3 pct3
 
81
  chr1 100   200  nasty 1     -    2    0.500000 1    1.000000 2    0.300000
 
82
  chr2 500   1000 ugly  2     +    0    0.000000 1    0.600000 1    1.000000
 
83
  chr3 1000  5000 big   3     -    1    1.000000 1    0.250000 0    0.000000
 
84
 
 
85
 
 
86
  
 
87
  
 
88
==========================================================================
 
89
5.24.5 Restrict the reporting to overlaps on the same strand.
 
90
==========================================================================
 
91
Note: Compare with the result from 5.24.3
 
92
::
 
93
  annotateBed -s -i variants.bed -files genes.bed conserv.bed known_var.bed
 
94
  chr1  100   200   nasty  var1  -  0.000000  0.000000  0.000000
 
95
  chr2  500   1000  ugly   var2  +  0.000000  0.000000  0.000000
 
96
  chr3  1000  5000  big    var3  -  1.000000  0.000000  0.000000
 
97
 
 
98
 
 
99