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

Release 1.2.0 #49

Merged
merged 41 commits into from
Sep 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
22ddf0d
Template update for nf-core/tools version 2.3.2
nf-core-bot Mar 24, 2022
73c61f1
Template update for nf-core/tools version 2.4
nf-core-bot May 16, 2022
fcbb9d9
Template update for nf-core/tools version 2.5
nf-core-bot Aug 30, 2022
2268123
Template update for nf-core/tools version 2.5.1
nf-core-bot Sep 1, 2022
6ed106a
Template update for nf-core/tools version 2.6
nf-core-bot Oct 4, 2022
044c200
Template update for nf-core/tools version 2.7.1
nf-core-bot Dec 8, 2022
034aa3f
Template update for nf-core/tools version 2.7.2
nf-core-bot Dec 19, 2022
ba9dc71
Template update for nf-core/tools version 2.8
nf-core-bot Apr 28, 2023
4f09c80
Allow adjusting normalization parameters
apeltzer Jun 28, 2023
c485a5f
Add usage
apeltzer Jun 28, 2023
3f9efe8
Prettier
apeltzer Jun 28, 2023
de10667
Update CHANGELOG.md
apeltzer Jun 28, 2023
9f4a05d
Merge pull request #42 from nf-core/allow-normalization-adjustment
apeltzer Jun 28, 2023
6423a8f
Template update for nf-core/tools version 2.9
nf-core-bot Jun 30, 2023
9ab706f
Merge branch 'TEMPLATE' of https://github.com/nf-core/nanostring into…
christopher-mohr Aug 10, 2023
f2c574a
update CHANGELOG
christopher-mohr Aug 10, 2023
244c53e
add NACHO reports to published files
christopher-mohr Aug 10, 2023
a5849a9
add PR number to CHANGELOG
christopher-mohr Aug 10, 2023
0a89188
update nf-core modules
christopher-mohr Aug 10, 2023
e71e937
Update docs/usage.md
christopher-mohr Aug 10, 2023
00a5e42
Update docs/usage.md
christopher-mohr Aug 10, 2023
9b59810
run prettier
christopher-mohr Aug 10, 2023
aed2394
correct PR number
christopher-mohr Aug 10, 2023
0551625
Merge pull request #46 from christopher-mohr/update_fix_issues
christopher-mohr Aug 10, 2023
6f92a4d
update mulled container
christopher-mohr Aug 10, 2023
5de6f52
update CHANGELOG
christopher-mohr Aug 10, 2023
399cee0
update container, conda string
christopher-mohr Aug 11, 2023
89a72cd
update CHANGELOG
christopher-mohr Aug 11, 2023
84ff170
Merge pull request #47 from christopher-mohr/update_container
christopher-mohr Aug 11, 2023
bafa2ca
add parameter for specifying id column for heatmap
christopher-mohr Aug 21, 2023
2f90252
use correct PR numbers
christopher-mohr Aug 21, 2023
390fe60
Merge pull request #48 from christopher-mohr/add_params
christopher-mohr Aug 23, 2023
71b70d2
update version
christopher-mohr Aug 24, 2023
da69703
Merge pull request #50 from christopher-mohr/update_version
grst Aug 24, 2023
a5f598d
apply review suggestions
christopher-mohr Aug 31, 2023
327dd8e
make heatmap_gene_filter_file input channel
christopher-mohr Aug 31, 2023
2297e23
use norm method for non-hk -norm, no hk-norm
christopher-mohr Aug 31, 2023
f9e4125
update CHANGELOG
christopher-mohr Sep 1, 2023
0891258
update CHANGELOG
christopher-mohr Sep 1, 2023
84af8f5
remove print statement
christopher-mohr Sep 1, 2023
b193b16
Merge pull request #51 from christopher-mohr/address_PR_comments
apeltzer Sep 1, 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
1 change: 0 additions & 1 deletion .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,4 +116,3 @@ To get started:
Devcontainer specs:

- [DevContainer config](.devcontainer/devcontainer.json)
- [Dockerfile](.devcontainer/Dockerfile)
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ body:
attributes:
label: System information
description: |
* Nextflow version _(eg. 22.10.1)_
* Nextflow version _(eg. 23.04.0)_
* Hardware _(eg. HPC, Desktop, Cloud)_
* Executor _(eg. slurm, local, awsbatch)_
* Container engine: _(e.g. Docker, Singularity, Conda, Podman, Shifter, Charliecloud, or Apptainer)_
Expand Down
12 changes: 9 additions & 3 deletions .github/workflows/awsfulltest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,24 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Launch workflow via tower
uses: seqeralabs/action-tower-launch@v1
uses: seqeralabs/action-tower-launch@v2
# Add full size test data (but still relatively small datasets for few samples)
# on the `test_full.config` test runs with only one set of parameters
with:
workspace_id: ${{ secrets.TOWER_WORKSPACE_ID }}
access_token: ${{ secrets.TOWER_ACCESS_TOKEN }}
compute_env: ${{ secrets.TOWER_COMPUTE_ENV }}
revision: ${{ github.sha }}
workdir: s3://${{ secrets.AWS_S3_BUCKET }}/work/nanostring/work-${{ github.sha }}
parameters: |
{
"hook_url": "${{ secrets.MEGATESTS_ALERTS_SLACK_HOOK_URL }}",
"outdir": "s3://${{ secrets.AWS_S3_BUCKET }}/nanostring/results-${{ github.sha }}"
}
profiles: test_full,aws_tower
profiles: test_full
- uses: actions/upload-artifact@v3
with:
name: Tower debug log file
path: tower_action_*.log
path: |
tower_action_*.log
tower_action_*.json
9 changes: 6 additions & 3 deletions .github/workflows/awstest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,21 @@ jobs:
steps:
# Launch workflow using Tower CLI tool action
- name: Launch workflow via tower
uses: seqeralabs/action-tower-launch@v1
uses: seqeralabs/action-tower-launch@v2
with:
workspace_id: ${{ secrets.TOWER_WORKSPACE_ID }}
access_token: ${{ secrets.TOWER_ACCESS_TOKEN }}
compute_env: ${{ secrets.TOWER_COMPUTE_ENV }}
revision: ${{ github.sha }}
workdir: s3://${{ secrets.AWS_S3_BUCKET }}/work/nanostring/work-${{ github.sha }}
parameters: |
{
"outdir": "s3://${{ secrets.AWS_S3_BUCKET }}/nanostring/results-test-${{ github.sha }}"
}
profiles: test,aws_tower
profiles: test
- uses: actions/upload-artifact@v3
with:
name: Tower debug log file
path: tower_action_*.log
path: |
tower_action_*.log
tower_action_*.json
1 change: 0 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ jobs:
- name: Run pipeline with test data
run: |
nextflow run ${GITHUB_WORKSPACE} -profile test,docker --outdir ./results

- name: Run pipeline with test data and gene scores
run: |
nextflow run ${GITHUB_WORKSPACE} -profile test_scores,docker --outdir ./results
Expand Down
5 changes: 5 additions & 0 deletions .gitpod.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
image: nfcore/gitpod:latest
tasks:
- name: Update Nextflow and setup pre-commit
command: |
pre-commit install --install-hooks
nextflow self-update

vscode:
extensions: # based on nf-core.nf-core-extensionpack
Expand Down
24 changes: 24 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,30 @@
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## v1.2.0 - 2023-08-24 - Nanometre

### `Added`

- [#48](https://github.com/nf-core/nanostring/pull/48) - Allow users to specify id column for heatmap [#39](https://github.com/nf-core/nanostring/issues/39)
- [#46](https://github.com/nf-core/nanostring/pull/46) - Update to nf-core template `2.9`
- [#42](https://github.com/nf-core/nanostring/pull/42) - Allow users to specify normalization method: `GEO` (default) or `GLM`

### `Fixed`

- [#51](https://github.com/nf-core/nanostring/pull/51) - Prevent HK-normalization while loading counts
- [#51](https://github.com/nf-core/nanostring/pull/51) - Use provided normalization method for Non-HK-normalized counts
- [#46](https://github.com/nf-core/nanostring/pull/46) - Publish `NACHO` QC reports [#44](https://github.com/nf-core/nanostring/issues/44)
- [#47](https://github.com/nf-core/nanostring/pull/47) - Update `NACHO` R package including bug fix [#45](https://github.com/nf-core/nanostring/issues/45)
- [#47](https://github.com/nf-core/nanostring/pull/47) - Set correct `conda` environment for `COMPUTE_GENE_SCORES` process

### `Dependencies`

| Dependency | Old version | New version |
| ---------- | ----------- | ----------- |
| `nacho` | 2.0.4 | 2.0.5 |

### `Deprecated`

## v1.1.1 - 2023-06-23

### `Added`
Expand Down
3 changes: 3 additions & 0 deletions CITATIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,8 @@

- [Docker](https://dl.acm.org/doi/10.5555/2600239.2600241)

> Merkel, D. (2014). Docker: lightweight linux containers for consistent development and deployment. Linux Journal, 2014(239), 2. doi: 10.5555/2600239.2600241.

- [Singularity](https://pubmed.ncbi.nlm.nih.gov/28494014/)

> Kurtzer GM, Sochat V, Bauer MW. Singularity: Scientific containers for mobility of compute. PLoS One. 2017 May 11;12(5):e0177459. doi: 10.1371/journal.pone.0177459. eCollection 2017. PubMed PMID: 28494014; PubMed Central PMCID: PMC5426675.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,22 +58,22 @@ nextflow run nf-core/nanostring \
> provided by the `-c` Nextflow option can be used to provide any configuration _**except for parameters**_;
> see [docs](https://nf-co.re/usage/configuration#custom-configuration-files).

For more details, please refer to the [usage documentation](https://nf-co.re/nanostring/usage) and the [parameter documentation](https://nf-co.re/nanostring/parameters).
For more details and further functionality, please refer to the [usage documentation](https://nf-co.re/nanostring/usage) and the [parameter documentation](https://nf-co.re/nanostring/parameters).

## Pipeline output

To see the the results of a test run with a full size dataset refer to the [results](https://nf-co.re/nanostring/results) tab on the nf-core website pipeline page.
To see the results of an example test run with a full size dataset refer to the [results](https://nf-co.re/nanostring/results) tab on the nf-core website pipeline page.
For more details about the output files and reports, please refer to the
[output documentation](https://nf-co.re/nanostring/output).

## Credits

nf-core/nanostring was originally written by Alexander Peltzer & Christopher Mohr. Extensive support was provided from other co-authors on the scientific or technical input required for the pipeline:
nf-core/nanostring was originally written by Peltzer, Alexander & Mohr, Christopher. Extensive support was provided from other co-authors on the scientific or technical input required for the pipeline:

- Kai Stadermann
- Matthias Zwick
- Germán Leparc
- Ramona Schmid
- Stadermann, Kai
- Zwick, Matthias
- Leparc, Germán
- Schmid, Ramona

## Contributions and Support

Expand Down
10 changes: 7 additions & 3 deletions assets/methods_description_template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,17 @@ plot_type: "html"
## You inject any metadata in the Nextflow '${workflow}' object
data: |
<h4>Methods</h4>
<p>Data was processed using nf-core/nanostring v${workflow.manifest.version} ${doi_text} of the nf-core collection of workflows (<a href="https://doi.org/10.1038/s41587-020-0439-x">Ewels <em>et al.</em>, 2020</a>).</p>
<p>Data was processed using nf-core/nanostring v${workflow.manifest.version} ${doi_text} of the nf-core collection of workflows (<a href="https://doi.org/10.1038/s41587-020-0439-x">Ewels <em>et al.</em>, 2020</a>), utilising reproducible software environments from the Bioconda (<a href="https://doi.org/10.1038/s41592-018-0046-7">Grüning <em>et al.</em>, 2018</a>) and Biocontainers (<a href="https://doi.org/10.1093/bioinformatics/btx192">da Veiga Leprevost <em>et al.</em>, 2017</a>) projects.</p>
<p>The pipeline was executed with Nextflow v${workflow.nextflow.version} (<a href="https://doi.org/10.1038/nbt.3820">Di Tommaso <em>et al.</em>, 2017</a>) with the following command:</p>
<pre><code>${workflow.commandLine}</code></pre>
<p>${tool_citations}</p>
<h4>References</h4>
<ul>
<li>Di Tommaso, P., Chatzou, M., Floden, E. W., Barja, P. P., Palumbo, E., & Notredame, C. (2017). Nextflow enables reproducible computational workflows. Nature Biotechnology, 35(4), 316-319. <a href="https://doi.org/10.1038/nbt.3820">https://doi.org/10.1038/nbt.3820</a></li>
<li>Ewels, P. A., Peltzer, A., Fillinger, S., Patel, H., Alneberg, J., Wilm, A., Garcia, M. U., Di Tommaso, P., & Nahnsen, S. (2020). The nf-core framework for community-curated bioinformatics pipelines. Nature Biotechnology, 38(3), 276-278. <a href="https://doi.org/10.1038/s41587-020-0439-x">https://doi.org/10.1038/s41587-020-0439-x</a></li>
<li>Di Tommaso, P., Chatzou, M., Floden, E. W., Barja, P. P., Palumbo, E., & Notredame, C. (2017). Nextflow enables reproducible computational workflows. Nature Biotechnology, 35(4), 316-319. doi: <a href="https://doi.org/10.1038/nbt.3820">10.1038/nbt.3820</a></li>
<li>Ewels, P. A., Peltzer, A., Fillinger, S., Patel, H., Alneberg, J., Wilm, A., Garcia, M. U., Di Tommaso, P., & Nahnsen, S. (2020). The nf-core framework for community-curated bioinformatics pipelines. Nature Biotechnology, 38(3), 276-278. doi: <a href="https://doi.org/10.1038/s41587-020-0439-x">10.1038/s41587-020-0439-x</a></li>
<li>Grüning, B., Dale, R., Sjödin, A., Chapman, B. A., Rowe, J., Tomkins-Tinch, C. H., Valieris, R., Köster, J., & Bioconda Team. (2018). Bioconda: sustainable and comprehensive software distribution for the life sciences. Nature Methods, 15(7), 475–476. doi: <a href="https://doi.org/10.1038/s41592-018-0046-7">10.1038/s41592-018-0046-7</a></li>
<li>da Veiga Leprevost, F., Grüning, B. A., Alves Aflitos, S., Röst, H. L., Uszkoreit, J., Barsnes, H., Vaudel, M., Moreno, P., Gatto, L., Weber, J., Bai, M., Jimenez, R. C., Sachsenberg, T., Pfeuffer, J., Vera Alvarez, R., Griss, J., Nesvizhskii, A. I., & Perez-Riverol, Y. (2017). BioContainers: an open-source and community-driven framework for software standardization. Bioinformatics (Oxford, England), 33(16), 2580–2582. doi: <a href="https://doi.org/10.1093/bioinformatics/btx192">10.1093/bioinformatics/btx192</a></li>
${tool_bibliography}
</ul>
<div class="alert alert-info">
<h5>Notes:</h5>
Expand Down
4 changes: 2 additions & 2 deletions assets/multiqc_config.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
report_comment: >
This report has been generated by the <a href="https://github.com/nf-core/nanostring" target="_blank">nf-core/nanostring</a>
This report has been generated by the <a href="https://github.com/nf-core/nanostring/1.2.0" target="_blank">nf-core/nanostring</a>
analysis pipeline. For information about how to interpret these results, please see the
<a href="https://nf-co.re/nanostring" target="_blank">documentation</a>.
<a href="https://nf-co.re/nanostring/1.2.0/output" target="_blank">documentation</a>.

report_section_order:
BD:
Expand Down
Binary file modified assets/nf-core-nanostring_logo_light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion assets/slackreport.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{
"fallback": "Plain-text summary of the attachment.",
"color": "<% if (success) { %>good<% } else { %>danger<%} %>",
"author_name": "sanger-tol/readmapping v${version} - ${runName}",
"author_name": "nf-core/nanostring v${version} - ${runName}",
"author_icon": "https://www.nextflow.io/docs/latest/_static/favicon.ico",
"text": "<% if (success) { %>Pipeline completed successfully!<% } else { %>Pipeline completed with errors<% } %>",
"fields": [
Expand Down
33 changes: 20 additions & 13 deletions bin/compute_gene_heatmap.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,31 +11,26 @@ library(tidylog)
###Command line argument parsing###
args = commandArgs(trailingOnly=TRUE)
if (length(args) < 1) {
stop("Usage: compute_gene_heatmap.R <annotated_counts.tsv> or compute_gene_heatmap.R <annotated_counts.tsv> <genes.yaml>", call.=FALSE)
stop("Usage: compute_gene_heatmap.R <annotated_counts.tsv> <sample_id_col> or compute_gene_heatmap.R <annotated_counts.tsv> <genes.yaml> <sample_id_col>", call.=FALSE)
}
input_counts <- args[1]
id_col <- tail(args, 1)

#Read annotated counts
# HEADER is always RCC_FILE + GENES + SAMPLE_ID and additional metadata such as GROUP TREATMENT OTHER_METADATA
counts <- read.table(input_counts, sep="\t", check.names = FALSE, header=TRUE, stringsAsFactors = FALSE)

if (length(args) == 2) {
if (length(args) == 3) {
input_genes <- args[2]
genes <- read_yaml(input_genes)
} else {
gene_cols <- counts %>% dplyr::select(- any_of(c("RCC_FILE", "SAMPLE_ID", "TIME", "TREATMENT", "OTHER_METADATA")))
gene_cols <- counts %>% dplyr::select(- any_of(c(unique(c("SAMPLE_ID", id_col)), "RCC_FILE", "TIME", "TREATMENT", "OTHER_METADATA")))
genes <- colnames(gene_cols)
}

#Select counts of interest
counts_selected <- counts %>% dplyr::select(all_of(genes))

#Add proper Rownames
rownames(counts_selected) <- counts$RCC_FILE_NAME

#sort dataframe by rownames to make it easier comparable across heatmaps
counts_selected[order(row.names(counts_selected)), ]

#log2+1
counts_selected <- log2(counts_selected + 1)

Expand All @@ -48,16 +43,28 @@ max_value <- max(colMax(counts_selected))
min_value <- min(colMin(counts_selected))

#Save as PDF

prefix <- ""
if (grepl("wo_HKnorm",input_counts)) {
prefix <- "wo_HKnorm_"
}

agg_png(file = paste0(prefix, "gene_heatmap_mqc.png"), width = 1200, height = 2000, unit = "px")

Heatmap(counts_selected, name = "Gene-Count Heatmap", column_title = "Gene (log2 +1)",
row_title_rot = 90, row_title = "SampleID",row_dend_reorder = FALSE, show_row_dend = FALSE, row_names_side = "left",
show_column_dend = FALSE, col = colorRamp2(c(min_value, max_value), c("#f7f7f7", "#67a9cf")))
#Add proper row names
counts_matrix <- as.matrix(counts_selected)
row.names(counts_matrix) <- counts[[id_col]]

Heatmap(counts_matrix,
name = "Gene-Count Heatmap",
column_title = "Gene (log2 +1)",
row_order = order(row.names(counts_matrix)),
row_title_rot = 90,
row_title = "SampleID",
row_dend_reorder = FALSE,
show_row_dend = FALSE,
row_names_side = "left",
show_column_dend = FALSE,
col = colorRamp2(c(min_value, max_value), c("#f7f7f7", "#67a9cf"))
)

dev.off()
19 changes: 7 additions & 12 deletions bin/nacho_norm.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ if (length(args) < 2) {
}
input_rcc_path <- args[1]
input_samplesheet <- args[2]
norm_method <- args[3]

#Create filelist for NachoQC

Expand All @@ -18,7 +19,8 @@ list_of_rccs <- dir_ls(path = input_rcc_path, glob = "*.RCC")
####RealCode####
nacho_data <- load_rcc(data_directory = input_rcc_path,
ssheet_csv = input_samplesheet,
id_colname = "RCC_FILE_NAME")
id_colname = "RCC_FILE_NAME",
normalisation_method = norm_method)

output_base <- "./"

Expand All @@ -45,19 +47,12 @@ now=format(Sys.time(), "%Y%m%d%H%M")
norm_counts <- as.data.frame(get_counts(nacho_data))
write_tsv(norm_counts, file = paste0(now, "_normalized_counts.tsv"))


#Write out non-hk normalized counts too
nacho_data_no_hk <- load_rcc(data_directory = input_rcc_path,
ssheet_csv = input_samplesheet,
id_colname = "RCC_FILE_NAME")

#Perform normalization again but without HK (so only pos + negative controls are used)
non_hk_normed_data <- normalise(nacho_data_no_hk,
nacho_data_no_hk[["housekeeping_genes"]],
housekeeping_norm = FALSE
)
id_colname = "RCC_FILE_NAME",
normalisation_method = norm_method,
housekeeping_norm = FALSE)

norm_counts_without_hks <- as.data.frame(get_counts(non_hk_normed_data))
norm_counts_without_hks <- as.data.frame(get_counts(nacho_data_no_hk))
write_tsv(norm_counts_without_hks, file = paste0(now, "_normalized_counts_wo_HKnorm.tsv"))


3 changes: 3 additions & 0 deletions conf/modules.config
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ process {
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
ext.args = { "${params.normalization_method}" }
}

withName: CREATE_ANNOTATED_TABLES {
Expand All @@ -56,6 +57,7 @@ process {
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
ext.args = { "${params.heatmap_id_column}" }
}

withName: COMPUTE_GENE_SCORES {
Expand All @@ -64,6 +66,7 @@ process {
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
ext.args = { "${params.gene_score_method}" }
}

withName: CUSTOM_DUMPSOFTWAREVERSIONS {
Expand Down
Loading