Skip to content

Commit

Permalink
build fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
TheFollyLlama committed Aug 7, 2024
1 parent cff8539 commit 1b60a59
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
5 changes: 4 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@ FROM bioc_base
COPY MeDUSA MeDUSA
WORKDIR MeDUSA
RUN chown rstudio /home/rstudio/*.xml
RUN R -e 'devtools::check()'
RUN R -e 'devtools::document()'
RUN R -e 'devtools::test()'
RUN R -e 'devtools::install(dependencies="never")'
#RUN R -e 'devtools::document()' && R -e 'devtools::check()'

### TO BUILD
# docker build . -f Dockerfile -t lacdr/medusa
Expand Down
10 changes: 5 additions & 5 deletions MeDUSA/R/2_mz_quality_check.R
Original file line number Diff line number Diff line change
Expand Up @@ -137,17 +137,17 @@ mz_quality_meta_check <- function(input_mz_obj, meta){
error <- list()

#Many more can be expected for "good science", but these are the ones that absence will cause issue
meta_columns_expected <- c( "sample_name",
"type",
"phenotype",
"filtered_out" )
meta_columns_expected <- c( "sample_name",
"type",
"phenotype",
"filtered_out" )


error <- .subset_check(meta_columns_expected,colnames(meta),"MetaColumns missing: ")
error <- .subset_check(meta$sample_name,colnames(input_mz_obj),"MetaSamples not in data: ")
error <- .subset_check(colnames(dplyr::select(input_mz_obj,-mz)), meta$sample_name,"DataSamples not in meta: ")
if ( class(meta$filtered_out) != 'logical' ){
error <- append(paste0("filtered_out column must be a logical (boolean)")
error <- append("metadata$filtered_out column must be a logical (boolean)")
}

sample_diff <- nrow(meta) - ncol(dplyr::select(input_mz_obj, -mz))
Expand Down

0 comments on commit 1b60a59

Please sign in to comment.