【工具】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,
                   ...)

参考

相关推荐
沅柠-AI营销2 小时前
ChatGPT GEO深度拆解:从专业底层逻辑到高阶流量壁垒的完整打法
人工智能·chatgpt·数据分析·品牌营销·ai搜索优化·geo优化
TechWayfarer6 小时前
营销反作弊实战:用IP归属地查询平台识别虚假流量
网络·python·网络协议·tcp/ip·数据分析
明志数科7 小时前
2026年机器人数据行业趋势预测:5个关键变化与应对策略
机器学习·数据分析
geneculture7 小时前
信智序位驾驭质能时空的产业+生活方式
人工智能·数据挖掘·生活·融智学的重要应用·哲学与科学统一性·融智时代(杂志)
Cloud_Shy6188 小时前
Python 数据分析基础入门:《Excel Python:飞速搞定数据分析与处理》学习笔记系列(第十二章 用户定义函数 中篇)
python·数据分析·excel·pandas
沉下去,苦磨练!9 小时前
python的数据分析Pandas
python·数据分析·pandas
wayz119 小时前
异常值检测方法详解(IQR / Z-score / Percentile / Winsorize)
数据分析·量化交易
测试员周周10 小时前
【Appium 系列】第20节-测试项目结构设计 — 从脚本到工程
人工智能·数据挖掘·回归·单元测试·appium·测试用例·测试覆盖率
Honker_yhw10 小时前
大数据管理与应用系列丛书《数据挖掘》(吕欣等著)读书笔记-LASSO回归
数据挖掘·回归·kotlin
码界筑梦坊10 小时前
143-基于Python的景点热度分析数据可视化分析系统
python·信息可视化·数据分析·毕业设计·fastapi