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

Convert byChroms.Rnw to byChroms.Rmd #2

Merged
merged 12 commits into from
Jun 6, 2023

Conversation

Rohit-Satyam
Copy link
Contributor

Asking for review from @Bioconductor/sweave2rmd @jwokaty. Below attached is the HTML output of the vignette.
byChroms.zip

@jwokaty
Copy link
Contributor

jwokaty commented Mar 15, 2023

The following checklist will be used to review your PR:

  • the .Rmd file knits to HTML
  • R CMD build runs without errors or timeouts
  • the tarball from R CMD build contains the HTML (check with the
    following by substituting the package name and vignette name tar ztf package_name.tar.gz | grep 'doc/vignette_name')
  • the .Rnw file has been removed
  • in the DESCRIPTION, BiocStyle and knitr are listed in Suggests
  • in the DESCRIPITON, the line VignetteBuilder: knitr exists
  • any added lines use the same spacing and indents as the existing
    document
  • if agreed with the Maintainer, the contributor is in the author list
    in the DESCRIPTION file; refer to the contribution guide for acceptable
    formats
  • if agreed with the Maintainer, the contributor is in the author list
    in the vignette's YAML; refer to the contribution guide for acceptable formats
  • if this pull request includes a conversion from using the separate Author
    and Maintainer lines into the Authors@R vector, check that the
    Authors@R vector includes the maintainer as specified with role='cre'.
  • if this pull request includes a conversion from using the separate Author
    and Maintainer lines into the Authors@R vector, the Maintainer line
    is completely removed.
  • HTML document is representative of the PDF in content and
    in general the presentation
  • Where the contributor was not able to preserve the content and presentation
    of the PDF is noted as a comment in the pull request
  • the R Markdown file is representative of the Sweave document and follows
    best practices, such as replacing links to Bioconductor packages with calls
    to BiocStyle's Biocpkg()

vignettes/byChroms.Rmd Show resolved Hide resolved
vignettes/byChroms.Rmd Outdated Show resolved Hide resolved
vignettes/byChroms.Rmd Outdated Show resolved Hide resolved
@BerylKanali
Copy link

  • the .Rmd file knits to HTML
  • R CMD build runs without errors or timeouts
  • the tarball from R CMD build contains the HTML (check with the
    following by substituting the package name and vignette name tar ztf package_name.tar.gz | grep 'doc/vignette_name')
  • the .Rnw file has been removed
  • in the DESCRIPTION, BiocStyle and knitr are listed in Suggests
  • in the DESCRIPITON, the line VignetteBuilder: knitr exists
  • any added lines use the same spacing and indents as the existing
    document
  • if agreed with the Maintainer, the contributor is in the author list
    in the DESCRIPTION file; refer to the contribution guide for acceptable
    formats
  • if agreed with the Maintainer, the contributor is in the author list in the vignette's YAML; refer to the contribution guide for acceptable formats
  • if this pull request includes a conversion from using the separate Author and Maintainer lines into the Authors@R vector, check that theAuthors@R vector includes the maintainer as specified with role='cre'.
  • if this pull request includes a conversion from using the separate Author and Maintainer lines into the Authors@R vector, the Maintainer line is completely removed.
  • HTML document is representative of the PDF in content and in general the presentation
  • Where the contributor was not able to preserve the content and presentation of the PDF is noted as a comment in the pull request
  • the R Markdown file is representative of the Sweave document and follows best practices, such as replacing links to Bioconductor packages with calls to BiocStyle's Biocpkg()

Copy link

@BerylKanali BerylKanali left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @Rohit-Satyam
I made some few additional comments, take a look at them and make the changes.

vignettes/byChroms.Rmd Show resolved Hide resolved
vignettes/byChroms.Rmd Show resolved Hide resolved
vignettes/byChroms.Rmd Show resolved Hide resolved
@jwokaty
Copy link
Contributor

jwokaty commented Mar 29, 2023

@BerylKanali @Rohit-Satyam Have all changes been made and it is ready for me?

@jwokaty jwokaty changed the title Geneplotter rmd Convert byChroms.Rnw to byChroms.Rmd Mar 30, 2023
@BerylKanali
Copy link

@jwokaty
Not yet. I had asked @Rohit-Satyam to make some minor changes then it will be good to go.

Removed spaces.
Copy link

@BerylKanali BerylKanali left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @Rohit-Satyam
Kindly go through your work one more time to ensure there are no extra spaces. After that let me know.

vignettes/byChroms.Rmd Show resolved Hide resolved
BiocStyle::pdf_document: default

---

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line 27 as well should be removed

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@Rohit-Satyam
Copy link
Contributor Author

Should I just use this PR link in to register contribution in Outrechy?

@BerylKanali
Copy link

Should I just use this PR link in to register contribution in Outrechy?

Yes

@mcarlsn
Copy link

mcarlsn commented Apr 13, 2023

Asking for review from @Bioconductor/sweave2rmd @jwokaty. Below attached is the HTML output of the vignette. byChroms.zip

@Rohit-Satyam Thanks so much for your work on this conversion. We're in the process of organizing the Sweave2Rmd project board post-Outreachy contribution period ending and I wanted to follow-up with you on this vignette. Are you interested in completing the conversion? If not, no worries - we can pass it along to someone else - but I wanted to check with you first. Let us know!

@Rohit-Satyam
Copy link
Contributor Author

Rohit-Satyam commented Apr 27, 2023

Hi @mcarlsn. I am sorry I am replying this two weeks later and this is because for some reason I am not getting github notifications on my gmails. I will resolve this issue. Besides, yes I would like to complete this package vignette conversion if it has not been assigned to someone else yet. Again apologies.

Edit: I saw your emails were in my spam folder. I sincerely apologize for the inconvenience. I thought since there was no notifications that this pull request might have been successfully merged.

@Rohit-Satyam
Copy link
Contributor Author

I have also added visualize.Rmd as requested here. Kindly review @mcarlsn

Copy link
Contributor

@jwokaty jwokaty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this PR. We generally keep conversions separate (1 PR to 1 conversion) and in this case, we already have a good PR for visualize.Rmd; however, it is being held because it has an old plot that requires fixing before we can merge it. Unfortunately, I think it is best to remove the visualize files here.

In addition to the items, I've marked, there are two additional issues.

The first is that the plot at the bottom of the vignette has changed over time if you compare it with the vignette in Bioc 2.0--and this is not anything I would expect you to catch; I only guessed it might have a problem because the other vignette has a problem. I made a suggestion below that might get us closer, but I think I might have to ask for help to update it to get the X, M, and Y parts unless you can figure it.

The second problem is that running R CMD build doesn't generate the html in the doc path, which is how the build system will generate it. After removing visualize, it might be easier to troubleshoot the issue.

@@ -0,0 +1,90 @@
---
title: "geneplotter:Graphics related functions for Bioconductor"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change the title to How to assemble a chromLocation object.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

package: geneplotter

vignette: >
%VignetteIndexEntry{geneplotter:Graphics related functions for Bioconductor}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally, the VignetteIndexEntry is the same as the title. Please change to How to assemble a chromLocation object.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

vignettes/byChroms.Rmd Outdated Show resolved Hide resolved
Comment on lines 86 to 87
And finally we can test it by calling `cPlot`.
```{r cPlot, fig=TRUE}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a blank line between 86 and 87.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

vignettes/byChroms.Rmd Outdated Show resolved Hide resolved
vignettes/byChroms.Rmd Outdated Show resolved Hide resolved
And finally we can test it by calling `cPlot`.
```{r cPlot, fig=TRUE}
library(geneplotter)
cPlot(newChrClass)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This plot is old and it's no longer correct if we look at the version from Bioconductor 2.0: https://bioconductor.org/packages/2.0/bioc/vignettes/geneplotter/inst/doc/byChroms.pdf. We can kind of get closer to it by doing cPlot(newChrClass, as.character(1:22)) but we also need X, M, Y, so we might have to ask for additional help to fix this plot.

Copy link
Contributor Author

@Rohit-Satyam Rohit-Satyam May 6, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Pardon my ignorance. I thought it was due to update in related packages and changes in the plot was expected. But I can offer additional help as well. The code can be modified as follows to generate the exact plot.

library(geneplotter)
## Reorder Chromosomes
newChrClass@chromLocs <- newChrClass@chromLocs[order(as.numeric(names(newChrClass@chromLocs)))]
newChrClass@chromInfo <- newChrClass@chromInfo[order(as.numeric(names(newChrClass@chromInfo)))]
cPlot(newChrClass,useChroms = as.character(c(names(splits),"X","Y","M")))

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing the plot.

%VignetteDepends{annotate, hu6800.db}
%VignetteKeywords{chromosomes}
%VignettePackage{geneplotter}
%VignetteAuthor{Robert Gentleman}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lines 13-19 should have 2 spaces. Currently there is only 1.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. But I don't understand why introducing all these spaces are so important when the Vignette is knitting just fine?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried to respond to a similar comment on slack, but I'll respond here. The reason why we're converting vignettes to .Rmd is that .Rmd files are easier to maintain, but just because something is in .Rmd format doesn't mean it's automatically readable so the requests to correct spacing, wrapping long lines, etc., are style guidelines that we've been picking up along the way as we refine the sweave2rmd process. Some of these suggestions come from core members, such as reformatting long lines. Because we also work with maintainers on their packages and their standards can be quite different, possibly stricter, our PRs need to be in the best shape possible.

This style guide really needs to be added to the documentation. I also hope that in the future, we'll have a package do all or most of this work for us.

vignettes/byChroms.Rmd Show resolved Hide resolved
vignettes/byChroms.Rmd Show resolved Hide resolved
Removal of this vignette requested in [PR](Bioconductor#2)
@Rohit-Satyam
Copy link
Contributor Author

The improved vignette is attached below.
byChroms.zip

Copy link
Contributor

@jwokaty jwokaty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add visualize.Rnw back in?

I still cannot find the html in the doc path after building the vignette, which is how it will be generated by the build system. I am not sure where the problem is.

When I run BiocCheck::BiocCheck on the package, I get the following:

* Checking parsed R code in R directory, examples, vignettes...
    Found @ in vignettes/byChroms.Rmd
    * NOTE: Use accessors; don't access S4 class slots via '@' in
      examples/vignettes.

Can you address these issues?

Comment on lines 13 to 19
%VignetteIndexEntry{How to Assemble a chromLocation Object}
%VignetteEngine{knitr::rmarkdown}
%VignetteEncoding{UTF-8}
%VignetteDepends{annotate, hu6800.db}
%VignetteKeywords{chromosomes}
%VignettePackage{geneplotter}
%VignetteAuthor{Robert Gentleman}
Copy link
Contributor

@jwokaty jwokaty May 14, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are missing the \; for example

%\VignetteIndexEntry{How to Assemble a chromLocation Object}

This is why we're not getting an error but the html isn't generated in the doc path of the tarball. Could I ask you to fix this here and in the other vignettes? Both GeneMeta and ShortRead have the same problem.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

@jwokaty jwokaty Jun 2, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you. I've been checking these to see if you updated any. I will look at this PR first. Enrichmentbrowser needs to be reviewed by the maintainer who will merge the PR. (Maybe he needs a gentle reminder?)

Added the missing `\` as suggested by reviewer in [issue](Bioconductor#2 (comment))
Added the visualize.Rnw as per request by reviewer in [issue](Bioconductor#2 (review))
Rohit-Satyam added a commit to Rohit-Satyam/ggbio that referenced this pull request Jun 2, 2023
Added space before and after the code block as suggested in Bioconductor/geneplotter#2 (comment)
@jwokaty jwokaty merged commit 361d29f into Bioconductor:devel Jun 6, 2023
@jwokaty
Copy link
Contributor

jwokaty commented Jun 6, 2023

@Rohit-Satyam Thanks for your contribution! @BerylKanali Thanks for reviewing!

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

Successfully merging this pull request may close these issues.

4 participants