02 2022 档案

ggplot2 注释文本到图所展示的数据上
摘要:best_in_class <-mpg %>% group_by(class) %>%filter(row_number(desc(hwy))==1) #取每组hwy 最大的那行观测赋值给best_in_class ggplot(mpg,aes(displ,hwy))+geom_point(aes( 阅读全文

posted @ 2022-02-26 22:09 BioinformaticsMaster 阅读(312) 评论(0) 推荐(0) 编辑

R glimpse比较全的查看列,但看不到rownames
摘要:R glimpse比较全的查看列,但看不到rownames。 rownames 可以通过View() 或head() 如glimpse(mtcars) View(mtcars) rownames(mtcars) head(mtcars) 阅读全文

posted @ 2022-02-26 16:13 BioinformaticsMaster 阅读(79) 评论(0) 推荐(0) 编辑

lm() 拟合线性模型linear module
摘要:lm() 拟合线性模型linear module ,用来进行回归、single stratum方差分析,协方差分析 lm(formula,data,subset,weights,na.action,【other args】) lm(y ~ x,data) 这样是最常见设置的参数 如lm(formul 阅读全文

posted @ 2022-02-25 13:00 BioinformaticsMaster 阅读(964) 评论(0) 推荐(0) 编辑

YuLabSMU 截断部分坐标轴 留些空白
摘要:library(ggplot2) library(ggbreak) set.seed(2019-01-19) rnorm(5) rnorm(5)+4 d<-data.frame(x=1:20,y=c(rnorm(5)+4,rnorm(5)+20,rnorm(5)+5,rnorm(5)+22)) p1 阅读全文

posted @ 2022-02-23 21:33 BioinformaticsMaster 阅读(349) 评论(0) 推荐(0) 编辑

GPL 与BSDlicense
摘要:GPL license 核心含义:允许任何人观看、修改,并散播程序软件中的原始程序码,条件是你要发布修改后的版本就要公布源代码。 与GPL常相对的BSD license :你可以对软件任意处理,只要注明来自于哪个项目即可。即使你对软件做了修改,你也可以限制其他使用者得到你修改后软件的自由。不保证软件 阅读全文

posted @ 2022-02-23 19:19 BioinformaticsMaster 阅读(56) 评论(0) 推荐(0) 编辑

geom_boxplot 箱线图
摘要:ggplot(data=data1,mapping = aes(x=VARIANT_TYPE,y=NON_REF_GENOTYPE_CONCORDANCE))+geom_boxplot()+scale_y_continuous(expand=c(0,0),breaks = c(0,75,0.80,0 阅读全文

posted @ 2022-02-19 11:14 BioinformaticsMaster 阅读(375) 评论(0) 推荐(0) 编辑

按分组,每个组画图 
摘要:data %>%group_by(VARIANT_TYPE) %>%do({ p<-ggplot(.,aes(x=TRUTH_SAMPLE,y=NON_REF_GENOTYPE_CONCORDANCE))+geom_point() ggsave(p,filename = paste0(unique( 阅读全文

posted @ 2022-02-18 16:05 BioinformaticsMaster 阅读(33) 评论(0) 推荐(0) 编辑

R 遍历目录下所有子目录中的某类文件
摘要:testvcfdir="/jdfssz1/ST_HEALTH/P18Z10200N0124/qdNB/" testvcfList <- list.files(testvcfdir, pattern = "*.genotype.vcf.gz$", include.dirs = FALSE, full. 阅读全文

posted @ 2022-02-18 14:00 BioinformaticsMaster 阅读(115) 评论(0) 推荐(0) 编辑

faidx提取fasta指定位置allele
摘要:提取指定区域的fasta 提取序列: samtools faidx input.fa chr1 > chr1.fa samtools faidx input.fa chr1:100-200 > chr1.fa 例子, samtools faidx /hwfssz1/BIGDATA_COMPUTING 阅读全文

posted @ 2022-02-17 16:36 BioinformaticsMaster 阅读(202) 评论(0) 推荐(0) 编辑

GATK GenotypeConcordance 比较vcf一致性:Sequence dictionaries are not the same size
摘要:处理多份vcf时,报GATK GenotypeConcordance:Sequence dictionaries are not the same size 解决方案:统一header中的##contig=<ID= 部分 注: 1)脚本如下 gatk --java-options -Xmx3G Ge 阅读全文

posted @ 2022-02-17 15:48 BioinformaticsMaster 阅读(291) 评论(0) 推荐(0) 编辑

R 定义函数 ,里面嵌套条件
摘要:myfunction<-function(arg1,arg2,...){ statements return (object) } 例1 function1<-function(x,y){plot(x,y) + return(x+y)}x<-rnorm(10)xy<-rnorm(10,2,3) fu 阅读全文

posted @ 2022-02-17 15:35 BioinformaticsMaster 阅读(88) 评论(0) 推荐(0) 编辑

geom_point 散点分布图 配色
摘要:1. GATK GenotypeConcordance p<-ggplot(data=data1,mapping=aes(x = TRUTH_SAMPLE,y=NON_REF_GENOTYPE_CONCORDANCE,colour=VARIANT_TYPE,shape=VARIANT_TYPE )) 阅读全文

posted @ 2022-02-16 20:50 BioinformaticsMaster 阅读(909) 评论(0) 推荐(0) 编辑

读,掌握别人项目代码 是非常好的学习路径
摘要:读,掌握别人项目代码 是非常好的学习路径 尤其是和自己相关的项目代码。 阅读全文

posted @ 2022-02-14 20:50 BioinformaticsMaster 阅读(22) 评论(0) 推荐(0) 编辑

list.files() list.dirs()
摘要:list.files("./",pattern = "*.R$",include.dirs = TRUE,full.names = TRUE,recursive = TRUE) pattern 正则表达式,仅list匹配上的 recursive=TRUE 遍历子目录 full.names=TRUE 阅读全文

posted @ 2022-02-11 13:03 BioinformaticsMaster 阅读(356) 评论(0) 推荐(0) 编辑

Rstudio 使用
摘要:Rstudio script 运行单行/多行代码 选择多行代码,按下 Ctrl/command + Enter 键(或使用 Source 窗口标题栏上的 Run 按钮)。 在运行完某一段代码后,按下 Ctrl + Shift + P 键(或对应的标题栏按钮),即可重新运行上一次运行的代码段(单行或多 阅读全文

posted @ 2022-02-11 11:52 BioinformaticsMaster 阅读(608) 评论(0) 推荐(0) 编辑

按_1 _2 排序fqlist 递归去空格
摘要:# -*- coding: utf-8 -*- # @Time : 2022/2/10 上午10:08 # @Author : lizhichao # @Email : 13652030758@163.com # @File : sort_Fqfile.py # @Software: PyCharm 阅读全文

posted @ 2022-02-10 11:51 BioinformaticsMaster 阅读(24) 评论(0) 推荐(0) 编辑

顺序的fqlist拆解成sample fqsize fq格式 ,涉及正则取样本名
摘要:# -*- coding: utf-8 -*-# @Time : 2022/1/20 下午10:10# @Author : lizhichao# @Email : 13652030758@163.com# @File : sample_fqsize_fq.py# @Software: PyCharm 阅读全文

posted @ 2022-02-10 11:49 BioinformaticsMaster 阅读(28) 评论(0) 推荐(0) 编辑

ggplot2(grammar of graphic)
摘要:ggplot2 特点 1. 采用图层的设计,利于结构化思维实现数据可视化。明确的起始 ggplot() , 图层之间叠加通过+实现 。通常geom_xx()或stat_xx()绘制一个图层 2. 把表征数据与图形细节分开,便于创造性的绘图。通过stat_xx()实现将常见的统计变换融入绘图中 3. 阅读全文

posted @ 2022-02-09 14:43 BioinformaticsMaster 阅读(143) 评论(0) 推荐(0) 编辑

想取出两列数据不同 对应的那行观测
摘要:想取出两列数据对应不同的那行观测 ,一步实现不来如bamsex_proportion[bamsex_proportion$sex1male_2female !=bamsex_new$sex1male_2female] 只能先把比较结果赋值给新列,再取出来对应的观测, bamsex_proportio 阅读全文

posted @ 2022-02-08 19:22 BioinformaticsMaster 阅读(41) 评论(0) 推荐(0) 编辑

subset 函数 选择数据框/向量的子集
摘要:subset(数据框,条件) 按条件选择子集 Datafra<-data.frame(name=c(1,2,4,NA,4,5,7),family=c("xiao","ming",NA,NA,"zhou","zheng","li")) Datafra subset(Datafra,name>=1) s 阅读全文

posted @ 2022-02-08 19:15 BioinformaticsMaster 阅读(184) 评论(0) 推荐(0) 编辑

R 处理、可视化 多变量数据
摘要:factoextra 包 1 PCA Principal Component Analysis 2 CA Correspondence Analysis 3 MCA Multiple corespondence Analysis 4 MFA Multiple Factor Analysis 5 HM 阅读全文

posted @ 2022-02-07 13:39 BioinformaticsMaster 阅读(204) 评论(0) 推荐(0) 编辑

ggplot tools ggpubr arrange
摘要:library(ggpubr) # ggpubr 是基于ggplot2开发,更便捷,使图满足论文出版的需要。 df<-iris colnames(df)<-paste0("V",1:5) # paste0 连接符是空字符串,相比paste不能设置sep df p1<-ggplot(df,aes(x= 阅读全文

posted @ 2022-02-04 14:50 BioinformaticsMaster 阅读(143) 评论(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
点击右上角即可分享
微信分享提示