Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

R CMD check results #5

Open
biodavidjm opened this issue Oct 19, 2023 · 1 comment
Open

R CMD check results #5

biodavidjm opened this issue Oct 19, 2023 · 1 comment

Comments

@biodavidjm
Copy link

I run The R CMD check and I got the following results that you might want to address:

── R CMD check results ────────── MetENP 0.0.0.9000 ────
Duration: 2m 12s

❯ checking examples ... ERROR
  Running examples in ‘MetENP-Ex.R’ failed
  The error most likely occurred in:
  
  > base::assign(".ptime", proc.time(), pos = "CheckExEnv")
  > ### Name: anova_ana
  > ### Title: Performs anova analysis Performs an anova across all response
  > ###   variables. The function takes 2 independent variables.
  > ### Aliases: anova_ana
  > 
  > ### ** Examples
  > 
  > anova_result = anova_ana(metabolomics_data=data,met_col="metabolite_name",analysis_type=c('Phospholipids, Chol. esters and Diacylglycerols','Sphingolipids'), metadata=metadata,normalization="50percent", factor_col1="TreatmentGroup",factor_col2="SamplingTimePoint",p_adjust="fdr")
  Error in metabolomics_data$refmet_name : 
    object of type 'closure' is not subsettable
  Calls: anova_ana -> gsub -> is.factor
  Execution halted

❯ checking for portable file names ... WARNING
  Found the following files with non-portable file names:
    vignettes/Case study 1_ Study ST000915.html
    vignettes/Case study 1_ Study ST000915_20220619.html
    vignettes/Case study 1_ Study ST000915_20220625.html
  These are not fully portable file names.
  See section ‘Package structure’ in the ‘Writing R Extensions’ manual.

❯ checking for missing documentation entries ... WARNING
  Undocumented code objects:
    ‘korg’
  Undocumented data sets:
    ‘korg’
  All user-level objects in a package should have documentation entries.
  See chapter ‘Writing R documentation files’ in the ‘Writing R
  Extensions’ manual.

❯ checking for code/documentation mismatches ... WARNING
  Codoc mismatches from documentation object 'metclassenrichment':
  metclassenrichment
    Code: function(df_metclass, refmet_class, metclass, enrich_stats, no,
                   debug = 0)
    Docs: function(df_metclass, refmet_class, metclass, enrich_stats, no)
    Argument names in code not in docs:
      debug
  
  Codoc mismatches from documentation object 'metcountplot':
  metcountplot
    Code: function(df_metclass, metclass, plotting, thres_logfC,
                   updown_fillcolor = c("red", "green"))
    Docs: function(df_metclass, metclass, plotting, thres_logfC)
    Argument names in code not in docs:
      updown_fillcolor

❯ checking Rd \usage sections ... WARNING
  Undocumented arguments in documentation object 'metcountplot'
    ‘plotting’
  Documented arguments not in \usage in documentation object 'metcountplot':
    ‘plot’
  
  Undocumented arguments in documentation object 'plot_volcano'
    ‘text_nooverlap’
  
  Functions with \usage entries need to have the appropriate \alias
  entries, and all their arguments documented.
  The \usage entries must correspond to syntactically valid R code.
  See chapter ‘Writing R documentation files’ in the ‘Writing R
  Extensions’ manual.

❯ checking files in ‘vignettes’ ... WARNING
  Files in the 'vignettes' directory but no files in 'inst/doc':
    ‘Case study 1_ Study ST000915.html’, ‘Case study 1_ Study
      ST000915_20220619.html’, ‘Case study 1_ Study
      ST000915_20220625.html’, ‘MetENP_ST000084.ipynb’,
      ‘MetENP_ST000897.ipynb’, ‘MetENP_ST000915.ipynb’,
      ‘MetENP_ST001256.ipynb’, ‘MetENP_ST001742.ipynb’,
      ‘MetENP_ST001951.ipynb’, ‘MetENP_ST001985.ipynb’,
      ‘MetENP_ST002085.ipynb’, ‘MetENP_ST002098.ipynb’,
      ‘MetENP_ST002104.ipynb’, ‘MetENP_vignette.rmd’,
      ‘MetENP_vignette_Jupyter_notebook.ipynb’, ‘tmp/test.txt’
  Files named as vignettes but with no recognized vignette engine:
     ‘vignettes/MetENP_vignette.rmd’
  (Is a VignetteBuilder field missing?)

❯ checking package dependencies ... NOTE
  Imports includes 23 non-default packages.
  Importing from so many packages makes the package vulnerable to any of
  them becoming unavailable.  Move as many as possible to Suggests and
  use conditionally.

❯ checking DESCRIPTION meta-information ... NOTE
  Malformed Description field: should contain one or more complete sentences.
  Non-standard license specification:
    mit_license
  Standardizable: FALSE

❯ checking top-level files ... NOTE
  File
    LICENSE
  is not mentioned in the DESCRIPTION file.
  Non-standard file/directory found at top level:
    ‘binder’

❯ checking dependencies in R code ... NOTE
  Namespaces in Imports field not imported from:
    ‘KEGGgraph’ ‘curl’ ‘data.table’ ‘pathview’ ‘rjson’ ‘tictoc’
    ‘tidyverse’
    All declared Imports should be used.

❯ checking R code for possible problems ... [22s/22s] NOTE
  anova_ana: no visible binding for global variable ‘metabolite_name’
  anova_ana: no visible binding for global variable ‘metabolite_id’
  anova_ana: no visible binding for global variable ‘refmet_name’
  anova_ana: no visible binding for global variable ‘analysis_id’
  anova_ana: no visible binding for global variable ‘analysis_summary’
  anova_ana: no visible global function definition for ‘select_if’
  compoundinfo: no visible binding for global variable ‘korg’
  convert_refmet: no visible binding for global variable ‘exactmass’
  convert_refmet: no visible binding for global variable ‘refmet_name.y’
  convert_refmet: no visible binding for global variable ‘refmet_name.x’
  dotplot_met_class_path: no visible binding for global variable
    ‘PATHWAY’
  dotplot_met_class_path: no visible binding for global variable ‘n’
  dotplot_met_class_path: no visible binding for global variable ‘Freq’
  enzyme_gene_info: no visible binding for global variable ‘countgenes’
  enzyme_gene_info: no visible binding for global variable ‘ORTHOLOGY.y’
  enzyme_gene_info: no visible binding for global variable ‘ORTHOLOGY.x’
  getmwstudies: no visible binding for global variable ‘DATA’
  getmwstudies: no visible binding for global variable ‘study_id’
  map_keggid: no visible binding for global variable ‘Formula’
  metclassenrichment: no visible global function definition for ‘blue’
  metcountplot: no visible binding for global variable ‘log2Fold_change’
  metcountplot: no visible binding for global variable
    ‘No.of_metabolites’
  metcountplot: no visible binding for global variable ‘neg’
  metcountplot: no visible binding for global variable ‘color’
  path_enrichmentscore: no visible binding for global variable
    ‘sig_metabolites_kegg_id’
  pathinfo: no visible binding for global variable ‘countrxn’
  plot_heatmap : tidy_name: no visible binding for global variable ‘.’
  plot_met_enrichment: no visible binding for global variable ‘sub_class’
  plot_pathway_networks: no visible binding for global variable ‘name’
  plot_volcano: no visible binding for global variable ‘log2Fold_change’
  plot_volcano: no visible binding for global variable ‘pval’
  plot_volcano: no visible binding for global variable ‘threshold’
  plot_volcano: no visible binding for global variable ‘metlabels’
  plot_volcano: no visible binding for global variable ‘Metabolite’
  rxninfo: no visible binding for global variable ‘countrxn’
  separate_data: no visible binding for global variable ‘Samples’
  significant_met: no visible binding for global variable
    ‘metabolite_name’
  significant_met: no visible binding for global variable ‘metabolite_id’
  significant_met: no visible binding for global variable ‘refmet_name’
  significant_met: no visible binding for global variable ‘analysis_id’
  significant_met: no visible binding for global variable
    ‘analysis_summary’
  significant_met: no visible binding for global variable ‘super_class’
  significant_met: no visible binding for global variable ‘main_class’
  significant_met: no visible binding for global variable ‘sub_class’
  significant_met: no visible binding for global variable ‘formula’
  significant_met_own: no visible binding for global variable
    ‘metabolite_name’
  significant_met_own: no visible binding for global variable
    ‘refmet_name’
  significant_met_own: no visible binding for global variable
    ‘super_class’
  significant_met_own: no visible binding for global variable
    ‘main_class’
  significant_met_own: no visible binding for global variable ‘sub_class’
  significant_met_own: no visible binding for global variable ‘formula’
  Undefined global functions or variables:
    . DATA Formula Freq Metabolite No.of_metabolites ORTHOLOGY.x
    ORTHOLOGY.y PATHWAY Samples analysis_id analysis_summary blue color
    countgenes countrxn exactmass formula korg log2Fold_change main_class
    metabolite_id metabolite_name metlabels n name neg pval refmet_name
    refmet_name.x refmet_name.y select_if sig_metabolites_kegg_id
    study_id sub_class super_class threshold
  Consider adding
    importFrom("stats", "formula")
  to your NAMESPACE file.

❯ checking Rd line widths ... NOTE
  Rd file 'anova_ana.Rd':
    \examples lines wider than 100 characters:
       anova_result = anova_ana(metabolomics_data=data,met_col="metabolite_name",analysis_type=c('Phospholipids, Chol. esters and Diacylglycer ... [TRUNCATED]
  
  Rd file 'metclassenrichment.Rd':
    \examples lines wider than 100 characters:
       metenrichment = metclassenrichment(df_metclass=sig_metabolites_kegg_id, refmet_class, metclass= "Sub class",enrich_stats="HG",no=1)
  
  Rd file 'metcountplot.Rd':
    \examples lines wider than 100 characters:
       count_changes = metcountplot(df_metclass=sig_metabolites_pubchem, metclass='sub_class', plotting=TRUE, thres_logfC = 0.5)
  
  Rd file 'path_enrichmentscore.Rd':
    \examples lines wider than 100 characters:
       kegg_es = path_enrichmentscore(met_path,sig_metabolite_kegg_id, ls_path,refmet_class,sps='hsa',padj='fdr')
  
  These lines will be truncated in the PDF manual.

1 error ✖ | 5 warnings ✖ | 6 notes ✖
Error: R CMD check found ERRORs
Execution halted
@mano-at-sdsc
Copy link
Collaborator

Most warnings and notes have been fixed. The error in running examples is since the complex objects that need to be passed as arguments are not in the workspace. To fix this, example data and objects should be loaded first (e.g., from RData files). However, this doesn't affect the ability to install the package and run Jupyter notebooks. Hence, for now, I am ignoring this error. I am leaving the issue still open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants