27-Nov-2024
process GET_SRA_BY_ACCESSION { input: val(sample) output: path("${sample}.fastq.gz") script: """ fastq-dump ${sample} > ${sample}.fastq.gz """ }
process GET_SRA_BY_ACCESSION { input: val(sample) output: tuple val(sample), path("${sample}.fastq.gz") script: """ fastq-dump ${sample} > ${sample}.fastq.gz """ }
process GET_SRA_BY_ACCESSION { cpus 2 memory '8 GB' input: val(sample) output: tuple val(sample), path("${sample}.fastq.gz") script: """ fastq-dump ${sample} > ${sample}.fastq.gz """ }
process GET_SRA_BY_ACCESSION { cpus 2 memory '8 GB' conda 'sra-tools=2.11.0' container 'ncbi/sra-tools:2.11.0' input: val(sample) output: tuple val(sample), path("${sample}.fastq.gz") script: """ fastq-dump ${sample} > ${sample}.fastq.gz """ }
workflow { // Define SRA input data channel ch_sra_ids = Channel.fromList ( ["SRR935090", "SRR935091", "SRR935092"] ) // Define the workflow GET_SRA_BY_ACCESSION ( ch_sra_ids ) }
workflow { // Define SRA input data channel ch_sra_ids = Channel.fromList ( ["SRR935090", "SRR935091", "SRR935092"] ) // Define the workflow GET_SRA_BY_ACCESSION ( ch_sra_ids ) RUN_FASTQC ( GET_SRA_BY_ACCESSION.out ) }
workflow { // Define SRA input data channel ch_sra_ids = Channel.fromList ( ["SRR935090", "SRR935091", "SRR935092"] ) // Define the workflow GET_SRA_BY_ACCESSION ( ch_sra_ids ) RUN_FASTQC ( GET_SRA_BY_ACCESSION.out ) RUN_MULTIQC ( RUN_FASTQC.out.collect() ) }
Execute a workflow
$ nextflow run main.nf
Re-run using cached results
$ nextflow run main.nf -resume
Execute with a specific configuration file
$ nextflow run main.nf -c nextflow.config
Supply a custom parameter
$ nextflow run main.nf --param "value"
Use a pre-defined configuration profile
$ nextflow run main.nf -profile uppmax
Use Docker or Apptainer
$ nextflow run main.nf -with-docker $ nextflow run main.nf -with-apptainer