Code Monkey home page Code Monkey logo

cytotools's People

Contributors

cells2numbers avatar mcquin avatar shntnu avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

cytotools's Issues

Create option to explicitly specify all paths

Most scripts in https://github.com/broadinstitute/cytominer_scripts assume a specific folder structure, which is great for keeping the options compact (only need to specify batchname and plate_id for most cases). But this makes it inflexible. Keep the current options, but also have the option to explicitly specify paths.

See the http://docopt.org docs to make sure we do it the right way.

These are the scripts that need to be updated:

  • select.R
  • sample.R: output and workspace_dir can be specified, but expects a predefined folder structure for this to work. It is not worth the effort to make this more flexible – the code gets far too complex.
  • preselect.R
  • normalize.R: all paths can be specified explicitly
  • compare_plates.R
  • collapse.R
  • audit.R
  • annotate.R: same as sample.R

Implement clean

This is intended to be used right after the SQLite file is produced. It strips Image_ from column names with prefix Image_Metadata_ in the image table.

I'm not thrilled about the fact that this is a hack, but it helps remove code downstream where this is done repeatedly

Here's a stub

db <- DBI::dbConnect(RSQLite::SQLite(), sqlite_file)

image <- dplyr::tbl(src = db, "image") %>%

columns_names <- colnames(image) %>% stringr::str_sub("^Image_Metadata_")

purrr::walk(columns_names, function(column_name) DBI::dbSendQuery(db, sprintf("'UPDATE image SET %s = %s;'", column_name, stringr::str_replace(column_name, "^Image_", ""))))

DBI::dbDisconnect(db)

Create test data (csv and sql)

It would be great to have one test data set that can be used to test all functions implemented in cytotools.

Some parts should be available as csv and sql.

  • level 2 - sql . single cell data (four wells, two control wells, two sites per well)
  • level 3 - csv. aggregated version (aggregated to wells or collapsing the wells, results has four rows )
  • level 4 - csv. normalized and aggregated data, same format as above (four rows).
  • level 4 - sql. normalized single cell data.
  • level 4 - csv. sample returns a subset of the aggregated data. possible test: sample returns one of the replicates (= 1 well) and we want to check if this is equal to one of the aggregated wells (one is chosen randomly). No new data needed.
  • level 4 - csv. a feature list is needed to test feature selection (preselect).
  • level 4 - csv. select returns a csv file with the same number of rows as the aggregated data but with fewer columns.
  • level 5 - csv. collapsed on replicate level (from level 4 to level 5). normalized data with 2 rows.
  • profiling stuff (not part of cytotools)

Level 1: Raw unprocessed images from microscopes
Level 2: Per-cell level measurements
Level 3: Per-well level aggregated measurements
Level 4: Morphological profiles computed using z-scores relative to the plate population as control or relative to the plate vehicle control.
Level 5: Replicate-collapsed perturbation signatures

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.