LiuzLab / TraceQC

Other
6 stars 1 forks source link

Pass package check. #10

Closed hyunhwan-jeong closed 3 years ago

hyunhwan-jeong commented 4 years ago

It is a current status of the package check, we need to fix it.

── R CMD check results ────────────────────────────────────── TraceQC 0.1.0 ────
Duration: 1m 24s

> checking examples ... ERROR
  Running examples in ‘TraceQC-Ex.R’ failed
  The error most likely occurred in:

  > base::assign(".ptime", proc.time(), pos = "CheckExEnv")
  > ### Name: TraceQC
  > ### Title: Creating an input object for TraceQC
  > ### Aliases: TraceQC
  > 
  > ### ** Examples
  > 
  > library(TraceQC)
  > library(fastqcr)
  > input_file <- system.file("extdata", "test_data",
  +                           "fastq", "example.fastq", package="TraceQC")
  > ref_file <- system.file("extdata", "test_data", "ref",
  +                         "ref.txt", package="TraceQC")
  > qc_dir <- tempdir()
  > fastqc(system.file("extdata", "test_data",
  +                    "fastq", package = "TraceQC"),
  +        qc.dir=qc_dir)
  Started analysis of example.fastq
  Approx 20% complete for example.fastq
  Approx 40% complete for example.fastq
  Approx 60% complete for example.fastq
  Approx 80% complete for example.fastq
  Approx 100% complete for example.fastq
  Analysis complete for example.fastq
  Started analysis of example_0d.fastq
  Approx 20% complete for example_0d.fastq
  Approx 40% complete for example_0d.fastq
  Approx 60% complete for example_0d.fastq
  Approx 80% complete for example_0d.fastq
  Approx 100% complete for example_0d.fastq
  Analysis complete for example_0d.fastq
  Started analysis of example_14d.fastq
  Approx 20% complete for example_14d.fastq
  Approx 40% complete for example_14d.fastq
  Approx 60% complete for example_14d.fastq
  Approx 80% complete for example_14d.fastq
  Approx 100% complete for example_14d.fastq
  Analysis complete for example_14d.fastq
  Started analysis of example_2d.fastq
  Approx 20% complete for example_2d.fastq
  Approx 40% complete for example_2d.fastq
  Approx 60% complete for example_2d.fastq
  Approx 80% complete for example_2d.fastq
  Approx 100% complete for example_2d.fastq
  Analysis complete for example_2d.fastq
  > 
  > input_qc_path <- get_qcpath(input_file, qc_dir)
  > 
  > obj <- TraceQC(input_file = input_file,
  +                ref_file = ref_file,
  +                fastqc_file = input_qc_path)
  Running an alignment between /Users/hyunhwan/Projects/InProgress/TraceQC.Rcheck/TraceQC/extdata/test_data/ref/ref.txt and /Users/hyunhwan/Projects/InProgress/TraceQC.Rcheck/TraceQC/extdata/test_data/fastq/example.fastq.
  Alignment: 10.324 sec elapsed
  Parsed with column specification:
  cols(
    name = col_character(),
    seq = col_character(),
    ref = col_character(),
    score = col_double(),
    target_seq = col_character(),
    target_ref = col_character(),
    spacer_seq = col_character(),
    spacer_ref = col_character(),
    PAM_seq = col_character(),
    PAM_ref = col_character()
  )
  Reading: /var/folders/v4/006474k92950c1m5lvg4nxn80000gp/T//RtmpkTC50n/working_dir/Rtmpwg3f99/example_fastqc.zip
  Error in .check_ncores(cores) : 4 simultaneous processes spawned
  Calls: TraceQC ... eval -> eval -> mcmapply -> mclapply -> .check_ncores
  Execution halted

> checking dependencies in R code ... WARNING
  '::' or ':::' import not declared from: ‘rmarkdown’

> checking for code/documentation mismatches ... WARNING
  Functions or methods with usage in documentation object 'hello' but not in code:
    ‘hello’

> checking Rd contents ... WARNING
  Argument items with no description in Rd object 'plot_deletion_hotspot':
    ‘traceQC_input’

> checking files in ‘vignettes’ ... WARNING
  Files in the 'vignettes' directory but no files in 'inst/doc':
    ‘00_Basic-usage.Rmd’,
      ‘01_Application-of-TraceQC-object-to-other-R-packages.Rmd’,
      ‘02_Creating-a-TraceQC-object.Rmd’
  Files named as vignettes but with no recognized vignette engine:
     ‘vignettes/00_Basic-usage.Rmd’
     ‘vignettes/01_Application-of-TraceQC-object-to-other-R-packages.Rmd’
     ‘vignettes/02_Creating-a-TraceQC-object.Rmd’
  (Is a VignetteBuilder field missing?)

> checking installed package size ... NOTE
    installed size is 10.1Mb
    sub-directories of 1Mb or more:
      Rmd       2.8Mb
      extdata   7.0Mb

> checking DESCRIPTION meta-information ... NOTE
  Malformed Title field: should not end in a period.
  Package listed in more than one of Depends, Imports, Suggests, Enhances:
    ‘readr’
  A package should be listed in only one of these fields.

> checking R code for possible problems ... NOTE
  build_character_table: no visible binding for global variable ‘type’
  build_character_table: no visible binding for global variable
    ‘target_seq’
  build_character_table: no visible binding for global variable ‘start’
  build_character_table: no visible binding for global variable
    ‘mutate_to’
  build_character_table: no visible binding for global variable
    ‘mutationID’
  build_character_table: no visible binding for global variable
    ‘sequenceID’
  circular_chordgram: no visible binding for global variable ‘region’
  circular_chordgram: no visible binding for global variable ‘start’
  circular_chordgram: no visible binding for global variable ‘end’
  circular_histogram: no visible binding for global variable ‘region’
  circular_histogram: no visible binding for global variable ‘start’
  circular_histogram: no visible binding for global variable ‘end’
  create_TraceQC_object: no visible global function definition for
    ‘setNames’
  create_TraceQC_object: no visible binding for global variable ‘start’
  create_TraceQC_object: no visible binding for global variable ‘end’
  create_TraceQC_object: no visible binding for global variable ‘region’
  find_position: no visible binding for global variable ‘end’
  find_position: no visible binding for global variable ‘start’
  find_position: no visible binding for global variable ‘type’
  find_position: no visible binding for global variable ‘tmp’
  find_position: no visible binding for global variable ‘align’
  find_position: no visible binding for global variable ‘mutate_to’
  generate_qc_report: no visible global function definition for
    ‘browseURL’
  lorenz_curve: no visible binding for global variable ‘target_seq’
  lorenz_curve: no visible binding for global variable ‘x’
  lorenz_curve: no visible binding for global variable ‘y’
  lorenz_curve: no visible binding for global variable ‘cs’
  mutation_type: no visible binding for global variable ‘type’
  mutation_type: no visible binding for global variable ‘start’
  mutation_type: no visible binding for global variable ‘mutate_to’
  mutation_type: no visible binding for global variable ‘length_category’
  mutation_type: no visible binding for global variable ‘ymax’
  mutation_type: no visible binding for global variable ‘ymin’
  mutation_type: no visible binding for global variable ‘labelPosition’
  mutation_type: no visible binding for global variable ‘label’
  num_mutation_histogram: no visible binding for global variable
    ‘target_seq’
  num_mutation_histogram: no visible binding for global variable
    ‘num_mutation’
  plot_construct: no visible binding for global variable ‘x’
  plot_construct: no visible binding for global variable ‘y’
  plot_construct: no visible binding for global variable ‘text’
  plot_construct: no visible binding for global variable ‘region’
  plot_deletion_hotspot: no visible binding for global variable ‘type’
  plot_deletion_hotspot: no visible binding for global variable ‘start’
  plot_insertion_hotspot: no visible binding for global variable ‘type’
  plot_insertion_hotspot: no visible binding for global variable ‘start’
  plot_point_mutation_hotspot: no visible binding for global variable
    ‘type’
  plot_point_mutation_hotspot: no visible binding for global variable
    ‘start’
  plot_point_mutation_hotspot: no visible binding for global variable
    ‘mutate_to’
  plot_score_distribution: no visible binding for global variable ‘score’
  plot_score_distribution: no visible binding for global variable
    ‘..density..’
  seq_to_character: no visible binding for global variable ‘target_seq’
  seq_to_character: no visible binding for global variable ‘target_ref’
  sequence_alignment: no visible global function definition for
    ‘alignment’
  Undefined global functions or variables:
    ..density.. align alignment browseURL cs end label labelPosition
    length_category mutate_to mutationID num_mutation region score
    sequenceID setNames start target_ref target_seq text tmp type x y
    ymax ymin
  Consider adding
    importFrom("graphics", "text")
    importFrom("stats", "end", "setNames", "start")
    importFrom("utils", "browseURL")
  to your NAMESPACE file.

> checking Rd files ... NOTE
  prepare_Rd: build_character_table.Rd:12-14: Dropping empty section \value
  prepare_Rd: circular_histogram.Rd:16-18: Dropping empty section \value
  prepare_Rd: plot_deletion_hotspot.Rd:12-14: Dropping empty section \value

1 error x | 4 warnings x | 4 notes x
Error: R CMD check found ERRORs
Execution halted

Exited with status 1.
hyunhwan-jeong commented 4 years ago

0 errors, 0 warnings, and 3 notes now.

> checking installed package size ... NOTE

I am not sure I can decrease the size.

> checking R code for possible problems ... NOTE

The problems are related with https://cran.r-project.org/web/packages/dplyr/vignettes/programming.html

> checking for unstated dependencies in vignettes ... NOTE
  'library' or 'require' call not declared from: ‘phangorn’

The SO page would be a solution to the problem: https://stackoverflow.com/questions/9899943/is-it-possible-to-use-non-imported-packages-in-a-package-vignette

── R CMD check results ────────────────────────────────────── TraceQC 0.1.0 ────
Duration: 4m 48.6s

> checking installed package size ... NOTE
    installed size is  7.9Mb
    sub-directories of 1Mb or more:
      extdata   7.0Mb

> checking R code for possible problems ... NOTE
  build_character_table: no visible binding for global variable ‘type’
  build_character_table: no visible binding for global variable
    ‘target_seq’
  build_character_table: no visible binding for global variable ‘start’
  build_character_table: no visible binding for global variable
    ‘mutate_to’
  build_character_table: no visible binding for global variable
    ‘mutationID’
  build_character_table: no visible binding for global variable
    ‘sequenceID’
  circular_chordgram: no visible binding for global variable ‘region’
  circular_chordgram: no visible binding for global variable ‘start’
  circular_chordgram: no visible binding for global variable ‘end’
  circular_histogram: no visible binding for global variable ‘region’
  circular_histogram: no visible binding for global variable ‘start’
  circular_histogram: no visible binding for global variable ‘end’
  create_TraceQC_object: no visible global function definition for
    ‘setNames’
  create_TraceQC_object: no visible binding for global variable ‘start’
  create_TraceQC_object: no visible binding for global variable ‘end’
  create_TraceQC_object: no visible binding for global variable ‘region’
  find_position: no visible binding for global variable ‘end’
  find_position: no visible binding for global variable ‘start’
  find_position: no visible binding for global variable ‘type’
  find_position: no visible binding for global variable ‘tmp’
  find_position: no visible binding for global variable ‘align’
  find_position: no visible binding for global variable ‘mutate_to’
  generate_qc_report: no visible global function definition for
    ‘browseURL’
  lorenz_curve: no visible binding for global variable ‘target_seq’
  lorenz_curve: no visible binding for global variable ‘x’
  lorenz_curve: no visible binding for global variable ‘y’
  lorenz_curve: no visible binding for global variable ‘cs’
  mutation_type: no visible binding for global variable ‘type’
  mutation_type: no visible binding for global variable ‘start’
  mutation_type: no visible binding for global variable ‘mutate_to’
  mutation_type: no visible binding for global variable ‘length_category’
  mutation_type: no visible binding for global variable ‘ymax’
  mutation_type: no visible binding for global variable ‘ymin’
  mutation_type: no visible binding for global variable ‘labelPosition’
  mutation_type: no visible binding for global variable ‘label’
  num_mutation_histogram: no visible binding for global variable
    ‘target_seq’
  num_mutation_histogram: no visible binding for global variable
    ‘num_mutation’
  plot_construct: no visible binding for global variable ‘x’
  plot_construct: no visible binding for global variable ‘y’
  plot_construct: no visible binding for global variable ‘text’
  plot_construct: no visible binding for global variable ‘region’
  plot_deletion_hotspot: no visible binding for global variable ‘type’
  plot_deletion_hotspot: no visible binding for global variable ‘start’
  plot_insertion_hotspot: no visible binding for global variable ‘type’
  plot_insertion_hotspot: no visible binding for global variable ‘start’
  plot_point_mutation_hotspot: no visible binding for global variable
    ‘type’
  plot_point_mutation_hotspot: no visible binding for global variable
    ‘start’
  plot_point_mutation_hotspot: no visible binding for global variable
    ‘mutate_to’
  plot_score_distribution: no visible binding for global variable ‘score’
  plot_score_distribution: no visible binding for global variable
    ‘..density..’
  seq_to_character: no visible binding for global variable ‘target_seq’
  seq_to_character: no visible binding for global variable ‘target_ref’
  sequence_alignment: no visible global function definition for
    ‘alignment’
  Undefined global functions or variables:
    ..density.. align alignment browseURL cs end label labelPosition
    length_category mutate_to mutationID num_mutation region score
    sequenceID setNames start target_ref target_seq text tmp type x y
    ymax ymin
  Consider adding
    importFrom("graphics", "text")
    importFrom("stats", "end", "setNames", "start")
    importFrom("utils", "browseURL")
  to your NAMESPACE file.

> checking for unstated dependencies in vignettes ... NOTE
  'library' or 'require' call not declared from: ‘phangorn’

0 errors ✓ | 0 warnings ✓ | 3 notes x
hyunhwan-jeong commented 4 years ago

No more checking for unstated dependencies in vignettes by 66f995c65626bda1e7b2c217252bd7d34afeafff.

hyunhwan-jeong commented 4 years ago

all the issues have been resolved. Ready to go.

hyunhwan-jeong commented 4 years ago

Current status

Duration: 2m 16.9s

> checking whether package ‘TraceQC’ can be installed ... WARNING
  See below...

> checking package dependencies ... NOTE
  Imports includes 21 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 R code for possible problems ... NOTE
  find_position: no visible binding for global variable ‘alignment_score’
  find_position: no visible binding for global variable ‘type’
  find_position: no visible binding for global variable ‘start’
  find_position: no visible binding for global variable ‘mutate_to’
  seq_to_character: no visible binding for global variable ‘target_seq’
  seq_to_character: no visible binding for global variable ‘target_ref’
  seq_to_character: no visible binding for global variable ‘score’
  Undefined global functions or variables:
    alignment_score mutate_to score start target_ref target_seq type
  Consider adding
    importFrom("stats", "start")
  to your NAMESPACE file.

> checking Rd files ... NOTE
  prepare_Rd: table_to_phyDat.Rd:12-14: Dropping empty section \value

0 errors ✓ | 1 warning x | 3 notes x
Error: R CMD check found WARNINGs
Execution halted

Exited with status 1.