前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >专栏 >ChAMP 包分析450K甲基化芯片数据(一站式)

ChAMP 包分析450K甲基化芯片数据(一站式)

作者头像
生信技能树
发布于 2018-11-05 10:07:53
发布于 2018-11-05 10:07:53
7.1K00
代码可运行
举报
文章被收录于专栏:生信技能树生信技能树
运行总次数:0
代码可运行

早在我们举办甲基化芯片专题学习的时候,见:

450K甲基化芯片数据处理传送门

就有非常棒的一站式教程投稿,也因此我结识了优秀的六六,以及其教程大力推荐的R包作者,见:

850K甲基化芯片数据的分析

但是当时的教程题目并没有着重宣传该R包,恰好技能树联盟新成员也总结了自己的经验,成员介绍见:

我与生信技能树的故事

那么我们就一起学习其优秀的总结笔记吧!

ChAMP PACKAGE

用来分析illuminate甲基化数据的包 (EPIC and 450k) ▟

不同格式的数据导入

| .idat files

| a beta-valued matrix

Quality Control plots

Type-2 探针的矫正方法

| SWAN1

| Peak Based Correction (PBC)2

| BMIQ3 (the default choice)

Functional Normalization function|the minfi package

查看批次效应的方法|singular value decomposition (SVD) method,for correction of multiple batch effects the ComBat method.

矫正cell-type heterogeneity|RefbaseEWAS

推断CNV变异

Differentially Methylated Regions (DMR)

| Lasso method

| Bumphunter

| DMRcate

find Differentially Methylated Blocks

Gene Set Enrichment Analysis (GSEA)

Infer gene modules in user-specified gene-networks that exhibit differential methylation between phenotypes (整合FEM package)

其他分析甲基化数据的包

| IMA

| minfi

| methylumi

| RnBeads

| wateRmelon

1、安装ChAMP包

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
source("https://bioconductor.org/biocLite.R")
biocLite("ChAMP")

source("http://bioconductor.org/biocLite.R")
biocLite(c("minfi","ChAMPdata","Illumina450ProbeVariants.db","sva","IlluminaHumanMethylation450kmanifest","limma"))

biocLite("YourErrorPackage")

library("ChAMP")


如果报错:
错误: package or namespace load failed for 'ChAMP' in inDL(x, as.logical(local), as.logical(now), ...):
无法载入共享目标对象‘D:/work/R-3.4.3/library/mvtnorm/libs/x64/mvtnorm.dll’::
已达到了DLL数目的上限...

解决方案:
设置环境变量R_MAX_NUM_DLLS, 不管是什么操作系统,R语言对应的环境变量都可以在.Renviron文件中进行设置。

这个文件可以保存在任意目录下,文件中就一句话,内容如下:

R_MAX_NUM_DLLS=500

500表示允许的最多的dll文件数目,设置好之后,重新启动R, 然后输入如下命令:

normalizePath("d:/Documents/.Renviron", mustWork = FALSE)

第一个参数为.Renviron文件的真实路径,然后在加载ChAMP包就可以了。

2、用测试数据跑流程

测试数据包括 450k(.idat) 和 850k(simulated EPIC data) 两个数据集

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
testDir=system.file("extdata",package="ChAMPdata")
myLoad <- champ.load(testDir,arraytype="450K")

data(EPICSimData)

3、ChAMP Pipeline

- 绿色发光线表示主要的分析步骤

- 灰色线条为可选的步骤

- 黑点表示准备好的甲基化数据

- 蓝色表示准备工作:Loading, Normalization, Quality Control checks

- 红色表示产生分析结果:Differentially Methylated Positions (DMPs), Differentially Methylated Regions (DMRs), Differentially methylated Blocks, EpiMod (a method for detecting differentially methylated gene modules derived from FEM package), Pathway Enrichment Results etc.

- 黄色表示交互界面画图

450K步骤

Full Pipeline

  • 一步跑完结果,但是可能报错

champ.process(directory = testDir)

  • 一步一步跑
代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
myLoad <- cham.load(testDir)
# Or you may separate about code as champ.import(testDir) + champ.filter()
CpG.GUI()
champ.QC() # Alternatively: QC.GUI()
myNorm <- champ.norm()
champ.SVD()
# If Batch detected, run champ.runCombat() here.
myDMP <- champ.DMP()
DMP.GUI()
myDMR <- champ.DMR()
DMR.GUI()
myBlock <- champ.Block()
Block.GUI()
myGSEA <- champ.GSEA()
myEpiMod <- champ.EpiMod()
myCNA <- champ.CNA()

# If DataSet is Blood samples, run champ.refbase() here.
myRefbase <- champ.refbase()

EPIC pipeline

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
data(EPICSimData)
CpG.GUI(arraytype="EPIC")
champ.QC() 
myNorm <- champ.norm(arraytype="EPIC")
champ.SVD()

myDMP <- champ.DMP(arraytype="EPIC")
DMP.GUI()
myDMR <- champ.DMR()
DMR.GUI()
myDMR <- champ.DMR(arraytype="EPIC")
DMR.GUI(arraytype="EPIC")
myBlock <- champ.Block(arraytype="EPIC")
Block.GUI(arraytype="EPIC") 
myGSEA <- champ.GSEA(arraytype="EPIC")
myEpiMod <- champ.EpiMod(arraytype="EPIC")

最多在8G内存电脑上可以跑200个样本,如果在服务器上多核跑,需要命令

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
library("doParallel")
detectCores()

ChAMP pipeline

1. Loading Data

.idat files 为原始芯片文件,包括pd file (Sample_Sheet.csv)文件(表型,编号等)

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
myLoad$pd

2. Filtering Data

  • ChAMP提供了 champ.filter() 函数,可以输入 (beta, M, Meth, UnMeth, intensity)格式的文件并进行过滤质控。 新版本的ChAMP包中champ.load()函数已经包含了此功能。
  • champ.filter() 函数有个参数autoimpute,可以填补或保留由过滤导致的NA空缺值。
  • 如果输入多个数据框进行过滤,他们的行名和列名必须一致,否则champ.filter()认为是不同来源的数据,将停止过滤。
  • 低质量的样本(有较多的探针没有信号)将会被过滤掉,Sample_Name 要与pd file中的列名称一致。
  • imputation需要detection P matrix, beta or M matrix信息,且ProbeCutoff 不能等于0,这个参数控制探针的NA ratio,来决定是否填补。
  • 如果想用beadcount信息进行过滤,champ.import() 函数会返回beads信息。 使用方法为:
代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
myImport <- champ.import(testDir)
myLoad <- champ.filter()



Section 1: Read PD Files Start: Reading CSV File
Section 2: Read IDAT files Start:Extract Mean value for Green and Red Channel Success
    Your Red Green Channel contains 622399 probes.
Section 3: Use Annotation Start:Reading 450K Annotation,there are 613 control probes in Annotation,Generating Meth and UnMeth Matrix,485512 Meth probes
  Generating beta Matrix
  Generating M Matrix
  Generating intensity Matrix
  Calculating Detect P value
  Counting Beads

You may want to process champ.filter() next,This function is provided for user need to do filtering on some beta (or M) matrix, which contained most filtering system in champ.load except beadcount.


Section 1:  Check Input Start:You have inputed beta,intensity for Analysis.
Checking Finished :filterDetP,filterBeads,filterMultiHit,filterSNPs,filterNoCG,filterXY would be done on beta,intensity.
  You also provided :detP,beadcount .

Section 2: Filtering Start
The fraction of failed positions per sample
   Failed CpG Fraction.
C1         0.0013429122
C2         0.0022162171
C3         0.0003563249
C4         0.0002842360
T1         0.0003831007
T2         0.0011946152
T3         0.0014953286
T4         0.0015447610
Filtering probes with a detection p-value above 0.01.
    Removing 2728 probes.

Filtering BeadCount Start
    Filtering probes with a beadcount <3 in at least 5% of samples.
    Removing 9291 probes

  Filtering NoCG Start
    Only Keep CpGs, removing 2959 probes from the analysis.

  Filtering SNPs Start
    Using general 450K SNP list for filtering.
    Filtering probes with SNPs as identified in Zhou's Nucleic Acids Research Paper 2016.
    Removing 49231 probes from the analysis.

  Filtering MultiHit Start
    Filtering probes that align to multiple locations as identified in Nordlund et al
    Removing 7003 probes from the analysis.

  Filtering XY Start
    Filtering probes located on X,Y chromosome, removing 9917 probes from the analysis.

  Updating PD file

  Fixing Outliers Start
    Replacing all value smaller/equal to 0 with smallest positive value.
    Replacing all value greater/equal to 1 with largest value below 1..

过滤步骤为:

  • detection p-value (< 0.01)。这个值储存在.idat文件中,champ.import()函数读入这个值并形成数据框。p< 0.01的探针认为实验失败。过滤过程为:样本探针失败率阈值=0.1,再在剩下的样本中过滤探针。参数SampleCutoff 和 ProbeCutoff控制这两个阈值。
  • ChAMP will filter out probes with <3 beads ( filterBeads 参数控制) in at least 5% (beadCutoff 参数控制)of samples per probe.
  • 默认过滤non-CpG probes
  • by default ChAMP will filter all SNP-related probe。需要用population参数选择群体。如果不选,用General Recommended Probes provided by Zhou to do filtering。
  • ChAMP will filter all multi-hit probes.
  • 默认过滤掉chromosome X and Y上的探针。filterXY 参数控制。 如果没有原始的.IDAT 数据,用champ.filter() 函数进行过滤。
注意:

champ.load() can not perform filtering on beta matrix alone. For users have no .IDAT data but beta matrix and Sample_Sheet.csv, you may want perform filtering using the champ.filter() function and then use following functions to do analysis.

CpG.GUI() 函数查看甲基化位点的分布情况。CpGs on chromosome, CpG island, TSS reagions.

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
CpG.GUI(CpG=rownames(myLoad$beta),arraytype="450K")

3. Further quality control and exploratory analysis

用champ.QC() function and QC.GUI() function检查数据质量

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
champ.QC()

champ.QC()函数会生成三个图:

mdsPlot (Multidimensional Scaling Plot): 基于前1000个最易变化的位点查看样本的相似度,用颜色标记不同的样本分组。

densityPlot: 查看每个样本的beta值分布,有严重偏离的样本预示着质量较差(如亚硫酸盐处理不完全等)

dendrogram:所有样本的聚类图。champ.QC()函数中Feature.sel="None" 参数表示直接通过探针数值来计算样本的距离,比较耗内存;还有 “SVD” method。

QC.GUI() 函数也可以画图,但是比较耗内存。 包括5张图:mdsPlot, type-I&II densityPlot, sample beta distribution plot, dendrogram plot and top 1000 most variable CpG’s heatmap.

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
QC.GUI(beta=myLoad$beta,arraytype="450K")
  • type-I&II densityPlot图可以帮助查看两个探针的标准化状态。
  • Top variable CpGs’ heatmap将前1000个差异最大的位点和状态表示出来。

4. Normalization

type-I 和 type-II 两种探针化学反应不同,设计也不同,导致分布区域也不同。这两种探针检测出的差异可能是因为探针所在位置不平衡导致的生物学差异引起的(如CpG位置的差异引起的)。最主要是type-II 探针exhibit a reduced dynamic range. 因此,针对 type-II probe bias的矫正是必要的。 champ.norm() 函数可以实现这个功能。针对type-II 探针有4种标准化的方法:BMIQ, SWAN, PBC 和 unctionalNormliazation。 850k 芯片用BMIQ标准化要好一点。但是BMIQ对质量差的样本或者甲基化偏差比较大的control样本效果不好。“cores”参数控制电脑核数,PDFplot=TRUE将图保存在resultsDir里。

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
myNorm <- champ.norm(beta=myLoad$beta,arraytype="450K",cores=5)

QC.GUI(myNorm,arraytype="450K")

5. SVD Plot

The singular value decomposition method (SVD) 用来用于评估数据集中变量的主要成分。这些显著性位点可能与我们感兴趣的生物学现象相关联,也可能与技术相关,如批次效应或群体效应。样本的病历信息越详细越好(如:dates of hybridization, season in which samples were collected, epidemiological information, etc),可以将这些因素包含进SVD中。 如果从 .idat导入原始文件,设置champ.SVD()函数的RGEffect=TRUE ,芯片上18个内置的对照探针(包括亚硫酸盐处理效率)将纳入确信的因素进行分析。 champ.SVD()函数将把pd文件中的所有协变量和表型数据纳入进行分析。可以用cbind()函数将自己的协变量与myLoad$pd合并进行分析。但是对于分类变量和数字变量处理方法是不一样的。 分类变量要转换成“factor” or “character”类型,数字变量转换成数字类型。 champ.SVD()分析时会把协变量打印在屏幕上,结果是热图,保存为SVDsummary.pdf文件。黑色表示最显著的p值。如果发现技术因素有影响,就需要用ComBat等方法重新标准化数据,包括variation related to the beadchip, position and/or plate。

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
champ.SVD(beta=myNorm,pd=myLoad$pd)

上图是用自带的测试数据绘制的,不是很复杂,看不出来。下图用GSE40279的656个样本绘制的。其中年龄是数字变量,其他都为分类变量。

6. Batch Effect Correction

ComBat方法是sva 包里的一个方法,已经整合到ChAMP包里了,batchname=c("Slide")参数控制矫正因素。champ.runCombat() 函数自动把Sample_Group作为协变量矫正,现在又加入了另一个参数variablename用来加入自己的协变量进行矫正。如果用户在 champ.runCombat()函数中写的 batchname正确,函数将自动进行批次效应矫正。 ComBat如果直接用beta值进行矫正,输出可能不在0-1之间,所以计算机在计算前需要做一个变换。如果用M-values矫正,参数 logitTrans=FALSE设置。有时候批次效应和变异会混杂在一起,如果矫正了批次效应,变异也会消失,

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
myCombat <- champ.runCombat(beta=myNorm,pd=myLoad$pd,batchname=c("Slide"))

champ.SVD() 

7.1 Differential Methylation Probes(DMP & DMR & DMB)

目的是找出几百万CpG中的哪些在疾病中发生了变化,而这些变化又是如何导致了基因发生了变化,最终导致了人体生病。

DMP代表找出Differential Methylation Probe(差异化CpG位点),DMR代表找出Differential Methylation Region(差异化CpG区域),Block代表Differential Methylation Block(更大范围的差异化region区域)。

champ.DMP() 实现了 limma包中利用linear model计算差异甲基化位点的p-value。最新的champ.DMP()包支持分析数值型变量如年龄,分类型变量如包含多个表型的:“tumor”, “metastasis”, “control”。数值型变量(如年龄)会用linear regression模型作为协变量进行分析,to find your covariate-related CpGs, say age-related CpGs.分类型变量会按类型分类进行比较,如比较“tumor–metastatic”, “tumor-control”, and “metastatis-control”之间的差异,结果会输出一个数据框,包含差异的探针:P-value, t-statistic and difference in mean methylation(被转换为logFC,类似于RNA-seq中的log fold-change)。还包括每个探针的注释,相同组的平均beta值,两组之间的delta beta值(与 logFC相同的意思,老版本的包需要)。高级用户可以用limma 包进一步用输出的探针及p值进行DMR分析。

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
myDMP <- champ.DMP(beta = myNorm,pheno=myLoad$pd$Sample_Group)

head(myDMP[[1]])

champ.DMP()返回的是list,新版本的ChAMP包含GUI交互界面检查myDMP的结果。用户提供未经修改的champ.DMP (myDMP)函数产生的orginal beta matrix结果和covariates,DMP.GUI() 函数自动检测covariates是数值型还是分类型。分类型如case/control, DMP.GUI()自动画出显著性差异位点。

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
DMP.GUI(DMP=myDMP[[1]],beta=myNorm,pheno=myLoad$pd$Sample_Group)

7.2 Hydroxymethylation Analysis 羟甲基化

一些用户想做羟甲基化,下面为示例代码

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
myDMP <- champ.DMP(beta=myNorm, pheno=myLoad$pd$Sample_Group, compare.group=c("oxBS", "BS"))


hmc <- myDMP[[1]][myDMP[[1]]$deltaBeta>0,]

8. Differential Methylation Regions 差异甲基化区域

DMRs主要指一连串的CpG都会出现很明显的差异,champ.DMR()函数计算并返回一个数据框,包括:detected DMRs, with their length, clusters, number of CpGs annotated. 函数包含三种算法Bumphunter, ProbeLasso and DMRcate. Bumphunter比较可靠,精确度可以有90%以上,ProbeLasso有75%左右,DMRcate是后来集成进去的,没有评测过。Bumphunter 算法首先将所有的探针分成几小类,然后用随机permutation方法评估候选的DMRs.

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
myDMR <- champ.DMR(beta=myNorm,pheno=myLoad$pd$Sample_Group,method="Bumphunter")
head(myDMR$DMRcateDMR)
DMR.GUI(DMR=myDMR)

9. Differential Methylation Blocks

在Block-finder 功能中,champ.Block()函数首先在全基因组范围上计算small clusters (regions) ,然后对于每个cluster,计算平均值和位置,将每个区域压缩为一个单元。 When we finding DMB, only single unit from open sea would be used to do clustering. Here Bumphunter algorithm will be used to find “DMRs” over these regions (single units after collapse). In our previous paper23, and other scientists’ work24 we demonstrated that Differential Methylated Blocks may show universal feature across various cancers

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
myBlock <- champ.Block(beta=myNorm,pheno=myLoad$pd$Sample_Group,arraytype="450K")
head(myBlock$Block)
Block.GUI(Block=myBlock,beta=myNorm,pheno=myLoad$pd$Sample_Group,runDMP=TRUE,compare.group=NULL,arraytype="450K")

10. Gene Set Enrichment Analysis

寻找作用通路网络中的疾病关联小网络 After previous steps, you may already get some significant DMPs or DMRs, thus you may want to know if genes involved in these significant DMPs or DMRs are enriched for specific biological terms or pathways. To achieve this analysis, you can use champ.GSEA() to do GSEA analysis.champ.GSEA() would automatically extract gene information, transfer CpG information into gene information then conduct GSEA on each list.

There are two ways to do GSEA. In previous version, ChAMP used pathway information downloaded fromMSigDB. ThenFisher Exact Test will be used to calculate the enrichment status of each pathway. After gene enrichment analysis, champ.GSEA() function would automatically return pathways with P-value smaller then adjPval cutoff.

However, as pointed out by Geeleher [citation], since different genes has different numbers of CpGs contained inside, the two situation that one genes with 50 CpGs inside but only one of them show significant methylation, and one gene with 2 CpGs inside but two are significant methylated should not be eaqualy treated. The solution is use number of CpGs contained by genes to correct significant genes. as implemented in the gometh function from missMethyl package25. In gometh function, it used number of CpGs contained by each gene replace length as biased data, to correct this issue. The idea of gometh is fitting a curve for numbers of CpGs across genes related with GSEA, then using the probability weighting function to correct GO’s p value.

champ.GSEA() function as “goseq” to use goseq method to do GSEA, or user may set it as “fisher” to do normal Gene Set Enrichment Analysis.

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
myGSEA <- champ.GSEA(beta=myNorm,DMP=myDMP[[1]], DMR=myDMR, arraytype="450K",adjPval=0.05, method="fisher")
# myDMP and myDMR could (not must) be used directly.

11. Differential Methylated Interaction Hotspots

champ.EpiMod() This function usesFEM package to infer differentially methylated gene modules within a user-specific functional gene-network. This network could be e.g. a protein-protein interaction network. Thus, the champ.EpiMod() function can be viewed as a functional supervised algorithm, which uses a network of relations between genes (usually a PPI network), to identify subnetworks where a significant number of genes are associated with a phenotype of interest (POI). The EpiMod algorithm can be run in two different modes: at the probe level, in which case the most differentially methylated probe is assigned to each gene, or at the gene-level in which case a DNAm value is assigned to each gene using an optimized procedure described in detail in Jiao Y, Widschwendter M, Teschendorff AE Bioinformatics 2014. Originally, the FEM package was developed to infer differentially methylated gene modules which are also deregulated at the gene expression level, however here we only provide the EpiMod version, which only infers differentially methylated modules. More advanced user may refer to FEM package for more information.

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
myEpiMod <- champ.EpiMod(beta=myNorm,pheno=myLoad$pd$Sample_Group)

12. Cell Type Heterogeneity

由于DNA甲基化有高的细胞特异性,许多DMPs/DMRs的变化是由细胞成分导致的。许多方法可以矫正这个问题:RefbaseEWAS用组织的细胞类型做参考数据库,确定细胞比例。In ChAMP, we include a reference databases for whole blood, one for 27K and the other for 450K. After champ.refbase() function, cell type heterogeneity corrected beta matrix, and cell-type specific proportions in each sample will be returned. Do remember champ.refbase() can only works on Blood Sample Data Set.

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
myRefBase <- champ.refbase(beta=myNorm,arraytype="450K")
# Our test data set is not whole blood. So it should not be run here.

参考:https://bioconductor.org/packages/release/bioc/vignettes/ChAMP/inst/doc/ChAMP.html http://blog.csdn.net/joshua_hit/article/details/54982018 https://www.jianshu.com/p/6411e8acfab3

本文参与 腾讯云自媒体同步曝光计划,分享自微信公众号。
原始发表:2018-10-17,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 生信技能树 微信公众号,前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
暂无评论
推荐阅读
第 001 期 聚集零散业务代码的解决方案 - Vue 3 Composition API
用 Vue 时,常出现相关业务逻辑代码散在 data, methods, watch, computed 和 mounted 等地方。这样的代码可维护性差。查找或更改这块逻辑时,都要找多个地方。
前端GoGoGo
2021/03/29
3900
通过10个实例小练习,快速入门熟练 Vue3 核心新特性
Vue3.0 发 beta 版都有一段时间了,正式版也不远了,所以真的要学习一下 Vue3.0 的语法了。
夜尽天明
2020/05/13
1.3K0
升级 Vue3 大幅提升开发运行效率
作者:louiszhai,腾讯 IEG 前端开发工程师 Vue3 性能提升了 1.3~2 倍,SSR 性能提升了 2~3 倍,升级 Vue3 正是当下。 背景 原计划 2019 年发布的 Vue3,又经过一年的再次打磨,终于于去年 9 月正式发布。随后,不少 UI 组件库都积极参与适配,去年 12 月,Element-plus(Element-ui 官方升级版)也发布了 beta 版。 由于项目中用到了 Element-ui 组件,组件库未适配的情况下,不敢贸然升级 Vue3。Element-plus
腾讯技术工程官方号
2021/04/27
2K0
再遇vue之vue3新特性
首先说明一下,vue2和vue3是Vue.js的两个主要版本。目前vue3已经更新到3.3.4的版本了
用户6297767
2023/11/21
5490
再遇vue之vue3新特性
让你30分钟快速掌握vue 3
经过了漫长的迭代,Vue 3.0终于在上2020-09-18发布了,带了翻天覆地的变化,使用了Typescript 进行了大规模的重构,带来了Composition API RFC版本,类似React Hook 一样的写Vue,可以自定义自己的hook ,让使用者更加的灵活,接下来总结一下vue 3.0 带来的部分新特性。
前端开发博客
2020/11/04
2.4K0
初探 Vue 3.0 的组装式 API(一)
Vue3 已经更新到 RC9,正式发布在即,其中让人倍加关注的重大更新:组装式 API (Composition API) 到底是什么,相比 Vue2 又有什么优势呢?
贤羽
2022/06/09
4080
推荐:非常详细的vite开发笔记(7k字)
当将当前的技术栈从Vue 2.0升级到Vue 3.0时,有许多值得考虑的理由。以下是10个升级到Vue 3.0的理由:
微芒不朽
2023/07/04
6890
推荐:非常详细的vite开发笔记(7k字)
最全系列的vue3入门教程『图文并茂』
Vue 3 是一个流行的开源JavaScript框架,用于构建用户界面和单页面应用。它带来了许多新特性和改进,包括更好的性能、更小的打包大小、更好的TypeScript支持、全新的组合式 API,以及一些新的内置组件。
linwu
2023/07/27
5.1K0
最全系列的vue3入门教程『图文并茂』
Vue开发仿京东商场app
vue3-jd-h5是一个电商H5页面前端项目,基于Vue 3.0.0 + Vant 3.0.0 实现,主要包括首页、分类页面、我的页面、购物车等,部分效果如下图。
xiangzhihong
2021/01/15
9790
@vue/composition-api速成课(通俗易懂版)
Composition API 将是 Vue 3 的核心功能,它具有许多更改和性能改进。我们也可以在 Vue 2 中通过 npm 插件@vue/composition-api 使用它。本人重点将带你了解:
前端迷
2020/09/30
2.9K0
Vue3.0 新特性以及使用变更总结(实际工作用到的)
Vue3.0 在去年9月正式发布了,也有许多小伙伴都热情的拥抱Vue3.0。去年年底我们新项目使用Vue3.0来开发,这篇文章就是在使用后的一个总结, 包含Vue3新特性的使用以及一些用法上的变更。
@超人
2021/03/23
2.6K0
Vue3.0 新特性以及使用变更总结(实际工作用到的)
vue3.0 Composition API 翻译版(超长)
Composition API 一组基于功能的附加API,允许灵活地组成组件逻辑。
公众号---人生代码
2020/05/18
9K0
vue3.0 Composition API 翻译版(超长)
Vue3.0 不畏惧祖传代码的 Composition API
昨晚写这篇文章的时候,隔壁在聚餐,几位女生欢聚一堂,整个楼层充满了欢声笑语的味道,就好像早上刷牙刷一半就跑去吃了个鸡蛋。
用户1890129
2020/12/16
5560
Vue3.x相对于Vue2.x的变化
ps: 上图中,一种颜色代表一个功能,我们可以看到Options API的功能代码比较分散;Composition API则可以将同一个功能的逻辑,组织在一个函数内部,利于维护。
conanma
2021/11/03
8930
vue3.0新特性
在 vue3 的 script 中不再使用 data 和 methods ,而是使用 setup() 方法
青梅煮码
2023/02/18
3560
vue3简易入门剖析
,发音同 “veet”)是一种新型前端构建工具,能够显著提升前端开发体验。它主要由两部分组成:
张哥编程
2024/12/13
4200
学会这几个API,vue3直接上手
vue2开发过项目的,想直接上手vue3很快,几个API熟悉了就够了,其它的特性在使用vue3的过程慢慢去了解。任何在熟悉了使用之后再去研究一些API的原理,慢慢就能把vue3掌握。
wade
2022/03/28
7080
【初学者笔记】整理的一些Vue3知识点
拒绝标题党,哈哈哈,看完你就基本可以上手搞开发了,本文适合Vue初学者,或者Vue2迁移者,当然还是建议Vue3官网完全过一遍。不适合精通原理,源码的大佬们。
一尾流莺
2022/12/10
2.4K0
【初学者笔记】整理的一些Vue3知识点
【Vuejs】738- 一篇文章上手Vue3中新增的API
作者: liulongbin http://www.liulongbin.top:8085/#/?id=_3-setup 1. 初始化项目 // ① npm i -g @vue/cli // ② vu
pingan8787
2020/10/23
8060
【Vuejs】738- 一篇文章上手Vue3中新增的API
超全的Vue3文档【Vue2迁移Vue3】
链接:https://juejin.cn/post/6858558735695937544#heading-153
小丑同学
2021/03/25
2.8K0
相关推荐
第 001 期 聚集零散业务代码的解决方案 - Vue 3 Composition API
更多 >
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档