Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
807fd19
install sentieon/staralign
FriederikeHanssen Aug 11, 2025
7636eb6
add args to sentieon_align_star
FriederikeHanssen Aug 12, 2025
c02c684
add sentieon secrets to ci
FriederikeHanssen Aug 12, 2025
8c8599d
add sentieon secrets
FriederikeHanssen Aug 12, 2025
82c38be
revert changes from schema builder
FriederikeHanssen Aug 12, 2025
fddcc5b
snapshots
FriederikeHanssen Aug 12, 2025
a4dace5
add auth_mech env var
FriederikeHanssen Aug 12, 2025
f4f5a18
sentieon star uses old style args
FriederikeHanssen Aug 12, 2025
1f044f5
add more env vars
FriederikeHanssen Aug 12, 2025
9f2f8ce
fix versions checksum
FriederikeHanssen Aug 12, 2025
9452604
Merge branch 'dev' into add_sentieon_star
FriederikeHanssen Aug 12, 2025
fc3cab4
fix version
FriederikeHanssen Aug 12, 2025
0799db8
snapshots
FriederikeHanssen Aug 12, 2025
ff9b53a
refactor code since sentieon star uses same syntax as igenomes star
FriederikeHanssen Aug 12, 2025
e0351a6
add license usage docs
FriederikeHanssen Aug 12, 2025
411645c
update changelog
FriederikeHanssen Aug 12, 2025
f96bdc7
add complete pipeline test with sentieon
FriederikeHanssen Aug 12, 2025
6163917
checksum order
FriederikeHanssen Aug 12, 2025
752e85d
test out symlinking sentieon star in rsem
FriederikeHanssen Aug 12, 2025
476d022
add tests for symlinking star in rsem
FriederikeHanssen Aug 12, 2025
26703b9
add sentieon env vars to subworkflow test
FriederikeHanssen Aug 13, 2025
c3ff26a
update version chcksum
FriederikeHanssen Aug 13, 2025
a6958f5
add stub test
FriederikeHanssen Aug 13, 2025
679d699
add pipeline level test
FriederikeHanssen Aug 13, 2025
f55fccc
add sentieon license vars to pipeline level tests
FriederikeHanssen Aug 13, 2025
5be778d
replace local module with nf-core module
FriederikeHanssen Aug 13, 2025
59978b6
update module name in configs
FriederikeHanssen Aug 13, 2025
17b525d
add sentieon support for prepare_genome
FriederikeHanssen Aug 13, 2025
004e8ea
update README with reference to sentieon for STAR
FriederikeHanssen Aug 13, 2025
d17cafc
add subworkflow level tests
FriederikeHanssen Aug 13, 2025
c8122ee
add snapshots
FriederikeHanssen Aug 13, 2025
3a09fc4
fix test names in snapshots
FriederikeHanssen Aug 13, 2025
b0e7744
update rocrate
FriederikeHanssen Aug 13, 2025
dfc56ee
quotes
FriederikeHanssen Aug 13, 2025
af42ef3
add config for sentieon rsem_prepare
FriederikeHanssen Aug 13, 2025
62cde8b
add maketranscript refs
FriederikeHanssen Aug 13, 2025
5445d6d
fix mixed checksums
FriederikeHanssen Aug 13, 2025
3bc2151
Merge branch 'dev' into add_sentieon_star
maxulysse Aug 13, 2025
ddfbee8
Apply suggestions from code review
FriederikeHanssen Aug 13, 2025
d0c7eba
move license script to .github.actions
FriederikeHanssen Aug 13, 2025
43abdc7
fix comment alignment
FriederikeHanssen Aug 13, 2025
9450a5c
rename use_sentieon to use_sentieon_star
FriederikeHanssen Aug 13, 2025
9e00a4d
test process name reassignment
FriederikeHanssen Aug 14, 2025
74f7d4d
test renaming
FriederikeHanssen Aug 14, 2025
107f668
revert process renaming tests
FriederikeHanssen Aug 14, 2025
5f45235
assign output name
FriederikeHanssen Aug 14, 2025
3cf1b7b
Address reviews from @pinin4fjords & reduce one level of if statements
FriederikeHanssen Aug 14, 2025
c0bfbd2
add link to modules tested to address review by @edmundmiller
FriederikeHanssen Aug 14, 2025
e81774e
simplify logic
FriederikeHanssen Aug 14, 2025
9c108af
clean up code
FriederikeHanssen Aug 14, 2025
b33be90
fix syntax error
FriederikeHanssen Aug 14, 2025
195550b
propagate changes from #1573 to a number of other tests
FriederikeHanssen Aug 14, 2025
d6d32cb
set multi_channel initialisation to null
FriederikeHanssen Aug 14, 2025
fda153f
fix order
FriederikeHanssen Aug 14, 2025
f228324
more odering
FriederikeHanssen Aug 14, 2025
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
10 changes: 10 additions & 0 deletions .github/actions/nf-test/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,20 @@ runs:
conda-solver: libmamba
conda-remove-defaults: true

# Set up secrets
- name: Set up Nextflow secrets
if: env.SENTIEON_ENCRYPTION_KEY != '' && env.SENTIEON_LICENSE_MESSAGE != ''
shell: bash
run: |
python -m pip install cryptography
nextflow secrets set SENTIEON_AUTH_DATA $(python3 .github/actions/nf-test/license_message.py encrypt --key "$SENTIEON_ENCRYPTION_KEY" --message "$SENTIEON_LICENSE_MESSAGE")

- name: Run nf-test
shell: bash
env:
NFT_WORKDIR: ${{ env.NFT_WORKDIR }}
SENTIEON_LICSRVR_IP: ${{ env.SENTIEON_LICSRVR_IP }}
SENTIEON_AUTH_MECH: "GitHub Actions - token"
run: |
nf-test test \
--profile=+${{ inputs.profile }} \
Expand Down
113 changes: 113 additions & 0 deletions .github/actions/nf-test/license_message.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
#!/usr/bin/env python3

#########################################
# Author: [DonFreed](https://github.com/DonFreed)
# File: license_message.py
# Source: https://github.com/DonFreed/docker-actions-test/blob/main/.github/scripts/license_message.py
# Source+commit: https://github.com/DonFreed/docker-actions-test/blob/aa1051a9f53b3a1e801953748d062cad74dca9a9/.github/scripts/license_message.py
# Download Date: 2023-07-04, commit: aa1051a
# This source code is licensed under the BSD 2-Clause license
#########################################

"""
Functions for generating and sending license messages
"""

# Modified from - https://stackoverflow.com/a/59835994

import argparse
import base64
import calendar
import re
import secrets
import sys

from cryptography.hazmat.primitives.ciphers.aead import AESGCM
from datetime import datetime as dt

MESSAGE_TIMEOUT = 60 * 60 * 24 # Messages are valid for 1 day
NONCE_BYTES = 12


class DecryptionTimeout(Exception):
# Decrypting a message that is too old
pass


def generate_key():
key = secrets.token_bytes(32)
return key


def handle_generate_key(args):
key = generate_key()
key_b64 = base64.b64encode(key)
print(key_b64.decode("utf-8"), file=args.outfile)


def encrypt_message(key, message):
nonce = secrets.token_bytes(NONCE_BYTES)
timestamp = calendar.timegm(dt.now().utctimetuple())
data = timestamp.to_bytes(10, byteorder="big") + b"__" + message
ciphertext = nonce + AESGCM(key).encrypt(nonce, data, b"")
return ciphertext


def handle_encrypt_message(args):
key = base64.b64decode(args.key.encode("utf-8"))
message = args.message.encode("utf-8")
ciphertext = encrypt_message(key, message)
ciphertext_b64 = base64.b64encode(ciphertext)
print(ciphertext_b64.decode("utf-8"), file=args.outfile)


def decrypt_message(key, ciphertext, timeout=MESSAGE_TIMEOUT):
nonce, ciphertext = ciphertext[:NONCE_BYTES], ciphertext[NONCE_BYTES:]
message = AESGCM(key).decrypt(nonce, ciphertext, b"")

msg_timestamp, message = re.split(b"__", message, maxsplit=1)
msg_timestamp = int.from_bytes(msg_timestamp, byteorder="big")
timestamp = calendar.timegm(dt.now().utctimetuple())
if (timestamp - msg_timestamp) > timeout:
raise DecryptionTimeout("The message has an expired timeout")
return message.decode("utf-8")


def handle_decrypt_message(args):
key = base64.b64decode(args.key.encode("utf-8"))
ciphertext = base64.b64decode(args.message.encode("utf-8"))
message = decrypt_message(key, ciphertext, timeout=args.timeout)
print(str(message), file=args.outfile)


def parse_args(argv=None):
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument("--outfile", default=sys.stdout, type=argparse.FileType("w"), help="The output file")

subparsers = parser.add_subparsers(help="Available sub-commands")

gen_parser = subparsers.add_parser("generate_key", help="Generate a random key string")
gen_parser.set_defaults(func=handle_generate_key)

encrypt_parser = subparsers.add_parser("encrypt", help="Encrypt a message")
encrypt_parser.add_argument("--key", required=True, help="The encryption key")
encrypt_parser.add_argument("--message", required=True, help="Message to encrypt")
encrypt_parser.set_defaults(func=handle_encrypt_message)

decrypt_parser = subparsers.add_parser("decrypt", help="Decyrpt a message")
decrypt_parser.add_argument("--key", required=True, help="The encryption key")
decrypt_parser.add_argument("--message", required=True, help="Message to decrypt")
decrypt_parser.add_argument(
"--timeout",
default=MESSAGE_TIMEOUT,
type=int,
help="A message timeout. Decryption will fail for older messages",
)
decrypt_parser.set_defaults(func=handle_decrypt_message)

return parser.parse_args(argv)


if __name__ == "__main__":
args = parse_args()
args.func(args)
4 changes: 4 additions & 0 deletions .github/workflows/nf-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,10 @@ jobs:
continue-on-error: ${{ matrix.NXF_VER == 'latest-everything' }}
env:
NFT_WORKDIR: ${{ env.NFT_WORKDIR }}
SENTIEON_AUTH_MECH: "GitHub Actions - token"
SENTIEON_ENCRYPTION_KEY: ${{ secrets.SENTIEON_ENCRYPTION_KEY }}
SENTIEON_LICENSE_MESSAGE: ${{ secrets.SENTIEON_LICENSE_MESSAGE }}
SENTIEON_LICSRVR_IP: ${{ secrets.SENTIEON_LICSRVR_IP }}
with:
profile: ${{ matrix.profile }}
shard: ${{ matrix.shard }}
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Special thanks to the following for their contributions to the release:

- [Jonathan Manning](https://github.com/pinin4fjords)
- [Maxime Garcia](https://github.com/maxulysse)
- [Friederike Hanssen](https://github.com/friederikehanssen)
- [Ido Tamir](https://github.com/idot)
- [Usman Rashid](https://github.com/GallVp)

Expand All @@ -21,12 +22,14 @@ Special thanks to the following for their contributions to the release:
- [PR #1573](https://github.com/nf-core/rnaseq/pull/1573) - Fix salmon.merged.SummarizedExperiment.rds name collision
- [PR #1585](https://github.com/nf-core/rnaseq/pull/1585) - Update awsfulltest.yml to restore aligner-wise outputs
- [PR #1580](https://github.com/nf-core/rnaseq/pull/1580) - Template update for nf-core/tools v3.3.2
- [PR #1590](https://github.com/nf-core/rnaseq/pull/1590) - Addition of Sentieon STAR

### Software dependencies

| Dependency | Old version | New version |
| ---------- | ----------- | ----------- |
| `MultiQC` | 1.29 | 1.30 |
| `Sentieon` | | 202503.01 |

## [[3.19.0](https://github.com/nf-core/rnaseq/releases/tag/3.19.0)] - 2025-06-10

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
5. Adapter and quality trimming ([`Trim Galore!`](https://www.bioinformatics.babraham.ac.uk/projects/trim_galore/))
6. Removal of genome contaminants ([`BBSplit`](http://seqanswers.com/forums/showthread.php?t=41288))
7. Removal of ribosomal RNA ([`SortMeRNA`](https://github.com/biocore/sortmerna))
8. Choice of multiple alignment and quantification routes:
8. Choice of multiple alignment and quantification routes (_For `STAR` the sentieon implementation can be chosen_):
1. [`STAR`](https://github.com/alexdobin/STAR) -> [`Salmon`](https://combine-lab.github.io/salmon/)
2. [`STAR`](https://github.com/alexdobin/STAR) -> [`RSEM`](https://github.com/deweylab/RSEM)
3. [`HiSAT2`](https://ccb.jhu.edu/software/hisat2/index.shtml) -> **NO QUANTIFICATION**
Expand Down
2 changes: 1 addition & 1 deletion conf/test.config
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ params {

// When using RSEM, remove warning from STAR whilst building tiny indices
process {
withName: 'RSEM_PREPAREREFERENCE_GENOME' {
withName: 'RSEM_PREPAREREFERENCE_GENOME|SENTIEON_RSEMPREPAREREFERENCE_GENOME' {
ext.args2 = "--genomeSAindexNbases 7"
}
}
28 changes: 28 additions & 0 deletions docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,34 @@ You can use `--skip_alignment --skip_pseudo_alignment` if you only want to run t

Note that `--skip_alignment` and `--skip_pseudo_alignment` prevent both the execution of alignment/pseudoalignment steps and the building of their corresponding indices. For example, using `--skip_alignment` with `--aligner star_salmon` will skip both STAR alignment and index building.

### Sentieon acceleration for STAR

The STAR aligner can be accelerated through its Sentieon implemention using the parameter `--use_sentieon_star`.

Sentieon is a commercial solution to process genomics data, requiring a paid license. Sentieon's tooling contains an accelerated version of the [`STAR` aligner](https://support.sentieon.com/manual/usages/general/?highlight=star#star-binary), which nf-core/rnaseq supports. In order to use those functions, the user will need to supply a license for Sentieon.

Sentieon supply license in the form of a string-value (a url) or a file. It should be base64-encoded and stored in a nextflow secret named `SENTIEON_LICENSE_BASE64`. If a license string (url) is supplied, then the nextflow secret should be set like this:

```bash
nextflow secrets set SENTIEON_LICENSE_BASE64 $(echo -n <sentieon_license_string> | base64 -w 0)
```

:::note
<sentieon_license_string> is formatted as `IP:Port` for example: `12.12.12.12:8990`
:::

If a license file is supplied, then the nextflow secret should be set like this:

```bash
nextflow secrets set SENTIEON_LICENSE_BASE64 \$(cat <sentieon_license_file.lic> | base64 -w 0)
```

:::note
If you're looking for documentation on how the nf-core Sentieon GitHub Actions and Sentieon License Server are set up: [Here be dragons.](https://github.com/nf-core/ops/blob/main/pulumi/sentieon_license_server/README.md)

For detailed instructions on how to test the modules and subworkflows separately, see [here](https://github.com/nf-core/modules/blob/master/modules/nf-core/sentieon/README.md).
:::

## Quantification options

The current options align with STAR and quantify using either Salmon (`--aligner star_salmon`) / RSEM (`--aligner star_rsem`). You also have the option to pseudoalign and quantify your data with Salmon or Kallisto by providing the `--pseudo_aligner salmon` or `--pseudo_aligner kallisto` parameter, respectively.
Expand Down
3 changes: 2 additions & 1 deletion main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ workflow NFCORE_RNASEQ {
params.skip_bbsplit,
!params.remove_ribo_rna,
params.skip_alignment,
params.skip_pseudo_alignment
params.skip_pseudo_alignment,
params.use_sentieon_star
)
ch_versions = ch_versions.mix(PREPARE_GENOME.out.versions)

Expand Down
15 changes: 15 additions & 0 deletions modules.json
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,21 @@
"git_sha": "05954dab2ff481bcb999f24455da29a5828af08d",
"installed_by": ["bam_stats_samtools"]
},
"sentieon/rsemcalculateexpression": {
"branch": "master",
"git_sha": "2779d18605e9923332155d671f45ed37fa185ff4",
"installed_by": ["modules"]
},
"sentieon/rsempreparereference": {
"branch": "master",
"git_sha": "2779d18605e9923332155d671f45ed37fa185ff4",
"installed_by": ["modules"]
},
"sentieon/staralign": {
"branch": "master",
"git_sha": "73d3ab1ac411843ae643b5bc310a4aec9ae7ab3a",
"installed_by": ["modules"]
},
"sortmerna": {
"branch": "master",
"git_sha": "d4a425ce59fc803a11e520f16680ede9af09761f",
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

87 changes: 87 additions & 0 deletions modules/nf-core/sentieon/rsemcalculateexpression/main.nf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading