R qtl package 使用记录

本文记录了在R中安装并使用qtl包的过程,首先解决版本不匹配问题成功安装qtl,然后通过BiocManager进一步安装。使用qtl包对数据进行处理,包括缺失值检查、遗传概率计算、模拟基因型,并用scanone函数进行扫描分析,最后展示部分分析结果图表。
摘要由CSDN通过智能技术生成

 

1.  qtl安装了很多次,提示R版本不符合;重启了R,安装成功

2. 画出的图如下,更详细的linkage map 图需要借助其它软件

########################

install.packages("qtl")

library(qtl)

source("https://bioconductor.org/biocLite.R")

install.packages("BiocManager") 
BiocManager::install("qtl")
if (!requireNamespace("BiocManager", quietly = TRUE))
  install.packages("BiocManager")
##########################################

data(fake.bc)
ls()
summary(fake.bc)
plot.missing(fake.bc)
fake.bc <- drop.nullmarkers(fake.bc)
totmar(fake.bc)
fake.bc <- calc.genoprob(fake.bc, step=1, error.prob=0.01)
out.em <- scanone(fake.bc)
out.hk <- scanone(fake.bc, method="hk")
fake.bc <- sim.geno(fake.bc, step=2, n.draws=16, error.prob=0.01)
out.imp <- scanone(fake.bc, method="imp")
summary(out.em)
summary(out.em, threshold = 3)
summary(out.hk, threshold = 3)
summary(out.imp, threshold = 3)

max(out.em) # based on expectation maximization

max(out.hk) # based on Haley-Knott regression

max(out.imp) # based on multiple imputation

plot(out.em, chr=c(2,5))
plot(out.em, out.hk, out.imp, chr=c(2,5))

 

 

 

 

  • 0
    点赞
  • 11
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值