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

Quick doc update #11

Merged
merged 2 commits into from
Sep 30, 2024
Merged
Changes from all commits
Commits
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
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ UNTAR:
untar: 1.34
Workflow:
nf-core/rnaseq: v3.16.0dev
```

Usage:

Expand Down Expand Up @@ -59,15 +60,13 @@ results/
In this example, 1 file is stable with stable content (`stable_content.txt`), and 1 file is stable with a stable name (`stable_name.txt`).
The last file has no stable content (`execution_trace_2024-09-30_13-10-16.txt`) as its name is based on the date and time of the pipeline execution.

For this example, we want to snapshot the files that have stable content, and the filenames that have stable names.
For this example, we want to snapshot the files that have stable content, and the names of files and folders that are stable. `stable_name` is a list of every file and folder except those matching the glob `**/execution_trace*.txt`. `stable_content` is a list of every file except those matching the two globs `**/execution_trace*.txt` and `**/stable_name.txt`. By using `stable_name*.name`, we extract the name of every file in `stable_name` and add them to the snapshot. `stable_content` can be used in the snapshot directly to include the hash of the file contents.

```groovy
def stable_name = getAllFilesFromDir(params.outdir, true, ['**/execution_trace*.txt'] )
def stable_content = getAllFilesFromDir(params.outdir, false, ['**/execution_trace*.txt', '**/stable_name.txt'] )
assert snapshot(
// Only snapshot name as content is not stable
stable_name*.name,
// Snapshot content
stable_content
).match()
```
Expand Down