šŸ§Ŗ

Community Workflows: Nf-core

Overview

nf-core provides a collection of open source pipelines and workflows. This workflow can be launched via API/SDK or via Web Walkthrough.

image

nf-core Launch via API/SDK

You can launch nf-core workflows programmatically using the Form Bio CLI/SDK tool to call the Form Bio API.

  1. Upload any relevant input data / files
# Upload files to Form Bio project
$ formbio storage cp -r ./local-files/sequences formbio://${org}/${project}
  1. Create input parameters for a given nf-core workflow as a JSON params list
    1. You can Use nf-coreā€™s web UI Launcher to create the JSON parameters.
    2. Note: any input files should be of the URI scheme: formbio://${project}/${org}/${filepath}
  1. You then can launch a workflow via the API using the Form Bio CLI/SDK:
    • See docs on how to use the Form Bio CLI/SDK to run workflows via the API

For example, to launch nf-core/bamtofastq workflow:

# Run nf-core/bamtofastq workflow
$ formbio workflow run \
--run-name 'nf-core_bamtofastq_re-run_1' \
--org formbio \
--project formbio-workflows \
--repo nf-core \
--workflow formbio/formbio-workflows/nf-core \
--version main \
--execution-engine nextflow \
-- \
--outdir='{{formbio.params.output}}' \
# nf-core JSON input params
--params='{
    "input": "https://raw.githubusercontent.com/nf-core/test-datasets/bamtofastq/samplesheet/test_bam_samplesheet.csv"
}' \
--workflow='nf-core/bamtofastq' \
--workflowVersion='2.1.0'

Another example to launch nf-core/taxprofiler using formbio input files:

$ formbio workflow run \
--run-name 'nf-core-tax-profiler' \
--org formbio \
--project formbio-workflows \
--repo nf-core \
--workflow formbio/formbio-workflows/nf-core \
--version main \
--execution-engine nextflow \
-- \
--outdir='{{formbio.params.output}}' \
# nf-core JSON input params
--params='{
  "input": "formbio://formbio/formbio-workflows/nf-core-data/taxprofiler/samplesheet.csv",
  "databases": "formbio://formbio/formbio-workflows/nf-core-data/taxprofiler/database_v1.1.csv",
  "perform_shortread_qc": true,
  "perform_longread_qc": true,
  "shortread_qc_mergepairs": true,
  "perform_shortread_complexityfilter": true,
  "perform_shortread_hostremoval": true,
  "perform_longread_hostremoval": true,
  "perform_runmerging": true,
  "hostremoval_reference": "https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/genome/genome.fasta",
  "run_kaiju": true,
  "run_kraken2": true,
  "run_bracken": true,
  "run_malt": false,
  "run_metaphlan": true,
  "run_centrifuge": true,
  "run_diamond": true,
  "run_krakenuniq": true,
  "run_motus": false,
  "run_ganon": true,
  "run_krona": true,
  "run_kmcp": true,
  "kmcp_mode": 0,
  "krona_taxonomy_directory": "https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/sarscov2/metagenome/krona_taxonomy.tab",
  "malt_save_reads": true,
  "kraken2_save_reads": true,
  "centrifuge_save_reads": true,
  "run_profile_standardisation": true
}' \
--workflow='nf-core/taxprofiler' \
--workflowVersion='1.1.2'

nf-core Launch via Web Walkthrough

  1. Navigate to the ā€˜nf-coreā€™ launcher card. You can also find this workflow using the search bar in the top right corner, or by using the ā€œnf-coreā€ filter on the left-hand side. Select the nf-core workflow, which will navigate directly to Launcher.
  2. image
  3. Launcher Tabs
    1. Search for the desired nf-core repository. The nf-core workflow repository supports many different workflows.
    2. image
    3. Search for workflow version of selected workflow repository
    4. image
      šŸ’”
      If you already know which parameters are required for the version you chose, you can skip to Step 2e. Otherwise, proceed to Step 2c.
    5. To determine which parameters are needed, click the link below the search bar for the documentation for the selected workflow and version.
    6. image
    7. Navigate to the ā€˜Parametersā€™ tab to see list of parameters required for the JSON input. Required parameters are indicated by a yellow ā€˜requiredā€™ box on the right side.
    8. image
    9. For each desired/required parameter, include the JSON key and give it a value.
    10. {
        "input": "formbio://formbio/formbio-workflows/nf-core-data/taxprofiler/samplesheet.csv",
        "databases": "formbio://formbio/formbio-workflows/nf-core-data/taxprofiler/database_v1.1.csv",
        "perform_shortread_qc": true,
        "perform_longread_qc": true,
        "shortread_qc_mergepairs": true,
        "perform_shortread_complexityfilter": true,
        "perform_shortread_hostremoval": true,
        "perform_longread_hostremoval": true,
        "perform_runmerging": true,
        "hostremoval_reference": "https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/genome/genome.fasta",
        "run_kaiju": true,
        "run_kraken2": true,
        "run_bracken": true,
        "run_malt": false,
        "run_metaphlan": true,
        "run_centrifuge": true,
        "run_diamond": true,
        "run_krakenuniq": true,
        "run_motus": false,
        "run_ganon": true,
        "run_krona": true,
        "run_kmcp": true,
        "kmcp_mode": 0,
        "krona_taxonomy_directory": "https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/sarscov2/metagenome/krona_taxonomy.tab",
        "malt_save_reads": true,
        "kraken2_save_reads": true,
        "centrifuge_save_reads": true,
        "run_profile_standardisation": true
      }
      image
    11. Note: outdir parameter should be omitted for our workflow, as this get specified in the API.
    12. Note: Any file or directory paths should point to its formbio:// path
    13. You can use the nf-core websiteā€™s ā€œLaunchā€ functionality to map which fields to populate in the JSON input field for this workflow.
  4. Go to the Review & Submit tab at the top and give the workflow run a name. Click ā€œRun Workflowā€ in the bottom right corner to begin analysis.
  5. image