-
Notifications
You must be signed in to change notification settings - Fork 15
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
Fixes Phase 1 of Issue #27 #103
Conversation
- Parsed the file in R. - Mapped the CARD Short Name column to shortname_antibiotics.tsv and shortname_pathogens.tsv. - Sorted and grouped the data by pathogens and antibiotics for analysis. - Filtered for the pathogen "Klebsiella pneumoniae" and drug "CZA" for further analysis.
Created a new branch for cleaner modifications and updates. Staged and committed the necessary unzipped files
Created a new branch for cleaner modifications and updates. Staged and committed the necessary unzipped files
…shortname_pathogens.tsv
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution! I think the overarching issue that you're running into is that the code you've added to the R
folder isn't in functions and, because of that, is getting executed any time the library is loaded.
The code you're adding also appears to be scripts, not library functions, so I'd consider restructuring your PR as follows:
- create a folder called
case_studies
, and one namedCARD
below that - move
CARD_data
,Klebsiella CARD Filtering Code.R
,Klebsiella CARD Filtering Code.R
andStaphylococcus_aureus_DAP_sequences4.fasta
into the newCARD
folder - remove
CARD_AMR_Data_Integration.R
(which appears to be a duplicate ofKlebsiella CARD Filtering Code.R
) andStaphylococcus_aureus_DAP.R
from theR
folder
You can at least submit your work at this point without it throwing off the automated checks.
If you'd like to go further and integrate your code into the package, I would do the following:
- Review the existing functions in the
R
folder to see how you'd write a new one - Add a new file, say
CARD_analyses.R
to theR
folder - Create one or more functions that encapsulate what your script's functionality (e.g., downloading a dataset, loading it into a dataset, and/or returning a filtered version of a datatable), being sure to remove the print statements that you were using for debugging
- Generally, R packages shouldn't include
library()
calls, so you should either add#' @importFrom <package> <symbol1> <symbol2> (etc.)
lines to your function's docstring, or use fully-qualified references, e.g.<library>::<method>()
when calling a method from a specific library.
Hope that helps!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd suggest removing the changes to this file from your PR. You can do so via git checkout main -- MolEvolvR.Rproj
to revert it to what it was before your PR, then add and commit that original version.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file should likewise be removed from the PR, since it appears your scripts download it. You can run git rm --cached broadstreet-v3.3.0.tar.bz2
to remove it from the repo without removing your local copy of it.
#Run FASTA Sequences Through MolEvolvR Web App | ||
|
||
library("devtools") | ||
|
||
devtools::check() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is likely what's causing that error you saw before about infinite recursion. Since the package is already being run by devtools::check()
, running this within the package code is causing it to start a check within the check (and within that check, repeat ad infinitum...) You definitely don't need to call this within code that's part of the package.
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.
@jananiravi @epbrenner