Skip to content

Develop olly#46

Open
ococrook wants to merge 12 commits intomainfrom
developOlly
Open

Develop olly#46
ococrook wants to merge 12 commits intomainfrom
developOlly

Conversation

@ococrook
Copy link
Copy Markdown
Owner

No description provided.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request adds a new comprehensive vignette demonstrating the analysis of SecA protein hydrogen deuterium exchange mass spectrometry data, along with important bug fixes and code improvements in the hdxstats package.

Changes:

  • Added a new case study vignette showing complete HDX-MS analysis workflow for SecA protein data
  • Fixed critical bug in forestPlot function where model2 parameters were incorrectly assigned from model1
  • Improved forestPlot function to return plot object instead of printing it
  • Updated package metadata including version bump (1.0 → 1.0.1) and corrected Authors@R format
  • Enhanced class flexibility by changing vis slot type from "gg" to "ANY"
  • Added new imports to NAMESPACE and DESCRIPTION

Reviewed changes

Copilot reviewed 6 out of 9 changed files in this pull request and generated 14 comments.

Show a summary per file
File Description
vignettes/hdxstats-secA-casestudy.Rmd New comprehensive vignette demonstrating HDX-MS analysis workflow on SecA protein data with functional data analysis approaches
R/hdxstat-methods.R Modified coef method to handle edge case when output has only 1 row by transposing the result
R/hdxstat-class.R Changed vis slot type from "gg" to "ANY" to allow more flexible data storage
R/functionalAnalysis-plots.R Fixed bug using model1 instead of model2, and changed from print to return for better API design
NAMESPACE Added new imports for longFormat, brewer.pal, is, and several packages via import()
DESCRIPTION Updated version to 1.0.1, corrected Authors@R format, expanded description, and added stats to imports

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread R/hdxstat-methods.R
Comment on lines +69 to 74
if(dim(.out)[1] == 1){
nm <- colnames(.out)[1]
.out <- t(.out)
colnames(.out) <- nm
}
rownames(.out) <- c("null", paste0("alt", seq.int(length(object))))
Copy link

Copilot AI Jan 30, 2026

Choose a reason for hiding this comment

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

The logic for preserving column names appears incorrect. When transposing a matrix with 1 row, you're saving only the first column name, but after transposing, you should preserve all the original column names as the new row names, not just the first one. Consider saving the entire colnames(.out) vector before transposing, then assigning it as rownames after the transpose.

Suggested change
if(dim(.out)[1] == 1){
nm <- colnames(.out)[1]
.out <- t(.out)
colnames(.out) <- nm
}
rownames(.out) <- c("null", paste0("alt", seq.int(length(object))))
if (dim(.out)[1] == 1) {
## Preserve all original column names as row names after transposing
nm <- colnames(.out)
.out <- t(.out)
rownames(.out) <- nm
} else {
rownames(.out) <- c("null", paste0("alt", seq.int(length(object))))
}

Copilot uses AI. Check for mistakes.

# Introduction

Ahdash et al. performed HDX-MS on the baceterial sec translocon, a multi-protein
Copy link

Copilot AI Jan 30, 2026

Choose a reason for hiding this comment

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

Spelling error: 'baceterial' should be 'bacterial'.

Suggested change
Ahdash et al. performed HDX-MS on the baceterial sec translocon, a multi-protein
Ahdash et al. performed HDX-MS on the bacterial sec translocon, a multi-protein

Copilot uses AI. Check for mistakes.

The data is stored as a .csv, we need to covert it to an object of class
`QFeatures`. This is performed in a number of steps which we detail below. The
data is contained within the package and so can be loaded by specificy
Copy link

Copilot AI Jan 30, 2026

Choose a reason for hiding this comment

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

Spelling error: 'specificy' should be 'specifying'.

Suggested change
data is contained within the package and so can be loaded by specificy
data is contained within the package and so can be loaded by specifying

Copilot uses AI. Check for mistakes.

```

We an use a forest plot to examine the differneces
Copy link

Copilot AI Jan 30, 2026

Choose a reason for hiding this comment

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

Grammar error: 'We an use' should be 'We can use'.

Suggested change
We an use a forest plot to examine the differneces
We can use a forest plot to examine the differneces

Copilot uses AI. Check for mistakes.
vignette: |
%\VignetteIndexEntry{SecA hydrogen deuterium exchange mass spectrometry data}
%\VignetteEngine{knitr::rmarkdown}
%%\VignetteKeywords{Mass Spectrometry, MS, MSMS, Proteomics, Metabolomics, Infrastructure, Quantitative} %\VignetteEncoding{UTF-8}
Copy link

Copilot AI Jan 30, 2026

Choose a reason for hiding this comment

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

The vignette metadata has a formatting issue. The VignetteKeywords and VignetteEncoding directives are on the same line. They should be on separate lines for proper parsing. Additionally, there's a double percent sign (%%) before VignetteKeywords which should be a single percent sign (%).

Suggested change
%%\VignetteKeywords{Mass Spectrometry, MS, MSMS, Proteomics, Metabolomics, Infrastructure, Quantitative} %\VignetteEncoding{UTF-8}
%\VignetteKeywords{Mass Spectrometry, MS, MSMS, Proteomics, Metabolomics, Infrastructure, Quantitative}
%\VignetteEncoding{UTF-8}

Copilot uses AI. Check for mistakes.

```{r, fig.width= 22, fig.height = 15}
#We need to provide an indication of "difference" so we can examine deprotected
# or prected regions
Copy link

Copilot AI Jan 30, 2026

Choose a reason for hiding this comment

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

Spelling error: 'prected' should be 'protected'.

Suggested change
# or prected regions
# or protected regions

Copilot uses AI. Check for mistakes.
Comment thread DESCRIPTION
comment = c(ORCID = "0000-0001-5669-8506"),
role = c("aut", "cre")))
Description: The hdxstats package enables the analysis and visualisation
of hydrogen deuterium exchange mass spectromery experiments. It supports
Copy link

Copilot AI Jan 30, 2026

Choose a reason for hiding this comment

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

Spelling error: 'spectromery' should be 'spectrometry'.

Suggested change
of hydrogen deuterium exchange mass spectromery experiments. It supports
of hydrogen deuterium exchange mass spectrometry experiments. It supports

Copilot uses AI. Check for mistakes.
toc_float: yes
abstract: "This vignette describes how to analyse a mass-spectrometry based hydrogen
deuterium exchange experiment, in particular we focus on empirical Bayes functional
models and visualisations. This vignette descibes a case-study for analysing
Copy link

Copilot AI Jan 30, 2026

Choose a reason for hiding this comment

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

Spelling error: 'descibes' should be 'describes'.

Suggested change
models and visualisations. This vignette descibes a case-study for analysing
models and visualisations. This vignette describes a case-study for analysing

Copilot uses AI. Check for mistakes.
membrane. Here we analyse this experiment using our functional data analysis
approaches

# loading packges
Copy link

Copilot AI Jan 30, 2026

Choose a reason for hiding this comment

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

Spelling error: 'packges' should be 'packages'.

Suggested change
# loading packges
# loading packages

Copilot uses AI. Check for mistakes.

```

We an use a forest plot to examine the differneces
Copy link

Copilot AI Jan 30, 2026

Choose a reason for hiding this comment

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

Spelling error: 'differneces' should be 'differences'.

Suggested change
We an use a forest plot to examine the differneces
We an use a forest plot to examine the differences

Copilot uses AI. Check for mistakes.
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.

3 participants