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

Adding Assembly Stub Output and Generating IRIDA Next-Compliant JSON Output #9

Merged
merged 18 commits into from
Nov 8, 2023

Conversation

emarinier
Copy link
Member

@emarinier emarinier commented Nov 2, 2023

  • Adds stub assembly output.
  • Generates a JSON file that is compatible with IRIDA Next.

Example single JSON output:

{
    "files": {
        "samples": {
            "SAMPLE1": [
                {
                    "path": "assembly/SAMPLE1.assembly.fa.gz"
                }
            ]
        }
    },
    "metadata": {
        "samples": {
            "SAMPLE1": {
                "reads": ["sample1_R1.fastq.gz", "sample1_R2.fastq.gz"]
            }
        }
    }
}

Example combined, flattened, and IRIDA-compliant JSON output:

{
    "files": {
        "global": [
            {
                "path": "summary/summary.txt.gz"
            }
        ],
        "samples": {
            "SAMPLE1": [
                {
                    "path": "assembly/SAMPLE1.assembly.fa.gz"
                }
            ],
            "SAMPLE2": [
                {
                    "path": "assembly/SAMPLE2.assembly.fa.gz"
                }
            ],
            "SAMPLE3": [
                {
                    "path": "assembly/SAMPLE3.assembly.fa.gz"
                }
            ]
        }
    },
    "metadata": {
        "samples": {
            "SAMPLE1": {
                "reads.1": "sample1_R1.fastq.gz",
                "reads.2": "sample1_R2.fastq.gz"
            },
            "SAMPLE2": {
                "reads.1": "sample2_R1.fastq.gz",
                "reads.2": "sample2_R2.fastq.gz"
            },
            "SAMPLE3": {
                "reads.1": "sample1_R1.fastq.gz",
                "reads.2": "null"
            }
        }
    }
}

Example summary file:

IRIDANEXT-EXAMPLE-NF Pipeline Summary

SUCCESS!

SAMPLE1:
    reads.1: /nf-core/test-datasets/viralrecon/illumina/amplicon/sample1_R1.fastq.gz
    reads.2: /nf-core/test-datasets/viralrecon/illumina/amplicon/sample1_R2.fastq.gz
    assembly: /nextflow-scratch/debeb133b9824ba8883d17261ce70f2f/a4/f892f61e24b5f7eaec584b044ce953/SAMPLE1.assembly.fa.gz

SAMPLE2:
    reads.1: /nf-core/test-datasets/viralrecon/illumina/amplicon/sample2_R1.fastq.gz
    reads.2: /nf-core/test-datasets/viralrecon/illumina/amplicon/sample2_R2.fastq.gz
    assembly: /nextflow-scratch/debeb133b9824ba8883d17261ce70f2f/cd/a2659b9486a06df86fbfa5ce8269bc/SAMPLE2.assembly.fa.gz

SAMPLE3:
    reads.1: /nf-core/test-datasets/viralrecon/illumina/amplicon/sample1_R1.fastq.gz
    reads.2: null
    assembly: /nextflow-scratch/debeb133b9824ba8883d17261ce70f2f/4a/d37e827094eb9c060c4c0be1a440af/SAMPLE3.assembly.fa.gz

Will very likely need to change how the summary file is written to avoid code injection: #10

@emarinier emarinier self-assigned this Nov 2, 2023

This comment was marked as resolved.

Copy link

github-actions bot commented Nov 2, 2023

nf-core lint overall result: Passed ✅ ⚠️

Posted for pipeline commit bfdb364

+| ✅ 156 tests passed       |+
#| ❔   2 tests were ignored |#
!| ❗  15 tests had warnings |!

❗ Test warnings:

  • readme - README did not have a Nextflow minimum version badge.
  • pipeline_todos - TODO string in nextflow.config: Specify your pipeline's command line flags
  • pipeline_todos - TODO string in ci.yml: You can customise CI pipeline run tests as required
  • pipeline_todos - TODO string in awsfulltest.yml: You can customise AWS full pipeline tests as required
  • pipeline_todos - TODO string in methods_description_template.yml: #Update the HTML below to your preferred methods description, e.g. add publication citation for this pipeline
  • pipeline_todos - TODO string in test_full.config: Specify the paths to your full test data ( on nf-core/test-datasets or directly in repositories, e.g. SRA)
  • pipeline_todos - TODO string in test_full.config: Give any required params for the test so that command line flags are not needed
  • pipeline_todos - TODO string in test.config: Specify the paths to your test data on nf-core/test-datasets
  • pipeline_todos - TODO string in test.config: Give any required params for the test so that command line flags are not needed
  • pipeline_todos - TODO string in base.config: Check the defaults for all processes
  • pipeline_todos - TODO string in base.config: Customise requirements for specific processes.
  • pipeline_todos - TODO string in output.md: Write this documentation describing your workflow's output
  • pipeline_todos - TODO string in usage.md: Add documentation about anything specific to running your pipeline. For general topics, please point to (and add to) the main nf-core website.
  • pipeline_todos - TODO string in WorkflowIridanext.groovy: Optionally add in-text citation tools to this list.
  • pipeline_todos - TODO string in WorkflowMain.groovy: Add Zenodo DOI for pipeline after first release

❔ Tests ignored:

  • files_unchanged - File ignored due to lint config: assets/sendmail_template.txt
  • files_unchanged - File ignored due to lint config: lib/NfcoreTemplate.groovy

✅ Tests passed:

Run details

  • nf-core/tools version 2.10
  • Run at 2023-11-08 19:23:31

@emarinier emarinier changed the title WIP: Adding Assembly Stub Output and Generating IRIDA Next-Compliant JSON Output Adding Assembly Stub Output and Generating IRIDA Next-Compliant JSON Output Nov 7, 2023
@emarinier emarinier requested a review from apetkau November 7, 2023 20:28
Copy link
Member

@apetkau apetkau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks amazing. Thanks so much for all you work on this Eric 😄. There are just a few suggestions I have.

@emarinier
Copy link
Member Author

I've made the changes and it's working as expected locally and on Azure.

Copy link
Member

@apetkau apetkau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome. Thanks so much Eric. This looks great. Merging.

@apetkau apetkau merged commit d230c4d into dev Nov 8, 2023
@apetkau apetkau deleted the assembly branch November 8, 2023 20:24
@emarinier emarinier mentioned this pull request Nov 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants