Skip to content

Latest commit

 

History

History
23 lines (20 loc) · 1.39 KB

soft_bedtools.md

File metadata and controls

23 lines (20 loc) · 1.39 KB

BEDTOOLS some useful command

01. intersect option

The intersect command is the workhorse of the bedtools suite. It compares two or more BED/BAM/VCF/GFF files and identifies all the regions in the genome where the features in the two files overlap (that is, share at least one base pair in common).

image

无参数直接输出overlap部分
-wa 输出有overlap的A文件的整个区间
-wb 输出有overlap的B文件的整个区间
-v  只输出A和B完全overlap的区间
-wo 输出overlap区间,只要有overlap就输出, 和不输入参数一样
-f  对于A文件,最小overlap的区间的比例,大于他保留,例如0.3
-F  对于B文件,最小overlap的区间的比例,大于他保留
-r  两个文件reciprocal的overlap比例,拷贝数矫正用这个, 需要和-f联用,-f指定比例
02. merge option

Many datasets of genomic features have many individual features that overlap one another (e.g. aligments from a ChiP seq experiment). It is often useful to just cobine the overlapping into a single, contiguous interval. The bedtools merge command will do this for you.

image

-d 指定两个要merge的区间之间的最大间隔大小(bp)