cellgeni / nf-irods-to-fastq

Get CRAMs from iRODS and convert them to FASTQ
MIT License
1 stars 2 forks source link

nf-irods-to-fastq

This Nextflow pipeline pulls samples from iRODS and converts them to FASTQ files.

Contents of Repo

Pipeline Arguments

Examples of use

  1. Run a metadata search for a specified list of samples:

    nextflow run main.nf --findmeta ./examples/samples.csv
  2. Download cram files (specified in metadata.tsv) from IRODS and convert them to fastq

    nextflow run main.nf --cram2fastq --meta metadata/metadata.tsv
  3. Upload fastq files to ftp server (you to set up the ftp server in nextflow.config):

    nextflow run main.nf --toftp --fastqfiles ./results/
  4. Combine several steps to run them together

    nextflow run main.nf --findmeta ./examples/samples.csv --cram2fastq --toftp

Graph

---
title: Nextflow pipeline for retrieving CRAM files stored in IRODS and convert them to FASTQ
---
flowchart TB
    subgraph findmeta["Find CRAM metadata"]
    direction LR
      v0([findCrams])
      v1([getMetadata])
      v2([parseMetadata])
      v3([combineMetadata])
    end
    subgraph downloadcrams["Covert CRAMS --> FASTQ"]
    direction LR
        v4([downloadCram])
        v5([cramToFastq])
        v6([calculateReadLength])
        v7([checkATAC])
        v8([renameATAC])
        v9([saveMetaToJson])
        v10([updateMetadata])
    end
    subgraph uploadtoftp["Upload data to FTP"]
    direction LR
      v11([concatFastqs])
      v12([uploadFTP])
    end
    v0 --> v1 --> v2 --> v3
    v4 --> v5 --> v6 --> v7{10X ATAC}
    v11 --> v12
    v7 --YES--> v8
    v8 --> v9
    v7 --NO--> v9
    v9 --> v10
    findmeta -.-> downloadcrams -.-> uploadtoftp