【工具】grcMalaria用于处理和分析“斑点疟疾基因报告卡”的R软件包

文章目录

介绍

grcMalaria 是一个易于使用的、开源的 R 软件包,旨在使遗传流行病学分析任务变得易于操作。

该软件包能够将来自"SpotMalaria 遗传报告卡"(GRC)中提取的疟原虫遗传信息转化为直观的流行率、多样性、亲缘关系等地理图谱。该软件库还能够识别流行毒株、分析药物耐药性特征以及绘制传播路径。

grcMalaria is a user-friendly, open-source R package, designed to make genetic epidemiology analysis tasks accessible.
The package facilitates the translation of genetic information derived from malaria parasites from SpotMalaria Genetic Report Cards (GRC) into intuitive geographical maps of prevalence, diversity, relatedness. This software library is also capable of identifying circulating strains, characterising drug resistance profiles, and mapping spread.

代码

https://genremekong.org/tools/grcmalaria-guide

r 复制代码
## Install devtools and rgeos
install.packages("devtools")
install.packages("rgeos")

##Install grcMalariaGeodata from Github
devtools::install_github("malariagen/grcMalariaGeodata")

## Require these dependencies to install 'malariagen/grcMalaria'
if (!requireNamespace("BiocManager", quietly = TRUE))
install.packages("BiocManager")

BiocManager::install("pcaMethods")

# Load libraries
library(grcMalariaGeodata)
library(grcMalaria)

# Check package versions grcMalaria and grcMalariaGeodata
# Latest version grcMalariaGeodata: 0.4.0
# Latest stable version of grcMalaria: 2.0.0
packageVersion('grcMalaria')
packageVersion('grcMalariaGeodata')


# Load data file
# Change the path to where your file is located before running the code
Data <- loadGrc("D:/.../GRC.xlsx", 
    sheet = "GenRe-Mekong", 
    species = "Pf", version = "1.4")

ctx <- initializeContext(Data, 
                          dir="D:/...", #Change the path to where you want output file to be 
															 minSnpTypability=0.8, minSampleTypability=0.75) 


## Select sample set to work on. 

# To select samples from 1 field (1 column in the GRC)
selectSampleSet(ctx, sampleSetName="EBKK", select=list(
								list(field="Country", values=c("VN", "KH", "LA")) ))

# To select samples from 2 fields
selectSampleSet(ctx, sampleSetName="Laos", select=list(
								list(field="TimePoint", values=c("D00H00","-")),
								list(field="Study", values=c("1208-PF-LA-CMPE-GENRE")) ))

# To select samples from 3 fields
selectSampleSet(ctx, sampleSetName="SouthLA_2017", select=list(
                 list(field="Country", values="LA"),
                 list(field="AdmDiv1", values=c("Attapeu", "Champasak")),
								 list(field="Year", values=c("2017", "2018")) ))

# To select samples from more fields, follow the example above to add more -> list(field=" ", values = " ")


mapSampleCounts (ctx, sampleSet="EBKK", timePeriods=NULL,
                   aggregate=c("Province","District"), 
                   minAggregateCount=1, 
                   markerSize=c(10,40), 
                   colourBy="Province", 
                   showNames=TRUE,
                   ...)
r 复制代码
mapDrugResistancePrevalence (ctx, sampleSet="EBKK", timePeriods=NULL,
                   drugs="ALL", aggregate=c("Province","District"),
                   minAggregateCount=10, showNames=TRUE, markerSize=16,
                   ...)

参考

相关推荐
2601_962295996 小时前
湖南码界领航教育科技有限公司:Python数据分析进阶,统计与可视化
numpy·pandas·统计·数据可视化·python数据分析
小小测试开发15 小时前
LLM评测:LLM-as-Judge 想当回归门禁,先过偏差校准和双层评分这两关
人工智能·数据挖掘·回归
wang_yb16 小时前
正态分布撒谎时:用柯西分布捕捉生活中的“黑天鹅”
数据分析·databook
databook16 小时前
正态分布撒谎时:用柯西分布捕捉生活中的“黑天鹅”
python·数据挖掘·数据分析
imgsq16 小时前
S-57 数据解剖:把一个 ENC 文件拆给你看
c++·数据可视化
2601_9622989316 小时前
pip安装Jupyter Notebook指南
数据分析·jupyternotebook·python编程·pip安装·交互式编程环境
千桐科技17 小时前
qData 开源版数据中台 v1.6.2 上线:修复数据连接、元数据与项目管理等多项问题
大数据·开源·数据治理·数据可视化·数据中台·元数据·qdata
statistican_ABin17 小时前
中国宠物经济发展分析报告——基于R语言的2018-2024年宠物市场多维度分析
开发语言·r语言·宠物
图扑软件17 小时前
下篇・换墨|主题/多语言/移动端,一套组件全覆盖
前端·javascript·ui·性能优化·数据可视化
waoooqwe17 小时前
2026年9月数据分析工具排行榜
数据挖掘·数据分析