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

参考

相关推荐
wh_xia_jun12 小时前
基础分类模型及回归简介(一)
分类·数据挖掘·回归
淦暴尼13 小时前
基于spark的二手房数据分析可视化系统
大数据·分布式·数据分析·spark
云天徽上14 小时前
【数据可视化】基于pyecharts的航空安全深度剖析:坠毁航班数据集可视化分析
数据可视化
Chef_Chen15 小时前
从0开始学习R语言--Day49--Lasso-Cox 回归
学习·回归·r语言
ClouGence20 小时前
CloudCanal + Apache Paimon + StarRocks 实时构建湖仓一体架构
后端·数据挖掘·数据分析
SickeyLee20 小时前
对比分析:给数据找个 “参照物”,让孤立数字变 “决策依据”
信息可视化·数据挖掘·数据分析
杨超越luckly1 天前
ArcGISPro应用指南:使用ArcGIS Pro创建与优化H3六边形网格
arcgis·信息可视化·数据可视化·shp·h3网格
Rita的程序bug1 天前
R语言基础| 基本图形绘制(条形图、堆积图、分组图、填充条形图、均值条形图)
开发语言·信息可视化·r语言
李昊哲小课1 天前
K近邻算法的分类与回归应用场景
python·机器学习·分类·数据挖掘·回归·近邻算法·sklearn
摸鱼仙人~1 天前
现代人工智能综合分类:大模型时代的架构、模态与生态系统
人工智能·分类·数据挖掘