计算FRIP值

2021-09-28  本文已影响0人  余绕

1.安装软件
软件安装在R4.1版本(激活conda的R4.1环境)

install.packages("remotes")
remotes::install_github("imbforge/encodeChIPqc")

出现如下选择时候最好都升级(升级时候如果个别安装不上先不管)

> remotes::install_github("imbforge/encodeChIPqc")
Downloading GitHub repo imbforge/encodeChIPqc@HEAD
These packages have more recent versions available.
It is recommended to update all of them.
Which would you like to update?

1: All                                 
2: CRAN packages only                  
3: None                                
4: gtools     (3.8.2  -> 3.9.2 ) [CRAN]
5: Rcpp       (1.0.6  -> 1.0.7 ) [CRAN]
6: data.table (1.14.0 -> 1.14.2) [CRAN]

Enter one or more numbers, or an empty line to skip updates: 1
gtools     (3.8.2  -> 3.9.2 ) [CRAN]
Rcpp       (1.0.6  -> 1.0.7 ) [CRAN]
data.table (1.14.0 -> 1.14.2) [CRAN]
spp        (NA     -> 1.16.0) [CRAN]

安装好后
加载包

library(encodeChIPqc)
library(GenomicRanges) #如果没有需要安装

进行计算

 peaks =  read.table('../../H4K5ac/WT/WT_1_peaks.narrowPeak')
 colnames(peaks) = c('chr','start','end','name','score','strand','signal','pval','qval','peak')
 peaks.gr = makeGRangesFromDataFrame(peaks,keep.extra.columns=TRUE)
 bam.file = '../../H4K5ac/WT/WT_1.bam' #sam转化后的bam
frip(bam.file,peaks.gr)

frip值

0.3997

encodeChIPqc好像只能在linux下用,其中有个依赖包只有Linux版本。

上一篇 下一篇

猜你喜欢

热点阅读