Giter VIP home page Giter VIP logo

campp2's People

Contributors

mtiberti avatar nikolatom avatar

Watchers

 avatar  avatar  avatar

campp2's Issues

Introduce SummarizedExperiment

How to implement SummarizedExperiment class?

  1. we can create a function for creating SummarizedExperiment based on feature counts and sample metadata, see below.
  2. Should SummarizedExperiment function be implemented at the beginning of CAMPP2.R?
  3. Should we use SE only in the main function and keep smaller functions as they are (in case there is no downsampling)? Or should we implement the whole SE as in input for all the functions?
  4. only the minority of the packages we use can handle SummarizedExperiment be default; in the rest of the cases it would need to be converted into a data.frame.
  5. I think where it really make sense are the cases where we do downsampling
  6. Or should we implement different tools using SummarizedExperiment as an input?

Function for SummarizedExperiment

library(SummarizedExperiment)

create_summarized_experiment <- function(gene_counts, sample_metadata) {
  # Check if input data frames have the same number of samples
  if (ncol(gene_counts) != nrow(sample_metadata)) {
    stop("The number of columns in gene_counts must match the number of rows in sample_metadata.")
  }
  
  # Check if row names in sample_metadata match column names in gene_counts
  if (!all(rownames(sample_metadata) %in% colnames(gene_counts))) {
    stop("All row names in sample_metadata must be present in the column names of gene_counts.")
  }
  
  # Create the SummarizedExperiment object
  se <- SummarizedExperiment(assays = list(counts = gene_counts),
                             colData = sample_metadata)
  
  return(se)
}

Try to fix the size of the original CAMPP2 repository

try to shrink the size of the original repository (and add the code from the new CAMPP2) by eg:

git clone --mirror <repository_url>
cd <repository_name>.git
git filter-branch --index-filter "git rm -rf --cached --ignore-unmatch <path_to_large_file>" --prune-empty --tag-name-filter cat -- --all
git reflog expire --expire=now --all
git gc --prune=now --aggressive
git push --force

Update all clones: Notify all collaborators to re-clone the repository, as the history has been rewritten. They should backup their local branches and changes, then clone the repository again.

Alternatively it’s possible to use:
BFG Repo-Cleaner (https://rtyley.github.io/bfg-repo-cleaner/):
java -jar bfg.jar --delete-files <path_to_large_file> <repository_name>.git
The the large files can be identified eg. by:
git rev-list --objects --all | sort -k 2 -n | tail -n 10

Vignettes build problem during BioC pre-check

--- re-building ‘vignette_campp2.Rmd’ using rmarkdown
Quitting from lines 261-262 (vignette_campp2.Rmd) 
Error: processing vignette 'vignette_campp2.Rmd' failed with diagnostics:
package or namespace load failed for 'CAMPP2':
 object 'predict' is not exported by 'namespace:randomForest'
--- failed re-building ‘vignette_campp2.Rmd’

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.