美文网首页单细胞-生信技能树
单细胞数据挖掘(0)-安装、加载packages(生信技能树视频

单细胞数据挖掘(0)-安装、加载packages(生信技能树视频

作者: 北欧森林 | 来源:发表于2021-01-12 05:09 被阅读0次

    本笔记来源于B站@生信技能树-jimmy;学习视频链接: 「生信技能树」单细胞数据挖掘
    视频的主要内容为复现一篇文献中的部分结果。文献题目为: Glioblastoma cell differentiation trajectory predicts theimmunotherapy response and overall survival of patients 。

    title.JPG
    视频包括的主要内容为: 入门视频大纲.png
    1. 入门基础知识

    1.1 设置镜像及下载/加载所需的package

    getOption("BioC_mirror")
    getOption("CRAN")
    # CRAN基础包
    options(CRAN="https://mirrors.ustc.edu.cn/CRAN/")
    cran_packages <- c('tidyverse',
                       'ggplot2'
                       ) 
    for (pkg in cran_packages){
      if (! require(pkg,character.only=T) ) {
        install.packages(pkg,ask = F,update = F)
        require(pkg,character.only=T) 
      }
    }
    if(!require("BiocManager")) install.packages("BiocManager",update = F,ask = F)
    
    # Bio分析包
    Biocductor_packages <- c("Seurat",
                            "scran",
                            "scater",
                            "monocle",
                            "DropletUtils",
                            "SingleR")
    options(BioC_mirror="https://mirrors.ustc.edu.cn/bioc/")  # 按需设置镜像
    # options(BioC_mirror="https://mirrors.tuna.tsinghua.edu.cn/bioconductor")
    # use BiocManager to install packages
    for (pkg in Biocductor_packages){
      if (! require(pkg,character.only=T) ) {
        BiocManager::install(pkg,ask = F,update = F)
        require(pkg,character.only=T) 
      }
    }
    
    # 检查下载是否成功
    for (pkg in c(Biocductor_packages,cran_packages)){
      require(pkg,character.only=T) 
    }
    

    1.2 GEO基本知识

    # GEO Platform (GPL)
    # GEO Sample (GSM)
    # GEO Series (GSE)
    # GEO Dataset (GDS)
    
    # https://blog.csdn.net/weixin_43569478/article/details/108079337
    # https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=
    
    library(GEOquery)
    # BiocManager::install("GEOquery")
    # library(GEOquery)
    gse1009 <- getGEO('GSE1009', destdir=".")
    class(gse1009)
    length(gse1009)
    a <- gse1009[[1]]  #注意一般是两个中括号
    class(gse1009[1]) # 如果只是一个[] 返回的还是一个list
    a
    b <- exprs(a) #两个非常常用的函数exprs()和pData()
    c <- pData(a)
    a$platform_id
    
    2. 文献背景知识和图解

    Glioblastoma (GBM) is the most common and lethal primary brain tumor. In this study, we aimed to investigate the differentiation states of GBM cells and their clinical relevance. Integrated single-cell RNA-sequencing (scRNA-seq) data and bulk RNA-seq data from GBM samples were used for analysis. Two subsets of GBM cells in distinct differentiation states were characterized, and 498 GBM cell differentiation-related genes (GDRGs) were identified.GDRGs were significantly correlated with immune regulation and metabolic pathways.

    分析思路:
    workflow.JPG
    要复现的图:
    Origin.png

    相关文章

      网友评论

        本文标题:单细胞数据挖掘(0)-安装、加载packages(生信技能树视频

        本文链接:https://www.haomeiwen.com/subject/rxogbktx.html