Skip to content

Commit

Permalink
Improve error explanation on potential inadequate combinations of sam…
Browse files Browse the repository at this point in the history
…ples and factor fields (#323)

* Warn on potential inadequate combinations of samples and factor fields

* Use black line lengths on flake8 linter

* Lint issues and others

* More linting

* Bump build number
  • Loading branch information
pcm32 authored Sep 15, 2024
1 parent 4990a52 commit 54818da
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ jobs:
- name: Install flake8
run: pip install flake8 flake8-import-order
- name: Flake8
run: echo '${{ needs.setup.outputs.repository-list }}' | xargs -d '\n' flake8 --ignore=I201,W503 --output-file pylint_report.txt --tee
run: echo '${{ needs.setup.outputs.repository-list }}' | xargs -d '\n' flake8 --max-line-length 88 --ignore=I201,W503 --output-file pylint_report.txt --tee
- uses: actions/upload-artifact@v4
if: ${{ failure() }}
with:
Expand Down
15 changes: 15 additions & 0 deletions tools/tertiary-analysis/decoupler/decoupler_pseudobulk.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,21 @@ def main(args):
min_counts=args.min_counts,
)

print("Created pseudo-bulk AnnData, checking if fields still make sense.")
print(
"If this fails this check, it might mean that you asked for factors "
+ "that are not compatible with you sample identifiers (ie. asked for "
+ "phase in the factors, but each sample contains more than one phase, "
+ "try joining fields)"
)
if factor_fields:
check_fields(
factor_fields,
pseudobulk_data,
context=" after creation of pseudo-bulk AnnData",
)
print("Factors requested are adequate for the pseudo-bulked AnnData!")

# Plot pseudobulk samples
plot_pseudobulk_samples(
pseudobulk_data,
Expand Down
2 changes: 1 addition & 1 deletion tools/tertiary-analysis/decoupler/decoupler_pseudobulk.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<tool id="decoupler_pseudobulk" name="Decoupler pseudo-bulk" version="1.4.0+galaxy3" profile="20.05">
<tool id="decoupler_pseudobulk" name="Decoupler pseudo-bulk" version="1.4.0+galaxy4" profile="20.05">
<description>aggregates single cell RNA-seq data for running bulk RNA-seq methods</description>
<requirements>
<requirement type="package" version="1.4.0">decoupler</requirement>
Expand Down

0 comments on commit 54818da

Please sign in to comment.