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

feat: gene essentiality workflow #675

Merged
merged 24 commits into from
Oct 28, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
07329bc
feat: gene essentiality workflow with pr comment
mihai-sysbio Jul 7, 2023
c3db9c5
Merge branch 'develop' into feat/gene-essentiality-workflow
mihai-sysbio Oct 6, 2023
1bba24d
chore: expand workflow targets
mihai-sysbio Oct 6, 2023
aff8211
fix: add to matlab path
mihai-sysbio Oct 6, 2023
cd98819
fix: style of macaw summary output
edkerk Oct 18, 2024
c83e572
Merge branch 'feat/macaw_output' into feat/gene-essentiality-workflow
edkerk Oct 18, 2024
7f8c8ae
feat: post and store gene essentiality results
edkerk Oct 19, 2024
497bd7b
fix: model path and allow 2 workflow comments
edkerk Oct 19, 2024
5409a5d
chore: add macaw test result
edkerk Oct 19, 2024
3ac5563
fix: use recent RAVEN and gurobi
edkerk Oct 19, 2024
61f9b12
fix: avoid Penr statistic calculation
edkerk Oct 19, 2024
ff716cb
fix: missing ) in gene-essentiality.yml
edkerk Oct 19, 2024
88fbdfc
chore: add gene essentiality test result
edkerk Oct 19, 2024
0ef23be
fix: gene-essentiality.yml output format
edkerk Oct 20, 2024
91ed960
fix: location of data/testResults/README.md
edkerk Oct 20, 2024
79c258a
chore: add macaw test result
edkerk Oct 20, 2024
ac5c47c
fix: test workflow including branch update
edkerk Oct 21, 2024
6371196
fix: correct git-auto-commit-action@v5
edkerk Oct 21, 2024
e5342bd
chore: add gene essentiality test result
edkerk Oct 21, 2024
e56fbe8
fix: run all Hart et al. 2015 tests
edkerk Oct 21, 2024
ca406a6
fix: missing )
edkerk Oct 21, 2024
a5409dc
chore: add gene essentiality test result
edkerk Oct 21, 2024
b847199
fix: only git stash pop if stash exist
edkerk Oct 21, 2024
43d1d4d
fix gene-essentiality ' not "
edkerk Oct 23, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/workflows/commentsFromTests.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
This PR has been [automatically tested with GH Actions](https://github.com/SysBioChalmers/Human-GEM/actions/runs/{GH_ACTION_RUN}). Here is the output of the gene essentiality test:

<pre>
{TEST_RESULTS}
</pre>

> _Note: In the case of multiple test runs, this post will be edited._
32 changes: 32 additions & 0 deletions .github/workflows/gene-essentiality.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Check gene essentiality with Hart 2015

on:
pull_request:
branches:
- "main"
mihai-sysbio marked this conversation as resolved.
Show resolved Hide resolved

jobs:
check-metabolictasks:
runs-on: self-hosted

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Run gene essentiality
id: essentiality
run: |
TEST_RESULTS=$(/usr/local/bin/matlab -nodisplay -nosplash -nodesktop -r "ihuman = importYaml('Human-GEM.yml'); taskStruct = parseTaskList('data/metabolicTasks/metabolicTasks_Essential.txt'); eGenes = estimateEssentialGenes(ihuman, 'Hart2015_RNAseq.txt', taskStruct); disp(evaluateHart2015Essentiality(eGenes));" | awk 'NR>9 && !/^\.+/')
Copy link
Member Author

Choose a reason for hiding this comment

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

@haowang-bioinfo the output of this line is very hard to capture/use. Do you have any suggestions to make this output more compact?

Copy link
Member Author

Choose a reason for hiding this comment

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

As seen in this workflow run, the output is way too rich to fit in a PR comment. @haowang-bioinfo how would you suggest to change it to end up with a nice summary like here?

Copy link
Member

Choose a reason for hiding this comment

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

no, I've never thought about this. Because they are non-binary indicators that are hard to be used for evaluating purpose in actions

PARSED_RESULTS="${TEST_RESULTS//'%'/'%25'}"
PARSED_RESULTS="${PARSED_RESULTS//$'\n'/'<br>'}"
PARSED_RESULTS="${PARSED_RESULTS//$'\r'/'<br>'}"
echo "results=$PARSED_RESULTS" >> $GITHUB_OUTPUT

- name: Post comment
uses: NejcZdovc/comment-pr@v2
with:
file: "commentsFromTests.md"
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
TEST_RESULTS: ${{steps.essentiality.outputs.results}}
GH_ACTION_RUN: ${{github.run_id}}