library(tximportData)
getwd() #查看当前工作目录,之后转换至文件所在目录
dir<- getwd() #设置目录
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
时隔一周,再次挑战:::
之前一直没有装上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包都安装完成
参考:刘晓泽同学简书--DESeq2分析转录组之数据导入