利用salmon進行轉(zhuǎn)錄組定量(中) --R包下載--2019-05-14

library(tximportData)
getwd() #查看當前工作目錄,之后轉(zhuǎn)換至文件所在目錄
dir<- getwd() #設(shè)置目錄
list.files(dir)
sample <- paste0("ERR1698",c(194,seq(202,209),seq(195,201)),"_quant")
files <- file.path(dir,"quants",sample,"quant.sf")
names(files) <- paste0("sample",seq(1,16))
all(file.exists(files))

source("https://bioconductor.org/biocLite.R")
biocLite("AnnotationHub")
library(BiocGenerics)
library(parallel)
library(AnnotationHub)
ah <- AnnotationHub()
ath <- query(ah,'thaliana')
ath_tx <- ath[[ 'AH52247' ]]
downloading 0 resources
loading from cache 
    ‘C:/Users/ZPY/Documents/AppData/.AnnotationHub/58985’
Loading required package: GenomicFeatures
Error: failed to load resource
  name: AH52247
  title: TxDb.Athaliana.BioMart.plantsmart28.sqlite
  reason: this db is of type TxDb and requires the GenomicFeatures package before it can be loaded 

時隔一周,再次挑戰(zhàn):::
之前一直沒有裝上DESeq2、airway、tximportData 和 tximport一直報錯
因此首先安裝

install.packages('DESeq2')
  Installing package into ‘C:/Users/ZPY/Documents/R/win-library/3.5’
(as ‘lib’ is unspecified)
Warning in install.packages :
  package ‘DESeq2’ is not available (for R version 3.5.2)
library('DESeq2')
  載入需要的程輯包:GenomicRanges
  載入需要的程輯包:GenomeInfoDb
  Error: package or namespace load failed for 
  ‘GenomeInfoDb’ in loadNamespace(i, c(lib.loc, 
  .libPaths()), versionCheck = vI[[i]]):
  不存在叫‘GenomeInfoDbData’這個名字的程輯包
  Error: 無法載入程輯包‘GenomeInfoDb’
source("https://bioconductor.org/biocLite.R")
biocLite("GenomeInfoDb")
library('DESeq2') # 就可以成功加載了
> source("https://bioconductor.org/biocLite.R")
> options(BioC_mirror="http://mirrors.ustc.edu.cn/bioc/")
> biocLite("tximportData")
> library("tximportData")  #成功加載tximportData
> BiocManager::install("tximport")
> library("tximport") # 成功加載
> library("pasilla")
Error in library("pasilla") : 不存在叫‘pasilla’這個名字的程輯包
> install.packages("pasilla")
Installing package into ‘C:/Users/ZPY/Documents/R/win-library/3.5’
(as ‘lib’ is unspecified)
Warning in install.packages :
  package ‘pasilla’ is not available (for R version 3.5.2)
> library("pasilla")
Error in library("pasilla") : 不存在叫‘pasilla’這個名字的程輯包
> source("https://bioconductor.org/biocLite.R")
> biocLite("pasilla")
> library("pasilla") # 成功安裝并加載pasilla
> source("https://bioconductor.org/biocLite.R")
> biocLite("airway")
> library("airway") #成功安裝并加載airway

今日份開心,,R包都安裝完成
參考:劉曉澤同學(xué)簡書--DESeq2分析轉(zhuǎn)錄組之數(shù)據(jù)導(dǎo)入

?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容