Git Product home page Git Product logo

grcmalaria's People

Contributors

olivo-miotto avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

grcmalaria's Issues

Problem with JAVA

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:

  • Download JAVA version (64-bit or 32-bit) that fits to the type of R version from https://java.com/en/download/manual.jsp
  • Install JAVA either by:
    • Double click on the downloaded installer file to start the installation process
      OR
    • With the following code:
      Sys.setenv(JAVA_HOME='%path%/%downloded%installer%file%')

Then run: library(rJava)

Rtools is required to build R packages

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:

  • Download version of Rtools to match your R version from: https://cran.r-project.org/bin/windows/Rtools/
  • For example, if you are using R version 4.0, download RTools version 4.0
  • Install Rtools by double click on the downloaded installer file to start the installation process

Problem with network connection

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

KH new locations not been updated, Error in quantile.default(lon) : missing values

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

Pop structure graphical attributes

Devise a simple way of configuring graphical attributes, with automatic assignment of colours and symbols to make default choices streamlined.

Issues with TRAC2 Myanmar samples

  1. 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?

  2. 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.

Label colour on strain maps

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.

Error in calls[bIdx, sIdx] : incorrect number of dimensions

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.

Error in strsplit(row.names(xy), " ") when selecting certain sample set

I came across a strange error in R from Vietnam samples. If I select and run samples from certain AdmDiv1 by themselves no maps will be produced and I will get an Error in strsplit(row.names(xy), " ") : non-character argument. But I wouldn't get an error if I select samples from multiple locations.   
The GRC looks fine to me and I couldn't tell what is the problem with the "row names"....

  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

requesting a package update for GRCv1.2

There are a few configs that need updating to cater for the new GRCv1.2 layout.

Issues that need fixing:

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 too

ctx$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.

Mapdrawing error grcMalaria v0.2.1

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]]]]

Label colour on gradient maps

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.

Required pcaMethod package

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")

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.