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

参考

相关推荐
Mikhail_G4 小时前
Mysql数据库操作指南——排序(零基础篇十)
大数据·数据库·sql·mysql·数据分析
地球资源数据云6 小时前
【免费下载】中国5米分辨率坡度数据
数据分析·数据集·遥感数据
Faker66363aaa7 小时前
GSM微波天线设备识别与分类_YOLOv26模型实现_1
yolo·分类·数据挖掘
weixin_462446237 小时前
PaddleX 3.2 人脸识别实战:自定义人脸库 + CartoonFace 官方案例 Top-K 识别完整指南
开发语言·r语言
创业之路&下一个五年7 小时前
以教为学:在赋能他人中完成自我跃升
机器学习·自然语言处理·数据挖掘
Tiger Z8 小时前
《R for Data Science (2e)》免费中文翻译 (第19章) --- Joins(1)
r语言·编程·数据科学
Aloudata8 小时前
数据工程新范式:NoETL 语义编织如何激活海量埋点数据价值?
数据挖掘·数据分析·etl·指标平台
Tiger Z8 小时前
《R for Data Science (2e)》免费中文翻译 (第18章) --- Missing values
开发语言·r语言
老吴学AI9 小时前
第 2 节 | 从“呈现数据“到“驱动决策“:数据故事的力量
数据分析·数据可视化·excel教程·数据故事·职场技巧·业务洞察·报告编写
Faker66363aaa10 小时前
YOLOv26哈密瓜花朵识别与分类_雄花雌花区分与花瓣结构识别
yolo·分类·数据挖掘