malariagen / grcmalaria Goto Github PK
View Code? Open in Web Editor NEWTools for processing and analyzing SpotMalaria Genetic Report Cards
License: Other
Tools for processing and analyzing SpotMalaria Genetic Report Cards
License: Other
Problem after running:
Any script that produces a map
Message:
Error: .onLoad failed in loadNamespace() for 'rJava', details:
call: fun(libname, pkgname)
error: JAVA_HOME cannot be determined from the Registry
Solution:
Sys.setenv(JAVA_HOME='%path%/%downloded%installer%file%')
Then run: library(rJava)
Problem after running:
install.packages("devtools")
Message
WARNING: Rtools is required to build R packages, but is not currently installed.
Please download and install Rtools 4.0 from https://cran.r-project.org/bin/windows/Rtools/.
Error: Failed to install 'unknown package' from GitHub:
Timeout was reached: [api.github.com] Connection timed out after 10000 milliseconds
Solution:
Problem after running:
devtools::install_github("malariagen/grcMalaria")
Message:
Error: Failed to install 'unknown package' from GitHub:
Timeout was reached: [api.github.com] Connection timed out after 10001 milliseconds
Solution:
Check network connection and Restart R
Unable to produce map because new locations from KH has not been updated in the package?
mapSampleCounts (ctx, sampleSet="KH",
aggregate=c("District"), minAggregateCount=1,
markerSize=c(10,40), colourBy="Province", showNames=T,
width=15, height=15)
[1] "Analyzing sample set: KH"
[1] "KH - map/sampleCount"
Error in quantile.default(lon) :
missing values and NaN's not allowed if 'na.rm' is FALSE
In addition: Warning message:
In lapply(X = X, FUN = FUN, ...) : NAs introduced by coercion
Devise a simple way of configuring graphical attributes, with automatic assignment of colours and symbols to make default choices streamlined.
In the GRC (20210927 version), 243 samples of Myanmar from 1180-PF-TRAC2-DONDORP and 1195-PF-TRAC2-DONDORP did not have any information (N/A) in the "AdmDiv" columns. Is it suppose to be like this or is this a mistake?
TRAC2 Myanmar samples both Mandalay and caused an error when running analysis with grcMalaria "Error in h(simpleError(msg, call)) : error in evaluating the argument 'obj' in selecting a method for function 'bbox': subscript out of bounds", preventing the analysis to proceed.
The sample count maps code now determined the colour of the text depending on a marker background colour, to avoid black-on-black. This should be extended to strain maps (haplotype group maps) too.
Note to future users encountering the following error:
> #Load grcMalaria library
> library(grcMalaria)
> packageVersion('grcMalaria')
[1] ‘0.4.5’
> #initialize context
> ctx <- initializeContext (Data, dir="D:/Data-Work/10_method-development/1_importation/out",
+ minSnpTypability=0.8, minSampleTypability=0.75)
[1] "Root folder: D:/Data-Work/10_method-development/1_importation/out"
[1] "Initializing Unfiltered Dataset"
[1] "Loaded metadata - Samples: 19015"
[1] "Initializing Filtered Dataset"
Created Matrix: 17282 x 101
[1] "Barcode alleles - Samples: 17282 x SNPs: 101"
[1] "Validating barcodes"
Error in calls[bIdx, sIdx] : incorrect number of dimensions
This issue was caused by 17 samples in the dataset that contained unexpected alleles. In this case we worked around the error by excluding these samples from the dataset.
Result | |
---|---|
Binh Phuoc | Error in strsplit(row.names(xy), " ") : non-character argument |
Dak Lak | OK |
Dak Nong | OK |
Gia Lai | OK |
Khanh Hoa | Error in strsplit(row.names(xy), " ") : non-character argument |
Ninh Thuan | Error in strsplit(row.names(xy), " ") : non-character argument |
Phu Yen | OK |
Quang Tri | Error in strsplit(row.names(xy), " ") : non-character argument |
c("Binh Phuoc", "Gia Lai") | OK |
c("Binh Phuoc", "Khanh Hoa") | OK |
There are a few configs that need updating to cater for the new GRCv1.2 layout.
1. Need to update the "ALL" variable for drugs to include 'Mefloquine' and 'AS-MQ' too.
Temporary solution while waiting for the fix is to specify these drugs, e.g.
drugs = c('Mefloquine', 'AS-MQ')
2. Running the findClusters() using new GRCv1.2 will encounter an error because 'Kelch' column has been changed to 'Pfkelch13':
Error in `[.data.frame`(sampleMeta, , colName) :
undefined columns selected
Temporary solution while waiting for the fix is to either:
A) Change 'Pfkelch13' column name to 'Kelch' in the GRC then import data and initialize context
OR
B) Manually overwrite context config:
ctx$config$cluster.stats.alleleCounts <- "Pfkelch13"
Also if would like to see all the drugs in cluster stats, will need to overwrite cluster stats drugs config tooctx$config$cluster.stats.drugs <- c( "Artemisinin" ,"Piperaquine","DHA-PPQ","Chloroquine","Pyrimethamine","Sulfadoxine", "S-P" ,"S-P-IPTp", "AS-MQ", "Mefloquine")
After overwriting context config, select sample set, then run findClusters(). This will work.
I receive this error when running map-drawing functions.
> mapLocations (ctx, sampleSet="LA",
+ aggregate=c("Province", "District"),
+ markerSize=5, colourBy="Province", showNames=FALSE,
+ width=18, height=10)
[1] "Analyzing sample set: LA"
[1] "LA - map/location"
Error in sp::CRS(...) :
PROJ4 argument-value pairs must begin with +: BOUNDCRS[
SOURCECRS[
GEOGCRS["unknown",
DATUM["World Geodetic System 1984",
ELLIPSOID["WGS 84",6378137,298.257223563,
LENGTHUNIT["metre",1]],
ID["EPSG",6326]],
PRIMEM["Greenwich",0,
ANGLEUNIT["degree",0.0174532925199433],
ID["EPSG",8901]],
CS[ellipsoidal,2],
AXIS["longitude",east,
ORDER[1],
ANGLEUNIT["degree",0.0174532925199433,
ID["EPSG",9122]]],
AXIS["latitude",north,
ORDER[2],
ID["EPSG",9122]]]]],
TARGETCRS[
GEOGCRS["WGS 84",
LENGTHUNIT["metre",1]]],
ANGLEUNIT["degree",0.0174532925199433]],
ID["EPSG",4326]]],
ABRIDGEDTRANSFORMATION["Transformation from unknown to WGS84",
METHOD["Geocentric translations (geog2D domain)",
ID["EPSG",9603]],
PARAMETER["X-axis translation",0,
ID["EPSG",8605]],
PARAMETER["Y-axis ID["EPSG",8606]],
PARAMETER["Z-axis ID["EPSG",8607]]]]
The sample count maps code now determined the colour of the text depending on a marker background colour, to avoid black-on-black. We may want to try to see how to apply it to the gradient maps, such as diversity and prevalence maps.
Problem after running:
devtools::install_github("malariagen/grcMalaria")
Message
ERROR: dependency 'pcaMethods' is not available for package 'grcMalaria'
*removing 'C:/Program Files/R/R-4.0.5/library/grcMalaria'
Solution:
Install "pcaMethods"
package with the following code:
BiocManager::install("pcaMethods")
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.