Contributions icon indicating copy to clipboard operation
Contributions copied to clipboard

tidysbml

Open veronicapaparozzi opened this issue 1 year ago • 11 comments

Update the following URL to point to the GitHub repository of the package you wish to submit to Bioconductor

  • Repository: https://github.com/veronicapaparozzi/tidysbml

Confirm the following by editing each check box to '[x]'

  • [x] I understand that by submitting my package to Bioconductor, the package source and all review commentary are visible to the general public.

  • [x] I have read the Bioconductor Package Submission instructions. My package is consistent with the Bioconductor Package Guidelines.

  • [x] I understand Bioconductor Package Naming Policy and acknowledge Bioconductor may retain use of package name.

  • [x] I understand that a minimum requirement for package acceptance is to pass R CMD check and R CMD BiocCheck with no ERROR or WARNINGS. Passing these checks does not result in automatic acceptance. The package will then undergo a formal review and recommendations for acceptance regarding other Bioconductor standards will be addressed.

  • [x] My package addresses statistical or bioinformatic issues related to the analysis and comprehension of high throughput genomic data.

  • [x] I am committed to the long-term maintenance of my package. This includes monitoring the support site for issues that users may have, subscribing to the bioc-devel mailing list to stay aware of developments in the Bioconductor community, responding promptly to requests for updates from the Core team in response to changes in R or underlying software.

  • [x] I am familiar with the Bioconductor code of conduct and agree to abide by it.

I am familiar with the essential aspects of Bioconductor software management, including:

  • [x] The 'devel' branch for new packages and features.
  • [x] The stable 'release' branch, made available every six months, for bug fixes.
  • [x] Bioconductor version control using Git (optionally via GitHub).

For questions/help about the submission process, including questions about the output of the automatic reports generated by the SPB (Single Package Builder), please use the #package-submission channel of our Community Slack. Follow the link on the home page of the Bioconductor website to sign up.

veronicapaparozzi avatar Feb 24 '24 18:02 veronicapaparozzi

Hi @veronicapaparozzi

Thanks for submitting your package. We are taking a quick look at it and you will hear back from us soon.

The DESCRIPTION file for this package is:

Package: tidysbml
Type: Package
Title: Extract SBML's data into dataframes
Version: 0.99.0
Authors@R: person("Veronica", "Paparozzi", role = c("aut", "cre"), email = "[email protected]")
Author: Veronica Paparozzi [aut, cre]
Maintainer: Veronica Paparozzi <[email protected]>
Description: Starting from one SBML file, it is possible to extract its information from each listOfCompartments, listOfSpecies and listOfReactions element by saving them into data frames. Each table provides one row for each entity (i.e. either compartment, species, reaction or speciesReference) and one set of columns for the attributes, one column for the content of the 'notes' subelement and one set of columns for the content of the 'annotation' subelement. 
License: CC BY 4.0
Encoding: UTF-8
RoxygenNote: 7.3.1
Imports: 
  xml2,
  methods
Suggests: 
    rmarkdown,
    knitr,
    BiocStyle
biocViews: GraphAndNetwork, Network, Pathways, Software
VignetteBuilder: knitr

bioc-issue-bot avatar Feb 24 '24 18:02 bioc-issue-bot

Thanks for this submission. Please provide some scientific context in the vignette. It would be great to show how information organized using SBML can be used with existing Bioconductor workflow or annotation processes. This would really help fit the package into the ecosystem. At present the package software focuses on xml transformation.

vjcitn avatar Mar 11 '24 14:03 vjcitn

Thanks for the feedback. I have updated vignette file with required info. If I understand correctly from submission instructions, at this stage the version bump is not required, so I have not made changes in Description file. Please let me know if any adjustment is required. Thank you.

veronicapaparozzi avatar Mar 22 '24 18:03 veronicapaparozzi

We recommend the vignette have a more distinct name (like your package name). Something generic like introduction can have naming conflicts depending on package load order. For instance just doing library of your package and doing a vignette("introduction") actually pulls up cowplot vignette without explicitly stating your package

> library(tidysbml)
> vignette("introduction")
starting httpd help server ... done
Warning message:
vignette 'introduction' found more than once,
using the one found in '/home/lorikern/R-Libraries/R4.4-Bioc3.19/cowplot/doc' 

You also don't show any examples still that use Bioconductor structures or packages? Unless I missed it?

lshep avatar Mar 27 '24 13:03 lshep

Dear @lshep, I apologise for delayed reply. I’ve renamed the vignette file adding the package name. About interoperability examples, I've previously inserted at the beginning of the vignette a very short description of interoperability, just quoting the packages name, but your last answer suggest me that maybe it is not enough. Currently I am close to finish an article which describes the package and its applications. In particular, I’ve described some use cases of workflows in R to enable tidysbml output (R dataframes) as input to use other R packages. Specially, I show the R commands to run for:

  • igraph package: in order to create an igraph graph starting from a portion of one of the output data frames;
  • RCy3 package: starting from both igraph graph and dataframe (in form of edgelist)
  • biomaRt package: to manipulate dataframes for accessing annotation databases

I suppose that these cases can be used for interoperability examples as well (please correct me if I’m wrong), but only one document can incorporate them. Thus I have some questions:

  • Are these examples suitable for your request?
  • If yes, could I report interoperability examples in the vignette just by adding citation to the article once it will be published? (The journal is open-access and the two submissions will be carried out in parallel); otherwise, could I describe inside vignette a similar example (for instance using biomaRt) ?
  • If not, which are the type of examples needed?

Many thanks for your patience and availability.

veronicapaparozzi avatar May 16 '24 17:05 veronicapaparozzi

Yes those examples (in particular RCy3 and biomaRt as Bioconductor packages) are suitable. We prefer to have some executed code in the vignette in a similar example to ensure runnable code/examples perform as advertised. If you could add examples showing how to incorporate with RCy3 and boimaRt that would be sufficient.

lshep avatar May 17 '24 14:05 lshep

May we expected updates soon?

lshep avatar Jun 24 '24 16:06 lshep

Yes, by tomorrow or at the latest the day after tomorrow I will update the package with the requested changes.

veronicapaparozzi avatar Jun 24 '24 17:06 veronicapaparozzi

Dear @lshep, I've completed the changes discussed: I've update the vignette inserting two example of interoperability (with RCy3 and biomaRt). I've also put an additional file in external data.

veronicapaparozzi avatar Jun 25 '24 18:06 veronicapaparozzi

Your package has been added to git.bioconductor.org to continue the pre-review process. A build report will be posted shortly. Please fix any ERROR and WARNING in the build report before a reviewer is assigned or provide a justification on why you feel the ERROR or WARNING should be granted an exception.

IMPORTANT: Please read this documentation for setting up remotes to push to git.bioconductor.org. All changes should be pushed to git.bioconductor.org moving forward. It is required to push a version bump to git.bioconductor.org to trigger a new build report.

Bioconductor utilized your github ssh-keys for git.bioconductor.org access. To manage keys and future access you may want to active your Bioconductor Git Credentials Account

bioc-issue-bot avatar Jul 01 '24 14:07 bioc-issue-bot

Dear Package contributor,

This is the automated single package builder at bioconductor.org.

Your package has been built on the Bioconductor Single Package Builder.

On one or more platforms, the build results were: "skipped, ERROR". This may mean there is a problem with the package that you need to fix. Or it may mean that there is a problem with the build system itself.

Please see the build report for more details.

The following are build products from R CMD build on the Single Package Builder: ERROR before build products produced.

Links above active for 21 days.

Remember: if you submitted your package after July 7th, 2020, when making changes to your repository push to [email protected]:packages/tidysbml to trigger a new build. A quick tutorial for setting up remotes and pushing to upstream can be found here.

bioc-issue-bot avatar Jul 01 '24 14:07 bioc-issue-bot

The error is due to execution of RCy3 function while Cytoscape is not running. I've tried to fix the issue inserting eval=FALSE in the respective chunk, but I cannot fetch or push to Bioconductor git since I lost the passphrase. Should I create another SSH key or there is another way to solve the connection issue? Thank you in advance.

veronicapaparozzi avatar Jul 11 '24 08:07 veronicapaparozzi

@lshep can you help here with ssh problem?

vjcitn avatar Jul 11 '24 09:07 vjcitn

We can not help with ssh key passphrases as they are created locally and known only by the creator. Yes you should create a new ssh key and put it in your BiocCredentials account

lshep avatar Jul 11 '24 10:07 lshep

Received a valid push on git.bioconductor.org; starting a build for commit id: 4d17ab7652a3d9f0508a804ae6f6cbe3073c4989

bioc-issue-bot avatar Jul 23 '24 17:07 bioc-issue-bot

Dear Package contributor,

This is the automated single package builder at bioconductor.org.

Your package has been built on the Bioconductor Single Package Builder.

On one or more platforms, the build results were: "ERROR". This may mean there is a problem with the package that you need to fix. Or it may mean that there is a problem with the build system itself.

Please see the build report for more details.

The following are build products from R CMD build on the Single Package Builder: macOS 12.7.1 Monterey: tidysbml_0.99.1.tar.gz Linux (Ubuntu 22.04.3 LTS): tidysbml_0.99.1.tar.gz

Links above active for 21 days.

Remember: if you submitted your package after July 7th, 2020, when making changes to your repository push to [email protected]:packages/tidysbml to trigger a new build. A quick tutorial for setting up remotes and pushing to upstream can be found here.

bioc-issue-bot avatar Jul 23 '24 17:07 bioc-issue-bot

Received a valid push on git.bioconductor.org; starting a build for commit id: cc17e5c5bd64b305ca354acd6652ed6eb6f6a626

bioc-issue-bot avatar Jul 24 '24 15:07 bioc-issue-bot

Dear Package contributor,

This is the automated single package builder at bioconductor.org.

Your package has been built on the Bioconductor Single Package Builder.

On one or more platforms, the build results were: "skipped, ERROR". This may mean there is a problem with the package that you need to fix. Or it may mean that there is a problem with the build system itself.

Please see the build report for more details.

The following are build products from R CMD build on the Single Package Builder: ERROR before build products produced.

Links above active for 21 days.

Remember: if you submitted your package after July 7th, 2020, when making changes to your repository push to [email protected]:packages/tidysbml to trigger a new build. A quick tutorial for setting up remotes and pushing to upstream can be found here.

bioc-issue-bot avatar Jul 24 '24 15:07 bioc-issue-bot

Received a valid push on git.bioconductor.org; starting a build for commit id: a82f6c51feff6f69c509e6ce635be513f634e94f

bioc-issue-bot avatar Jul 24 '24 16:07 bioc-issue-bot

Dear Package contributor,

This is the automated single package builder at bioconductor.org.

Your package has been built on the Bioconductor Single Package Builder.

On one or more platforms, the build results were: "ERROR". This may mean there is a problem with the package that you need to fix. Or it may mean that there is a problem with the build system itself.

Please see the build report for more details.

The following are build products from R CMD build on the Single Package Builder: macOS 12.7.1 Monterey: tidysbml_0.99.3.tar.gz Linux (Ubuntu 22.04.3 LTS): tidysbml_0.99.3.tar.gz

Links above active for 21 days.

Remember: if you submitted your package after July 7th, 2020, when making changes to your repository push to [email protected]:packages/tidysbml to trigger a new build. A quick tutorial for setting up remotes and pushing to upstream can be found here.

bioc-issue-bot avatar Jul 24 '24 16:07 bioc-issue-bot

Received a valid push on git.bioconductor.org; starting a build for commit id: 0543b2002954c7c7266d2289f374f5f6c06f910c

bioc-issue-bot avatar Jul 24 '24 16:07 bioc-issue-bot

Dear Package contributor,

This is the automated single package builder at bioconductor.org.

Your package has been built on the Bioconductor Single Package Builder.

On one or more platforms, the build results were: "ERROR". This may mean there is a problem with the package that you need to fix. Or it may mean that there is a problem with the build system itself.

Please see the build report for more details.

The following are build products from R CMD build on the Single Package Builder: macOS 12.7.1 Monterey: tidysbml_0.99.4.tar.gz Linux (Ubuntu 22.04.3 LTS): tidysbml_0.99.4.tar.gz

Links above active for 21 days.

Remember: if you submitted your package after July 7th, 2020, when making changes to your repository push to [email protected]:packages/tidysbml to trigger a new build. A quick tutorial for setting up remotes and pushing to upstream can be found here.

bioc-issue-bot avatar Jul 24 '24 16:07 bioc-issue-bot

Received a valid push on git.bioconductor.org; starting a build for commit id: 0efd11aba5814413f791444bda99d14d83732c82

bioc-issue-bot avatar Jul 24 '24 16:07 bioc-issue-bot

Dear Package contributor,

This is the automated single package builder at bioconductor.org.

Your package has been built on the Bioconductor Single Package Builder.

On one or more platforms, the build results were: "WARNINGS". This may mean there is a problem with the package that you need to fix. Or it may mean that there is a problem with the build system itself.

Please see the build report for more details.

The following are build products from R CMD build on the Single Package Builder: macOS 12.7.1 Monterey: tidysbml_0.99.5.tar.gz Linux (Ubuntu 22.04.3 LTS): tidysbml_0.99.5.tar.gz

Links above active for 21 days.

Remember: if you submitted your package after July 7th, 2020, when making changes to your repository push to [email protected]:packages/tidysbml to trigger a new build. A quick tutorial for setting up remotes and pushing to upstream can be found here.

bioc-issue-bot avatar Jul 24 '24 16:07 bioc-issue-bot

Received a valid push on git.bioconductor.org; starting a build for commit id: f7ca18d2481553179208d17afd981f02f370cec5

bioc-issue-bot avatar Jul 29 '24 10:07 bioc-issue-bot

Dear Package contributor,

This is the automated single package builder at bioconductor.org.

Your package has been built on the Bioconductor Single Package Builder.

On one or more platforms, the build results were: "WARNINGS". This may mean there is a problem with the package that you need to fix. Or it may mean that there is a problem with the build system itself.

Please see the build report for more details.

The following are build products from R CMD build on the Single Package Builder: macOS 12.7.1 Monterey: tidysbml_0.99.6.tar.gz Linux (Ubuntu 22.04.3 LTS): tidysbml_0.99.6.tar.gz

Links above active for 21 days.

Remember: if you submitted your package after July 7th, 2020, when making changes to your repository push to [email protected]:packages/tidysbml to trigger a new build. A quick tutorial for setting up remotes and pushing to upstream can be found here.

bioc-issue-bot avatar Jul 29 '24 11:07 bioc-issue-bot

I have added in Suggests the RCy3 and biomaRt packages (that I use in Vignette for examples of interoperability), yet the warning persists.

veronicapaparozzi avatar Jul 29 '24 13:07 veronicapaparozzi

Thank you. We can proceed with this warning as you show interoperability in the vignette with the mentioned Bioconductor packages. I will assign a reviewer shortly.

lshep avatar Jul 29 '24 13:07 lshep

A reviewer has been assigned to your package for an indepth review. Please respond accordingly to any further comments from the reviewer.

bioc-issue-bot avatar Aug 05 '24 13:08 bioc-issue-bot

Package 'tidysbml' Review

Thank you for submitting your package to Bioconductor. The package passed check and build. Please try to answer the comments line by line when you are ready for a second review. Code: Note: please consider; Important: must be addressed.

The DESCRIPTION file

  • [ ] Important: Depends field is not found in DESCRIPTION.
  • [ ] Important: R version is not clear in DESCRIPTION.
  • [ ] NOTE: Provide 'URL', 'BugReports' field(s) in DESCRIPTION.
  • [ ] Important: No Bioconductor dependencies detected (Imports or Depends).

The NAMESPACE file

  • [ ] Important: Function names use camelCase or snake_case and do not include ..
    • in line 4 export(as_df.annotation)
    • in line 5 export(as_df.attributes)
    • in line 6 export(as_df.notes)

General package development

  • [ ] Important: Consider adding unit tests. We strongly encourage them. See http://bioconductor.org/developers/how-to/unitTesting-guidelines/.
  • [ ] Important: Consider adding a NEWS file, so your package news will be included in Bioconductor release announcements.
  • [ ] Important: validate the xml files with schema.
  • [ ] Note: S4 object oriented programming is suggested for xml converted objects.

R code

  • [ ] NOTE: :: is not suggested in source code unless you can make sure all the packages are imported. Some people think it is better to keep ::. However, please be aware that you will need to manually double-check the imported items if you make any changes to the DESCRIPTION file during development. My suggestion is to remove one repetitions to trigger the dependency check.
  • [ ] NOTE: Vectorize: for loops present, try to replace them by *apply funcitons.
    • In file R/as_df.annotation.R:
      • at line 13 found ' for(p in seq_along(list_creator[[descriptor_content_idx]])){'
      • at line 24 found ' for(q in seq_along(list_creator[[descriptor_content_idx]][[p]])){'
      • at line 59 found ' for(m in seq_along(list_app)){'
      • at line 108 found ' for (i in seq_len(len)) {'
      • at line 109 found ' for(j in seq_along(names(sbml_list_listOf[[i]]))){'
      • at line 116 found ' for(k in seq_along(sbml_list_listOf[[i]][[j]])){'
      • at line 122 found ' for(n_descr in seq_along(sbml_list_listOf[[i]][[j]][[k]])){'
      • at line 127 found ' for(l in seq_along(list_temp)){'
    • In file R/as_df.attributes.R:
      • at line 26 found ' for (i in seq_along(sbml_list_listOf)) {'
      • at line 27 found ' for(j in seq_along(names(attributes(sbml_list_listOf[[i]])))){'
    • In file R/as_df.notes.R:
      • at line 57 found ' for(l in seq_along(names(list_notes))){'
      • at line 99 found ' for (i in seq_len(len)) {'
      • at line 100 found ' for(j in seq_along(names(sbml_list_listOf[[i]]))){'
    • In file R/as_dfs.R:
      • at line 35 found ' for (i in seq_along(vec_names_model)) {'
    • In file R/as_subdf.R:
      • at line 39 found ' for (i in seq_len(len)) {'
      • at line 40 found ' for(j in seq_along(names(sbml_list_listOf[[i]]))){'
      • at line 47 found ' for(k in seq_along(sbml_list_listOf[[i]][[j]])){'
      • at line 52 found ' for(l in seq_along(names(attributes(list_speciesref)))){'
      • at line 66 found ' for (l in seq_along(list_speciesref)) {'
      • at line 78 found ' for(m in seq_along(list_speciesref[[l]])){'
      • at line 84 found ' for(n_descr in seq_along(names(list_speciesref[[l]][[m]]))){'
      • at line 89 found ' for(n in seq_along(list_descr)){'
  • [ ] Important: Remove unused code.
    • In file R/as_df.notes.R:
      • at line 47 found 'as_value.notes <- function(list_notes){ # , vec_notes_i){ # I think you cannot have multiple notes elements within on entity'
  • [ ] NOTE: Avoid using '=' for assignment and use '<-' instead. Please user styler package to reformat your package.
    • R/as_df.annotation.R (line 18, column 27)
    • R/as_df.annotation.R (line 99, column 6)
    • R/as_df.annotation.R (line 185, column 7)
    • R/as_df.notes.R (line 93, column 6)
    • R/as_df.notes.R (line 97, column 12)
    • R/as_subdf.R (line 22, column 6)
    • R/as_subdf.R (line 48, column 12)
    • R/as_subdf.R (line 150, column 10)
    • R/as_subdf.R (line 152, column 32)
    • R/as_subdf.R (line 165, column 63)
    • R/as_subdf.R (line 166, column 12)
    • R/as_subdf.R (line 173, column 12)
  • [ ] To avoid the * NOTE: Avoid redundant 'stop' and 'warn*' in signal conditions in BioCheck, could you please change the word error to other word in - R/as_df.notes.R (line 12, column 50)
  • [ ] NOTE: Functional programming: code repetition.
    • repetition in as_df.annotation, as_df.attributes, as_df.notes, as_subdf, and as_value.notes
      • in as_df.annotation
        • line 1:{
        • line 2: if (missing(sbml_list_listOf))
        • line 3: stop("no argument inserted. You must provide one list in input.")
        • line 4: if (!typeof(sbml_list_listOf) == "list")
        • line 5: stop("argument is not a list")
        • line 6: len = length(sbml_list_listOf)
        • line 7: if (!len)
        • line 8: stop("Empty output : list of length 0 inserted")
        • line 9: if (length(unique(names(sbml_list_listOf))) != 1 && !unique(names(sbml_list_listOf)) %in%
        • line 10: c("species", "reaction", "compartment"))
        • line 11: stop("invalid format for list in input : it must contain only one type of element, that is either 'species','reaction' or 'compartment' type")
        • line 12: vec_names_attr <- c()
        • line 13: vec_annotation <- c()
        • line 14: vec_colname_annotation <- c()
        • line 15: vec_colname_ann_final <- c()
        • line 16: for (i in seq_len(len)) {
        • line 17: for (j in seq_along(names(sbml_list_listOf[[i]]))) {
        • line 18: if (names(sbml_list_listOf[[i]])[j] == "annotation") {
        • line 30: for (l in seq_along(list_temp)) {
        • line 31: name_descriptor <- names(list_temp)[l]
        • line 32: name_col_descriptor <- paste("annotation_",
        • line 33: name_descriptor, "__", sep = "")
        • line 34: name_col_tosearch <- substr(name_col_descriptor,
        • line 35: 1, nchar(name_col_descriptor) -
        • line 36: 1)
        • line 37: name_col_tosave <- substr(name_col_descriptor,
        • line 38: 1, nchar(name_col_descriptor) -
        • line 39: 2)
        • line 40: if (!name_col_descriptor %in% vec_colname_annotation) {
        • line 41: assign(name_col_descriptor, rep(NA,
        • line 42: length(sbml_list_listOf)))
        • line 43: vec_colname_ann_final <- c(vec_colname_ann_final,
        • line 44: name_col_tosave)
        • line 45: vec_colname_annotation <- c(vec_colname_annotation,
        • line 46: name_col_descriptor)
        • line 47: vec_names_descriptor <- c(vec_names_descriptor,
        • line 48: name_col_descriptor)
        • line 49: }
        • line 50: else if (!name_col_descriptor %in%
        • line 51: vec_names_descriptor) {
        • line 52: vec_names_descriptor <- c(vec_names_descriptor,
        • line 53: name_col_descriptor)
        • line 54: }
        • line 55: else {
        • line 56: string_tosearch <- paste("^",
        • line 57: name_col_tosearch, ".+", sep = "")
        • line 58: number <- sum(grepl(string_tosearch,
        • line 59: vec_names_descriptor))
        • line 60: name_new_col <- paste(name_col_tosearch,
        • line 61: number, sep = "")
        • line 62: if (name_new_col %in% vec_colname_annotation) {
        • line 63: vec_names_descriptor <- c(vec_names_descriptor,
        • line 64: name_new_col)
        • line 65: }
        • line 66: else {
        • line 67: assign(name_new_col, rep(NA,
        • line 68: length(sbml_list_listOf)))
        • line 69: vec_colname_ann_final <- c(vec_colname_ann_final,
        • line 70: name_new_col)
        • line 71: vec_colname_annotation <- c(vec_colname_annotation,
        • line 72: name_new_col)
        • line 73: vec_names_descriptor <- c(vec_names_descriptor,
        • line 74: name_new_col)
        • line 75: }
        • line 76: name_col_descriptor <- name_new_col
        • line 77: }
        • line 78: list_temp1 <- list_temp[[l]]
        • line 79: vec_app <- get(name_col_descriptor)
        • line 82: vec_app[i] <- as_value.annotation(list_temp1,
        • line 83: vec_app[i])
        • line 84: }
        • line 85: assign(name_col_descriptor, vec_app)
        • line 86: }
        • line 87: }
        • line 88: }
        • line 90: else {
        • line 91: warning("Extraction of 'annotation' is not totally available for '",
        • line 92: names(sbml_list_listOf)[i], " ", i,
        • line 93: "': found element '", names(sbml_list_listOf[[i]][[j]])[k],
        • line 94: "' different from 'RDF' within the input list")
        • line 95: }
        • line 96: }
        • line 97: }
        • line 103: length(vec_colname_annotation)) {
        • line 104: vec_colname_ann_final <- sort(vec_colname_ann_final)
        • line 105: vec_colname_annotation <- sort(vec_colname_annotation)
        • line 106: df = data.frame(lapply(seq_along(vec_colname_annotation),
        • line 107: function(n_col) get(vec_colname_annotation[n_col])))
        • line 109: df
        • line 110: }
        • line 111: else {
        • line 112: message("Empty annotation's columns for '", unique(names(sbml_list_listOf)),
        • line 113: "' elements")
        • line 114: c()
        • line 115: }
      • in as_df.attributes
        • line 1:{
        • line 2: if (missing(sbml_list_listOf))
        • line 3: stop("no argument inserted. You must provide one list in input.")
        • line 4: if (!typeof(sbml_list_listOf) == "list")
        • line 5: stop("argument is not a list")
        • line 6: if (!length(sbml_list_listOf))
        • line 7: stop("empty output. List of length 0 inserted.")
        • line 8: if (length(unique(names(sbml_list_listOf))) != 1 && !unique(names(sbml_list_listOf)) %in%
        • line 9: c("species", "reaction", "compartment"))
        • line 10: stop("invalid format for list in input : it must contain only one type of element, that is either 'species','reaction' or 'compartment' type")
        • line 11: vec_names_attr <- c()
        • line 12: for (i in seq_along(sbml_list_listOf)) {
      • in as_df.notes
        • line 1:{
        • line 2: if (missing(sbml_list_listOf))
        • line 3: stop("no argument inserted. You must provide one list in input.")
        • line 4: if (!typeof(sbml_list_listOf) == "list")
        • line 5: stop("argument is not a list")
        • line 6: len = length(sbml_list_listOf)
        • line 7: if (!len > 0)
        • line 8: stop("empty output. List in input must have length greater than 0.")
        • line 9: if (length(unique(names(sbml_list_listOf))) != 1 && !unique(names(sbml_list_listOf)) %in%
        • line 10: c("species", "reaction", "compartment"))
        • line 11: stop("invalid format for list in input : it must contain only one type of element, that is either 'species','reaction' or 'compartment' type")
        • line 12: vec_notes = rep(NA, len)
        • line 13: for (i in seq_len(len)) {
        • line 14: for (j in seq_along(names(sbml_list_listOf[[i]]))) {
        • line 15: if (names(sbml_list_listOf[[i]])[j] == "notes") {
        • line 23: df
        • line 24: }
        • line 25: else {
        • line 26: message("Empty notes' column for '", unique(names(sbml_list_listOf)),
        • line 27: "' elements")
        • line 28: c()
        • line 29: }
      • in as_subdf
        • line 1:{
        • line 2: if (missing(sbml_list_listOf))
        • line 3: stop("no argument inserted. You must provide one list in input.")
        • line 4: if (!typeof(sbml_list_listOf) == "list")
        • line 5: stop("argument is not a list")
        • line 6: len = length(sbml_list_listOf)
        • line 7: if (!len)
        • line 8: stop("Empty output : list of length 0 inserted")
        • line 17: vec_names_attr <- c()
        • line 18: vec_annotation <- c()
        • line 19: vec_colname_annotation <- c()
        • line 20: vec_colname_ann_final <- c()
        • line 61: for (n in seq_along(list_descr)) {
        • line 62: name_descriptor <- names(list_descr)[n]
        • line 63: name_col_descriptor <- paste("annotation_",
        • line 64: name_descriptor, "__",
        • line 65: sep = "")
        • line 66: name_col_tosearch <- substr(name_col_descriptor,
        • line 67: 1, nchar(name_col_descriptor) -
        • line 68: 1)
        • line 69: name_col_tosave <- substr(name_col_descriptor,
        • line 70: 1, nchar(name_col_descriptor) -
        • line 71: 2)
        • line 72: if (!name_col_descriptor %in%
        • line 73: vec_colname_annotation) {
        • line 74: assign(name_col_descriptor,
        • line 75: rep(NA, length(sbml_list_listOf)))
        • line 76: vec_colname_ann_final <- c(vec_colname_ann_final,
        • line 77: name_col_tosave)
        • line 78: vec_colname_annotation <- c(vec_colname_annotation,
        • line 79: name_col_descriptor)
        • line 80: vec_names_descriptor <- c(vec_names_descriptor,
        • line 81: name_col_descriptor)
        • line 82: }
        • line 83: else if (!name_col_descriptor %in%
        • line 84: vec_names_descriptor) {
        • line 85: vec_names_descriptor <- c(vec_names_descriptor,
        • line 86: name_col_descriptor)
        • line 87: }
        • line 88: else {
        • line 89: string_tosearch <- paste("^",
        • line 90: name_col_tosearch,
        • line 91: ".+", sep = "")
        • line 92: number <- sum(grepl(string_tosearch,
        • line 93: vec_names_descriptor))
        • line 94: name_new_col <- paste(name_col_tosearch,
        • line 95: number, sep = "")
        • line 96: if (name_new_col %in%
        • line 97: vec_colname_annotation) {
        • line 98: vec_names_descriptor <- c(vec_names_descriptor,
        • line 99: name_new_col)
        • line 100: }
        • line 101: else {
        • line 102: assign(name_new_col,
        • line 103: rep(NA, length(sbml_list_listOf)))
        • line 104: vec_colname_ann_final <- c(vec_colname_ann_final,
        • line 105: name_new_col)
        • line 106: vec_colname_annotation <- c(vec_colname_annotation,
        • line 107: name_new_col)
        • line 108: vec_names_descriptor <- c(vec_names_descriptor,
        • line 109: name_new_col)
        • line 110: }
        • line 111: name_col_descriptor <- name_new_col
        • line 112: }
        • line 113: list_tmp <- list_descr[[n]]
        • line 114: vec_tmp <- get(name_col_descriptor)
        • line 115: vec_tmp[r] <- as_value.annotation(list_tmp,
        • line 116: vec_tmp[r])
        • line 117: assign(name_col_descriptor,
        • line 118: vec_tmp)
        • line 119: }
        • line 120: }
        • line 124: warning("Extraction of 'annotation' for nested dataframe is not totally available for '",
        • line 125: names(sbml_list_listOf)[i],
        • line 126: " ", i, "': found element '",
        • line 127: names(sbml_list_listOf[[i]][[j]])[k],
        • line 128: "' different from 'RDF' within the input list")
        • line 129: }
        • line 130: }
        • line 131: }
        • line 164: if (length(vec_colname_annotation)) {
        • line 165: vec_colname_ann_final <- sort(vec_colname_ann_final)
        • line 166: vec_colname_annotation <- sort(vec_colname_annotation)
        • line 167: subdf = data.frame(subdf, lapply(seq_along(vec_colname_annotation),
        • line 168: function(n_colannotation) {
      • in as_value.notes
        • line 1:{
        • line 2: if (missing(list_notes))
        • line 3: stop("no argument inserted. You must provide one list in input.")
        • line 4: if (!typeof(list_notes) == "list")
        • line 5: stop("argument is not a list")
        • line 6: if (length(list_notes) == 0) {

Documentation

  • [ ] Important: Vignette should have an Installation section.
    • rmd file vignettes/tidysbml-introduction.Rmd
  • [ ] Important: Please include Bioconductor installation instructions using BiocManager.
    • rmd file vignettes/tidysbml-introduction.Rmd
  • [ ] Important: Vignette includes sessionInfo().
    • rmd file vignettes/tidysbml-introduction.Rmd
  • [ ] Note: Vignette includes motivation for submitting to Bioconductor as part of the abstract/intro of the main vignette.
    • rmd file vignettes/tidysbml-introduction.Rmd
  • [ ] Important: when first using an abbreviation or acronym in writing, spelling out the full term and including the abbreviation in parentheses are suggested.

jianhong avatar Aug 09 '24 12:08 jianhong