宏基因组探究


宏基因组

1.数据库下载

## nt和nr库
https://ftp.ncbi.nlm.nih.gov/blast/db/
https://ftp.ncbi.nlm.nih.gov/refseq/release/
https://nmdc.cn/datadownload

2.宏基因组分析

########################################################
##三代纳米孔宏基因组分析               #
#  1 纳米孔测序数据处理    #
cp -r /TestDatas/nanopore8/data/fast5_files...

Read more

微生物之16S分析流程


16S扩增子分析

背景

16S 选择测序区域 V3+V4
ITS测序主要是针对真菌多样性的研究,注释准确度高;
18S测序针对的是真核微生物,注释到的范围广,但是就真菌来说精确度相对较低

流程

1.原始数据到OTU表格
# 双端测序数据合并
# Barcode  引物去除
# 去除嵌合体序列 
# 聚类生成OUT
# 物种注释
# OTU 过滤
# 数据标准化
OTU是人为给某一个分类单元(品系,种,属,分组等)设置的同一标志。
要了解一个样品测序结果中的菌种、菌属等数目信息,
就需要对序列进行聚类操作(cluster)。通过聚类操作,将
序列按照彼此的相似性分归为许多小组,一个小组...

Read more

单细胞之Reference Mapping


Reference Mapping

### 背景
单细胞数据分析的核心步骤到底是在分析基因表达矩阵协方差的来源
对细胞的cell embedding,图谱提供好的model,可看自己数据在其中的关系

1.数据清洗

library(Seurat)
library(GEOquery)
setwd(here::here())

# cached.object <- "input/SadeFeldman.seurat.rds"
cached.object <- "input/SadeFeldman.seurat.qs"

options(t...

Read more

单细胞之GRN


GRN 基因调控网络

## 背景
http://www.seqyuan.com/GRN.html
https://lishensuo.github.io/posts/bioinfo/010%E5%8D%95%E7%BB%86%E8%83%9E%E5%88%86%E6%9E%90%E5%B7%A5%E5%85%B7--%E8%BD%AC%E5%BD%95%E5%9B%A0%E5%AD%90pyscenic/
## 数据securt多样本数据
外源刺激 -> TF(GRN) -> 转录组的变化 -> 通路/生物学过程的变化

1.pySCENIC数据准备

## 准备pyS...

Read more

单细胞多样本分析Seurat


Seurat多样本

## 背景
多样本分析流程
https://satijalab.org/seurat/archive/v3.0/immune_alignment.html
https://github.com/satijalab/seurat-wrappers

1.读取多个样本数据并合并

library(Seurat)
### 样本1
scdata1 <- data.table::fread('data/immune_control_expression_matrix.txt.gz', data.table = F)
rownames(scdata1) &l...

Read more

GSEA分析


GSEA基因集富集分析

## 背景:
基因集富集分析

1.fgsea

### https://bioconductor.org/packages/release/bioc/vignettes/fgsea/inst/doc/fgsea-tutorial.html
rm(list = ls())

library(fgsea)
library(data.table)
library(ggplot2)
data(examplePathways)
data(exampleRanks)
set.seed(42)
fgseaRes <- fgsea(pathways = examplePa...

Read more

单细胞富集分析


单细胞富集分析

接上述的 单细胞seurat中间提到的单细胞富集分析

下面的代码还未测试 ,后续测试
library(Seurat)
library(tidyverse)
## 1 常规富集分析----
# 常规富集基于 top DEG
library(clusterProfiler)
library(enrichplot)

### 1.1、获得DEG----
# 同前,只需要要把默认 idents 从 seurat_clusters 改成 cell_type
Idents(sc_pbmc_int3)
Idents(sc_pbmc_int3) = "cell_type&q...

Read more