bedtools是一款很是強大的用於處理bed,vcf,gff等格式數據的工具,該軟件由猶他大學的Quinlan實驗室開發。可是目前bedtools主要提供的是在linux,unxi等操做系統環境下的「命令行」運行方式,然而,對於想要使用R語言進行bedtools命令操做的科研人員來講就顯得比較麻煩。今天,我就給你們介紹一款由北卡羅來納大學教堂山分校開發的R語言版本的bedtools--bedtoolsr。話很少說,直接上乾貨。linux
install.packages("devtools") devtools::install_github("PhanstielLab/bedtoolsr") # 首次使用須要安裝
library(bedtoolsr)
A.bed <- data.frame(chr = c("chr1", "chr1", "chr3"), start = c(10, 100, 50), end = c(40, 150, 110)) B.bed <- data.frame(chr = c("chr1", "chr5"), start = c(20, 60), end = c(35, 80)) print(A.bed) # chr start end #1 chr1 10 40 #2 chr1 100 150 #3 chr3 50 110 print(B.bed) # chr start end #1 chr1 20 35 #2 chr5 60 80
#調用方法一 bt.intersect(a = A.bed, b = B.bed) #output # V1 V2 V3 #1 chr1 20 35 #調用方法二 bedtoolsr::bt.intersect(a = A.bed, b = B.bed) #output # V1 V2 V3 #1 chr1 20 35 #intersect全部參數 # a, # b, # wa = NULL, # wb = NULL, # loj = NULL, # wo = NULL, # wao = NULL, # u = NULL, # c = NULL, # C = NULL, # v = NULL, # ubam = NULL, # s = NULL, # S = NULL, # f = NULL, # F = NULL, # r = NULL, # e = NULL, # split = NULL, # g = NULL, # nonamecheck = NULL, # sorted = NULL, # names = NULL, # filenames = NULL, # sortout = NULL, # bed = NULL, # header = NULL, # nobuf = NULL, # iobuf = NULL, # output = NULL
函數名 | 函數名 | 函數名 |
---|---|---|
bt.annotate | bt.bamtobed | bt.bamtofastq |
bt.bed12tobed6 | bt.bedpetobam | bt.bedtobam |
bt.closest | bt.cluster | bt.closest |
bt.cluster | bt.complement | bt.coverage |
bt.expand | bt.fisher | bt.flank |
bt.genomecov | bt.getfasta | bt.groupby |
bt.igv | bt.intersect | bt.jaccard |
bt.links | bt.makewindows | bt.map |
bt.maskfasta | bt.merge | bt.multicov |
bt.multiinter | bt.nuc | bt.overlap |
bt.pairtobed | bt.pairtopair | bt.random |
bt.reldist | bt.sample | bt.shift |
bt.shuffle | bt.slop | bt.sort |
bt.spacing | bt.split | bt.subtract |
bt.summary | bt.tag | bt.unionbedg |
bt.window |