随笔分类 -  统计R

z-score Normalization
摘要:Z-score 表示一个值是高于或低于平均值多少个标准差( a score that indicates how many standard deviations a value is above or below the mean). 比如用于RNA-seq 的normalisation. 对每个 阅读全文

posted @ 2022-06-15 14:30 BioinformaticsMaster 阅读(1752) 评论(0) 推荐(1) 编辑

计算 GWAS的 lambda GC
摘要:You have conducted your genome-wide association study (GWAS) and have tested each genetic variant for an association with your trait of interest. Now 阅读全文

posted @ 2022-06-13 14:52 BioinformaticsMaster 阅读(848) 评论(0) 推荐(0) 编辑

KING
摘要:KING 根据个体的基因组数据,判断亲子关系,推断个体间的亲缘关系 family relationship and flag pedigree errors。 PI作者是个华人 https://www.kingrelatedness.com/ 不同亲缘关系推断一句 依次解释如下: MT 同卵双胞胎 阅读全文

posted @ 2022-05-24 15:52 BioinformaticsMaster 阅读(499) 评论(0) 推荐(0) 编辑

ggplot2 的scale手动设置
摘要:scale_colour_manual(...,values) scale_fill_manual(...,values) scale_size_manual(...,values) scale_shape_manual(...,values) scale_linetype_manual(...,v 阅读全文

posted @ 2022-05-23 13:19 BioinformaticsMaster 阅读(330) 评论(0) 推荐(0) 编辑

expression函数在R图上增公式,数学符号
摘要:> x<-1:10 > y<-x^2 > plot(x,y) > plot(x,y,ylab=expression(x^y)) > plot(1:10,ylab=expression(a[b])) x<-1:10 > y<-sqrt(x) > plot(x,y,ylab=expression(y== 阅读全文

posted @ 2022-05-15 00:10 BioinformaticsMaster 阅读(92) 评论(0) 推荐(0) 编辑

na.rm 缺失值处理
摘要:is.na 检测缺失值,返回结果为true,false na.rm=TRUE 很多函数有这个参数,即在计算之前移除缺失值,并使用剩余值计算。 https://www.cnblogs.com/GhostBear/p/8416897.html 阅读全文

posted @ 2022-05-14 23:45 BioinformaticsMaster 阅读(174) 评论(0) 推荐(0) 编辑

geom_ribbon 给数据分组 的覆盖面积上色
摘要:huron<-data.frame(year=1875:1972,level=as.vector(LakeHuron),level2=as.vector(LakeHuron)) huron[1:50,2]<-huron[1:50,2]+100 #给第二列,1:50行每个值加100 huron[50: 阅读全文

posted @ 2022-05-14 22:26 BioinformaticsMaster 阅读(437) 评论(0) 推荐(0) 编辑

order_by 函数 R
摘要:order_by(order_by,call) 函数 更灵活的排序 This function makes it possible to control the ordering of window functions in R that don't have a specific ordering 阅读全文

posted @ 2022-05-09 17:42 BioinformaticsMaster 阅读(208) 评论(0) 推荐(0) 编辑

R 条件判断和循环
摘要:基本语句 判断: if(Condition1){ State1 }else if(Condition2){ State2} else { State_last } 循环 for ( i in xx){ yy} while (xx){yy} 嵌套 for ( i in xx) { if (i yy){ 阅读全文

posted @ 2022-05-01 20:22 BioinformaticsMaster 阅读(102) 评论(0) 推荐(0) 编辑

Rscript 给脚本内传递参数
摘要:最直接的方式是args<-commandArgs(trailingOnly = TRUE) ,对应args[1],args[2] 如:cat test.R #脚本内容如下 args<-commandArgs(trailingOnly = TRUE)print(args)print (args[1]) 阅读全文

posted @ 2022-05-01 19:42 BioinformaticsMaster 阅读(249) 评论(0) 推荐(0) 编辑

R 自定义函数
摘要:函数调用 R 所有函数的调用格式为 function(argument1=value1, argument2=value2,...) 如t.test(x=sample,mu=4.5) 对于二元计算 a %x% b 等价于 "x"(a,b) 如 > "+"(2,3) [1] 5 从function( 阅读全文

posted @ 2022-05-01 17:29 BioinformaticsMaster 阅读(389) 评论(0) 推荐(0) 编辑

肾病质控下机数据的脚本
摘要:library("tidyverse") library(ggplot2) library(ggpubr) data <- read_tsv("./rawDataStat20220215141517.txt") #fq qc dataPlot<-data %>% select("TotalBases 阅读全文

posted @ 2022-04-14 11:03 BioinformaticsMaster 阅读(26) 评论(0) 推荐(0) 编辑

rawdata0413<-read.csv("./rawDataStat20220413151324.txt",sep = "\t") 不等于read.tsv
摘要:文件内有%,rawdata0413<-read.csv("./rawDataStat20220413151324.txt",sep = "\t")识别错误 rawdata0413<-read.csv("./rawDataStat20220413151324.txt",sep = "\t") 里边的% 阅读全文

posted @ 2022-04-13 17:42 BioinformaticsMaster 阅读(24) 评论(0) 推荐(0) 编辑

Standard Deviation (SD), Standard Error (SE),Confidence Interval (CI). 画barplot,置信区间
摘要:Standard Deviation(SD) 标准(偏)差,代表变量的分散程度,离散量。统计为方差的平方根(Calculated as the root square of the variance) sd<-sd(vec) 等同于 sd<-sqrt(var(vec)) Standard Error 阅读全文

posted @ 2022-03-25 16:09 BioinformaticsMaster 阅读(453) 评论(0) 推荐(0) 编辑

ROC R脚本
摘要:AUC ROC ROC: receivers operating characteristic curve,是一种坐标图式的分析工具,是一个二元分类模型(0/1),输出结果只有两种类别的模型。如阳性/阴性,有病/没病,垃圾邮件/非垃圾邮件。 预测错误:针对正样本而言,即预测是正样本,但预测错了FP 阅读全文

posted @ 2022-03-12 19:32 BioinformaticsMaster 阅读(273) 评论(0) 推荐(0) 编辑

导航

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5
点击右上角即可分享
微信分享提示