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

add input checks in pre-msa-tree #74

Merged
merged 5 commits into from
Oct 30, 2024
Merged

Conversation

awasyn
Copy link
Collaborator

@awasyn awasyn commented Oct 7, 2024

Description

What kind of change(s) are included?

Checklist

Please ensure that all boxes are checked before indicating that this pull request is ready for review.

  • I have read and followed the CONTRIBUTING.md guidelines.
  • I have searched for existing content to ensure this is not a duplicate.
  • I have performed a self-review of these additions (including spelling, grammar, and related).
  • I have added comments to my code to help provide understanding.
  • I have added a test which covers the code changes found within this PR.
  • I have deleted all non-relevant text in this pull request template.
  • Reviewer assignment: Tag a relevant team member to review and approve the changes.

@jananiravi jananiravi added the outreachy for outreachy interns label Oct 20, 2024
@the-mayer the-mayer self-requested a review October 30, 2024 16:44
@the-mayer the-mayer self-assigned this Oct 30, 2024
Copy link
Collaborator

@the-mayer the-mayer 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 these additions!

@the-mayer the-mayer linked an issue Oct 30, 2024 that may be closed by this pull request
3 tasks
@the-mayer the-mayer merged commit c838c4e into JRaviLab:main Oct 30, 2024
1 check passed
Copy link
Member

@jananiravi jananiravi left a comment

Choose a reason for hiding this comment

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

minor Qs. thanks for PR!

abort("Error: Alignment file path must be provided.")
}

if (!file.exists(aln_file)) {
Copy link
Member

Choose a reason for hiding this comment

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

Should we remove extra spaces or use paste0 if we're introducing spaces? [or do the tests work out OK?]

@@ -218,6 +245,19 @@ addLeaves2Alignment <- function(aln_file = "",
addName <- function(data,
accnum_col = "AccNum", spec_col = "Species", lin_col = "Lineage",
lin_sep = ">", out_col = "Name") {
# Check if the data is a data fram
if (!is.data.frame(data)) {
abort("Error: The input 'data' must be a data frame")
Copy link
Member

Choose a reason for hiding this comment

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

missing full stop

abort("Error: Alignment file path must be provided.")
}

if (!file.exists(aln_file)) {
Copy link
Member

Choose a reason for hiding this comment

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

space Qs here, too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
outreachy for outreachy interns
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEAT] Add error handling for functions
3 participants