2019-09-28 22:21:06 Yaopufu 阅读数 131

##前提:系统:ubuntu 18.04 安装的R是3.4.4 版本 多次尝试安装DESeq 无果
试过:

install.packages(‘DESeq’)

source(“https://bioconductor.org/biocLite.R”)
biocLite(“DESeq”)

以上两个方法都不行
后来又尝试卸载 R 3.4.4 安装最新的3.6版本,进入官网找到清华的R 3.6 的镜像链接,并写入了 source.list
sudo apt update 后,显示错误。
接着就尝试在win10下安装R 并安装Deseq的R包。
首先在R的官网上下载R3.6的安装文件,下载后安装,打开R,找到程序包
在这里插入图片描述
点击二级菜单里的《设定CRAN镜像》找到China里面的guangzhou
设置好镜像后并且显示成功后,点击安装程序包,找到DESeq。接着等待就好饿了。

2019-12-27 11:36:07 weixin_40099163 阅读数 35

第一次用R…
R version 3.6.2

install.packages("BiocManager")
BiocManager::install(version = "3.10")
BiocManager::install("DESeq2")

library("DESeq2")
上路(mac和win7下测试都ok,win7下安装R和RStudio的路径都在默认路径下)
2017-02-16 13:15:35 ada0915 阅读数 9782

安装R包(“RcppArmadillo”)失败,导致依赖该包的DESeq2 无法使用;

首先对gcc,g++升级至4.7
但依然报错,还是安装不了RcppArmadillo;

报错如下:

$ R

> source("https://bioconductor.org/biocLite.R")
> biocLite("DESeq2")
BioC_mirror: https://bioconductor.org
Using Bioconductor 3.2 (BiocInstaller 1.20.3), R 3.4.1 (2017-06-30).
Installing package(s) ‘DESeq2’
also installing the dependencies ‘RcppArmadillo’, ‘locfit’, ‘geneplotter’

trying URL 'https://mirrors.tuna.tsinghua.edu.cn/CRAN/src/contrib/RcppArmadillo_0.7.960.1.1.tar.gz'
Content type 'application/octet-stream' length 1115539 bytes (1.1 MB)
==================================================
downloaded 1.1 MB

trying URL 'https://mirrors.tuna.tsinghua.edu.cn/CRAN/src/contrib/locfit_1.5-9.1.tar.gz'
Content type 'application/octet-stream' length 196560 bytes (191 KB)
==================================================
downloaded 191 KB

trying URL 'https://bioconductor.org/packages/3.2/bioc/src/contrib/geneplotter_1.48.0.tar.gz'
Content type 'application/x-gzip' length 1400072 bytes (1.3 MB)
==================================================
downloaded 1.3 MB

trying URL 'https://bioconductor.org/packages/3.2/bioc/src/contrib/DESeq2_1.10.1.tar.gz'
Content type 'application/x-gzip' length 1255971 bytes (1.2 MB)
==================================================
downloaded 1.2 MB

* installing *source* package ‘RcppArmadillo’ ...
** package ‘RcppArmadillo’ successfully unpacked and MD5 sums checked
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ -m64 accepts -g... yes
checking how to run the C++ preprocessor... g++ -m64 -E
checking whether we are using the GNU C++ compiler... (cached) yes
checking whether g++ -m64 accepts -g... (cached) yes
checking whether g++ version is sufficient... no
configure: WARNING: Only g++ version 4.7.2 or greater can be used with RcppArmadillo.
configure: error: Please use a different compiler.
ERROR: configuration failed for package ‘RcppArmadillo’
* removing ‘/public/home/user/R/x86_64-redhat-linux-gnu-library/3.4/RcppArmadillo’
* installing *source* package ‘locfit’ ...
** package ‘locfit’ successfully unpacked and MD5 sums checked
** libs
gcc -m64 -std=gnu99 -I/usr/include/R -DNDEBUG   -I/usr/local/include   -fpic  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fpic -fPIC   -c S_enter.c -o S_enter.o
......
gcc -m64 -std=gnu99 -I/usr/include/R -DNDEBUG   -I/usr/local/include   -fpic  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fpic -
gcc -m64 -std=gnu99 -shared -L/usr/lib64/R/lib -o locfit.so S_enter.o band.o dbinom.o dens_haz.o dens_int.o dens_odi.o density.o ev_atree.o ev_interp.o ev_kdtre.o ev_main.o ev_sphere.o ev_trian.o family.o fitted.o frend.o lf_adap.o lf_dercor.o lf_fitfun.o lf_nbhd.o lf_robust.o lf_vari.o lf_wdiag.o lfstr.o locfit.o m_chol.o m_eigen.o m_icirc.o m_imont.o m_isimp.o m_isphr.o m_jacob.o m_max.o m_qr.o m_solve.o m_svd.o m_vector.o math.o minmax.o pcomp.o preplot.o prob.o procv.o scb.o scb_cons.o scb_crit.o scb_iface.o simul.o smisc.o startlf.o weight.o -L/usr/lib64/R/lib -lR
installing to /public/home/user/R/x86_64-redhat-linux-gnu-library/3.4/locfit/libs
** R
** data
** preparing package for lazy loading
** help
*** installing help indices
 .........
** building package indices
** testing if installed package can be loaded
* DONE (locfit)
* installing *source* package ‘geneplotter’ ...
** R
** data
** inst
** preparing package for lazy loading
** help
*** installing help indices
  ......
** building package indices
** installing vignettes
** testing if installed package can be loaded
* DONE (geneplotter)
ERROR: dependency ‘RcppArmadillo’ is not available for package ‘DESeq2’
* removing ‘/public/home/user/R/x86_64-redhat-linux-gnu-library/3.4/DESeq2’



$ gcc --version
gcc (GCC) 4.7.2 20121015 (Red Hat 4.7.2-5)
Copyright (C) 2012 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

解决方法:

## R version 3.4.1 (2017-06-30)
## Platform: x86_64-redhat-linux-gnu (64-bit)
## Running under: CentOS release 6.5 (Final)
#安装低版本的RcppArmadillo包
#Old sources---RcppArmadillo archive: https://cran.r-project.org/src/contrib/Archive/RcppArmadillo/
install.packages("https://cran.r-project.org/src/contrib/Archive/RcppArmadillo/RcppArmadillo_0.3.930.1.tar.gz", repos=NULL)

source("https://bioconductor.org/biocLite.R")
biocLite("DESeq2")

MADE IT ^ _^

2012-09-14 11:09:50 likelet 阅读数 15115

DESeq采用NB(负二项分布检验的方式)对reads数进行差异显著性检验,同时还增加了矫正由于长度引起的误差,估算基因表达量的方式采用basemean值来估算表达量(标准化以后)这里,我在R下安装DESeq包出现了一些问题帮助总结一下。

首先,我的R是15.0版本

打开R
source("http://bioconductor.org/biocLite.R")
biocLite(‘DEseq’)
会出现安装成功
loading的时候缺少locfit包则需要再输入(locfit包只在15.1版本下编译的,不过貌似没什么问题)
biocLite(‘locfit’)
再loading会出现缺少xtable包
输入
biocLite(‘xtable’)
在loading会出现XML报错
输入
biocLite(‘XML’)
这样DESeq就运行没有问题了。

注中间可能会出现某个包无法安装的情况,注意检查网络连接


下面具体的如何进行差异显著性检验,我参考别人的数据,这里计算出reads在每个样本中各个基因上的counts数文件,下面couns_...分别表示6个样本(三个重复对照三个重复处理组)

         library(DESeq)

        setwd("wherethe data is")

        #设置工作路径,可以再GUI上面直接设置

        c1<-read.table("counts_074284",row.names=1)

        c2<-read.table("counts_074286",row.names=1)

        c3<-read.table("counts_074262",row.names=1)

        c4<-read.table("counts_074263",row.names=1)

        c5<-read.table("counts_074264",row.names=1)

        c6<-read.table("counts_074285",row.names=1)

        #读入几组counts数据

        counts<-cbind(c1,c2,c3,c4,c5,c6)

        counts<-counts[-c(32679:32683),]  #remove the more general lines

        colnames(counts)<-c("P1","P2","P3","M1","M2","M3")

        #讲数据放到表中

        design<- rep (c("P","Mo"),each=3)

        #描述实验设置重复

          de  <- newCountDataSet(counts, design)

        #de  <- estimateSizeFactors(de)

        de  <-  estimateDispersions(de)

        de<- estimateDispersions(de)

        res  <- nbinomTest(de,"P","Mo")

        #计算结果

         sum(na.omit(res$padj<0.05))

        #输出差异显著的值。
#最后再加一部把数据输出出来,这个我就不用说了
    write.table(res,file="file.csv",sep=",")

2018-10-17 20:01:20 linkequa 阅读数 4399

DESeq2结果p-value和padj设为NA的理由:

Note on p-values set to NA: some values in the results table can be set to NA for one of the following reasons:

  • If within a row, all samples have zero counts, the baseMean column will be zero, and the log2 fold change estimates, p value and adjusted p value will all be set to NA.
  • If a row contains a sample with an extreme count outlier then the p value and adjusted p value will be set to NA. These outlier counts are detected by Cook’s distance. Customization of this outlier filtering and description of functionality for replacement of outlier counts and refitting is described below.
  • If a row is filtered by automatic independent filtering, for having a low mean normalized count, then only the adjusted p value will be set to NA. Description and customization of independent filtering is described below.
没有更多推荐了,返回首页