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 Universc #1706

Merged
merged 161 commits into from
Feb 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
161 commits
Select commit Hold shift + click to select a range
6693bce
initialise template for new module: "universc"
TomKellyGenetics May 11, 2022
3043aa0
Merge branch 'nf-core:master' into universc
TomKellyGenetics May 11, 2022
9ef4cfc
Merge remote-tracking branch 'remotes/tomkellygenetics/universc' into…
Kelly-ST-HRI Aug 30, 2022
34e67b1
update UniverSC module
TomKellyGenetics Aug 30, 2022
b392506
update UniverSC module
TomKellyGenetics Aug 30, 2022
8f26297
update UniverSC module
TomKellyGenetics Aug 30, 2022
6325d26
initialise template for new module: "universc"
TomKellyGenetics May 11, 2022
72f0526
update UniverSC module
TomKellyGenetics Aug 30, 2022
a711a45
update UniverSC module
TomKellyGenetics Aug 30, 2022
74c4908
update UniverSC module
TomKellyGenetics Aug 30, 2022
55af181
Merge branch 'nf-core:master' into universc
TomKellyGenetics Sep 12, 2022
ed47f76
resolve formatting issues for UniverSC module
TomKellyGenetics Sep 29, 2022
655a0ac
resolve linting errors for UniverSC module
TomKellyGenetics Sep 29, 2022
f30fa33
fix test jobs to call UniverSC version without errors
TomKellyGenetics Oct 7, 2022
24b6257
correct configuration for UniverSC test jobs
TomKellyGenetics Oct 7, 2022
f7ebca2
correct linting errors for UniverSC module
TomKellyGenetics Oct 7, 2022
8140fd0
Merge branch 'universc' of github.com/tomkellygenetics/nf-core-module…
TomKellyGenetics Oct 7, 2022
d4a469e
correct docker build files for UniverSC
TomKellyGenetics Oct 7, 2022
d174034
correct syntax errors in cellranger version call
TomKellyGenetics Oct 7, 2022
4bc21bc
Merge remote-tracking branch 'tomkellygenetics/universc' into universc
TomKellyGenetics Oct 7, 2022
439815a
prettier docs for UniverSC
TomKellyGenetics Oct 7, 2022
ec5107a
add output to test data for UniverSC module
TomKellyGenetics Oct 11, 2022
acc3ae5
Merge branch 'master' of ssh://github.com/nf-core/modules into universc
TomKellyGenetics Oct 11, 2022
f79f671
update UniverSC module to restructured repo
TomKellyGenetics Oct 11, 2022
8f1d1c5
define separate outputs for Cell Ranger and UniverSC tests
TomKellyGenetics Oct 11, 2022
277968f
remove TODO statements and update UniverSC meta.yml
TomKellyGenetics Oct 11, 2022
668424f
resolve minor linting issues with UniverSC
TomKellyGenetics Oct 11, 2022
a79e689
update paths to UniverSC module in test config
TomKellyGenetics Oct 11, 2022
74bf02a
update container versions and tags for UniverSC module
TomKellyGenetics Oct 11, 2022
15b2148
simplifiy container configurations for UniverSC
TomKellyGenetics Oct 11, 2022
83abbe9
update configuration for UniverSC tests (build Cell Ranger transcript…
TomKellyGenetics Oct 11, 2022
8c0d3de
test UniverSC module with Cell Ranger references
TomKellyGenetics Oct 11, 2022
f854b37
update tests for UniverSC for restructured repository
TomKellyGenetics Oct 11, 2022
56afd2b
update reference inputs for UniverSC module
TomKellyGenetics Oct 13, 2022
462a78e
set up references for cellranger OS test
TomKellyGenetics Oct 13, 2022
9a59cd0
resolve permissions errors for starting UniverSC
TomKellyGenetics Oct 14, 2022
5dfaa24
update input arguments for UniverSC and Cell Ranger OS (tests passing)
TomKellyGenetics Oct 14, 2022
67d8bb4
correct versions and checksums for UniverSC tests
TomKellyGenetics Oct 14, 2022
ac34280
resolves linting issues for UniverSC
TomKellyGenetics Oct 14, 2022
ca8fffe
resolves linting issues for UniverSC
TomKellyGenetics Oct 14, 2022
5c6d9b7
Merge remote-tracking branch 'upstream/master' into universc
TomKellyGenetics Oct 14, 2022
c09f4da
update expected test outputs for UniverSC tests
TomKellyGenetics Oct 14, 2022
241fe74
migrate UniverSC tests to calling open source Cell Ranger
TomKellyGenetics Oct 14, 2022
1abfa0e
Merge branch 'master' into universc
TomKellyGenetics Oct 14, 2022
f0d8a76
migrate changes to source code to updated UniverSC container
TomKellyGenetics Oct 17, 2022
b657ec2
update unit tests for UniverSC to correct output (using new container)
TomKellyGenetics Oct 17, 2022
8b46282
update output criteria for UniverSC unit tests
TomKellyGenetics Oct 17, 2022
3994c17
change output directory for UniverSC unit tests
TomKellyGenetics Oct 17, 2022
475a19e
Merge remote-tracking branch 'upstream/master' into universc
TomKellyGenetics Oct 17, 2022
f574c3c
test adding podman to GitHub actions (will revert if reviewers object…
TomKellyGenetics Oct 17, 2022
2d14b03
correct test errors for Cell Ranger OS tests (UniverSC module)
TomKellyGenetics Oct 17, 2022
4c0b1c4
array format for test checks (UniverSC and Cell Ranger OS)
TomKellyGenetics Oct 17, 2022
b1b6d5f
remove unncessary files from UniverSC module
TomKellyGenetics Oct 18, 2022
b4ae889
remove podman from automated testing
TomKellyGenetics Oct 18, 2022
b225054
remove mentions of nf-core/universc container
TomKellyGenetics Oct 18, 2022
21824c6
call executable script from PATH in UniverSC container
TomKellyGenetics Oct 18, 2022
7b2795a
migrate UniverSC module Cell Ranger OS count own directory
TomKellyGenetics Oct 18, 2022
21fa196
reorganise UniverSC submodules
TomKellyGenetics Oct 18, 2022
c272c7f
update process names in UniverSC module for consistency
TomKellyGenetics Oct 18, 2022
e6bdeea
update formatting for UniverSC tests
TomKellyGenetics Oct 18, 2022
84c4b1b
update unit tests for UniverSC submodules running Cell Ranger OS 3.0.2
TomKellyGenetics Oct 19, 2022
c492eec
reorganise UniverSC submodules to fit naming conventions
TomKellyGenetics Oct 19, 2022
8e13b4b
remove stub from UniverSC for testing
TomKellyGenetics Oct 19, 2022
c962ae3
add universc/mkfastq to unit tests
TomKellyGenetics Oct 20, 2022
e7cb96b
correct syntax in cellranger module files
TomKellyGenetics Oct 20, 2022
8db8d70
update expected output for universc and universc/count
TomKellyGenetics Oct 20, 2022
c7898c6
correct syntax for universc/count meta.yaml (pass linting)
TomKellyGenetics Oct 20, 2022
5520952
add stub to universc and universc/count
TomKellyGenetics Oct 20, 2022
c924b63
Merge remote-tracking branch 'upstream/master' into universc
TomKellyGenetics Oct 20, 2022
40de411
update unit tests for universc module
TomKellyGenetics Oct 20, 2022
9ccfdff
update unit tests for universc module
TomKellyGenetics Oct 20, 2022
7e84b9a
update unit tests for universc module
TomKellyGenetics Oct 20, 2022
85697d2
update unit tests for universc module
TomKellyGenetics Oct 20, 2022
d3d495f
update universc/mkfastq test to run stub
TomKellyGenetics Oct 21, 2022
084df3e
update universc/mkfastq expected outputs when running stub
TomKellyGenetics Oct 21, 2022
e317ef4
remove trailing whitespace (linting error)
TomKellyGenetics Oct 21, 2022
77a43a0
restructure UniverSC main module
TomKellyGenetics Oct 24, 2022
982939e
update configuration to run each UniverSC test once only
TomKellyGenetics Oct 24, 2022
ba832bd
Merge remote-tracking branch 'upstream/master' into universc
TomKellyGenetics Oct 24, 2022
0c2a88a
correct UniverSC unit test configuration
TomKellyGenetics Oct 24, 2022
bf64783
Merge branch 'master' of ssh://github.com/nf-core/modules into universc
TomKellyGenetics Oct 25, 2022
a00c84b
Merge branch 'master' of ssh://github.com/nf-core/modules into universc
TomKellyGenetics Oct 27, 2022
e562e8d
Merge branch 'master' of ssh://github.com/nf-core/modules into universc
TomKellyGenetics Oct 31, 2022
de8cb6c
Merge branch 'master' of ssh://github.com/nf-core/modules into universc
TomKellyGenetics Nov 2, 2022
de66365
update name of tools in universc tests configuration
TomKellyGenetics Nov 7, 2022
548f7aa
Merge branch 'master' of ssh://github.com/nf-core/modules into universc
TomKellyGenetics Nov 8, 2022
e72c75c
update expected output for Cell Ranger and UniverSC tests
TomKellyGenetics Nov 9, 2022
6dcf794
Merge branch 'master' of ssh://github.com/nf-core/modules into universc
TomKellyGenetics Nov 9, 2022
654bb06
Merge branch 'master' of ssh://github.com/nf-core/modules into universc
TomKellyGenetics Nov 18, 2022
4e53d60
updates unit tests for Cell Ranger and UniverSC
TomKellyGenetics Nov 18, 2022
86fedcd
updates unit tests for Cell Ranger for web summary HTML
TomKellyGenetics Nov 18, 2022
c9cdce5
updates unit tests for Cell Ranger for web summary HTML
TomKellyGenetics Nov 18, 2022
8a74411
updates unit tests for Cell Ranger for web summary HTML to use descri…
TomKellyGenetics Nov 18, 2022
193fa3d
Merge branch 'master' of ssh://github.com/nf-core/modules into universc
TomKellyGenetics Nov 21, 2022
6677b50
Merge branch 'master' of ssh://github.com/nf-core/modules into universc
TomKellyGenetics Nov 29, 2022
7325e72
correct path to Cell Ranger test output
TomKellyGenetics Nov 29, 2022
e4164f9
update container options for run UniverSC with singularity
TomKellyGenetics Nov 29, 2022
3a3c53c
Merge branch 'master' of ssh://github.com/nf-core/modules into universc
TomKellyGenetics Dec 6, 2022
acc63a2
migrate UniverSC container to mirrored image at nfcore/universc:1.2.4
TomKellyGenetics Dec 6, 2022
9f767e5
Merge remote-tracking branch 'remotes/tomkellygenetics/universc' into…
TomKellyGenetics Aug 30, 2022
aa40f80
Merge remote-tracking branch 'upstream/master' into universc
TomKellyGenetics Dec 9, 2022
9b509ef
Merge branch 'universc' into universc
TomKellyGenetics Dec 9, 2022
ec26f7e
remove redundant submodules from UniverSC
TomKellyGenetics Dec 9, 2022
10c5681
Merge branch 'master' into universc
ggabernet Dec 14, 2022
e3f2c7e
migrate UniverSC references to generate by Cell Ranger submodules
Dec 15, 2022
1f1aa01
update test configuration for universc/launch
Dec 15, 2022
a0118b1
update expected outputs for UniverSC to use Cell Ranger references
Dec 15, 2022
1cb2f21
update expected outputs for UniverSC to use Cell Ranger references
Dec 15, 2022
85e2276
remove UniverSC submodules for mkref and mkgtf
Dec 15, 2022
3de1112
move universc/launch submodule to universc module
Dec 15, 2022
15732f6
remove tests for UniverSC submodules for mkref and mkgtf
Dec 15, 2022
584554d
move tests for universc/launch submodule to universc module
Dec 15, 2022
841169d
migrate universc/launch submodule to universc module
Dec 15, 2022
2687dec
update paths in unit tests from universc/launch to universc
Dec 15, 2022
56d012b
update documentation for UniverSC module
Dec 15, 2022
422044a
update paths in test config from universc/launch to universc
Dec 15, 2022
946b36e
restore cellranger module (remove changes from PR 1706)
Dec 15, 2022
128fdee
restore cellranger module (remove changes from PR 1706)
Dec 15, 2022
dd41cfe
restore cellranger module (remove changes from PR 1706)
Dec 15, 2022
b0bd058
update style of documentation to pass linting
Dec 15, 2022
4734db9
add podman to settings and docs (passes local test)
Dec 15, 2022
53917b0
test podman configuration
TomKellyGenetics Dec 16, 2022
47ea08b
test podman configuration
TomKellyGenetics Dec 16, 2022
a2626fb
restore changes to testing (removes podman discussed in https://githu…
TomKellyGenetics Dec 16, 2022
b159a4e
restore changes to other modules (removes cellranger discussed in htt…
TomKellyGenetics Dec 16, 2022
c2d82c3
update podman settings in UniverSC docs
TomKellyGenetics Dec 16, 2022
96d3118
Merge branch 'master' into universc
ggabernet Dec 19, 2022
f8dcb0d
update podman parameters
Dec 20, 2022
a1d02d5
update container version for universc to stable release 1.2.5
Jan 18, 2023
6e5e357
Merge branch 'master' of ssh://github.com/nf-core/modules into universc
Jan 18, 2023
1ff0804
remove conda tests for universc (not supported)
Jan 18, 2023
1763af4
update container version for universc to latest release 1.2.5.1
Jan 18, 2023
bf64698
allow running docker or podman without root user
Jan 18, 2023
02d5d4e
update container version for universc to use nfcore/universc:1.2.5.1 …
Jan 18, 2023
0eb88da
exit logic for universc module that doesn't support conda
Jan 19, 2023
946af55
Merge branch 'master' of ssh://github.com/nf-core/modules
Jan 19, 2023
0f4e510
Merge branch 'master' into universc
Jan 19, 2023
891cdc3
trigger GitHub Actions test for tomkellygenetics/universc:1.2.5.1
Jan 18, 2023
571fc8d
add log files to universc output directory (confirm running subroutin…
Jan 19, 2023
2b45d13
correct UniverSC test configuration
TomKellyGenetics Jan 19, 2023
12f4a1c
Merge branch 'master' into universc
TomKellyGenetics Jan 20, 2023
27ee147
Merge branch 'master' of ssh://github.com/nf-core/modules into universc
Jan 20, 2023
b693cad
update configuration for singularity in universc tests
Jan 20, 2023
613656d
Merge branch 'master' of ssh://github.com/nf-core/modules into universc
Jan 20, 2023
dc824aa
Merge branch 'universc' of ssh://tkg-github.com/tomkellygenetics/nf-c…
Jan 20, 2023
2869c1b
test running universc with singularity --fakeroot
Jan 21, 2023
bc7dbd6
update configuration for singularity in universc tests
Jan 21, 2023
ee5e452
debug GH Actions configuration for singularity in universc tests
Jan 21, 2023
12002ce
test running singularity with —fakeroot write permissions
TomKellyGenetics Jan 22, 2023
1505f67
test singularity—
TomKellyGenetics Jan 22, 2023
da8b4a7
Merge branch 'master' of ssh://github.com/nf-core/modules into universc
Jan 23, 2023
09f88d4
revert changes to singularity tests
Jan 23, 2023
1ef9e78
update container settings for universc
Jan 23, 2023
c80e93b
Merge branch 'universc' of ssh://tkg-github.com/tomkellygenetics/nf-c…
Jan 23, 2023
e3de0ad
test universc with singularity --writable-tmpfs
Jan 23, 2023
291719a
revert changes to singularity tests (--writable-tmpfs not supported o…
Jan 24, 2023
08b8297
update container settings for universc to call nfcore/universc:1.2.5.1
Jan 24, 2023
933b88d
update version in UniverSC citation
Jan 24, 2023
7dec389
Merge branch 'master' of ssh://github.com/nf-core/modules into universc
Feb 10, 2023
2dc4e63
Merge branch 'master' into universc
apeltzer Feb 11, 2023
0e4ece0
Merge branch 'master' into universc
ggabernet Feb 14, 2023
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
4 changes: 4 additions & 0 deletions .github/workflows/pytest-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,10 @@ jobs:
tags: merquryfk/merquryfk
- profile: "conda"
tags: merquryfk/ploidyplot
- profile: "conda"
tags: universc
- profile: "singularity"
tags: universc
- profile: "conda"
tags: subworkflows/vcf_annotate_ensemblvep
env:
Expand Down
51 changes: 51 additions & 0 deletions modules/nf-core/universc/CITATION.cff
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
- given-names: "S. Thomas"
family-names: "Kelly"
email: "[email protected]"
affiliation: "Center for Integrative Medical Sciences, RIKEN, Suehiro-cho-1-7-22, Tsurumi Ward, Yokohama, Japan"
orcid: "https://orcid.org/0000-0003-3904-6690"
- family-names: "Battenberg"
given-names: "Kai"
email: "[email protected]"
affiliation: "Center for Sustainable Resource Science, RIKEN, Suehiro-cho-1-7-22, Tsurumi Ward, Yokohama, Japan"
orcid: "http://orcid.org/0000-0001-7517-2657"
version: 1.2.5.1
doi: 10.1101/2021.01.19.427209
date-released: 2021-02-14
url: "https://github.com/minoda-lab/universc"
preferred-citation:
type: article
authors:
- given-names: "S. Thomas"
family-names: "Kelly"
email: "[email protected]"
affiliation: "Center for Integrative Medical Sciences, RIKEN, Suehiro-cho-1-7-22, Tsurumi Ward, Yokohama, Japan"
orcid: "https://orcid.org/0000-0003-3904-6690"
- family-names: "Battenberg"
given-names: "Kai"
email: "[email protected]"
affiliation: "Center for Sustainable Resource Science, RIKEN, Suehiro-cho-1-7-22, Tsurumi Ward, Yokohama, Japan"
orcid: "https://orcid.org/http://orcid.org/0000-0001-7517-2657"
- family-names: "Hetherington"
given-names: "Nicola A."
affiliation: "Center for Integrative Medical Sciences, RIKEN, Suehiro-cho-1-7-22, Tsurumi Ward, Yokohama, Japan"
orcid: "http://orcid.org/0000-0001-8802-2906"
- family-names: "Hayashi"
given-names: "Makoto"
affiliation: "Center for Sustainable Resource Science, RIKEN, Suehiro-cho-1-7-22, Tsurumi Ward, Yokohama, Japan"
orcid: "http://orcid.org/0000-0001-6389-4265"
- given-names: "Aki"
family-names: "Minoda"
email: "[email protected]"
affiliation: Center for Integrative Medical Sciences, RIKEN, Suehiro-cho-1-7-22, Tsurumi Ward, Yokohama, Japan"
orcid: "http://orcid.org/0000-0002-2927-5791"
doi: "10.1101/2021.01.19.427209"
title: "UniverSC: a flexible cross-platform single-cell data processing pipeline"
year: "2021"
journal: "bioRxiv"
start: 2021.01.19.427209
volume:
issue:
month: 1
37 changes: 37 additions & 0 deletions modules/nf-core/universc/CITATION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
### Citation <span id="Citation"><span>

A submission to a journal and biorXiv is in progress. Please cite these when
they are available. Currently, the package can be cited
as follows:

Kelly, S.T., Battenberg, Hetherington, N.A., K., Hayashi, K., and Minoda, A. (2021)
UniverSC: a flexible cross-platform single-cell data processing pipeline.
bioRxiv 2021.01.19.427209; doi: [https://doi.org/10.1101/2021.01.19.427209](https://doi.org/10.1101/2021.01.19.427209)
package version 1.2.5.1. [https://github.com/minoda-lab/universc](https://github.com/minoda-lab/universc)

```
@article {Kelly2021.01.19.427209,
author = {Kelly, S. Thomas and Battenberg, Kai and Hetherington, Nicola A. and Hayashi, Makoto and Minoda, Aki},
title = {{UniverSC}: a flexible cross-platform single-cell data processing pipeline},
elocation-id = {2021.01.19.427209},
year = {2021},
doi = {10.1101/2021.01.19.427209},
publisher = {Cold Spring Harbor Laboratory},
abstract = {Single-cell RNA-sequencing analysis to quantify RNA molecules in individual cells has become popular owing to the large amount of information one can obtain from each experiment. We have developed UniverSC (https://github.com/minoda-lab/universc), a universal single-cell processing tool that supports any UMI-based platform. Our command-line tool enables consistent and comprehensive integration, comparison, and evaluation across data generated from a wide range of platforms.Competing Interest StatementThe authors have declared no competing interest.},
eprint = {https://www.biorxiv.org/content/early/2021/01/19/2021.01.19.427209.full.pdf},
journal = {{bioRxiv}},
note = {package version 1.2.5.1},
URL = {https://github.com/minoda-lab/universc},
}

```

```
@Manual{,
title = {{UniverSC}: a flexible cross-platform single-cell data processing pipeline},
author = {S. Thomas Kelly, Kai Battenberg, Nicola A. Hetherington, Makoto Hayashi, and Aki Minoda},
year = {2021},
note = {package version 1.2.5.1},
url = {https://github.com/minoda-lab/universc},
}
```
116 changes: 116 additions & 0 deletions modules/nf-core/universc/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
# UniverSC

## Single-cell processing across technologies

UniverSC is an open-source single-cell pipeline that runs across platforms on various technologies.

## Maintainers

Tom Kelly (RIKEN, IMS)

Kai Battenberg (RIKEN CSRS/IMS)

Contact: <first name>.<family name>[at]riken.jp

## Implementation

This container runs Cell Ranger v3.0.2 installed from source on MIT License on GitHub with
TomKellyGenetics marked this conversation as resolved.
Show resolved Hide resolved
modifications for compatibility with updated dependencies. All software is installed from
open-source repositories and available for reuse.

It is _not_ subject to the 10X Genomics End User License Agreement (EULA).
This version allows running Cell Ranger v3.0.2 on data generated from any experimental platform
without restrictions. However, updating to newer versions on Cell Ranger subject to the
10X EULA is not possible without the agreement of 10X Genomics.

To comply with licensing and respect 10X Genomics Trademarks, the 10X Genomics logo
has been removed from HTML reports, the tool has been renamed, and proprietary
closed-source tools to build Cloupe files are disabled.

It is still suffient to generate summary reports and count matrices compatible with
single-cell analysis tools available for 10X Genomics and Cell Ranger output format
in Python and R packages.

## Usage

### Generating References

The Cell Ranger modules can be used to generate reference indexes to run UniverSC.
Note that UniverSC requires the Open Source version v3.0.2 of Cell Ranger included
in the nf-core/universc Docker image. The same module parameters can be run provided
that the container is changed in process configurations (modify nextflow.config).

```
process {

...
withName: CELLRANGER_MKGTF {
container = "nfcore/universc:1.2.5.1"
}
withName: CELLRANGER_MKREF{
container = "nfcore/universc:1.2.5.1"
}
...
}
```

This will generate a compatible index for UniverSC using the same version of the
STAR aligner and a permissive software license without and EULA.

### Container settings

The cellranger install directory must have write permissions to run UniverSC.
To run in docker or podman use the `--user root` option in container parameters
and for singularity use the `--writeable` parameter.

These are set as default in universc/main.nf:

```
container "nfcore/universc:1.2.5.1"
if (workflow.containerEngine == 'docker'){
containerOptions = "--privileged"
}
if (workflow.containerEngine == 'podman'){
containerOptions = "--runtime /usr/bin/crun --userns=keep-id --user root --systemd=always"
}
if (workflow.containerEngine == 'singularity'){
containerOptions = "--writable"
}
```

Select the container engine with `nextflow --profile "docker"` or set the environment variable
as one of the following before running nextflow.

```
export PROFILE="docker"
export PROFILE="podman"
export PROFILE="singularity"
```

Note that due to dependencies installed in a docker image, it is not possible to use conda environments.

## Disclaimer

We are third party developers not affiliated with 10X Genomics or any other vendor of
single-cell technologies. We are releasing this code on an open-source license which calls Cell Ranger
as an external dependency.

## Licensing

This package is provided open-source on a GPL-3 license. This means that you are free to use and
modify this code provided that they also contain this license.

## Updating the package

The tomkellygenetics/universc:<VERSION> container is automatically updated with tomkellygenetics/universc:latest.

A stable release is mirrored at nfcore/universc:1.2.5.1 and will be updated as needed.

To build an updated container use the Dockerfile provided here:

[https://github.com/minoda-lab/universc/blob/master/Dockerfile](https://github.com/minoda-lab/universc/blob/master/Dockerfile)

Note that this uses a custom base image which is built with an open-source implementation of
Cell Ranger v3.0.2 on MIT License and relies of Python 2. The build file can be found here:

[https://github.com/TomKellyGenetics/cellranger_clean/blob/master/Dockerfile](https://github.com/TomKellyGenetics/cellranger_clean/blob/master/Dockerfile)
76 changes: 76 additions & 0 deletions modules/nf-core/universc/main.nf
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
process UNIVERSC {
TomKellyGenetics marked this conversation as resolved.
Show resolved Hide resolved
tag "$meta.id"
label 'process_medium'

// Exit if running this module with -profile conda / -profile mamba
if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) {
exit 1, "UNIVERSC module does not support Conda. Please use Docker / Singularity / Podman instead."
}
container "nfcore/universc:1.2.5.1"
if (workflow.containerEngine == 'docker'){
containerOptions = "--privileged"
}
if ( workflow.containerEngine == 'podman'){
containerOptions = "--runtime crun --userns=keep-id --systemd=always"
}
if (workflow.containerEngine == 'singularity'){
containerOptions = "-B /var/tmp --writable-tmpfs"
params.singularity_autoMounts = true
}

input:
tuple val(meta), path(reads)
path reference


output:
tuple val(meta), path("sample-${meta.id}/outs/*"), emit: outs
path "versions.yml" , emit: versions

when:
task.ext.when == null || task.ext.when

script:
def args = task.ext.args ?: ''
def sample_arg = meta.samples.unique().join(",")
def reference_name = reference.name
def input_reads = meta.single_end ? "--file $reads" : "-R1 ${reads[0]} -R2 ${reads[1]}"
"""
universc \\
--id 'sample-${meta.id}' \\
${input_reads} \\
--technology '${meta.technology}' \\
--chemistry '${meta.chemistry}' \\
--reference ${reference_name} \\
--description ${sample_arg} \\
--jobmode "local" \\
--localcores ${task.cpus} \\
--localmem ${task.memory.toGiga()} \\
--per-cell-data \\
$args 1> _log 2> _err

# save log files
echo !! > sample-${meta.id}/outs/_invocation
cp _log sample-${meta.id}/outs/_log
cp _err sample-${meta.id}/outs/_err

cat <<-END_VERSIONS > versions.yml
"${task.process}":
cellranger: \$(echo \$(cellranger count --version 2>&1 | head -n 2 | tail -n 1 | sed 's/^.* //g' | sed 's/(//g' | sed 's/)//g' ))
universc: \$(echo \$(bash /universc/launch_universc.sh --version | grep version | grep universc | sed 's/^.* //g' ))
END_VERSIONS
"""


stub:
"""
mkdir -p "sample-${meta.id}/outs/"
touch sample-${meta.id}/outs/fake_file.txt

cat <<-END_VERSIONS > versions.yml
"${task.process}":
cellranger: \$(echo \$(cellranger count --version 2>&1 | head -n 2 | tail -n 1 | sed 's/^.* //g' | sed 's/(//g' | sed 's/)//g' ))
universc: \$(echo \$(bash /universc/launch_universc.sh --version | grep version | grep universc | sed 's/^.* //g' ))
END_VERSIONS
"""
}
42 changes: 42 additions & 0 deletions modules/nf-core/universc/meta.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: "universc"
description: Module to run UniverSC an open-source pipeline to demultiplex and process single-cell RNA-Seq data
keywords:
- demultiplex
- align
- single-cell
- scRNA-Seq
- count
- umi
tools:
- "universc":
description: "UniverSC: a flexible cross-platform single-cell data processing pipeline"
homepage: "https://hub.docker.com/r/tomkellygenetics/universc"
documentation: "https://raw.githubusercontent.com/minoda-lab/universc/master/man/launch_universc.sh"
tool_dev_url: "https://github.com/minoda-lab/universc"
doi: "https://doi.org/10.1101/2021.01.19.427209"
licence: ["GPL-3.0-or-later"]

input:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- reads:
type: file
description: FASTQ or FASTQ.GZ file, list of 2 files for paired-end data
pattern: "*.{fastq,fq,fastq.gz,fq.gz}"

output:
- outs:
type: file
description: Files containing the outputs of Cell Ranger
pattern: "sample-${meta.id}/outs/*"
- versions:
type: file
description: File containing software version
pattern: "versions.yml"

authors:
- "@kbattenb"
- "@tomkellygenetics"
4 changes: 4 additions & 0 deletions tests/config/nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ if ("$PROFILE" == "singularity") {
} else if ("$PROFILE" == "mamba") {
conda.enabled = true
conda.useMamba = true
} else if ("$PROFILE" == "podman") {
podman.enabled = true
podman.userEmulation = true
podman.runOptions = "--runtime crun --platform linux/x86_64 --systemd=always"
} else {
docker.enabled = true
docker.userEmulation = true
Expand Down
4 changes: 4 additions & 0 deletions tests/config/pytest_modules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3236,6 +3236,10 @@ unicycler:
- modules/nf-core/unicycler/**
- tests/modules/nf-core/unicycler/**

universc:
- modules/nf-core/universc/**
- tests/modules/nf-core/universc/**

untar:
- modules/nf-core/untar/**
- tests/modules/nf-core/untar/**
Expand Down
33 changes: 33 additions & 0 deletions tests/modules/nf-core/universc/main.nf
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/usr/bin/env nextflow

nextflow.enable.dsl = 2

include { CELLRANGER_MKGTF } from '../../../../modules/nf-core/cellranger/mkgtf/main.nf'
include { CELLRANGER_MKREF } from '../../../../modules/nf-core/cellranger/mkref/main.nf'
include { UNIVERSC } from '../../../../modules/nf-core/universc//main.nf'

workflow test_universc_10x {

input = [ [ id:'123', technology:'10x', chemistry:'SC3Pv3', single_end:false, strandedness:'forward', samples: ["test_10x"] ], // meta map
[ file(params.test_data['homo_sapiens']['illumina']['test_10x_1_fastq_gz'], checkIfExists: true),
file(params.test_data['homo_sapiens']['illumina']['test_10x_2_fastq_gz'], checkIfExists: true)
]
]

fasta = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true)
gtf = file(params.test_data['homo_sapiens']['genome']['genome_gtf'], checkIfExists: true)
reference_name = "homo_sapiens_chr22_reference"

CELLRANGER_MKGTF ( gtf )

CELLRANGER_MKREF (
fasta,
CELLRANGER_MKGTF.out.gtf,
reference_name
)

UNIVERSC (
input,
CELLRANGER_MKREF.out.reference
)
}
Loading