-
Clone the repository to your local machine so you can begin making changes.
-
On your local machine make sure you have the latest version of the
develop
branch:git checkout develop git pull origin develop
-
Create a feature branch off the
develop
branch and work on it. The branch should be named the same as the JIRA issue you are working on in lowercase (e.g.,gen-1234-{feature-here}
). Make sure the branch name as informative as possible.git checkout develop git checkout -b gen-1234-{feature-here}
-
Once you have made your additions or changes, make sure you write tests and run comparison scripts to ensure changes are expected.
-
At this point, you have only created the branch locally, you need to push this to your fork on GitHub.
git add your file git commit -m "your commit information" git push --set-upstream origin gen-1234-{feature-here}
-
Create a pull request from the feature branch to the develop branch. When changes are made to
script/<module_folder_name>
(only applies to scripts/references and scripts/table_updates for now), a Github action will be triggered to create a docker image for the branch, you can check it here.
Here is how to contribute to the nextflow workflow of the genie-bpc-pipeline
If you wish to contribute a new step, please use the following guidelines:
- Add a new process step as a nextflow module under
genie-bpc-pipeline/modules
- Write the process step code and add to the appropriate module folder under
script/<module_folder_name>
- Add the process step to the workflow section in
main.nf
as a step - Add to any pre-existing process steps that needs this step as an input and vice versa
- Add any new parameters to
nextflow_schema.json
with help text. - Add any new parameter's default values to the set parameter default values section in
main.nf
. - Add any additional validation for all relevant parameters. See validation section in
main.nf
We have automated docker builds to GHCR whenever there are changes to the scripts within a "module" as each module has its own image. Whenever a new module gets added, the github workflow .github/workflows/build-docker-images.yml
should be updated.
- Under
jobs
add your module name tomatrix:
- Once you push your changes, your docker image will build and will in the form:
<registry>/<repo>:<folder_name>-<branch>
(Example:ghcr.io/genie-bpc-pipeline:references-gen-1485-update-potential-phi
)
Parameters should be initialized / defined with default values in the set parameter default values section in main.nf
Defaults for process resource requirements (CPUs / memory / time) for a process should be defined in nextflow.config
.
- To test locally, you can’t use ghcr.io/sage-bionetworks/docker_image_name locally directly. You will need to pull the docker image to local and test with it.
- To test on Sequra, go to the test_bpc_pipeline, edit the pipeline by pointing it to your feature branch then update. Doing this will allow you to select parameters from the dropdown menu directly.