Coder Social home page Coder Social logo

toxpi / toxpir Goto Github PK

View Code? Open in Web Editor NEW
8.0 2.0 4.0 13.72 MB

toxpiR R package for the Toxicological Priority Index (ToxPi) algorithm.

Home Page: https://toxpi.github.io/toxpiR/index.html

License: GNU General Public License v3.0

R 100.00%
r r-package data-science modeling toxicology

toxpir's Introduction

toxpiR

Project Status: Active โ€“ The project has reached a stable, usable state and is being actively developed. R-CMD-check cran-version downloads codecov

R package for the Toxicological Priority Index (ToxPi) prioritization algorithm. Package developed and maintained by the Reif Lab.

Installation

Current stable release (CRAN):

install.packages("toxpiR")

Current stable release (Build from GitHub):

remotes::install_github("ToxPi/toxpiR", 
                        dependencies = TRUE)
                        
Note: Users may need to ensure "remotes" package and packages
requiring "BiocManager" are installed before building package.

if (!require(remotes)) install.packages("remotes")

if (!require(BiocManager, quietly = TRUE)) {
  install.packages("BiocManager")
}
BiocManager::install(c("S4Vectors","BiocGenerics"))

Current stable release (Build from GitHub with vignettes):

remotes::install_github("ToxPi/toxpiR",
                        dependencies = TRUE, 
                        build_vignettes = TRUE)

Note: Building packages with vignettes requires the package
"pandoc" to be installed.

toxpir's People

Contributors

davidmreif avatar daynefiler avatar dtlloyd96 avatar flemingjf avatar pthunga avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

toxpir's Issues

Documentation request

Terrific work to create this new package.
One observation I encountered when performing the install - and might just be specific to me but figured I would report it nonetheless. Using the install.packages and setting dependencies to True still failed to install S4Vectors and BiocGenerics.
I found I needed to install 'BiocManager' and then use this to install the 2 dependencies. Steps I went through were as follows:
install.packages('BiocManager')
BiocManager::install(c('S4Vectors', 'BiocGenerics'))
install.packages('toxpiR')

Legend issues

Hello,

I was wondering if there is a native way to control legend positions/text/colors?

The default seems to be having some trouble in my case:

image

As you can see, the slice names are a bit long - and, not all the slices appear to be assigned a color. Any advice would be helpful!

Thanks,
Matt

Create donutGrob

Create donutGrob and associated functions for plotting with missing-ness.

Add function for exporting to GUI format

The difficult aspect of doing this -- and the reason for not implementing in v1.0 -- is the transformation functions. The simple fix would be to NOT include transformation functions (i.e. make them all linear) and apply any transformations to input prior to exporting; this breaks down when the same input is included in different slices that may have different transformation functions. While we would advise against duplicating inputs across the model (particularly using different transformation functions), and throw a warning to the user when duplicating inputs, this particular situation is present within the format_C.csv example file. The "simple" fix, therefore would break unless we detected this situation and created new columns with alternately transformed inputs. Off the top of my head, I cannot see an easy way to map the used transformation functions (if possible) to the GUI options. And what would we do if users supplied function(s) not available in the GUI? Thoughts?

how to pass the "adjusted" parameters to txpweight and txpmodel

Dear Professor,
When I was using toxpiR, I tried to modify the parameters to make txpweights have a weight ratio of 2,2,1. However, at the same time, I do not want to normalize my data, but I do not know how to pass the "adjusted" parameters to txpweight and txpmodel. Besides, how to change the name of legend and present the title of each pie chart in two lines. Do you have any ideas? My code is as follows, urgently seeking your help. Thank you a lot!

library(toxpiR)
library(ghibli)
setwd("E:\R\toxpi")
your_data <- read.csv("1.csv")
colnames(your_data) <- c("name", "I", "P", "F")
f.slices <- TxpSliceList(Slice1 = TxpSlice("I"),
Slice2 = TxpSlice("P"),
Slice3 = TxpSlice("F"))

f.model <- TxpModel(txpSlices = f.slices,
txpWeights = c(2,2,1)
)

f.results <- txpCalculateScores(model = f.model,
input = your_data,
id.var = 'name' )
txpWeights(f.results,adjusted = FALSE) <- c(2,2,1)
txpSliceScores(f.results)
library(grid)
top_50_results <- head(f.results, 50)
p1<-plot(top_50_results)

Add support for missing-ness

Add functionality to track missing-ness in TxpResult object.

  • Add txpMissing slot to TxpResult class; observation by slice matrix (same as txpSliceScores ) with the proportion of missing observations
  • Update txpCalculateScores to calculate missing-ness
  • Add accessors for txpMissing
  • Update man page and create examples showing accessors
  • Add tests to cover new missing-ness functionality

Require R>=4.0

Based on some feedback from reviewers, there are nondescript issues with installing the package with lower versions of R.

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.