Bugs in example code

Issue #113 resolved
Xinqiu Yao created an issue

After run R CMD check

...
* checking examples ... ERROR
Running examples inbio3d-Ex.Rfailed
The error most likely occurred in:

> ### Name: nma.pdbs
> ### Title: Ensemble Normal Mode Analysis
> ### Aliases: nma.pdbs print.enma
> ### Keywords: analysis
> 
> ### ** Examples
> 
> ## Fetch PDB files and split to chain A only PDB files
> ids <- c("1a70_A", "1czp_A", "1frd_A", "1fxi_A", "1iue_A", "1pfd_A")
> raw.files <- get.pdb(ids, path = tempdir())
> files <- pdbsplit(raw.files, ids, path = tempdir())
> 
> ## Sequence Alignement
> pdbs <- pdbaln(files)
> 
> ## Normal mode analysis on aligned data
> modes <- nma(pdbs, rm.gaps=FALSE)
> 
> ## Plot fluctuation data
> plot(modes, pdbs=pdbs)
> 
> ## Cluster on Fluctuation similariy
> sip <- sip(modes)
Error in sip.enma(modes) : 
  provide 'enma' object calculated with argument 'rm.gaps=TRUE'
Calls: sip -> sip.enma
Execution halted

Comments (4)

  1. Xinqiu Yao reporter

    Above bug has been fixed with recent commit.

    Another one found during "R CMD check --as-cran"

    gs  <- geostas(pdb, ncore=1)
    ...
    Error in M[1, 1] = suma : argument "M" is missing, with no default
    
  2. Lars Skjærven

    thanks for spotting! should be resolved in latest commit.

    I also added warning in function get.pdb() when ids4 > 4. attempted a strsplit(ids, "_") for this. see code for more details.

    there is also this one:

    Undocumented code objects:print.xyz
  3. Xinqiu Yao reporter

    Thanks! I will update slightly test-get.pdb for the change. I've also noticed the missing print.xyz.Rd. Will add it soon.

  4. Log in to comment