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)入