From 49345a1eaa5dc09f5ef507fa749cb8fbb50e7ca2 Mon Sep 17 00:00:00 2001 From: Chris Hakkaart Date: Fri, 24 Feb 2023 22:12:22 +0000 Subject: [PATCH 01/77] Simplify samplesheet, input check, and qcat --- bin/check_samplesheet.py | 130 ++++++------------ main.nf | 9 ++ subworkflows/local/input_check.nf | 34 ++--- subworkflows/local/qcfastq_nanoplot_fastqc.nf | 14 +- workflows/nanoseq.nf | 96 +++++++------ 5 files changed, 121 insertions(+), 162 deletions(-) diff --git a/bin/check_samplesheet.py b/bin/check_samplesheet.py index a10f4479..7ff786d3 100755 --- a/bin/check_samplesheet.py +++ b/bin/check_samplesheet.py @@ -46,24 +46,23 @@ def read_head(handle, num_lines=10): return "".join(lines) -def check_samplesheet(file_in, updated_path, file_out): +def check_samplesheet(file_in, file_out): """ This function checks that the samplesheet follows the following structure: - group,replicate,barcode,input_file,fasta,gtf - MCF7,1,,MCF7_directcDNA_replicate1.fastq.gz,genome.fa, - MCF7,2,,MCF7_directcDNA_replicate3.fastq.gz,genome.fa,genome.gtf - K562,1,,K562_directcDNA_replicate1.fastq.gz,genome.fa, - K562,2,,K562_directcDNA_replicate4.fastq.gz,,transcripts.fa + group,replicate,barcode,input_file + MCF7,1,,MCF7_directcDNA_replicate1.fastq.gz + MCF7,2,,MCF7_directcDNA_replicate3.fastq.gz """ input_extensions = [] sample_info_dict = {} with open(file_in, "r") as fin: + ## Check header MIN_COLS = 3 - HEADER = ["group", "replicate", "barcode", "input_file", "fasta", "gtf"] + HEADER = ['group', 'replicate', 'barcode', 'input_file'] header = fin.readline().strip().split(",") - if header[: len(HEADER)] != HEADER: + if header[:len(HEADER)] != HEADER: print("ERROR: Please check samplesheet header -> {} != {}".format(",".join(header), ",".join(HEADER))) sys.exit(1) @@ -73,40 +72,40 @@ def check_samplesheet(file_in, updated_path, file_out): ## Check valid number of columns per row if len(lspl) < len(HEADER): - print_error("Invalid number of columns (minimum = {})!".format(len(HEADER)), "Line", line) + print_error("Invalid number of columns (minimum = {})!".format(len(HEADER)), 'Line', line) num_cols = len([x for x in lspl if x]) if num_cols < MIN_COLS: - print_error("Invalid number of populated columns (minimum = {})!".format(MIN_COLS), "Line", line) + print_error("Invalid number of populated columns (minimum = {})!".format(MIN_COLS), 'Line', line) ## Check group name entries - group, replicate, barcode, input_file, fasta, gtf = lspl[: len(HEADER)] + group, replicate, barcode, input_file = lspl[:len(HEADER)] if group: if group.find(" ") != -1: - print_error("Group entry contains spaces!", "Line", line) + print_error("Group entry contains spaces!", 'Line', line) else: - print_error("Group entry has not been specified!", "Line", line) + print_error("Group entry has not been specified!", 'Line', line) ## Check replicate entry is integer if replicate: if not replicate.isdigit(): - print_error("Replicate id not an integer!", "Line", line) + print_error("Replicate id not an integer!", 'Line', line) else: - print_error("Replicate id not specified!", "Line", line) + print_error("Replicate id not specified!", 'Line', line) replicate = int(replicate) ## Check barcode entry if barcode: if not barcode.isdigit(): - print_error("Barcode entry is not an integer!", "Line", line) + print_error("Barcode entry is not an integer!", 'Line', line) else: - barcode = "barcode%s" % (barcode.zfill(2)) + barcode = 'barcode%s' % (barcode.zfill(2)) ## Check input file extension - nanopolish_fast5 = "" + nanopolish_fast5 = '' if input_file: if input_file.find(" ") != -1: - print_error("Input file contains spaces!", "Line", line) + print_error("Input file contains spaces!", 'Line', line) if input_file.endswith(".fastq.gz"): input_extensions.append("*.fastq.gz") elif input_file.endswith(".fq.gz"): @@ -115,110 +114,65 @@ def check_samplesheet(file_in, updated_path, file_out): input_extensions.append("*.bam") else: if updated_path != "not_changed": - input_file = "/".join([updated_path, input_file.split("/")[-1]]) - list_dir = os.listdir(input_file) + input_file='/'.join([updated_path,input_file.split("/")[-1]]) + list_dir = os.listdir(input_file) nanopolish_fast5 = input_file - if not (all(fname.endswith(".fast5") for fname in list_dir)): + if not (all(fname.endswith('.fast5') for fname in list_dir)): if "fast5" in list_dir and "fastq" in list_dir: - nanopolish_fast5 = input_file + "/fast5" + nanopolish_fast5 = input_file+'/fast5' ## CHECK FAST5 DIRECTORY - if not (all(fname.endswith(".fast5") for fname in os.listdir(nanopolish_fast5))): - print_error("fast5 directory contains non-fast5 files.") + if not (all(fname.endswith('.fast5') for fname in os.listdir(nanopolish_fast5))): + print_error('fast5 directory contains non-fast5 files.') ## CHECK PROVIDED BASECALLED FASTQ - fastq_path = input_file + "/fastq" - basecalled_fastq = [ - fn for fn in os.listdir(fastq_path) if fn.endswith(".fastq.gz") or fn.endswith(".fq.gz") - ] + fastq_path = input_file+'/fastq' + basecalled_fastq = [fn for fn in os.listdir(fastq_path) if fn.endswith(".fastq.gz") or fn.endswith(".fq.gz") ] if len(basecalled_fastq) != 1: - print_error("Please input one basecalled fastq per sample.") + print_error('Please input one basecalled fastq per sample.') else: - input_file = fastq_path + "/" + basecalled_fastq[0] + input_file = fastq_path+'/'+basecalled_fastq[0] if not basecalled_fastq[0].endswith(".fastq.gz"): if not basecalled_fastq[0].endswith(".fq.gz"): print_error('basecalled fastq input does not end with ".fastq.gz" or ".fq.gz"') else: - print_error( - 'path does not end with ".fastq.gz", ".fq.gz", or ".bam" and is not an existing directory with correct fast5 and/or fastq inputs.' - ) - - ## Check genome entries - if fasta: - if fasta.find(" ") != -1: - print_error("Genome entry contains spaces!", "Line", line) - if len(fasta.split(".")) > 1: - if ( - fasta[-6:] != ".fasta" - and fasta[-3:] != ".fa" - and fasta[-9:] != ".fasta.gz" - and fasta[-6:] != ".fa.gz" - ): - print_error( - "Genome entry does not have extension '.fasta', '.fa', '.fasta.gz' or '.fa.gz'!", - "Line", - line, - ) - - ## Check transcriptome entries - # gtf = '' - is_transcripts = "0" - if gtf: - if gtf.find(" ") != -1: - print_error("Transcriptome entry contains spaces!", "Line", line) - print(gtf[-4:]) - if gtf[-4:] != ".gtf" and gtf[-7:] != ".gtf.gz": - print_error("Transcriptome entry does not have extension '.gtf' or '.gtf.gz'!", "Line", line) - # if transcriptome[-6:] != '.fasta' and transcriptome[-3:] != '.fa' and transcriptome[-9:] != '.fasta.gz' and transcriptome[-6:] != '.fa.gz' and transcriptome[-4:] != '.gtf' and transcriptome[-7:] != '.gtf.gz': - # print_error("Transcriptome entry does not have extension '.fasta', '.fa', '.fasta.gz', '.fa.gz', '.gtf' or '.gtf.gz'!", 'Line', line) - # if transcriptome[-4:] == '.gtf' or transcriptome[-7:] == '.gtf.gz': - # gtf = transcriptome - # if not genome: - # print_error("If genome isn't provided, transcriptome must be in fasta format for mapping!", 'Line', line) - # else: - # is_transcripts = '1' - # genome = transcriptome - - ## Create sample mapping dictionary = {group: {replicate : [ barcode, input_file, genome, gtf, is_transcripts, nanopolish_fast5 ]}} - sample_info = [barcode, input_file, fasta, gtf, is_transcripts, nanopolish_fast5] + print_error('path does not end with ".fastq.gz", ".fq.gz", or ".bam" and is not an existing directory with correct fast5 and/or fastq inputs.') + + ## Create sample mapping dictionary = {group: {replicate : [ barcode, input_file ]}} + sample_info = [barcode, input_file] if group not in sample_info_dict: sample_info_dict[group] = {} if replicate not in sample_info_dict[group]: sample_info_dict[group][replicate] = sample_info else: - print_error("Same replicate id provided multiple times!", "Line", line) + print_error("Same replicate id provided multiple times!", 'Line', line) ## Check all input files have the same extension if len(set(input_extensions)) > 1: - print_error( - "All input files must have the same extension!", - "Multiple extensions found", - ", ".join(set(input_extensions)), - ) + print_error("All input files must have the same extension!", 'Multiple extensions found', ', '.join(set(input_extensions))) ## Write validated samplesheet with appropriate columns if len(sample_info_dict) > 0: out_dir = os.path.dirname(file_out) make_dir(out_dir) with open(file_out, "w") as fout: - fout.write( - ",".join(["sample", "barcode", "input_file", "fasta", "gtf", "is_transcripts", "nanopolish_fast5"]) - + "\n" - ) + + fout.write(",".join(['sample', 'barcode', 'reads']) + "\n") for sample in sorted(sample_info_dict.keys()): + ## Check that replicate ids are in format 1.. uniq_rep_ids = set(sample_info_dict[sample].keys()) if len(uniq_rep_ids) != max(uniq_rep_ids): - print_error("Replicate ids must start with 1..!", "Group", sample) + print_error("Replicate ids must start with 1..!", 'Group', sample) ### Write to file for replicate in sorted(sample_info_dict[sample].keys()): - sample_id = "{}_R{}".format(sample, replicate) - fout.write(",".join([sample_id] + sample_info_dict[sample][replicate]) + "\n") + sample_id = "{}_R{}".format(sample,replicate) + fout.write(','.join([sample_id] + sample_info_dict[sample][replicate]) + '\n') def main(args=None): args = parse_args(args) - check_samplesheet(args.FILE_IN, args.UPDATED_PATH, args.FILE_OUT) + check_samplesheet(args.FILE_IN, args.FILE_OUT) -if __name__ == "__main__": +if __name__ == '__main__': sys.exit(main()) diff --git a/main.nf b/main.nf index 5ef5c817..6993bfee 100644 --- a/main.nf +++ b/main.nf @@ -12,6 +12,15 @@ nextflow.enable.dsl = 2 +/* +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + GENOME PARAMETER VALUES +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +*/ + +params.fasta = WorkflowMain.getGenomeAttribute(params, 'fasta') +params.gtf = WorkflowMain.getGenomeAttribute(params, 'gtf') + /* ======================================================================================== VALIDATE & PRINT PARAMETER SUMMARY diff --git a/subworkflows/local/input_check.nf b/subworkflows/local/input_check.nf index f38041df..e222ad70 100644 --- a/subworkflows/local/input_check.nf +++ b/subworkflows/local/input_check.nf @@ -16,35 +16,21 @@ workflow INPUT_CHECK { SAMPLESHEET_CHECK ( samplesheet, input_path ) .csv .splitCsv ( header:true, sep:',' ) - .map { get_sample_info(it, params.genomes) } - .map { it -> [ it[0], it[2], it[3], it[4], it[5], it[6], it[1] , it[7] ] } + .map { get_sample_info(it) } .set { ch_sample } emit: - ch_sample // [ sample, barcode, fasta, gtf, is_transcripts, annotation_str ] + ch_sample // [ sample, barcode, fasta ] } -// Function to resolve fasta and gtf file if using iGenomes -// Returns [ sample, input_file, barcode, fasta, gtf, is_transcripts, annotation_str, nanopolish_fast5 ] -def get_sample_info(LinkedHashMap sample, LinkedHashMap genomeMap) { - def meta = [:] - meta.id = sample.sample +// Function to get list of [ meta, fastq ] +def get_sample_info(LinkedHashMap row) { + def meta = [:] + meta.id = row.sample + meta.barcode = row.barcode + input_file = row.reads ? file(row.reads, checkIfExists: true) : null - // Resolve fasta and gtf file if using iGenomes - def fasta = false - def gtf = false - if (sample.fasta) { - if (genomeMap && genomeMap.containsKey(sample.fasta)) { - fasta = file(genomeMap[sample.fasta].fasta, checkIfExists: true) - gtf = file(genomeMap[sample.fasta].gtf, checkIfExists: true) - } else { - fasta = file(sample.fasta, checkIfExists: true) - } - } + fastq_meta = [ meta, [ input_file ] ] - // Check if input file and gtf file exists - input_file = sample.input_file ? file(sample.input_file, checkIfExists: true) : null - gtf = sample.gtf ? file(sample.gtf, checkIfExists: true) : gtf - - return [ meta, input_file, sample.barcode, fasta, gtf, sample.is_transcripts.toBoolean(), fasta.toString()+';'+gtf.toString(), sample.nanopolish_fast5 ] + return fastq_meta } diff --git a/subworkflows/local/qcfastq_nanoplot_fastqc.nf b/subworkflows/local/qcfastq_nanoplot_fastqc.nf index b2c0f54d..0684b381 100644 --- a/subworkflows/local/qcfastq_nanoplot_fastqc.nf +++ b/subworkflows/local/qcfastq_nanoplot_fastqc.nf @@ -8,8 +8,6 @@ include { FASTQC } from '../../modules/nf-core/fastqc/main' workflow QCFASTQ_NANOPLOT_FASTQC { take: ch_fastq - skip_nanoplot - skip_fastqc main: ch_fastq @@ -24,9 +22,10 @@ workflow QCFASTQ_NANOPLOT_FASTQC { nanoplot_txt = Channel.empty() nanoplot_log = Channel.empty() nanoplot_version = Channel.empty() - if (!skip_nanoplot){ + + if (!params.skip_nanoplot) { NANOPLOT ( ch_fastq ) - //nanoplot_png = NANOPLOT.out.png + nanoplot_png = NANOPLOT.out.png nanoplot_html = NANOPLOT.out.html nanoplot_txt = NANOPLOT.out.txt nanoplot_log = NANOPLOT.out.log @@ -40,10 +39,12 @@ workflow QCFASTQ_NANOPLOT_FASTQC { fastqc_html = Channel.empty() fastqc_multiqc = Channel.empty() fastqc_version = Channel.empty() - if (!skip_fastqc){ - FASTQC ( ch_fastq ) + + if (!params.skip_fastqc){ + FASTQC(ch_fastq) fastqc_zip = FASTQC.out.zip fastqc_html = FASTQC.out.html + fastqc_version = FASTQC.out.versions fastqc_zip .map { it -> [ it[1] ] } .set { fastqc_zip_only } @@ -51,7 +52,6 @@ workflow QCFASTQ_NANOPLOT_FASTQC { .map { it -> [ it[1] ] } .set { fastqc_html_only } fastqc_multiqc = fastqc_multiqc.mix( fastqc_zip_only, fastqc_html_only ) -// fastqc_version = FASTQC.out.versions } emit: diff --git a/workflows/nanoseq.nf b/workflows/nanoseq.nf index ba1c377e..1d0aaab5 100644 --- a/workflows/nanoseq.nf +++ b/workflows/nanoseq.nf @@ -11,10 +11,10 @@ def summary_params = NfcoreSchema.paramsSummaryMap(workflow, params) //////////////////////////////////////////////////// // Check input path parameters to see if they exist -checkPathParamList = [ params.input, params.multiqc_config ] +checkPathParamList = [ params.input, params.multiqc_config, params.fasta ] for (param in checkPathParamList) { if (param) { file(param, checkIfExists: true) } } -// Check mandatory parameters (missing protocol or profile will exit the run.) +// Check mandatory parameters if (params.input) { ch_input = file(params.input) } else { @@ -55,7 +55,6 @@ if (!params.skip_demultiplexing) { } } - if (!params.skip_alignment) { if (params.aligner != 'minimap2' && params.aligner != 'graphmap2') { exit 1, "Invalid aligner option: ${params.aligner}. Valid options: 'minimap2', 'graphmap2'" @@ -100,6 +99,10 @@ ch_multiqc_custom_config = params.multiqc_config ? Channel.fromPath(params.multi /* -- IMPORT LOCAL MODULES/SUBWORKFLOWS -- */ //////////////////////////////////////////////////// +/* + * MODULE: Local + */ + include { GET_TEST_DATA } from '../modules/local/get_test_data' include { GET_NANOLYSE_FASTA } from '../modules/local/get_nanolyse_fasta' include { QCAT } from '../modules/local/qcat' @@ -149,8 +152,9 @@ def multiqc_report = [] workflow NANOSEQ{ - // Pre-download test-dataset to get files for '--input_path' parameter - // Nextflow is unable to recursively download directories via HTTPS + /* + * Download test dataset for '--input_path' if applicable + */ if (workflow.profile.contains('test') && !workflow.profile.contains('vc')) { if (!params.skip_modification_analysis) { if (!isOffline()) { @@ -162,28 +166,29 @@ workflow NANOSEQ{ } } else { if (params.input_path) { - ch_input_path = Channel.fromPath(params.input_path, checkIfExists: true) + Channel.fromPath(params.input_path, checkIfExists: true) + .set { ch_input_path } } else { - ch_input_path = 'not_changed' + Channel.of('not_changed') + .set { ch_input_path } } } } else { if (params.input_path) { - ch_input_path = Channel.fromPath(params.input_path, checkIfExists: true) + Channel.fromPath(params.input_path, checkIfExists: true) + .set { ch_input_path } } else { - ch_input_path = 'not_changed' + Channel.of('not_changed') + .set { ch_input_path } } } - /* - * Create empty software versions channel to mix - */ ch_software_versions = Channel.empty() /* - * SUBWORKFLOW: Read in samplesheet, validate and stage input files + * SUBWORKFLOW: Read samplesheet, validate samplesheet, and stage input files */ - INPUT_CHECK ( ch_input, ch_input_path ) + INPUT_CHECK (ch_input, ch_input_path) .set { ch_sample } if (!params.skip_demultiplexing) { @@ -191,19 +196,19 @@ workflow NANOSEQ{ /* * MODULE: Demultipexing using qcat */ - QCAT ( ch_input_path ) - ch_fastq = Channel.empty() + QCAT (ch_input_path) QCAT.out.fastq .flatten() - .map { it -> [ it, it.baseName.substring(0,it.baseName.lastIndexOf('.'))] } - .join(ch_sample, by: 1) // join on barcode - .map { it -> [ it[2], it[1], it[3], it[4], it[5], it[6] ] } + .map { it -> [ it.baseName.substring(0,it.baseName.lastIndexOf('.')), it ] } + .join(ch_sample.map{ meta, empty -> [meta.barcode, meta] }, by: [0] ) + .map { it -> [ it[2], it[1] ] } .set { ch_fastq } + ch_fastq.view() ch_software_versions = ch_software_versions.mix(QCAT.out.versions.ifEmpty(null)) } else { if (!params.skip_alignment) { ch_sample - .map { it -> if (it[6].toString().endsWith('.gz')) [ it[0], it[6], it[2], it[1], it[4], it[5] ] } + //.map { it -> if (it[6].toString().endsWith('.gz')) [ it[0], it[6], it[2], it[1], it[4], it[5] ] } .set { ch_fastq } } else { ch_fastq = Channel.empty() @@ -215,6 +220,9 @@ workflow NANOSEQ{ .map { it -> [ it[0], it[1] ] } .set { ch_fastq_nanolyse } + /* + * MODULE: Get NanoLyse test data + */ if (!params.nanolyse_fasta) { if (!isOffline()) { GET_NANOLYSE_FASTA() @@ -229,7 +237,7 @@ workflow NANOSEQ{ /* * MODULE: DNA contaminant removal using NanoLyse */ - NANOLYSE ( ch_fastq_nanolyse, ch_nanolyse_fasta ) + NANOLYSE (ch_fastq_nanolyse, ch_nanolyse_fasta) NANOLYSE.out.fastq .join( ch_sample ) .map { it -> [ it[0], it[1], it[3], it[4], it[5], it[6] ]} @@ -239,62 +247,60 @@ workflow NANOSEQ{ ch_fastqc_multiqc = Channel.empty() if (!params.skip_qc) { - /* * SUBWORKFLOW: Fastq QC with Nanoplot and fastqc */ - QCFASTQ_NANOPLOT_FASTQC ( ch_fastq, params.skip_nanoplot, params.skip_fastqc) + QCFASTQ_NANOPLOT_FASTQC (ch_fastq) ch_software_versions = ch_software_versions.mix(QCFASTQ_NANOPLOT_FASTQC.out.fastqc_version.first().ifEmpty(null)) ch_fastqc_multiqc = QCFASTQ_NANOPLOT_FASTQC.out.fastqc_multiqc.ifEmpty([]) } ch_samtools_multiqc = Channel.empty() if (!params.skip_alignment) { - /* * SUBWORKFLOW: Make chromosome size file and covert GTF to BED12 */ - PREPARE_GENOME ( ch_fastq ) + PREPARE_GENOME (ch_fastq) ch_fasta_index = PREPARE_GENOME.out.ch_fasta_index ch_gtf_bed = PREPARE_GENOME.out.ch_gtf_bed ch_fasta = PREPARE_GENOME.out.ch_fasta ch_fai = PREPARE_GENOME.out.ch_fai ch_software_versions = ch_software_versions.mix(PREPARE_GENOME.out.samtools_version.first().ifEmpty(null)) ch_software_versions = ch_software_versions.mix(PREPARE_GENOME.out.gtf2bed_version.first().ifEmpty(null)) - if (params.aligner == 'minimap2') { + if (params.aligner == 'minimap2') { /* - * SUBWORKFLOW: Align fastq files with minimap2 and sort bam files - */ - ALIGN_MINIMAP2 ( ch_fasta_index, ch_fastq ) + * SUBWORKFLOW: Align fastq files with minimap2 and sort bam files + */ + ALIGN_MINIMAP2 (ch_fasta_index, ch_fastq) ch_align_sam = ALIGN_MINIMAP2.out.ch_align_sam ch_index = ALIGN_MINIMAP2.out.ch_index ch_software_versions = ch_software_versions.mix(ALIGN_MINIMAP2.out.minimap2_version.first().ifEmpty(null)) } else { - /* * SUBWORKFLOW: Align fastq files with graphmap2 and sort bam files */ - ALIGN_GRAPHMAP2 ( ch_fasta_index, ch_fastq ) + ALIGN_GRAPHMAP2 (ch_fasta_index, ch_fastq) ch_align_sam = ALIGN_GRAPHMAP2.out.ch_align_sam ch_index = ALIGN_GRAPHMAP2.out.ch_index ch_software_versions = ch_software_versions.mix(ALIGN_GRAPHMAP2.out.graphmap2_version.first().ifEmpty(null)) } /* - * SUBWORKFLOW: View, then sort, and index bam files - */ - BAM_SORT_INDEX_SAMTOOLS ( ch_align_sam, params.call_variants, ch_fasta ) + * SUBWORKFLOW: View, then sort, and index bam files + */ + BAM_SORT_INDEX_SAMTOOLS (ch_align_sam, params.call_variants, ch_fasta) ch_view_sortbam = BAM_SORT_INDEX_SAMTOOLS.out.sortbam ch_software_versions = ch_software_versions.mix(BAM_SORT_INDEX_SAMTOOLS.out.samtools_versions.first().ifEmpty(null)) ch_samtools_multiqc = BAM_SORT_INDEX_SAMTOOLS.out.sortbam_stats_multiqc.ifEmpty([]) if (params.call_variants && params.protocol == 'DNA') { + /* - * SUBWORKFLOW: Short variant calling - */ + * SUBWORKFLOW: Short variant calling + */ if (!params.skip_vc) { - SHORT_VARIANT_CALLING ( ch_view_sortbam, ch_fasta.map{ it [1] }, ch_fai.map{ it [1] } ) + SHORT_VARIANT_CALLING (ch_view_sortbam, ch_fasta.map{ it [1] }, ch_fai.map{ it [1] }) ch_software_versions = ch_software_versions.mix(SHORT_VARIANT_CALLING.out.ch_versions.first().ifEmpty(null)) } @@ -302,7 +308,7 @@ workflow NANOSEQ{ * SUBWORKFLOW: Structural variant calling */ if (!params.skip_sv) { - STRUCTURAL_VARIANT_CALLING ( ch_view_sortbam, ch_fasta.map{ it [1] }, ch_fai.map{ it [1] } ) + STRUCTURAL_VARIANT_CALLING (ch_view_sortbam, ch_fasta.map{ it [1] }, ch_fai.map{ it [1] }) ch_software_versions = ch_software_versions.mix(STRUCTURAL_VARIANT_CALLING.out.ch_versions.first().ifEmpty(null)) } } @@ -313,7 +319,7 @@ workflow NANOSEQ{ /* * SUBWORKFLOW: Convert BAM -> BEDGraph -> BigWig */ - BEDTOOLS_UCSC_BIGWIG ( ch_view_sortbam ) + BEDTOOLS_UCSC_BIGWIG (ch_view_sortbam) ch_bedtools_version = ch_bedtools_version.mix(BEDTOOLS_UCSC_BIGWIG.out.bedtools_version.first().ifEmpty(null)) ch_software_versions = ch_software_versions.mix(BEDTOOLS_UCSC_BIGWIG.out.bedgraphtobigwig_version.first().ifEmpty(null)) } @@ -322,7 +328,7 @@ workflow NANOSEQ{ /* * SUBWORKFLOW: Convert BAM -> BED12 -> BigBED */ - BEDTOOLS_UCSC_BIGBED ( ch_view_sortbam ) + BEDTOOLS_UCSC_BIGBED (ch_view_sortbam) ch_bedtools_version = ch_bedtools_version.mix(BEDTOOLS_UCSC_BIGBED.out.bedtools_version.first().ifEmpty(null)) ch_software_versions = ch_software_versions.mix(BEDTOOLS_UCSC_BIGBED.out.bed12tobigbed_version.first().ifEmpty(null)) } @@ -338,7 +344,11 @@ workflow NANOSEQ{ ch_sample .map { it -> if (it[6].toString().endsWith('.bam')) [ it[0], it[6] ] } .set { ch_sample_bam } - BAM_RENAME ( ch_sample_bam ) + + /* + * MODULE: Rename bam files + */ + BAM_RENAME (ch_sample_bam) ch_sortbam = BAM_RENAME.out.bam } @@ -370,7 +380,7 @@ workflow NANOSEQ{ /* * MODULE: Quantification and novel isoform detection with bambu */ - BAMBU ( ch_sample_annotation, ch_sortbam.collect{ it [1] } ) + BAMBU (ch_sample_annotation, ch_sortbam.collect{ it [1] }) ch_gene_counts = BAMBU.out.ch_gene_counts ch_transcript_counts = BAMBU.out.ch_transcript_counts ch_software_versions = ch_software_versions.mix(BAMBU.out.versions.first().ifEmpty(null)) @@ -379,7 +389,7 @@ workflow NANOSEQ{ /* * SUBWORKFLOW: Novel isoform detection with StringTie and Quantification with featureCounts */ - QUANTIFY_STRINGTIE_FEATURECOUNTS( ch_sample, ch_sortbam ) + QUANTIFY_STRINGTIE_FEATURECOUNTS(ch_sample, ch_sortbam) ch_gene_counts = QUANTIFY_STRINGTIE_FEATURECOUNTS.out.ch_gene_counts ch_transcript_counts = QUANTIFY_STRINGTIE_FEATURECOUNTS.out.ch_transcript_counts ch_software_versions = ch_software_versions.mix(QUANTIFY_STRINGTIE_FEATURECOUNTS.out.stringtie2_version.first().ifEmpty(null)) From 342429b790b703c51712796103287a0b5a38af71 Mon Sep 17 00:00:00 2001 From: Chris Hakkaart Date: Sat, 25 Feb 2023 22:14:54 +0000 Subject: [PATCH 02/77] remove tools and add back in slowly --- conf/test.config | 2 + modules/local/get_chrom_sizes.nf | 6 +- modules/local/gtf2bed.nf | 6 +- subworkflows/local/prepare_genome.nf | 63 ++--- workflows/nanoseq.nf | 380 +++++++++++++-------------- 5 files changed, 207 insertions(+), 250 deletions(-) diff --git a/conf/test.config b/conf/test.config index 1e7d8f8c..984bfa13 100644 --- a/conf/test.config +++ b/conf/test.config @@ -18,6 +18,8 @@ params { // Input data to perform demultipexing input = 'https://raw.githubusercontent.com/nf-core/test-datasets/nanoseq/3.0/samplesheet/samplesheet_nobc_dx.csv' + fasta = 'https://raw.githubusercontent.com/nf-core/test-datasets/nanoseq/reference/hg19_KCMF1.fa' + gtf = null protocol = 'DNA' barcode_kit = 'NBD103/NBD104' input_path = 'https://raw.githubusercontent.com/nf-core/test-datasets/nanoseq/fastq/nondemultiplexed/sample_nobc_dx.fastq.gz' diff --git a/modules/local/get_chrom_sizes.nf b/modules/local/get_chrom_sizes.nf index 53c8fd94..bf2d851e 100644 --- a/modules/local/get_chrom_sizes.nf +++ b/modules/local/get_chrom_sizes.nf @@ -8,11 +8,11 @@ process GET_CHROM_SIZES { 'quay.io/biocontainers/samtools:1.13--h8c37831_0' }" input: - tuple path(fasta), val(name) + path fasta output: - tuple path('*.sizes'), val(name), emit: sizes - path "versions.yml" , emit: versions + path "*.sizes" , emit: sizes + path "versions.yml" , emit: versions when: task.ext.when == null || task.ext.when diff --git a/modules/local/gtf2bed.nf b/modules/local/gtf2bed.nf index 6ae37e61..8a3a70c7 100644 --- a/modules/local/gtf2bed.nf +++ b/modules/local/gtf2bed.nf @@ -7,11 +7,11 @@ process GTF2BED { 'quay.io/biocontainers/perl:5.26.2' }" input: - tuple path(gtf), val(name) + path gtf output: - tuple path('*.bed'), val(name), emit: gtf_bed - path "versions.yml" , emit: versions + path "*.bed" , emit: gtf_bed + path "versions.yml" , emit: versions when: task.ext.when == null || task.ext.when diff --git a/subworkflows/local/prepare_genome.nf b/subworkflows/local/prepare_genome.nf index e6047cc0..4a9592a1 100644 --- a/subworkflows/local/prepare_genome.nf +++ b/subworkflows/local/prepare_genome.nf @@ -8,64 +8,37 @@ include { SAMTOOLS_FAIDX } from '../../modules/nf-core/samtools/faidx/main' workflow PREPARE_GENOME { take: - ch_fastq + fasta + gtf main: - // Get unique list of all fasta files - ch_fastq - .filter { it[2] } - .map { it -> [ it[2], it[5].toString() ] } // [ fasta, annotation_str ] - .unique() - .set { ch_fastq_sizes } /* * Make chromosome sizes file */ - GET_CHROM_SIZES ( ch_fastq_sizes ) - ch_chrom_sizes = GET_CHROM_SIZES.out.sizes - samtools_version = GET_CHROM_SIZES.out.versions - - // Get unique list of all gtf files - ch_fastq - .filter { it[3] } - .map { it -> [ it[3], it[5] ] } // [ gtf, annotation_str ] - .unique() - .set { ch_fastq_gtf } + if (params.fasta) { + GET_CHROM_SIZES (fasta) + ch_chrom_sizes = GET_CHROM_SIZES.out.sizes + samtools_version = GET_CHROM_SIZES.out.versions + ch_chrom_sizes.view() /* - * Convert GTF to BED12 + * Make fasta index */ - GTF2BED ( ch_fastq_gtf ) - ch_gtf_bed = GTF2BED.out.gtf_bed - gtf2bed_version = GTF2BED.out.versions - - ch_chrom_sizes - .join(ch_gtf_bed, by: 1, remainder:true) - .map { it -> [ it[1], it[2], it[0] ] } - .cross(ch_fastq) { it -> it[-1] } - .flatten() - .collate(9) - .map { it -> [ it[5], it[0], it[6], it[1], it[7], it[8] ]} // [ fasta, sizes, gtf, bed, is_transcripts, annotation_str ] - .unique() - .set { ch_fasta_index } + //SAMTOOLS_FAIDX (fasta) + //ch_fai = SAMTOOLS_FAIDX.out.fai /* * Convert GTF to BED12 */ - ch_fastq - .filter { it[2] } - .map { it -> [ it[0], it[2] ] } // [ gtf, annotation_str ] - .unique() - .set { ch_fasta } - - SAMTOOLS_FAIDX ( ch_fasta ) - ch_fai = SAMTOOLS_FAIDX.out.fai + //GTF2BED (gtf) + //ch_gtf_bed = GTF2BED.out.gtf_bed + //gtf2bed_version = GTF2BED.out.versions emit: - ch_fasta - ch_fai - ch_fasta_index - ch_gtf_bed - samtools_version - gtf2bed_version + ch_chrom_sizes + //ch_fai + //ch_gtf_bed + //samtools_version + //gtf2bed_version } diff --git a/workflows/nanoseq.nf b/workflows/nanoseq.nf index 1d0aaab5..21106b20 100644 --- a/workflows/nanoseq.nf +++ b/workflows/nanoseq.nf @@ -203,7 +203,6 @@ workflow NANOSEQ{ .join(ch_sample.map{ meta, empty -> [meta.barcode, meta] }, by: [0] ) .map { it -> [ it[2], it[1] ] } .set { ch_fastq } - ch_fastq.view() ch_software_versions = ch_software_versions.mix(QCAT.out.versions.ifEmpty(null)) } else { if (!params.skip_alignment) { @@ -216,9 +215,6 @@ workflow NANOSEQ{ } if (params.run_nanolyse) { - ch_fastq - .map { it -> [ it[0], it[1] ] } - .set { ch_fastq_nanolyse } /* * MODULE: Get NanoLyse test data @@ -237,12 +233,14 @@ workflow NANOSEQ{ /* * MODULE: DNA contaminant removal using NanoLyse */ - NANOLYSE (ch_fastq_nanolyse, ch_nanolyse_fasta) + NANOLYSE (ch_fastq, ch_nanolyse_fasta) NANOLYSE.out.fastq - .join( ch_sample ) - .map { it -> [ it[0], it[1], it[3], it[4], it[5], it[6] ]} - .set { ch_fastq } + .set { ch_fastq_nl } ch_software_versions = ch_software_versions.mix(NANOLYSE.out.versions.first().ifEmpty(null)) + } else { + ch_fastq + .map { it -> [ it[0], it[1] ] } + .set { ch_fastq_nl } } ch_fastqc_multiqc = Channel.empty() @@ -260,199 +258,183 @@ workflow NANOSEQ{ /* * SUBWORKFLOW: Make chromosome size file and covert GTF to BED12 */ - PREPARE_GENOME (ch_fastq) - ch_fasta_index = PREPARE_GENOME.out.ch_fasta_index - ch_gtf_bed = PREPARE_GENOME.out.ch_gtf_bed - ch_fasta = PREPARE_GENOME.out.ch_fasta - ch_fai = PREPARE_GENOME.out.ch_fai - ch_software_versions = ch_software_versions.mix(PREPARE_GENOME.out.samtools_version.first().ifEmpty(null)) - ch_software_versions = ch_software_versions.mix(PREPARE_GENOME.out.gtf2bed_version.first().ifEmpty(null)) - - if (params.aligner == 'minimap2') { - /* - * SUBWORKFLOW: Align fastq files with minimap2 and sort bam files - */ - ALIGN_MINIMAP2 (ch_fasta_index, ch_fastq) - ch_align_sam = ALIGN_MINIMAP2.out.ch_align_sam - ch_index = ALIGN_MINIMAP2.out.ch_index - ch_software_versions = ch_software_versions.mix(ALIGN_MINIMAP2.out.minimap2_version.first().ifEmpty(null)) - } else { - /* - * SUBWORKFLOW: Align fastq files with graphmap2 and sort bam files - */ - ALIGN_GRAPHMAP2 (ch_fasta_index, ch_fastq) - ch_align_sam = ALIGN_GRAPHMAP2.out.ch_align_sam - ch_index = ALIGN_GRAPHMAP2.out.ch_index - ch_software_versions = ch_software_versions.mix(ALIGN_GRAPHMAP2.out.graphmap2_version.first().ifEmpty(null)) - } - - /* - * SUBWORKFLOW: View, then sort, and index bam files - */ - BAM_SORT_INDEX_SAMTOOLS (ch_align_sam, params.call_variants, ch_fasta) - ch_view_sortbam = BAM_SORT_INDEX_SAMTOOLS.out.sortbam - ch_software_versions = ch_software_versions.mix(BAM_SORT_INDEX_SAMTOOLS.out.samtools_versions.first().ifEmpty(null)) - ch_samtools_multiqc = BAM_SORT_INDEX_SAMTOOLS.out.sortbam_stats_multiqc.ifEmpty([]) - - if (params.call_variants && params.protocol == 'DNA') { - - /* - * SUBWORKFLOW: Short variant calling - */ - if (!params.skip_vc) { - SHORT_VARIANT_CALLING (ch_view_sortbam, ch_fasta.map{ it [1] }, ch_fai.map{ it [1] }) - ch_software_versions = ch_software_versions.mix(SHORT_VARIANT_CALLING.out.ch_versions.first().ifEmpty(null)) - } - - /* - * SUBWORKFLOW: Structural variant calling - */ - if (!params.skip_sv) { - STRUCTURAL_VARIANT_CALLING (ch_view_sortbam, ch_fasta.map{ it [1] }, ch_fai.map{ it [1] }) - ch_software_versions = ch_software_versions.mix(STRUCTURAL_VARIANT_CALLING.out.ch_versions.first().ifEmpty(null)) - } - } - - ch_bedtools_version = Channel.empty() - if (!params.skip_bigwig) { - - /* - * SUBWORKFLOW: Convert BAM -> BEDGraph -> BigWig - */ - BEDTOOLS_UCSC_BIGWIG (ch_view_sortbam) - ch_bedtools_version = ch_bedtools_version.mix(BEDTOOLS_UCSC_BIGWIG.out.bedtools_version.first().ifEmpty(null)) - ch_software_versions = ch_software_versions.mix(BEDTOOLS_UCSC_BIGWIG.out.bedgraphtobigwig_version.first().ifEmpty(null)) - } - if (!params.skip_bigbed) { - - /* - * SUBWORKFLOW: Convert BAM -> BED12 -> BigBED - */ - BEDTOOLS_UCSC_BIGBED (ch_view_sortbam) - ch_bedtools_version = ch_bedtools_version.mix(BEDTOOLS_UCSC_BIGBED.out.bedtools_version.first().ifEmpty(null)) - ch_software_versions = ch_software_versions.mix(BEDTOOLS_UCSC_BIGBED.out.bed12tobigbed_version.first().ifEmpty(null)) - } - ch_software_versions = ch_software_versions.mix(ch_bedtools_version.first().ifEmpty(null)) - - ch_view_sortbam - .map { it -> [ it[0], it[3] ] } - .set { ch_sortbam } - ch_view_sortbam - .map { it -> [ it[0], it[3], it[4] ] } - .set { ch_nanopolish_sortbam } - } else { - ch_sample - .map { it -> if (it[6].toString().endsWith('.bam')) [ it[0], it[6] ] } - .set { ch_sample_bam } - - /* - * MODULE: Rename bam files - */ - BAM_RENAME (ch_sample_bam) - ch_sortbam = BAM_RENAME.out.bam - } - - ch_featurecounts_gene_multiqc = Channel.empty() - ch_featurecounts_transcript_multiqc = Channel.empty() - if (!params.skip_quantification && (params.protocol == 'cDNA' || params.protocol == 'directRNA')) { - - // Check that reference genome and annotation are the same for all samples if perfoming quantification - // Check if we have replicates and multiple conditions in the input samplesheet - REPLICATES_EXIST = false - MULTIPLE_CONDITIONS = false - ch_sample.map{ it[2] }.unique().toList().set { fastas } - ch_sample.map{ it[3] }.unique().toList().set { gtfs } - // BUG: ".val" halts the pipeline /////////////////////// - // if ( gtfs.map{it[0]} == false || fastas.map{it[0]} == false || gtfs.size().val != 1 || fasta.size().val != 1 ) { - // exit 1, """Quantification can only be performed if all samples in the samplesheet have the same reference fasta and GTF file." - // Please specify the '--skip_quantification' parameter if you wish to skip these steps.""" - // } - // REPLICATES_EXIST = ch_sample.map { it -> it[0].split('_')[-1].replaceAll('R','').toInteger() }.max().val > 1 - // MULTIPLE_CONDITIONS = ch_sample.map { it -> it[0].split('_')[0..-2].join('_') }.unique().count().val > 1 - - ch_r_version = Channel.empty() - if (params.quantification_method == 'bambu') { - ch_sample - .map { it -> [ it[2], it[3] ]} - .unique() - .set { ch_sample_annotation } - - /* - * MODULE: Quantification and novel isoform detection with bambu - */ - BAMBU (ch_sample_annotation, ch_sortbam.collect{ it [1] }) - ch_gene_counts = BAMBU.out.ch_gene_counts - ch_transcript_counts = BAMBU.out.ch_transcript_counts - ch_software_versions = ch_software_versions.mix(BAMBU.out.versions.first().ifEmpty(null)) - } else { - - /* - * SUBWORKFLOW: Novel isoform detection with StringTie and Quantification with featureCounts - */ - QUANTIFY_STRINGTIE_FEATURECOUNTS(ch_sample, ch_sortbam) - ch_gene_counts = QUANTIFY_STRINGTIE_FEATURECOUNTS.out.ch_gene_counts - ch_transcript_counts = QUANTIFY_STRINGTIE_FEATURECOUNTS.out.ch_transcript_counts - ch_software_versions = ch_software_versions.mix(QUANTIFY_STRINGTIE_FEATURECOUNTS.out.stringtie2_version.first().ifEmpty(null)) - ch_software_versions = ch_software_versions.mix(QUANTIFY_STRINGTIE_FEATURECOUNTS.out.featurecounts_version.first().ifEmpty(null)) - ch_featurecounts_gene_multiqc = QUANTIFY_STRINGTIE_FEATURECOUNTS.out.featurecounts_gene_multiqc.ifEmpty([]) - ch_featurecounts_transcript_multiqc = QUANTIFY_STRINGTIE_FEATURECOUNTS.out.featurecounts_transcript_multiqc.ifEmpty([]) - } - if (!params.skip_differential_analysis) { - - /* - * SUBWORKFLOW: Differential gene and transcript analysis with DESeq2 and DEXseq - */ - DIFFERENTIAL_DESEQ2_DEXSEQ( ch_gene_counts, ch_transcript_counts ) - ch_software_versions = ch_software_versions.mix(DIFFERENTIAL_DESEQ2_DEXSEQ.out.deseq2_version.first().ifEmpty(null)) - ch_software_versions = ch_software_versions.mix(DIFFERENTIAL_DESEQ2_DEXSEQ.out.dexseq_version.first().ifEmpty(null)) - } - } - - if (!params.skip_modification_analysis && params.protocol == 'directRNA') { - - /* - * SUBWORKFLOW: RNA modification detection with xPore and m6anet - */ - RNA_MODIFICATION_XPORE_M6ANET( ch_sample, ch_nanopolish_sortbam ) + PREPARE_GENOME (params.fasta, params.gtf) + //ch_fasta_index = PREPARE_GENOME.out.ch_fasta_index + //ch_gtf_bed = PREPARE_GENOME.out.ch_gtf_bed + //ch_fasta = PREPARE_GENOME.out.ch_fasta + //ch_fai = PREPARE_GENOME.out.ch_fai + //ch_software_versions = ch_software_versions.mix(PREPARE_GENOME.out.samtools_version.first().ifEmpty(null)) + //ch_software_versions = ch_software_versions.mix(PREPARE_GENOME.out.gtf2bed_version.first().ifEmpty(null)) + + +// /* +// * SUBWORKFLOW: View, then sort, and index bam files +// */ +// //BAM_SORT_INDEX_SAMTOOLS (ch_align_sam, params.call_variants, ch_fasta) +// ch_view_sortbam = Channel.empty() +// //ch_view_sortbam = BAM_SORT_INDEX_SAMTOOLS.out.sortbam +// //ch_software_versions = ch_software_versions.mix(BAM_SORT_INDEX_SAMTOOLS.out.samtools_versions.first().ifEmpty(null)) +// //ch_samtools_multiqc = BAM_SORT_INDEX_SAMTOOLS.out.sortbam_stats_multiqc.ifEmpty([]) + +// if (params.call_variants && params.protocol == 'DNA') { + +// /* +// * SUBWORKFLOW: Short variant calling +// */ +// if (!params.skip_vc) { +// SHORT_VARIANT_CALLING (ch_view_sortbam, ch_fasta.map{ it [1] }, ch_fai.map{ it [1] }) +// ch_software_versions = ch_software_versions.mix(SHORT_VARIANT_CALLING.out.ch_versions.first().ifEmpty(null)) +// } + +// /* +// * SUBWORKFLOW: Structural variant calling +// */ +// if (!params.skip_sv) { +// STRUCTURAL_VARIANT_CALLING (ch_view_sortbam, ch_fasta.map{ it [1] }, ch_fai.map{ it [1] }) +// ch_software_versions = ch_software_versions.mix(STRUCTURAL_VARIANT_CALLING.out.ch_versions.first().ifEmpty(null)) +// } +// } + +// ch_bedtools_version = Channel.empty() +// if (!params.skip_bigwig) { + +// /* +// * SUBWORKFLOW: Convert BAM -> BEDGraph -> BigWig +// */ +// BEDTOOLS_UCSC_BIGWIG (ch_view_sortbam) +// ch_bedtools_version = ch_bedtools_version.mix(BEDTOOLS_UCSC_BIGWIG.out.bedtools_version.first().ifEmpty(null)) +// ch_software_versions = ch_software_versions.mix(BEDTOOLS_UCSC_BIGWIG.out.bedgraphtobigwig_version.first().ifEmpty(null)) +// } +// if (!params.skip_bigbed) { + +// /* +// * SUBWORKFLOW: Convert BAM -> BED12 -> BigBED +// */ +// BEDTOOLS_UCSC_BIGBED (ch_view_sortbam) +// ch_bedtools_version = ch_bedtools_version.mix(BEDTOOLS_UCSC_BIGBED.out.bedtools_version.first().ifEmpty(null)) +// ch_software_versions = ch_software_versions.mix(BEDTOOLS_UCSC_BIGBED.out.bed12tobigbed_version.first().ifEmpty(null)) +// } +// ch_software_versions = ch_software_versions.mix(ch_bedtools_version.first().ifEmpty(null)) + +// ch_view_sortbam +// .map { it -> [ it[0], it[3] ] } +// .set { ch_sortbam } +// ch_view_sortbam +// .map { it -> [ it[0], it[3], it[4] ] } +// .set { ch_nanopolish_sortbam } +// } else { +// ch_sample +// .map { it -> if (it[6].toString().endsWith('.bam')) [ it[0], it[6] ] } +// .set { ch_sample_bam } + +// /* +// * MODULE: Rename bam files +// */ +// BAM_RENAME (ch_sample_bam) +// ch_sortbam = BAM_RENAME.out.bam +// } + +// ch_featurecounts_gene_multiqc = Channel.empty() +// ch_featurecounts_transcript_multiqc = Channel.empty() +// if (!params.skip_quantification && (params.protocol == 'cDNA' || params.protocol == 'directRNA')) { + +// // Check that reference genome and annotation are the same for all samples if perfoming quantification +// // Check if we have replicates and multiple conditions in the input samplesheet +// REPLICATES_EXIST = false +// MULTIPLE_CONDITIONS = false +// ch_sample.map{ it[2] }.unique().toList().set { fastas } +// ch_sample.map{ it[3] }.unique().toList().set { gtfs } +// // BUG: ".val" halts the pipeline /////////////////////// +// // if ( gtfs.map{it[0]} == false || fastas.map{it[0]} == false || gtfs.size().val != 1 || fasta.size().val != 1 ) { +// // exit 1, """Quantification can only be performed if all samples in the samplesheet have the same reference fasta and GTF file." +// // Please specify the '--skip_quantification' parameter if you wish to skip these steps.""" +// // } +// // REPLICATES_EXIST = ch_sample.map { it -> it[0].split('_')[-1].replaceAll('R','').toInteger() }.max().val > 1 +// // MULTIPLE_CONDITIONS = ch_sample.map { it -> it[0].split('_')[0..-2].join('_') }.unique().count().val > 1 + +// ch_r_version = Channel.empty() +// if (params.quantification_method == 'bambu') { +// ch_sample +// .map { it -> [ it[2], it[3] ]} +// .unique() +// .set { ch_sample_annotation } + +// /* +// * MODULE: Quantification and novel isoform detection with bambu +// */ +// BAMBU (ch_sample_annotation, ch_sortbam.collect{ it [1] }) +// ch_gene_counts = BAMBU.out.ch_gene_counts +// ch_transcript_counts = BAMBU.out.ch_transcript_counts +// ch_software_versions = ch_software_versions.mix(BAMBU.out.versions.first().ifEmpty(null)) +// } else { + +// /* +// * SUBWORKFLOW: Novel isoform detection with StringTie and Quantification with featureCounts +// */ +// QUANTIFY_STRINGTIE_FEATURECOUNTS(ch_sample, ch_sortbam) +// ch_gene_counts = QUANTIFY_STRINGTIE_FEATURECOUNTS.out.ch_gene_counts +// ch_transcript_counts = QUANTIFY_STRINGTIE_FEATURECOUNTS.out.ch_transcript_counts +// ch_software_versions = ch_software_versions.mix(QUANTIFY_STRINGTIE_FEATURECOUNTS.out.stringtie2_version.first().ifEmpty(null)) +// ch_software_versions = ch_software_versions.mix(QUANTIFY_STRINGTIE_FEATURECOUNTS.out.featurecounts_version.first().ifEmpty(null)) +// ch_featurecounts_gene_multiqc = QUANTIFY_STRINGTIE_FEATURECOUNTS.out.featurecounts_gene_multiqc.ifEmpty([]) +// ch_featurecounts_transcript_multiqc = QUANTIFY_STRINGTIE_FEATURECOUNTS.out.featurecounts_transcript_multiqc.ifEmpty([]) +// } +// if (!params.skip_differential_analysis) { + +// /* +// * SUBWORKFLOW: Differential gene and transcript analysis with DESeq2 and DEXseq +// */ +// DIFFERENTIAL_DESEQ2_DEXSEQ( ch_gene_counts, ch_transcript_counts ) +// ch_software_versions = ch_software_versions.mix(DIFFERENTIAL_DESEQ2_DEXSEQ.out.deseq2_version.first().ifEmpty(null)) +// ch_software_versions = ch_software_versions.mix(DIFFERENTIAL_DESEQ2_DEXSEQ.out.dexseq_version.first().ifEmpty(null)) +// } } - if (!params.skip_fusion_analysis && (params.protocol == 'cDNA' || params.protocol == 'directRNA')) { - - /* - * SUBWORKFLOW: RNA_FUSIONS_JAFFAL - */ - ch_fastq - .map { it -> [ it[0], it[1] ] } - .set { ch_fastq_simple } - - RNA_FUSIONS_JAFFAL( ch_fastq_simple, params.jaffal_ref_dir ) - } - - /* - * MODULE: Parse software version numbers - */ - CUSTOM_DUMPSOFTWAREVERSIONS ( - ch_software_versions.unique().collectFile() - ) - - if (!params.skip_multiqc) { - workflow_summary = WorkflowNanoseq.paramsSummaryMultiqc(workflow, summary_params) - ch_workflow_summary = Channel.value(workflow_summary) - - /* - * MODULE: MultiQC - */ - MULTIQC ( - ch_multiqc_config, - ch_multiqc_custom_config.collect().ifEmpty([]), - ch_fastqc_multiqc.ifEmpty([]), - ch_samtools_multiqc.collect().ifEmpty([]), - ch_featurecounts_gene_multiqc.ifEmpty([]), - ch_featurecounts_transcript_multiqc.ifEmpty([]), - CUSTOM_DUMPSOFTWAREVERSIONS.out.mqc_yml.collect(), - ch_workflow_summary.collectFile(name: 'workflow_summary_mqc.yaml') - ) - } +// if (!params.skip_modification_analysis && params.protocol == 'directRNA') { + +// /* +// * SUBWORKFLOW: RNA modification detection with xPore and m6anet +// */ +// RNA_MODIFICATION_XPORE_M6ANET( ch_sample, ch_nanopolish_sortbam ) +// } + +// if (!params.skip_fusion_analysis && (params.protocol == 'cDNA' || params.protocol == 'directRNA')) { + +// /* +// * SUBWORKFLOW: RNA_FUSIONS_JAFFAL +// */ +// ch_fastq +// .map { it -> [ it[0], it[1] ] } +// .set { ch_fastq_simple } + +// RNA_FUSIONS_JAFFAL( ch_fastq_simple, params.jaffal_ref_dir ) +// } + +// /* +// * MODULE: Parse software version numbers +// */ +// CUSTOM_DUMPSOFTWAREVERSIONS ( +// ch_software_versions.unique().collectFile() +// ) + +// if (!params.skip_multiqc) { +// workflow_summary = WorkflowNanoseq.paramsSummaryMultiqc(workflow, summary_params) +// ch_workflow_summary = Channel.value(workflow_summary) + +// /* +// * MODULE: MultiQC +// */ +// MULTIQC ( +// ch_multiqc_config, +// ch_multiqc_custom_config.collect().ifEmpty([]), +// ch_fastqc_multiqc.ifEmpty([]), +// ch_samtools_multiqc.collect().ifEmpty([]), +// ch_featurecounts_gene_multiqc.ifEmpty([]), +// ch_featurecounts_transcript_multiqc.ifEmpty([]), +// CUSTOM_DUMPSOFTWAREVERSIONS.out.mqc_yml.collect(), +// ch_workflow_summary.collectFile(name: 'workflow_summary_mqc.yaml') +// ) +// } } //////////////////////////////////////////////////// From a4ff7dc50b42a5363fbb6b593c4a10ac7e22dd7a Mon Sep 17 00:00:00 2001 From: Chris Hakkaart Date: Tue, 28 Feb 2023 20:57:39 +0000 Subject: [PATCH 03/77] Fix vc branch, sv calling --- conf/modules.config | 287 ++++++------------ conf/test.config | 4 +- conf/test_nodx_vc.config | 1 + modules.json | 32 +- modules/local/cutesv.nf | 24 +- modules/local/minimap2_align.nf | 2 +- modules/local/minimap2_index.nf | 7 + modules/local/sniffles.nf | 24 +- .../getchromsizes/custom-getchromsizes.diff | 24 ++ modules/nf-core/custom/getchromsizes/main.nf | 44 +++ modules/nf-core/custom/getchromsizes/meta.yml | 53 ++++ modules/nf-core/minimap2/align/main.nf | 48 +++ modules/nf-core/minimap2/align/meta.yml | 65 ++++ modules/nf-core/minimap2/index/main.nf | 34 +++ modules/nf-core/minimap2/index/meta.yml | 40 +++ .../minimap2/index/minimap2-index.diff | 20 ++ nextflow.config | 6 + nextflow_schema.json | 13 + subworkflows/local/align_minimap2.nf | 90 ++++-- subworkflows/local/prepare_genome.nf | 76 +++-- subworkflows/local/qcfastq_nanoplot_fastqc.nf | 3 - .../local/structural_variant_calling.nf | 33 +- subworkflows/nf-core/bam_stats_samtools.nf | 38 --- .../nf-core/bam_stats_samtools/main.nf | 32 ++ .../nf-core/bam_stats_samtools/meta.yml | 54 ++++ workflows/nanoseq.nf | 97 +++--- 26 files changed, 773 insertions(+), 378 deletions(-) create mode 100644 modules/nf-core/custom/getchromsizes/custom-getchromsizes.diff create mode 100644 modules/nf-core/custom/getchromsizes/main.nf create mode 100644 modules/nf-core/custom/getchromsizes/meta.yml create mode 100644 modules/nf-core/minimap2/align/main.nf create mode 100644 modules/nf-core/minimap2/align/meta.yml create mode 100644 modules/nf-core/minimap2/index/main.nf create mode 100644 modules/nf-core/minimap2/index/meta.yml create mode 100644 modules/nf-core/minimap2/index/minimap2-index.diff delete mode 100644 subworkflows/nf-core/bam_stats_samtools.nf create mode 100644 subworkflows/nf-core/bam_stats_samtools/main.nf create mode 100644 subworkflows/nf-core/bam_stats_samtools/meta.yml diff --git a/conf/modules.config b/conf/modules.config index ba13b442..b7c87228 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -137,255 +137,144 @@ if (!params.skip_alignment) { } if (params.aligner == "graphmap2") { process { - withName: GRAPHMAP2_INDEX { + withName: GRAPHMAP2_INDEX_VARIANT { publishDir = [ - path: { "${params.outdir}/graphmap2" }, + path: { "${params.outdir}/${params.aligner}" }, mode: 'copy', enabled: false, saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] } - withName: GRAPHMAP2_ALIGN { + withName: GRAPHMAP2_ALIGN_VARIANT { publishDir = [ - path: { "${params.outdir}/graphmap2" }, + path: { "${params.outdir}/${params.aligner}" }, mode: 'copy', enabled: false, saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] } - withName: SAMTOOLS_VIEW_BAM { - publishDir = [ - path: { "${params.outdir}/graphmap2" }, - mode: 'copy', - enabled: false, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } - ] - } - withName: SAMTOOLS_SORT { - ext.prefix = { "${meta.id}.sorted" } - publishDir = [ - path: { "${params.outdir}/graphmap2" }, - mode: 'copy', - enabled: true, - pattern: "*.sorted.bam", - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } - ] - } - withName: SAMTOOLS_INDEX { - publishDir = [ - path: { "${params.outdir}/graphmap2" }, - mode: 'copy', - enabled: true, - pattern: "*.bai", - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } - ] - } - withName: SAMTOOLS_SORT_INDEX { - publishDir = [ - path: { "${params.outdir}/graphmap2" }, - mode: 'copy', - enabled: true, - pattern: "*{'.sorted.bam','.bai'}", - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } - ] - } - withName: SAMTOOLS_STATS { - publishDir = [ - path: { "${params.outdir}/graphmap2/samtools_stats" }, - mode: 'copy', - enabled: true, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } - ] - } - withName: SAMTOOLS_IDXSTATS { - publishDir = [ - path: { "${params.outdir}/graphmap2/samtools_stats" }, - mode: 'copy', - enabled: true, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } - ] - } - withName: SAMTOOLS_FLAGSTAT { - publishDir = [ - path: { "${params.outdir}/graphmap2/samtools_stats" }, - mode: 'copy', - enabled: true, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } - ] - } - } - if (!params.skip_bigbed) { - process { - withName: BEDTOOLS_BAMBED { - publishDir = [ - path: { "${params.outdir}/graphmap2/bigbed" }, - mode: 'copy', - enabled: true, - pattern: "*.bed12", - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } - ] - } - withName: UCSC_BED12TOBIGBED { - publishDir = [ - path: { "${params.outdir}/graphmap2/bigbed" }, - mode: 'copy', - enabled: true, - pattern: "*.bigBed", - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } - ] - } - } - } - if (!params.skip_bigwig) { - process { - withName: BEDTOOLS_GENOMECOV { - publishDir = [ - path: { "${params.outdir}/graphmap2/bigwig" }, - mode: 'copy', - enabled: true, - pattern: "*bedGraph", - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } - ] - } - } - process { - withName: UCSC_BEDGRAPHTOBIGWIG { - publishDir = [ - path: { "${params.outdir}/graphmap2/bigwig" }, - mode: 'copy', - enabled: true, - pattern: "*bigWig", - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } - ] - } - } } } if (params.aligner == "minimap2") { process { - withName: MINIMAP2_INDEX { + withName: MINIMAP2_INDEX_VARIANT { + ext.args = { "-ax map-ont" } publishDir = [ - path: { "${params.outdir}/minimap2" }, + path: { "${params.outdir}/${params.aligner}" }, mode: 'copy', enabled: false, saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] } - withName: MINIMAP2_ALIGN { + withName: MINIMAP2_ALIGN_VARIANT { + ext.args = { "--MD -ax map-ont --eqx" } publishDir = [ - path: { "${params.outdir}/minimap2" }, + path: { "${params.outdir}/${params.aligner}" }, mode: 'copy', enabled: false, saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] } - withName: SAMTOOLS_VIEW_BAM { - publishDir = [ - path: { "${params.outdir}/minimap2" }, - mode: 'copy', - enabled: false, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } - ] - } - withName: SAMTOOLS_SORT { - ext.prefix = { "${meta.id}.sorted" } - publishDir = [ - path: { "${params.outdir}/minimap2" }, - mode: 'copy', - enabled: true, - pattern: "*.sorted.bam", - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } - ] - } - withName: SAMTOOLS_INDEX { - publishDir = [ - path: { "${params.outdir}/minimap2" }, - mode: 'copy', - enabled: true, - pattern: "*.bai", - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } - ] - } - withName: SAMTOOLS_SORT_INDEX { + } + } + process { + withName: SAMTOOLS_VIEW_BAM { + publishDir = [ + path: { "${params.outdir}/${params.aligner}" }, + mode: 'copy', + enabled: false, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + ] + } + withName: SAMTOOLS_SORT { + ext.prefix = { "${meta.id}.sorted" } + publishDir = [ + path: { "${params.outdir}/${params.aligner}" }, + mode: 'copy', + enabled: true, + pattern: "*.sorted.bam", + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + ] + } + withName: SAMTOOLS_INDEX { + publishDir = [ + path: { "${params.outdir}/${params.aligner}" }, + mode: 'copy', + enabled: true, + pattern: "*.bai", + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + ] + } + withName: SAMTOOLS_STATS { + publishDir = [ + path: { "${params.outdir}/${params.aligner}/samtools_stats" }, + mode: 'copy', + enabled: true, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + ] + } + withName: SAMTOOLS_IDXSTATS { + publishDir = [ + path: { "${params.outdir}/${params.aligner}/samtools_stats" }, + mode: 'copy', + enabled: true, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + ] + } + withName: SAMTOOLS_FLAGSTAT { + publishDir = [ + path: { "${params.outdir}/${params.aligner}/samtools_stats" }, + mode: 'copy', + enabled: true, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + ] + } + } + if (!params.skip_bigbed) { + process { + withName: BEDTOOLS_BAMBED { publishDir = [ - path: { "${params.outdir}/minimap2" }, + path: { "${params.outdir}/${params.aligner}/bigbed" }, mode: 'copy', enabled: true, - pattern: "*.{sorted.bam,sorted.bam.bai}", + pattern: "*.bed12", saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] } - withName: SAMTOOLS_STATS { + withName: UCSC_BED12TOBIGBED { publishDir = [ - path: { "${params.outdir}/minimap2/samtools_stats" }, + path: { "${params.outdir}/${params.aligner}/bigbed" }, mode: 'copy', enabled: true, + pattern: "*.bigBed", saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] } - withName: SAMTOOLS_IDXSTATS { + } + } + if (!params.skip_bigwig) { + process { + withName: BEDTOOLS_GENOMECOV { publishDir = [ - path: { "${params.outdir}/minimap2/samtools_stats" }, + path: { "${params.outdir}/${params.aligner}/bigwig" }, mode: 'copy', enabled: true, + pattern: "*bedGraph", saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] } - withName: SAMTOOLS_FLAGSTAT { + } + process { + withName: UCSC_BEDGRAPHTOBIGWIG { publishDir = [ - path: { "${params.outdir}/minimap2/samtools_stats" }, + path: { "${params.outdir}/${params.aligner}/bigwig" }, mode: 'copy', enabled: true, + pattern: "*bigWig", saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] } } - if (!params.skip_bigbed) { - process { - withName: BEDTOOLS_BAMBED { - publishDir = [ - path: { "${params.outdir}/minimap2/bigbed" }, - mode: 'copy', - enabled: true, - pattern: "*.bed12", - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } - ] - } - withName: UCSC_BED12TOBIGBED { - publishDir = [ - path: { "${params.outdir}/minimap2/bigbed" }, - mode: 'copy', - enabled: true, - pattern: "*.bigBed", - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } - ] - } - } - } - if (!params.skip_bigwig) { - process { - withName: BEDTOOLS_GENOMECOV { - publishDir = [ - path: { "${params.outdir}/minimap2/bigwig" }, - mode: 'copy', - enabled: true, - pattern: "*bedGraph", - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } - ] - } - } - process { - withName: UCSC_BEDGRAPHTOBIGWIG { - publishDir = [ - path: { "${params.outdir}/minimap2/bigwig" }, - mode: 'copy', - enabled: true, - pattern: "*.bigWig", - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } - ] - } - } - } } } @@ -425,7 +314,7 @@ if (params.call_variants) { if (params.variant_caller == 'deepvariant') { process { withName: DEEPVARIANT { - ext.args = { "--model_type WGS" } + ext.args = { "--model_type WGS" } publishDir = [ path: { "${params.outdir}/variant_calling/deepvariant" }, mode: 'copy', @@ -458,7 +347,7 @@ if (params.call_variants) { if (params.variant_caller == 'pepper_margin_deepvariant') { process { withName: PEPPER_MARGIN_DEEPVARIANT { - ext.args = { "--ont_r9_guppy5_sup" } + ext.args = { "--ont_r9_guppy5_sup" } publishDir = [ path: { "${params.outdir}/variant_calling/margin_pepper_deepvariant" }, mode: 'copy', @@ -471,6 +360,7 @@ if (params.call_variants) { if (params.structural_variant_caller == 'sniffles') { process { withName: SNIFFLES { + ext.args = { "" } publishDir = [ path: { "${params.outdir}/variant_calling/sniffles" }, mode: 'copy', @@ -503,6 +393,7 @@ if (params.call_variants) { if (params.structural_variant_caller == 'cutesv') { process { withName: CUTESV { + ext.args = { "" } publishDir = [ path: { "${params.outdir}/variant_calling/cutesv" }, mode: 'copy', diff --git a/conf/test.config b/conf/test.config index 984bfa13..8e919c90 100644 --- a/conf/test.config +++ b/conf/test.config @@ -18,8 +18,8 @@ params { // Input data to perform demultipexing input = 'https://raw.githubusercontent.com/nf-core/test-datasets/nanoseq/3.0/samplesheet/samplesheet_nobc_dx.csv' - fasta = 'https://raw.githubusercontent.com/nf-core/test-datasets/nanoseq/reference/hg19_KCMF1.fa' - gtf = null + fasta = 'https://raw.githubusercontent.com/nf-core/test-datasets/nanoseq/reference/chr22_23800000-23980000.fa' + gtf = 'https://raw.githubusercontent.com/nf-core/test-datasets/nanoseq/reference/chr22_23800000-23980000.gtf' protocol = 'DNA' barcode_kit = 'NBD103/NBD104' input_path = 'https://raw.githubusercontent.com/nf-core/test-datasets/nanoseq/fastq/nondemultiplexed/sample_nobc_dx.fastq.gz' diff --git a/conf/test_nodx_vc.config b/conf/test_nodx_vc.config index 6b4e8d5c..910df6d3 100644 --- a/conf/test_nodx_vc.config +++ b/conf/test_nodx_vc.config @@ -18,6 +18,7 @@ params { // Input data to skip demultiplexing and variant call input = 'https://raw.githubusercontent.com/nf-core/test-datasets/nanoseq/3.0/samplesheet/samplesheet_nobc_nodx_vc.csv' + fasta = 'https://raw.githubusercontent.com/nf-core/test-datasets/nanoseq/reference/hg19_KCMF1.fa' protocol = 'DNA' skip_quantification = true skip_demultiplexing = true diff --git a/modules.json b/modules.json index cee4bd83..ffdaaafa 100644 --- a/modules.json +++ b/modules.json @@ -15,11 +15,29 @@ "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", "installed_by": ["modules"] }, + "custom/getchromsizes": { + "branch": "master", + "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", + "installed_by": ["modules"], + "patch": "modules/nf-core/custom/getchromsizes/custom-getchromsizes.diff" + }, "fastqc": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", "installed_by": ["modules"] }, + "minimap2/align": { + "branch": "master", + "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", + "installed_by": ["modules"], + "patch": "modules/nf-core/minimap2/align/minimap2-align.diff" + }, + "minimap2/index": { + "branch": "master", + "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", + "installed_by": ["modules"], + "patch": "modules/nf-core/minimap2/index/minimap2-index.diff" + }, "multiqc": { "branch": "master", "git_sha": "ee80d14721e76e2e079103b8dcd5d57129e584ba", @@ -43,12 +61,12 @@ "samtools/flagstat": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] + "installed_by": ["bam_stats_samtools", "modules"] }, "samtools/idxstats": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] + "installed_by": ["bam_stats_samtools", "modules"] }, "samtools/index": { "branch": "master", @@ -63,7 +81,7 @@ "samtools/stats": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] + "installed_by": ["bam_stats_samtools", "modules"] }, "stringtie/merge": { "branch": "master", @@ -93,7 +111,13 @@ } }, "subworkflows": { - "nf-core": {} + "nf-core": { + "bam_stats_samtools": { + "branch": "master", + "git_sha": "92eb5091ae5368a60cda58b3a0ced8b36d715b0f", + "installed_by": ["subworkflows"] + } + } } } } diff --git a/modules/local/cutesv.nf b/modules/local/cutesv.nf index 33cbbf8c..c78e540c 100644 --- a/modules/local/cutesv.nf +++ b/modules/local/cutesv.nf @@ -2,13 +2,13 @@ process CUTESV { tag "$meta.id" label 'process_high' - conda "bioconda::cutesv=1.0.12" + conda "bioconda::cutesv=2.0.2" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/cutesv:1.0.12--pyhdfd78af_0' : - 'quay.io/biocontainers/cutesv:1.0.12--pyhdfd78af_0' }" + 'quay.io/biocontainers/cutesv:2.0.2--pyhdfd78af_0 ' }" input: - tuple val(meta), path(sizes), val(is_transcripts), path(input), path(index) + tuple val(meta), path(bam), path(bai) path(fasta) output: @@ -19,15 +19,19 @@ process CUTESV { task.ext.when == null || task.ext.when script: + def args = task.ext.args ?: '' + def genotyping = params.enable_genotyping ? "--genotyping" : '' """ cuteSV \ - ${input} \ - ${fasta} \ - ${meta.id}_cuteSV.vcf \ - . \ - --threads $task.cpus \ - --sample ${meta.id} \ - --genotype + ${bam} \\ + ${fasta} \\ + ${meta.id}_cuteSV.vcf \\ + . \\ + --threads $task.cpus \\ + --sample ${meta.id} \\ + $genotyping \\ + $args + cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/local/minimap2_align.nf b/modules/local/minimap2_align.nf index 96790e5d..d5544f3d 100644 --- a/modules/local/minimap2_align.nf +++ b/modules/local/minimap2_align.nf @@ -18,7 +18,7 @@ process MINIMAP2_ALIGN { task.ext.when == null || task.ext.when script: - def preset = (params.protocol == 'DNA' || is_transcripts) ? "-ax map-ont" : "-ax splice" + def preset = (params.protocol == 'DNA' || is_transcripts) ? "--MD -ax map-ont" : "-ax splice" def kmer = (params.protocol == 'directRNA') ? "-k14" : "" def stranded = (params.stranded || params.protocol == 'directRNA') ? "-uf" : "" def junctions = (params.protocol != 'DNA' && bed) ? "--junc-bed ${file(bed)}" : "" diff --git a/modules/local/minimap2_index.nf b/modules/local/minimap2_index.nf index 31b1877c..15557770 100644 --- a/modules/local/minimap2_index.nf +++ b/modules/local/minimap2_index.nf @@ -22,6 +22,13 @@ process MINIMAP2_INDEX { def kmer = (params.protocol == 'directRNA') ? "-k14" : "" def stranded = (params.stranded || params.protocol == 'directRNA') ? "-uf" : "" def junctions = (params.protocol != 'DNA' && bed) ? "--junc-bed ${file(bed)}" : "" + + ext.args = [ + (params.protocol == 'DNA' || is_transcripts) ? "-ax map-ont" : "-ax splice", + (params.protocol == 'directRNA') ? "-k14" : "", + (params.stranded || params.protocol == 'directRNA') ? "-uf" : "", + (params.protocol != 'DNA' && bed) ? "--junc-bed ${file(bed)}" : "" + ].join(' ').trim() """ minimap2 \\ $preset \\ diff --git a/modules/local/sniffles.nf b/modules/local/sniffles.nf index 1336392a..33bec787 100644 --- a/modules/local/sniffles.nf +++ b/modules/local/sniffles.nf @@ -2,28 +2,34 @@ process SNIFFLES { tag "$meta.id" label 'process_high' - conda "bioconda::sniffles=1.0.12" + conda "bioconda::sniffles=2.0.7" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/sniffles:1.0.12--h8b12597_1' : - 'quay.io/biocontainers/sniffles:1.0.12--h8b12597_1' }" + 'https://depot.galaxyproject.org/singularity/sniffles:2.0.7--pyhdfd78af_0' : + 'quay.io/biocontainers/sniffles:2.0.7--pyhdfd78af_0' }" input: - tuple val(meta), path(sizes), val(is_transcripts), path(input), path(index) + tuple val(meta), path(bam), path(bai) + path fasta output: - tuple val(meta), path("*_sniffles.vcf"), emit: sv_calls + tuple val(meta), path("*_sniffles.vcf"), emit: sv_vcf + tuple val(meta), path("*_sniffles.snf"), emit: sv_snf path "versions.yml" , emit: versions when: task.ext.when == null || task.ext.when script: + def args = task.ext.args ?: '' """ - sniffles \ - -m $input \ - -v ${meta.id}_sniffles.vcf \ - -t $task.cpus + sniffles \\ + --input $bam \\ + --vcf ${meta.id}_sniffles.vcf \\ + --snf ${meta.id}_sniffles.snf \\ + --reference $fasta \\ + -t $task.cpus \\ + $args cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/nf-core/custom/getchromsizes/custom-getchromsizes.diff b/modules/nf-core/custom/getchromsizes/custom-getchromsizes.diff new file mode 100644 index 00000000..42e2ab1a --- /dev/null +++ b/modules/nf-core/custom/getchromsizes/custom-getchromsizes.diff @@ -0,0 +1,24 @@ +Changes in module 'nf-core/custom/getchromsizes' +--- modules/nf-core/custom/getchromsizes/main.nf ++++ modules/nf-core/custom/getchromsizes/main.nf +@@ -8,13 +8,13 @@ + 'quay.io/biocontainers/samtools:1.16.1--h6899075_1' }" + + input: +- tuple val(meta), path(fasta) ++ path fasta + + output: +- tuple val(meta), path ("*.sizes"), emit: sizes +- tuple val(meta), path ("*.fai") , emit: fai +- tuple val(meta), path ("*.gzi") , emit: gzi, optional: true +- path "versions.yml" , emit: versions ++ path "*.sizes" , emit: sizes ++ path "*.fai" , emit: fai ++ path "*.gzi" , emit: gzi, optional: true ++ path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + +************************************************************ diff --git a/modules/nf-core/custom/getchromsizes/main.nf b/modules/nf-core/custom/getchromsizes/main.nf new file mode 100644 index 00000000..85ad9552 --- /dev/null +++ b/modules/nf-core/custom/getchromsizes/main.nf @@ -0,0 +1,44 @@ +process CUSTOM_GETCHROMSIZES { + tag "$fasta" + label 'process_single' + + conda "bioconda::samtools=1.16.1" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/samtools:1.16.1--h6899075_1' : + 'quay.io/biocontainers/samtools:1.16.1--h6899075_1' }" + + input: + path fasta + + output: + path "*.sizes" , emit: sizes + path "*.fai" , emit: fai + path "*.gzi" , emit: gzi, optional: true + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + """ + samtools faidx $fasta + cut -f 1,2 ${fasta}.fai > ${fasta}.sizes + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + getchromsizes: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') + END_VERSIONS + """ + + stub: + """ + touch ${fasta}.fai + touch ${fasta}.sizes + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + getchromsizes: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') + END_VERSIONS + """ +} diff --git a/modules/nf-core/custom/getchromsizes/meta.yml b/modules/nf-core/custom/getchromsizes/meta.yml new file mode 100644 index 00000000..219ca1d8 --- /dev/null +++ b/modules/nf-core/custom/getchromsizes/meta.yml @@ -0,0 +1,53 @@ +name: custom_getchromsizes +description: Generates a FASTA file of chromosome sizes and a fasta index file +keywords: + - fasta + - chromosome + - indexing +tools: + - samtools: + description: Tools for dealing with SAM, BAM and CRAM files + homepage: http://www.htslib.org/ + documentation: http://www.htslib.org/doc/samtools.html + tool_dev_url: https://github.com/samtools/samtools + doi: 10.1093/bioinformatics/btp352 + licence: ["MIT"] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - fasta: + type: file + description: FASTA file + pattern: "*.{fa,fasta,fna,fas}" + +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - sizes: + type: file + description: File containing chromosome lengths + pattern: "*.{sizes}" + - fai: + type: file + description: FASTA index file + pattern: "*.{fai}" + - gzi: + type: file + description: Optional gzip index file for compressed inputs + pattern: "*.gzi" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + +authors: + - "@tamara-hodgetts" + - "@chris-cheshire" + - "@muffato" diff --git a/modules/nf-core/minimap2/align/main.nf b/modules/nf-core/minimap2/align/main.nf new file mode 100644 index 00000000..430dbab9 --- /dev/null +++ b/modules/nf-core/minimap2/align/main.nf @@ -0,0 +1,48 @@ +process MINIMAP2_ALIGN { + tag "$meta.id" + label 'process_medium' + + // Note: the versions here need to match the versions used in the mulled container below and minimap2/index + conda "bioconda::minimap2=2.24 bioconda::samtools=1.14" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/mulled-v2-66534bcbb7031a148b13e2ad42583020b9cd25c4:1679e915ddb9d6b4abda91880c4b48857d471bd8-0' : + 'quay.io/biocontainers/mulled-v2-66534bcbb7031a148b13e2ad42583020b9cd25c4:1679e915ddb9d6b4abda91880c4b48857d471bd8-0' }" + + input: + tuple val(meta), path(reads) + path reference + val bam_format + val cigar_paf_format + val cigar_bam + + output: + tuple val(meta), path("*.paf"), optional: true, emit: paf + tuple val(meta), path("*.bam"), optional: true, emit: bam + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + def bam_output = bam_format ? "-a | samtools sort | samtools view -@ ${task.cpus} -b -h -o ${prefix}.bam" : "-o ${prefix}.paf" + def cigar_paf = cigar_paf_format && !bam_format ? "-c" : '' + def set_cigar_bam = cigar_bam && bam_format ? "-L" : '' + """ + minimap2 \\ + $args \\ + -t $task.cpus \\ + "${reference ?: reads}" \\ + "$reads" \\ + $cigar_paf \\ + $set_cigar_bam \\ + $bam_output + + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + minimap2: \$(minimap2 --version 2>&1) + END_VERSIONS + """ +} diff --git a/modules/nf-core/minimap2/align/meta.yml b/modules/nf-core/minimap2/align/meta.yml new file mode 100644 index 00000000..991b39a0 --- /dev/null +++ b/modules/nf-core/minimap2/align/meta.yml @@ -0,0 +1,65 @@ +name: minimap2_align +description: A versatile pairwise aligner for genomic and spliced nucleotide sequences +keywords: + - align + - fasta + - fastq + - genome + - paf + - reference +tools: + - minimap2: + description: | + A versatile pairwise aligner for genomic and spliced nucleotide sequences. + homepage: https://github.com/lh3/minimap2 + documentation: https://github.com/lh3/minimap2#uguide + licence: ["MIT"] +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - reads: + type: file + description: | + List of input FASTA or FASTQ files of size 1 and 2 for single-end + and paired-end data, respectively. + - reference: + type: file + description: | + Reference database in FASTA format. + - bam_format: + type: boolean + description: Specify that output should be in BAM format + - cigar_paf_format: + type: boolean + description: Specify that output CIGAR should be in PAF format + - cigar_bam: + type: boolean + description: | + Write CIGAR with >65535 ops at the CG tag. This is recommended when + doing XYZ (https://github.com/lh3/minimap2#working-with-65535-cigar-operations) +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - paf: + type: file + description: Alignment in PAF format + pattern: "*.paf" + - bam: + type: file + description: Alignment in BAM format + pattern: "*.bam" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" +authors: + - "@heuermh" + - "@sofstam" + - "@sateeshperi" + - "@jfy133" diff --git a/modules/nf-core/minimap2/index/main.nf b/modules/nf-core/minimap2/index/main.nf new file mode 100644 index 00000000..5fc64e82 --- /dev/null +++ b/modules/nf-core/minimap2/index/main.nf @@ -0,0 +1,34 @@ +process MINIMAP2_INDEX { + label 'process_medium' + + // Note: the versions here need to match the versions used in minimap2/align + conda "bioconda::minimap2=2.24" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/minimap2:2.24--h7132678_1' : + 'quay.io/biocontainers/minimap2:2.24--h7132678_1' }" + + input: + path fasta + + output: + path "*.mmi" , emit: index + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + """ + minimap2 \\ + -t $task.cpus \\ + -d ${fasta.baseName}.mmi \\ + $args \\ + $fasta + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + minimap2: \$(minimap2 --version 2>&1) + END_VERSIONS + """ +} diff --git a/modules/nf-core/minimap2/index/meta.yml b/modules/nf-core/minimap2/index/meta.yml new file mode 100644 index 00000000..b58f35c6 --- /dev/null +++ b/modules/nf-core/minimap2/index/meta.yml @@ -0,0 +1,40 @@ +name: minimap2_index +description: Provides fasta index required by minimap2 alignment. +keywords: + - index + - fasta + - reference +tools: + - minimap2: + description: | + A versatile pairwise aligner for genomic and spliced nucleotide sequences. + homepage: https://github.com/lh3/minimap2 + documentation: https://github.com/lh3/minimap2#uguide + licence: ["MIT"] +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - fasta: + type: file + description: | + Reference database in FASTA format. +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - index: + type: file + description: Minimap2 fasta index. + pattern: "*.mmi" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" +authors: + - "@yuukiiwa" + - "@drpatelh" diff --git a/modules/nf-core/minimap2/index/minimap2-index.diff b/modules/nf-core/minimap2/index/minimap2-index.diff new file mode 100644 index 00000000..d5b50216 --- /dev/null +++ b/modules/nf-core/minimap2/index/minimap2-index.diff @@ -0,0 +1,20 @@ +Changes in module 'nf-core/minimap2/index' +--- modules/nf-core/minimap2/index/main.nf ++++ modules/nf-core/minimap2/index/main.nf +@@ -8,11 +8,11 @@ + 'quay.io/biocontainers/minimap2:2.24--h7132678_1' }" + + input: +- tuple val(meta), path(fasta) ++ path fasta + + output: +- tuple val(meta), path("*.mmi"), emit: index +- path "versions.yml" , emit: versions ++ path "*.mmi" , emit: index ++ path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + +************************************************************ diff --git a/nextflow.config b/nextflow.config index 0341d8ed..58443b20 100644 --- a/nextflow.config +++ b/nextflow.config @@ -13,6 +13,12 @@ params { input = './samplesheet.csv' protocol = null + // Options: Reference genome options + genome = null + fasta = null + gtf = null + + // Options: Demultiplexing input_path = null barcode_kit = null diff --git a/nextflow_schema.json b/nextflow_schema.json index 5e716045..0f2f0939 100644 --- a/nextflow_schema.json +++ b/nextflow_schema.json @@ -315,6 +315,19 @@ "fa_icon": "fas fa-dna", "description": "Reference genome related files and options required for the workflow.", "properties": { + "fasta": { + "type": "string", + "default": null + }, + "gtf": { + "type": "string", + "default": null + }, + "genome": { + "type": "string", + "description": "Name of iGenomes reference.", + "default": "null" + }, "igenomes_base": { "type": "string", "format": "directory-path", diff --git a/subworkflows/local/align_minimap2.nf b/subworkflows/local/align_minimap2.nf index 70693a8a..c05c1c6a 100644 --- a/subworkflows/local/align_minimap2.nf +++ b/subworkflows/local/align_minimap2.nf @@ -2,37 +2,83 @@ * Alignment with MINIMAP2 */ -include { MINIMAP2_INDEX } from '../../modules/local/minimap2_index' -include { MINIMAP2_ALIGN } from '../../modules/local/minimap2_align' +include { MINIMAP2_INDEX as MINIMAP2_INDEX_VARIANT } from '../../modules/nf-core/minimap2/index/main' +include { MINIMAP2_ALIGN as MINIMAP2_ALIGN_VARIANT } from '../../modules/nf-core/minimap2/align/main' +//include { MINIMAP2_INDEX as MINIMAP2_INDEX_SPLICE } from '../../modules/nf-core/minimap2/index/main' +//include { MINIMAP2_ALIGN as MINIMAP2_ALIGN_SPLICE } from '../../modules/nf-core/minimap2/align/main' +include { SAMTOOLS_INDEX } from '../../modules/nf-core/samtools/index/main' +include { BAM_STATS_SAMTOOLS } from '../../subworkflows/nf-core/bam_stats_samtools/main' + workflow ALIGN_MINIMAP2 { take: - ch_fasta_index // channel: [ val(meta), [ reads ] ] - ch_fastq + ch_fasta // channel: [ path fasta ] + ch_sizes // channel: [ path sizes ] + ch_gtf // channel: [ path gtf ] + ch_bed // channel: [ path bed ] + ch_fastq // channel: [ val(meta), path(fastq) ] main: - /* - * Create genome/transcriptome index - */ - MINIMAP2_INDEX ( ch_fasta_index ) - ch_index = MINIMAP2_INDEX.out.index - minimap2_version = MINIMAP2_INDEX.out.versions - ch_index - .cross(ch_fastq) { it -> it[-1] } - .flatten() - .collate(13) - .map { it -> [ it[7], it[8], it[0], it[1], it[2], it[3], it[4], it[5] ] } // [ sample, fastq, fasta, sizes, gtf, bed, is_transcripts, index ] - .set { ch_index } + ch_versions = Channel.empty() + + if (params.protocol == "DNA") { + + /* + * Create genome/transcriptome index for variant calling with MINIMAP2 + */ + MINIMAP2_INDEX_VARIANT (ch_fasta) + ch_index = MINIMAP2_INDEX_VARIANT.out.index + ch_versions = ch_versions.mix(MINIMAP2_INDEX_VARIANT.out.versions) + + /* + * Map reads with MINIMAP2 + */ + MINIMAP2_ALIGN_VARIANT (ch_fastq, ch_fasta, true, false, false) + ch_bam = MINIMAP2_ALIGN_VARIANT.out.bam // channel: [ val (meta) , path (bam) ] ] + ch_versions = ch_versions.mix(MINIMAP2_ALIGN_VARIANT.out.versions) + } + + //if (params.protocol == 'cDNA' || params.protocol == 'directRNA') { + + /* + * Create genome/transcriptome index for splice variant calling + */ + //MINIMAP2_INDEX_SPLICE (ch_fasta) + //ch_index = MINIMAP2_INDEX_SPLICE.out.index + //ch_versions = ch_versions.mix(MINIMAP2_INDEX_SPLICE.out.versions) + + /* + * Map reads with MINIMAP2 + */ + //MINIMAP2_ALIGN (ch_fastq, ch_fasta, ch_index, ch_bed) + //ch_bam = MINIMAP2_ALIGN.out.bam + //ch_versions = ch_versions.mix(MINIMAP2_ALIGN.out.versions) + + //} /* - * Map reads with MINIMAP2 - */ - MINIMAP2_ALIGN ( ch_index ) - ch_align_sam = MINIMAP2_ALIGN.out.align_sam + * Index mapped reads with SAMTOOLS + */ + SAMTOOLS_INDEX(ch_bam) + ch_bai = SAMTOOLS_INDEX.out.bai // channel: [ val (meta) , path (bai) ] ] + ch_versions = ch_versions.mix(SAMTOOLS_INDEX.out.versions) + + ch_bam + .join(ch_bai, by: 0) + .set{ ch_bam_bai } + + BAM_STATS_SAMTOOLS(ch_bam_bai, ch_fasta) + ch_stats = BAM_STATS_SAMTOOLS.out.stats // channel: [ val(meta), [ stats ] ] + ch_flagstat = BAM_STATS_SAMTOOLS.out.flagstat // channel: [ val(meta), [ flagstat ] ] + ch_idxstats = BAM_STATS_SAMTOOLS.out.idxstats // channel: [ val(meta), [ idxstats ] ] + ch_versions = ch_versions.mix(BAM_STATS_SAMTOOLS.out.versions) emit: ch_index - minimap2_version - ch_align_sam + ch_bam_bai + ch_stats + ch_flagstat + ch_idxstats + ch_versions } diff --git a/subworkflows/local/prepare_genome.nf b/subworkflows/local/prepare_genome.nf index 4a9592a1..3e7bec9f 100644 --- a/subworkflows/local/prepare_genome.nf +++ b/subworkflows/local/prepare_genome.nf @@ -1,44 +1,56 @@ /* * Prepare genome/transcriptome before alignment */ - -include { GET_CHROM_SIZES } from '../../modules/local/get_chrom_sizes' -include { GTF2BED } from '../../modules/local/gtf2bed' -include { SAMTOOLS_FAIDX } from '../../modules/nf-core/samtools/faidx/main' +include { CUSTOM_GETCHROMSIZES } from '../../modules/nf-core/custom/getchromsizes/main' +include { GTF2BED } from '../../modules/local/gtf2bed' workflow PREPARE_GENOME { - take: - fasta - gtf main: - /* - * Make chromosome sizes file - */ + ch_versions = Channel.empty() + ch_fasta = Channel.empty() + ch_fai = Channel.empty() + ch_sizes = Channel.empty() + ch_gtf = Channel.empty() + ch_bed = Channel.empty() + if (params.fasta) { - GET_CHROM_SIZES (fasta) - ch_chrom_sizes = GET_CHROM_SIZES.out.sizes - samtools_version = GET_CHROM_SIZES.out.versions - ch_chrom_sizes.view() - - /* - * Make fasta index - */ - //SAMTOOLS_FAIDX (fasta) - //ch_fai = SAMTOOLS_FAIDX.out.fai - - /* - * Convert GTF to BED12 - */ - //GTF2BED (gtf) - //ch_gtf_bed = GTF2BED.out.gtf_bed - //gtf2bed_version = GTF2BED.out.versions + + Channel.fromPath(params.fasta) + .collect() + .set { ch_fasta } + + /* + * Generates a FASTA file of chromosome sizes and a fasta index file + */ + CUSTOM_GETCHROMSIZES (ch_fasta) + ch_chrom_sizes = CUSTOM_GETCHROMSIZES.out.sizes.collect() + ch_fai = CUSTOM_GETCHROMSIZES.out.fai.collect() + ch_versions = ch_versions.mix(CUSTOM_GETCHROMSIZES.out.versions) + + } + + if (params.gtf) { + + Channel.fromPath(params.gtf) + .collect() + .set { ch_gtf } + + /* + * Convert GTF to BED12 + */ + GTF2BED (ch_gtf) + ch_bed = GTF2BED.out.gtf_bed.collect() + ch_versions = ch_versions.mix(GTF2BED.out.versions) + + } emit: - ch_chrom_sizes - //ch_fai - //ch_gtf_bed - //samtools_version - //gtf2bed_version + ch_fasta + ch_fai + ch_sizes + ch_gtf + ch_bed + ch_versions } diff --git a/subworkflows/local/qcfastq_nanoplot_fastqc.nf b/subworkflows/local/qcfastq_nanoplot_fastqc.nf index 0684b381..26ed980d 100644 --- a/subworkflows/local/qcfastq_nanoplot_fastqc.nf +++ b/subworkflows/local/qcfastq_nanoplot_fastqc.nf @@ -10,9 +10,6 @@ workflow QCFASTQ_NANOPLOT_FASTQC { ch_fastq main: - ch_fastq - .map { ch -> [ ch[0], ch[1] ] } - .set { ch_fastq } /* * FastQ QC using NanoPlot diff --git a/subworkflows/local/structural_variant_calling.nf b/subworkflows/local/structural_variant_calling.nf index 2dcf66e4..d9311df5 100644 --- a/subworkflows/local/structural_variant_calling.nf +++ b/subworkflows/local/structural_variant_calling.nf @@ -15,14 +15,13 @@ include { TABIX_TABIX as CUTESV_TABIX_VCF } from '../../modules/nf-core/ta workflow STRUCTURAL_VARIANT_CALLING { take: - ch_view_sortbam + ch_bam_bai ch_fasta ch_fai main: ch_sv_calls_vcf = Channel.empty() ch_sv_calls_vcf_tbi = Channel.empty() - ch_versions = Channel.empty() /* @@ -33,21 +32,21 @@ workflow STRUCTURAL_VARIANT_CALLING { /* * Call structural variants with sniffles */ - SNIFFLES( ch_view_sortbam ) + SNIFFLES (ch_bam_bai, ch_fasta) ch_versions = ch_versions.mix(SNIFFLES.out.versions) /* * Sort structural variants with bcftools */ - SNIFFLES_SORT_VCF( SNIFFLES.out.sv_calls ) - ch_sv_calls_vcf = SNIFFLES_SORT_VCF.out.vcf + SNIFFLES_SORT_VCF( SNIFFLES.out.sv_vcf ) + ch_sv_vcf_sorted = SNIFFLES_SORT_VCF.out.vcf ch_versions = ch_versions.mix(SNIFFLES_SORT_VCF.out.versions) /* * Index sniffles vcf.gz */ - SNIFFLES_TABIX_VCF( ch_sv_calls_vcf ) - ch_sv_calls_tbi = SNIFFLES_TABIX_VCF.out.tbi + SNIFFLES_TABIX_VCF( ch_sv_vcf_sorted ) + ch_sv_vcf_sorted_tbi = SNIFFLES_TABIX_VCF.out.tbi ch_versions = ch_versions.mix(SNIFFLES_TABIX_VCF.out.versions) } else if (params.structural_variant_caller == 'cutesv') { @@ -55,26 +54,26 @@ workflow STRUCTURAL_VARIANT_CALLING { /* * Call structural variants with cutesv */ - CUTESV( ch_view_sortbam, ch_fasta ) - ch_versions = ch_versions.mix(CUTESV.out.versions) + CUTESV(ch_bam_bai, ch_fasta) + //ch_versions = ch_versions.mix(CUTESV.out.versions) /* * Sort structural variants with bcftools */ - CUTESV_SORT_VCF( CUTESV.out.sv_calls ) - ch_sv_calls_vcf = CUTESV_SORT_VCF.out.vcf - ch_versions = ch_versions.mix(CUTESV_SORT_VCF.out.versions) + //CUTESV_SORT_VCF( CUTESV.out.sv_calls ) + //ch_sv_calls_vcf = CUTESV_SORT_VCF.out.vcf + //ch_versions = ch_versions.mix(CUTESV_SORT_VCF.out.versions) /* * Zip cutesv vcf.gz */ - CUTESV_TABIX_VCF( ch_sv_calls_vcf ) - ch_sv_calls_tbi = CUTESV_TABIX_VCF.out.tbi - ch_versions = ch_versions.mix(CUTESV_TABIX_VCF.out.versions) + //CUTESV_TABIX_VCF( ch_sv_calls_vcf ) + //ch_sv_calls_tbi = CUTESV_TABIX_VCF.out.tbi + //ch_versions = ch_versions.mix(CUTESV_TABIX_VCF.out.versions) } emit: ch_sv_calls_vcf - ch_sv_calls_vcf_tbi - ch_versions + //ch_sv_calls_vcf_tbi + //ch_versions } diff --git a/subworkflows/nf-core/bam_stats_samtools.nf b/subworkflows/nf-core/bam_stats_samtools.nf deleted file mode 100644 index d4292db1..00000000 --- a/subworkflows/nf-core/bam_stats_samtools.nf +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Run SAMtools stats, flagstat and idxstats - */ - -include { SAMTOOLS_STATS } from '../../modules/nf-core/samtools/stats/main' -include { SAMTOOLS_IDXSTATS } from '../../modules/nf-core/samtools/idxstats/main' -include { SAMTOOLS_FLAGSTAT } from '../../modules/nf-core/samtools/flagstat/main' - -workflow BAM_STATS_SAMTOOLS { - take: - ch_bam_bai // channel: [ val(meta), [ bam ], [bai] ] - ch_id_fasta - - main: - /* - * Stats with samtools - */ - ch_id_fasta - .map{ it -> it[1] } - .set{ ch_fasta } - SAMTOOLS_STATS ( ch_bam_bai, ch_fasta ) - - /* - * Flagstat with samtools - */ - SAMTOOLS_FLAGSTAT ( ch_bam_bai ) - - /* - * Idxstats with samtools - */ - SAMTOOLS_IDXSTATS ( ch_bam_bai ) - - emit: - stats = SAMTOOLS_STATS.out.stats // channel: [ val(meta), [ stats ] ] - flagstat = SAMTOOLS_FLAGSTAT.out.flagstat // channel: [ val(meta), [ flagstat ] ] - idxstats = SAMTOOLS_IDXSTATS.out.idxstats // channel: [ val(meta), [ idxstats ] ] - versions = SAMTOOLS_STATS.out.versions // path: version.yml -} diff --git a/subworkflows/nf-core/bam_stats_samtools/main.nf b/subworkflows/nf-core/bam_stats_samtools/main.nf new file mode 100644 index 00000000..cfcc48dd --- /dev/null +++ b/subworkflows/nf-core/bam_stats_samtools/main.nf @@ -0,0 +1,32 @@ +// +// Run SAMtools stats, flagstat and idxstats +// + +include { SAMTOOLS_STATS } from '../../../modules/nf-core/samtools/stats/main' +include { SAMTOOLS_IDXSTATS } from '../../../modules/nf-core/samtools/idxstats/main' +include { SAMTOOLS_FLAGSTAT } from '../../../modules/nf-core/samtools/flagstat/main' + +workflow BAM_STATS_SAMTOOLS { + take: + bam_bai // channel: [ val(meta), [ bam/cram ], [bai/csi] ] + fasta // channel: [ fasta ] + + main: + ch_versions = Channel.empty() + + SAMTOOLS_STATS ( bam_bai, fasta ) + ch_versions = ch_versions.mix(SAMTOOLS_STATS.out.versions) + + SAMTOOLS_FLAGSTAT ( bam_bai ) + ch_versions = ch_versions.mix(SAMTOOLS_FLAGSTAT.out.versions) + + SAMTOOLS_IDXSTATS ( bam_bai ) + ch_versions = ch_versions.mix(SAMTOOLS_IDXSTATS.out.versions) + + emit: + stats = SAMTOOLS_STATS.out.stats // channel: [ val(meta), [ stats ] ] + flagstat = SAMTOOLS_FLAGSTAT.out.flagstat // channel: [ val(meta), [ flagstat ] ] + idxstats = SAMTOOLS_IDXSTATS.out.idxstats // channel: [ val(meta), [ idxstats ] ] + + versions = ch_versions // channel: [ versions.yml ] +} diff --git a/subworkflows/nf-core/bam_stats_samtools/meta.yml b/subworkflows/nf-core/bam_stats_samtools/meta.yml new file mode 100644 index 00000000..5252b0e4 --- /dev/null +++ b/subworkflows/nf-core/bam_stats_samtools/meta.yml @@ -0,0 +1,54 @@ +name: bam_stats_samtools +description: Produces comprehensive statistics from SAM/BAM/CRAM file +keywords: + - statistics + - counts + - bam + - sam + - cram +modules: + - samtools/stats + - samtools/idxstats + - samtools/flagstat +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bam: + type: file + description: BAM/CRAM/SAM file + pattern: "*.{bam,cram,sam}" + - bai: + type: file + description: Index for BAM/CRAM/SAM file + pattern: "*.{bai,crai,sai}" + - fasta: + type: file + description: Reference genome fasta file + pattern: "*.{fasta,fa}" +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - stats: + type: file + description: File containing samtools stats output + pattern: "*.{stats}" + - flagstat: + type: file + description: File containing samtools flagstat output + pattern: "*.{flagstat}" + - idxstats: + type: file + description: File containing samtools idxstats output + pattern: "*.{idxstats}" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" +authors: + - "@drpatelh" diff --git a/workflows/nanoseq.nf b/workflows/nanoseq.nf index 21106b20..49b76ec9 100644 --- a/workflows/nanoseq.nf +++ b/workflows/nanoseq.nf @@ -202,15 +202,14 @@ workflow NANOSEQ{ .map { it -> [ it.baseName.substring(0,it.baseName.lastIndexOf('.')), it ] } .join(ch_sample.map{ meta, empty -> [meta.barcode, meta] }, by: [0] ) .map { it -> [ it[2], it[1] ] } - .set { ch_fastq } + .set { ch_fastq_dirty } ch_software_versions = ch_software_versions.mix(QCAT.out.versions.ifEmpty(null)) } else { if (!params.skip_alignment) { ch_sample - //.map { it -> if (it[6].toString().endsWith('.gz')) [ it[0], it[6], it[2], it[1], it[4], it[5] ] } - .set { ch_fastq } + .set { ch_fastq_dirty } } else { - ch_fastq = Channel.empty() + ch_fastq_dirty = Channel.empty() } } @@ -230,21 +229,23 @@ workflow NANOSEQ{ } else { ch_nanolyse_fasta = file(params.nanolyse_fasta, checkIfExists: true) } + /* * MODULE: DNA contaminant removal using NanoLyse */ - NANOLYSE (ch_fastq, ch_nanolyse_fasta) + NANOLYSE (ch_fastq_dirty, ch_nanolyse_fasta) NANOLYSE.out.fastq - .set { ch_fastq_nl } + .set { ch_fastq } ch_software_versions = ch_software_versions.mix(NANOLYSE.out.versions.first().ifEmpty(null)) } else { - ch_fastq + ch_fastq_dirty .map { it -> [ it[0], it[1] ] } - .set { ch_fastq_nl } + .set { ch_fastq } } ch_fastqc_multiqc = Channel.empty() if (!params.skip_qc) { + /* * SUBWORKFLOW: Fastq QC with Nanoplot and fastqc */ @@ -254,46 +255,58 @@ workflow NANOSEQ{ } ch_samtools_multiqc = Channel.empty() + if (!params.skip_alignment) { + /* * SUBWORKFLOW: Make chromosome size file and covert GTF to BED12 */ - PREPARE_GENOME (params.fasta, params.gtf) - //ch_fasta_index = PREPARE_GENOME.out.ch_fasta_index - //ch_gtf_bed = PREPARE_GENOME.out.ch_gtf_bed - //ch_fasta = PREPARE_GENOME.out.ch_fasta - //ch_fai = PREPARE_GENOME.out.ch_fai - //ch_software_versions = ch_software_versions.mix(PREPARE_GENOME.out.samtools_version.first().ifEmpty(null)) - //ch_software_versions = ch_software_versions.mix(PREPARE_GENOME.out.gtf2bed_version.first().ifEmpty(null)) - - -// /* -// * SUBWORKFLOW: View, then sort, and index bam files -// */ -// //BAM_SORT_INDEX_SAMTOOLS (ch_align_sam, params.call_variants, ch_fasta) -// ch_view_sortbam = Channel.empty() -// //ch_view_sortbam = BAM_SORT_INDEX_SAMTOOLS.out.sortbam -// //ch_software_versions = ch_software_versions.mix(BAM_SORT_INDEX_SAMTOOLS.out.samtools_versions.first().ifEmpty(null)) -// //ch_samtools_multiqc = BAM_SORT_INDEX_SAMTOOLS.out.sortbam_stats_multiqc.ifEmpty([]) - -// if (params.call_variants && params.protocol == 'DNA') { + PREPARE_GENOME () + ch_fasta = PREPARE_GENOME.out.ch_fasta + ch_fai = PREPARE_GENOME.out.ch_fai + ch_sizes = PREPARE_GENOME.out.ch_sizes + ch_gtf = PREPARE_GENOME.out.ch_gtf + ch_bed = PREPARE_GENOME.out.ch_bed + ch_software_versions = ch_software_versions.mix(PREPARE_GENOME.out.ch_versions.first().ifEmpty(null)) + + if (params.aligner == 'minimap2') { + + /* + * SUBWORKFLOW: Create index and align fastq files with MINIMAP2 + */ + ALIGN_MINIMAP2 ( ch_fasta, ch_sizes, ch_gtf, ch_bed, ch_fastq ) + ch_index = ALIGN_MINIMAP2.out.ch_index + ch_bam_bai = ALIGN_MINIMAP2.out.ch_bam_bai + ch_software_versions = ch_software_versions.mix(ALIGN_MINIMAP2.out.ch_versions.first().ifEmpty(null)) + } else { -// /* -// * SUBWORKFLOW: Short variant calling -// */ -// if (!params.skip_vc) { -// SHORT_VARIANT_CALLING (ch_view_sortbam, ch_fasta.map{ it [1] }, ch_fai.map{ it [1] }) -// ch_software_versions = ch_software_versions.mix(SHORT_VARIANT_CALLING.out.ch_versions.first().ifEmpty(null)) -// } + /* + * SUBWORKFLOW: Align fastq files with graphmap2 and sort bam files + */ + //ALIGN_GRAPHMAP2 ( ch_fasta_index, ch_fastq ) + //ch_align_sam = ALIGN_GRAPHMAP2.out.ch_align_sam + //ch_index = ALIGN_GRAPHMAP2.out.ch_index + //ch_software_versions = ch_software_versions.mix(ALIGN_GRAPHMAP2.out.graphmap2_version.first().ifEmpty(null)) + } -// /* -// * SUBWORKFLOW: Structural variant calling -// */ -// if (!params.skip_sv) { -// STRUCTURAL_VARIANT_CALLING (ch_view_sortbam, ch_fasta.map{ it [1] }, ch_fai.map{ it [1] }) -// ch_software_versions = ch_software_versions.mix(STRUCTURAL_VARIANT_CALLING.out.ch_versions.first().ifEmpty(null)) -// } -// } + if (params.call_variants && params.protocol == 'DNA') { + + /* + * SUBWORKFLOW: Short variant calling + */ + //if (!params.skip_vc) { + // SHORT_VARIANT_CALLING (ch_bam, ch_bai, ch_fasta, ch_fai) + // ch_software_versions = ch_software_versions.mix(SHORT_VARIANT_CALLING.out.ch_versions.first().ifEmpty(null)) + //} + + /* + * SUBWORKFLOW: Structural variant calling + */ + if (!params.skip_sv) { + STRUCTURAL_VARIANT_CALLING (ch_bam_bai, ch_fasta, ch_fai) + ch_software_versions = ch_software_versions.mix(STRUCTURAL_VARIANT_CALLING.out.ch_versions.first().ifEmpty(null)) + } + } // ch_bedtools_version = Channel.empty() // if (!params.skip_bigwig) { From 5e2fcc79f99d84812c83dbc9604f9ebeb28d3cbf Mon Sep 17 00:00:00 2001 From: Chris Hakkaart Date: Wed, 1 Mar 2023 20:40:34 +0000 Subject: [PATCH 04/77] Adding graphmap --- conf/modules.config | 2 + modules.json | 10 +++++ modules/local/clair3.nf | 39 ++++++++++++++++++ modules/nf-core/graphmap2/align/main.nf | 41 +++++++++++++++++++ modules/nf-core/graphmap2/align/meta.yml | 51 ++++++++++++++++++++++++ modules/nf-core/graphmap2/index/main.nf | 34 ++++++++++++++++ modules/nf-core/graphmap2/index/meta.yml | 30 ++++++++++++++ subworkflows/local/align_graphmap2.nf | 49 ++++++++++++----------- workflows/nanoseq.nf | 1 - 9 files changed, 233 insertions(+), 24 deletions(-) create mode 100644 modules/local/clair3.nf create mode 100644 modules/nf-core/graphmap2/align/main.nf create mode 100644 modules/nf-core/graphmap2/align/meta.yml create mode 100644 modules/nf-core/graphmap2/index/main.nf create mode 100644 modules/nf-core/graphmap2/index/meta.yml diff --git a/conf/modules.config b/conf/modules.config index b7c87228..4c279f64 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -138,6 +138,7 @@ if (!params.skip_alignment) { if (params.aligner == "graphmap2") { process { withName: GRAPHMAP2_INDEX_VARIANT { + ext.args = { "" } publishDir = [ path: { "${params.outdir}/${params.aligner}" }, mode: 'copy', @@ -146,6 +147,7 @@ if (!params.skip_alignment) { ] } withName: GRAPHMAP2_ALIGN_VARIANT { + ext.args = { "" } publishDir = [ path: { "${params.outdir}/${params.aligner}" }, mode: 'copy', diff --git a/modules.json b/modules.json index ffdaaafa..b86c2519 100644 --- a/modules.json +++ b/modules.json @@ -26,6 +26,16 @@ "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", "installed_by": ["modules"] }, + "graphmap2/align": { + "branch": "master", + "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", + "installed_by": ["modules"] + }, + "graphmap2/index": { + "branch": "master", + "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", + "installed_by": ["modules"] + }, "minimap2/align": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", diff --git a/modules/local/clair3.nf b/modules/local/clair3.nf new file mode 100644 index 00000000..ac38fcc9 --- /dev/null +++ b/modules/local/clair3.nf @@ -0,0 +1,39 @@ +process CLAIR3 { + tag "$meta.id" + label 'process_high' + + conda 'bioconda::clair3=0.1.10' + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/clair3:0.1.10--hdfd78af_0' : + 'quay.io/biocontainers/clair3:0.1.10--hdfd78af_0' }" + + input: + tuple val(meta), path(bam), path(bai) + path(fasta) + path(fai) + + output: + tuple val(meta), path("${meta.id}/*") , emit: vcf + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + """ + /usr/local/bin/run_clair3.sh \ + --bam_fn=$bam \ + --ref_fn=$fasta \ + --threads=$task.cpus \ + --platform=${params.platform} \ + --model_path="/usr/local/bin/models/${params.clair3_model}" \ + --output="${meta.id}" \ + $args + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + clair3: \$( /usr/local/bin/run_clair3.sh --version | sed 's/ /,/' ) + END_VERSIONS + """ +} diff --git a/modules/nf-core/graphmap2/align/main.nf b/modules/nf-core/graphmap2/align/main.nf new file mode 100644 index 00000000..becb65bf --- /dev/null +++ b/modules/nf-core/graphmap2/align/main.nf @@ -0,0 +1,41 @@ +process GRAPHMAP2_ALIGN { + tag "$meta.id" + label 'process_medium' + tag "$meta.id" + + conda "bioconda::graphmap=0.6.3" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/graphmap:0.6.3--he513fc3_0' : + 'quay.io/biocontainers/graphmap:0.6.3--he513fc3_0' }" + + input: + tuple val(meta), path(reads) + path fasta + path index + + output: + tuple val(meta), path("*.sam"), emit: sam + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + """ + graphmap2 \\ + align \\ + -t $task.cpus \\ + -r $fasta \\ + -i $index \\ + -d $reads \\ + -o ${prefix}.sam \\ + $args + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + graphmap2: \$(echo \$(graphmap2 align 2>&1) | sed 's/^.*Version: v//; s/ .*\$//') + END_VERSIONS + """ +} diff --git a/modules/nf-core/graphmap2/align/meta.yml b/modules/nf-core/graphmap2/align/meta.yml new file mode 100644 index 00000000..d498069b --- /dev/null +++ b/modules/nf-core/graphmap2/align/meta.yml @@ -0,0 +1,51 @@ +name: graphmap2_align +description: A versatile pairwise aligner for genomic and spliced nucleotide sequences +keywords: + - align + - fasta + - fastq + - genome + - reference +tools: + - graphmap2: + description: | + A versatile pairwise aligner for genomic and spliced nucleotide sequences. + homepage: https://github.com/lbcb-sci/graphmap2 + documentation: https://github.com/lbcb-sci/graphmap2#graphmap2---a-highly-sensitive-and-accurate-mapper-for-long-error-prone-reads + licence: ["MIT"] +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - fastq: + type: file + description: | + List of input FASTQ files + and paired-end data, respectively. + - fasta: + type: file + description: | + Reference database in FASTA format. + - index: + type: file + description: | + FASTA index in gmidx. +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - sam: + type: file + description: Alignment in SAM format + pattern: "*.sam" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" +authors: + - "@yuukiiwa" + - "@drpatelh" diff --git a/modules/nf-core/graphmap2/index/main.nf b/modules/nf-core/graphmap2/index/main.nf new file mode 100644 index 00000000..f641d68e --- /dev/null +++ b/modules/nf-core/graphmap2/index/main.nf @@ -0,0 +1,34 @@ +process GRAPHMAP2_INDEX { + label 'process_medium' + + conda "bioconda::graphmap=0.6.3" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/graphmap:0.6.3--he513fc3_0' : + 'quay.io/biocontainers/graphmap:0.6.3--he513fc3_0' }" + + input: + path fasta + + output: + path "*.gmidx" , emit: index + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + """ + graphmap2 \\ + align \\ + -t $task.cpus \\ + -I \\ + $args \\ + -r $fasta + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + graphmap2: \$(echo \$(graphmap2 align 2>&1) | sed 's/^.*Version: v//; s/ .*\$//') + END_VERSIONS + """ +} diff --git a/modules/nf-core/graphmap2/index/meta.yml b/modules/nf-core/graphmap2/index/meta.yml new file mode 100644 index 00000000..8e9d2c1c --- /dev/null +++ b/modules/nf-core/graphmap2/index/meta.yml @@ -0,0 +1,30 @@ +name: graphmap2_index +description: A versatile pairwise aligner for genomic and spliced nucleotide sequences +keywords: + - index + - fasta + - reference +tools: + - graphmap2: + description: | + A versatile pairwise aligner for genomic and spliced nucleotide sequences. + homepage: https://github.com/lbcb-sci/graphmap2 + documentation: https://github.com/lbcb-sci/graphmap2#graphmap2---a-highly-sensitive-and-accurate-mapper-for-long-error-prone-reads + licence: ["MIT"] +input: + - fasta: + type: file + description: | + Reference database in FASTA format. +output: + - gmidx: + type: file + description: Graphmap2 fasta index in gmidx format + pattern: "*.gmidx" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" +authors: + - "@yuukiiwa" + - "@drpatelh" diff --git a/subworkflows/local/align_graphmap2.nf b/subworkflows/local/align_graphmap2.nf index 75db5921..590f39de 100644 --- a/subworkflows/local/align_graphmap2.nf +++ b/subworkflows/local/align_graphmap2.nf @@ -2,35 +2,38 @@ * Alignment with GRAPHMAP2 */ -include { GRAPHMAP2_INDEX } from '../../modules/local/graphmap2_index' -include { GRAPHMAP2_ALIGN } from '../../modules/local/graphmap2_align' +include { GRAPHMAP2_INDEX as GRAPHMAP2_INDEX_VARIANT } from '../../modules/nf-core/graphmap2/index/main' +include { GRAPHMAP2_ALIGN as GRAPHMAP2_ALIGN_VARIANT } from '../../modules/nf-core/graphmap2/align/main' +//include { GRAPHMAP2_INDEX as GRAPHMAP2_INDEX_SPLICE } from '../../modules/nf-core/graphmap2/index/main' +//include { GRAPHMAP2_ALIGN as GRAPHMAP2_ALIGN_SPLICE } from '../../modules/nf-core/graphmap2/align/main' workflow ALIGN_GRAPHMAP2 { take: - ch_fasta_index // channel: [ val(meta), [ reads ] ] - ch_fastq + ch_fastq // channel: [ val(meta), path(reads) ] + ch_fasta // channel: [ path fasta ] + ch_fai // channel: [ path fai ] main: - /* - * Create genome/transcriptome index - */ - GRAPHMAP2_INDEX ( ch_fasta_index ) - ch_index = GRAPHMAP2_INDEX.out.index - graphmap2_version = GRAPHMAP2_INDEX.out.versions - ch_index - .cross(ch_fastq) { it -> it[-1] } - .flatten() - .collate(12) - .map { it -> [ it[6], it[7], it[0], it[1], it[2], it[3], it[10], it[4] ] } // [ sample, fastq, fasta, sizes, gtf, bed, is_transcripts, index ] - .set { ch_index } - - /* - * Map reads with GRAPHMAP2 - */ - - GRAPHMAP2_ALIGN ( ch_index ) - ch_align_sam = GRAPHMAP2_ALIGN.out.align_sam + ch_versions = Channel.empty() + + if (params.protocol == "DNA") { + + /* + * Create genome/transcriptome index for variant calling with GRAPHMAP2 + */ + GRAPHMAP2_INDEX_VARIANT (ch_fasta) + ch_index = GRAPHMAP2_INDEX_VARIANT.out.index + ch_versions = ch_versions.mix(GRAPHMAP2_INDEX_VARIANT.out.versions) + + /* + * Map reads with GRAPHMAP2 + */ + + GRAPHMAP2_ALIGN_VARIANT ( ch_index ) + ch_align_sam = GRAPHMAP2_ALIGN.out.align_sam + + } emit: ch_index diff --git a/workflows/nanoseq.nf b/workflows/nanoseq.nf index 49b76ec9..b236cc7c 100644 --- a/workflows/nanoseq.nf +++ b/workflows/nanoseq.nf @@ -308,7 +308,6 @@ workflow NANOSEQ{ } } -// ch_bedtools_version = Channel.empty() // if (!params.skip_bigwig) { // /* From 368f1ef7dcd970f41cb0e179ecb850623fe4afe5 Mon Sep 17 00:00:00 2001 From: Yuk Kei Wan <41866052+yuukiiwa@users.noreply.github.com> Date: Mon, 13 Mar 2023 13:29:58 +0800 Subject: [PATCH 05/77] Update align_graphmap2.nf --- subworkflows/local/align_graphmap2.nf | 49 +++++++++++++-------------- 1 file changed, 23 insertions(+), 26 deletions(-) diff --git a/subworkflows/local/align_graphmap2.nf b/subworkflows/local/align_graphmap2.nf index 590f39de..50909436 100644 --- a/subworkflows/local/align_graphmap2.nf +++ b/subworkflows/local/align_graphmap2.nf @@ -2,38 +2,35 @@ * Alignment with GRAPHMAP2 */ -include { GRAPHMAP2_INDEX as GRAPHMAP2_INDEX_VARIANT } from '../../modules/nf-core/graphmap2/index/main' -include { GRAPHMAP2_ALIGN as GRAPHMAP2_ALIGN_VARIANT } from '../../modules/nf-core/graphmap2/align/main' -//include { GRAPHMAP2_INDEX as GRAPHMAP2_INDEX_SPLICE } from '../../modules/nf-core/graphmap2/index/main' -//include { GRAPHMAP2_ALIGN as GRAPHMAP2_ALIGN_SPLICE } from '../../modules/nf-core/graphmap2/align/main' +include { GRAPHMAP2_INDEX } from '../../modules/local/graphmap2_index' +include { GRAPHMAP2_ALIGN } from '../../modules/local/graphmap2_align' workflow ALIGN_GRAPHMAP2 { take: - ch_fastq // channel: [ val(meta), path(reads) ] - ch_fasta // channel: [ path fasta ] - ch_fai // channel: [ path fai ] + ch_fasta_index // channel: [ val(meta), [ reads ] ] + ch_fastq main: + /* + * Create genome/transcriptome index + */ + GRAPHMAP2_INDEX ( ch_fasta_index ) + ch_index = GRAPHMAP2_INDEX.out.index + graphmap2_version = GRAPHMAP2_INDEX.out.versions - ch_versions = Channel.empty() - - if (params.protocol == "DNA") { - - /* - * Create genome/transcriptome index for variant calling with GRAPHMAP2 - */ - GRAPHMAP2_INDEX_VARIANT (ch_fasta) - ch_index = GRAPHMAP2_INDEX_VARIANT.out.index - ch_versions = ch_versions.mix(GRAPHMAP2_INDEX_VARIANT.out.versions) - - /* - * Map reads with GRAPHMAP2 - */ - - GRAPHMAP2_ALIGN_VARIANT ( ch_index ) - ch_align_sam = GRAPHMAP2_ALIGN.out.align_sam - - } + ch_index + .cross(ch_fastq) { it -> it[-1] } + .flatten() + .collate(12) // [fasta, fasta sizes, gtf, bed, fasta_index, annotation_string, meta, fastq, fasta, gtf, is_transcript, fasta_gtf_string] + .map { it -> [ it[6], it[7], it[0], it[1], it[2], it[3], it[10], it[4] ] } // [ sample, fastq, fasta, sizes, gtf, bed, is_transcripts, index ] + .set { ch_index } + + /* + * Map reads with GRAPHMAP2 + */ + + GRAPHMAP2_ALIGN ( ch_index ) + ch_align_sam = GRAPHMAP2_ALIGN.out.align_sam emit: ch_index From f78633db941be285b7ab74ac67f9b2bd9ba42783 Mon Sep 17 00:00:00 2001 From: Yuk Kei Wan <41866052+yuukiiwa@users.noreply.github.com> Date: Mon, 13 Mar 2023 13:40:14 +0800 Subject: [PATCH 06/77] make sure that python black is still passing --- bin/check_samplesheet.py | 130 ++++++++++++++++++++++++++------------- 1 file changed, 88 insertions(+), 42 deletions(-) diff --git a/bin/check_samplesheet.py b/bin/check_samplesheet.py index 7ff786d3..a10f4479 100755 --- a/bin/check_samplesheet.py +++ b/bin/check_samplesheet.py @@ -46,23 +46,24 @@ def read_head(handle, num_lines=10): return "".join(lines) -def check_samplesheet(file_in, file_out): +def check_samplesheet(file_in, updated_path, file_out): """ This function checks that the samplesheet follows the following structure: - group,replicate,barcode,input_file - MCF7,1,,MCF7_directcDNA_replicate1.fastq.gz - MCF7,2,,MCF7_directcDNA_replicate3.fastq.gz + group,replicate,barcode,input_file,fasta,gtf + MCF7,1,,MCF7_directcDNA_replicate1.fastq.gz,genome.fa, + MCF7,2,,MCF7_directcDNA_replicate3.fastq.gz,genome.fa,genome.gtf + K562,1,,K562_directcDNA_replicate1.fastq.gz,genome.fa, + K562,2,,K562_directcDNA_replicate4.fastq.gz,,transcripts.fa """ input_extensions = [] sample_info_dict = {} with open(file_in, "r") as fin: - ## Check header MIN_COLS = 3 - HEADER = ['group', 'replicate', 'barcode', 'input_file'] + HEADER = ["group", "replicate", "barcode", "input_file", "fasta", "gtf"] header = fin.readline().strip().split(",") - if header[:len(HEADER)] != HEADER: + if header[: len(HEADER)] != HEADER: print("ERROR: Please check samplesheet header -> {} != {}".format(",".join(header), ",".join(HEADER))) sys.exit(1) @@ -72,40 +73,40 @@ def check_samplesheet(file_in, file_out): ## Check valid number of columns per row if len(lspl) < len(HEADER): - print_error("Invalid number of columns (minimum = {})!".format(len(HEADER)), 'Line', line) + print_error("Invalid number of columns (minimum = {})!".format(len(HEADER)), "Line", line) num_cols = len([x for x in lspl if x]) if num_cols < MIN_COLS: - print_error("Invalid number of populated columns (minimum = {})!".format(MIN_COLS), 'Line', line) + print_error("Invalid number of populated columns (minimum = {})!".format(MIN_COLS), "Line", line) ## Check group name entries - group, replicate, barcode, input_file = lspl[:len(HEADER)] + group, replicate, barcode, input_file, fasta, gtf = lspl[: len(HEADER)] if group: if group.find(" ") != -1: - print_error("Group entry contains spaces!", 'Line', line) + print_error("Group entry contains spaces!", "Line", line) else: - print_error("Group entry has not been specified!", 'Line', line) + print_error("Group entry has not been specified!", "Line", line) ## Check replicate entry is integer if replicate: if not replicate.isdigit(): - print_error("Replicate id not an integer!", 'Line', line) + print_error("Replicate id not an integer!", "Line", line) else: - print_error("Replicate id not specified!", 'Line', line) + print_error("Replicate id not specified!", "Line", line) replicate = int(replicate) ## Check barcode entry if barcode: if not barcode.isdigit(): - print_error("Barcode entry is not an integer!", 'Line', line) + print_error("Barcode entry is not an integer!", "Line", line) else: - barcode = 'barcode%s' % (barcode.zfill(2)) + barcode = "barcode%s" % (barcode.zfill(2)) ## Check input file extension - nanopolish_fast5 = '' + nanopolish_fast5 = "" if input_file: if input_file.find(" ") != -1: - print_error("Input file contains spaces!", 'Line', line) + print_error("Input file contains spaces!", "Line", line) if input_file.endswith(".fastq.gz"): input_extensions.append("*.fastq.gz") elif input_file.endswith(".fq.gz"): @@ -114,65 +115,110 @@ def check_samplesheet(file_in, file_out): input_extensions.append("*.bam") else: if updated_path != "not_changed": - input_file='/'.join([updated_path,input_file.split("/")[-1]]) - list_dir = os.listdir(input_file) + input_file = "/".join([updated_path, input_file.split("/")[-1]]) + list_dir = os.listdir(input_file) nanopolish_fast5 = input_file - if not (all(fname.endswith('.fast5') for fname in list_dir)): + if not (all(fname.endswith(".fast5") for fname in list_dir)): if "fast5" in list_dir and "fastq" in list_dir: - nanopolish_fast5 = input_file+'/fast5' + nanopolish_fast5 = input_file + "/fast5" ## CHECK FAST5 DIRECTORY - if not (all(fname.endswith('.fast5') for fname in os.listdir(nanopolish_fast5))): - print_error('fast5 directory contains non-fast5 files.') + if not (all(fname.endswith(".fast5") for fname in os.listdir(nanopolish_fast5))): + print_error("fast5 directory contains non-fast5 files.") ## CHECK PROVIDED BASECALLED FASTQ - fastq_path = input_file+'/fastq' - basecalled_fastq = [fn for fn in os.listdir(fastq_path) if fn.endswith(".fastq.gz") or fn.endswith(".fq.gz") ] + fastq_path = input_file + "/fastq" + basecalled_fastq = [ + fn for fn in os.listdir(fastq_path) if fn.endswith(".fastq.gz") or fn.endswith(".fq.gz") + ] if len(basecalled_fastq) != 1: - print_error('Please input one basecalled fastq per sample.') + print_error("Please input one basecalled fastq per sample.") else: - input_file = fastq_path+'/'+basecalled_fastq[0] + input_file = fastq_path + "/" + basecalled_fastq[0] if not basecalled_fastq[0].endswith(".fastq.gz"): if not basecalled_fastq[0].endswith(".fq.gz"): print_error('basecalled fastq input does not end with ".fastq.gz" or ".fq.gz"') else: - print_error('path does not end with ".fastq.gz", ".fq.gz", or ".bam" and is not an existing directory with correct fast5 and/or fastq inputs.') - - ## Create sample mapping dictionary = {group: {replicate : [ barcode, input_file ]}} - sample_info = [barcode, input_file] + print_error( + 'path does not end with ".fastq.gz", ".fq.gz", or ".bam" and is not an existing directory with correct fast5 and/or fastq inputs.' + ) + + ## Check genome entries + if fasta: + if fasta.find(" ") != -1: + print_error("Genome entry contains spaces!", "Line", line) + if len(fasta.split(".")) > 1: + if ( + fasta[-6:] != ".fasta" + and fasta[-3:] != ".fa" + and fasta[-9:] != ".fasta.gz" + and fasta[-6:] != ".fa.gz" + ): + print_error( + "Genome entry does not have extension '.fasta', '.fa', '.fasta.gz' or '.fa.gz'!", + "Line", + line, + ) + + ## Check transcriptome entries + # gtf = '' + is_transcripts = "0" + if gtf: + if gtf.find(" ") != -1: + print_error("Transcriptome entry contains spaces!", "Line", line) + print(gtf[-4:]) + if gtf[-4:] != ".gtf" and gtf[-7:] != ".gtf.gz": + print_error("Transcriptome entry does not have extension '.gtf' or '.gtf.gz'!", "Line", line) + # if transcriptome[-6:] != '.fasta' and transcriptome[-3:] != '.fa' and transcriptome[-9:] != '.fasta.gz' and transcriptome[-6:] != '.fa.gz' and transcriptome[-4:] != '.gtf' and transcriptome[-7:] != '.gtf.gz': + # print_error("Transcriptome entry does not have extension '.fasta', '.fa', '.fasta.gz', '.fa.gz', '.gtf' or '.gtf.gz'!", 'Line', line) + # if transcriptome[-4:] == '.gtf' or transcriptome[-7:] == '.gtf.gz': + # gtf = transcriptome + # if not genome: + # print_error("If genome isn't provided, transcriptome must be in fasta format for mapping!", 'Line', line) + # else: + # is_transcripts = '1' + # genome = transcriptome + + ## Create sample mapping dictionary = {group: {replicate : [ barcode, input_file, genome, gtf, is_transcripts, nanopolish_fast5 ]}} + sample_info = [barcode, input_file, fasta, gtf, is_transcripts, nanopolish_fast5] if group not in sample_info_dict: sample_info_dict[group] = {} if replicate not in sample_info_dict[group]: sample_info_dict[group][replicate] = sample_info else: - print_error("Same replicate id provided multiple times!", 'Line', line) + print_error("Same replicate id provided multiple times!", "Line", line) ## Check all input files have the same extension if len(set(input_extensions)) > 1: - print_error("All input files must have the same extension!", 'Multiple extensions found', ', '.join(set(input_extensions))) + print_error( + "All input files must have the same extension!", + "Multiple extensions found", + ", ".join(set(input_extensions)), + ) ## Write validated samplesheet with appropriate columns if len(sample_info_dict) > 0: out_dir = os.path.dirname(file_out) make_dir(out_dir) with open(file_out, "w") as fout: - - fout.write(",".join(['sample', 'barcode', 'reads']) + "\n") + fout.write( + ",".join(["sample", "barcode", "input_file", "fasta", "gtf", "is_transcripts", "nanopolish_fast5"]) + + "\n" + ) for sample in sorted(sample_info_dict.keys()): - ## Check that replicate ids are in format 1.. uniq_rep_ids = set(sample_info_dict[sample].keys()) if len(uniq_rep_ids) != max(uniq_rep_ids): - print_error("Replicate ids must start with 1..!", 'Group', sample) + print_error("Replicate ids must start with 1..!", "Group", sample) ### Write to file for replicate in sorted(sample_info_dict[sample].keys()): - sample_id = "{}_R{}".format(sample,replicate) - fout.write(','.join([sample_id] + sample_info_dict[sample][replicate]) + '\n') + sample_id = "{}_R{}".format(sample, replicate) + fout.write(",".join([sample_id] + sample_info_dict[sample][replicate]) + "\n") def main(args=None): args = parse_args(args) - check_samplesheet(args.FILE_IN, args.FILE_OUT) + check_samplesheet(args.FILE_IN, args.UPDATED_PATH, args.FILE_OUT) -if __name__ == '__main__': +if __name__ == "__main__": sys.exit(main()) From f5d238a6cd9377c73898557ed1fda0645cecfbd5 Mon Sep 17 00:00:00 2001 From: Yuk Kei Wan <41866052+yuukiiwa@users.noreply.github.com> Date: Mon, 13 Mar 2023 13:48:42 +0800 Subject: [PATCH 07/77] Update check_samplesheet.py --- bin/check_samplesheet.py | 54 +++++++--------------------------------- 1 file changed, 9 insertions(+), 45 deletions(-) diff --git a/bin/check_samplesheet.py b/bin/check_samplesheet.py index a10f4479..8cdcd6b3 100755 --- a/bin/check_samplesheet.py +++ b/bin/check_samplesheet.py @@ -49,11 +49,11 @@ def read_head(handle, num_lines=10): def check_samplesheet(file_in, updated_path, file_out): """ This function checks that the samplesheet follows the following structure: - group,replicate,barcode,input_file,fasta,gtf - MCF7,1,,MCF7_directcDNA_replicate1.fastq.gz,genome.fa, - MCF7,2,,MCF7_directcDNA_replicate3.fastq.gz,genome.fa,genome.gtf - K562,1,,K562_directcDNA_replicate1.fastq.gz,genome.fa, - K562,2,,K562_directcDNA_replicate4.fastq.gz,,transcripts.fa + group,replicate,barcode,input_file + MCF7,1,,MCF7_directcDNA_replicate1.fastq.gz + MCF7,2,,MCF7_directcDNA_replicate3.fastq.gz + K562,1,,K562_directcDNA_replicate1.fastq.gz + K562,2,,K562_directcDNA_replicate4.fastq.gz """ input_extensions = [] @@ -61,7 +61,7 @@ def check_samplesheet(file_in, updated_path, file_out): with open(file_in, "r") as fin: ## Check header MIN_COLS = 3 - HEADER = ["group", "replicate", "barcode", "input_file", "fasta", "gtf"] + HEADER = ["group", "replicate", "barcode", "input_file"] header = fin.readline().strip().split(",") if header[: len(HEADER)] != HEADER: print("ERROR: Please check samplesheet header -> {} != {}".format(",".join(header), ",".join(HEADER))) @@ -80,7 +80,7 @@ def check_samplesheet(file_in, updated_path, file_out): print_error("Invalid number of populated columns (minimum = {})!".format(MIN_COLS), "Line", line) ## Check group name entries - group, replicate, barcode, input_file, fasta, gtf = lspl[: len(HEADER)] + group, replicate, barcode, input_file = lspl[: len(HEADER)] if group: if group.find(" ") != -1: print_error("Group entry contains spaces!", "Line", line) @@ -141,44 +141,8 @@ def check_samplesheet(file_in, updated_path, file_out): 'path does not end with ".fastq.gz", ".fq.gz", or ".bam" and is not an existing directory with correct fast5 and/or fastq inputs.' ) - ## Check genome entries - if fasta: - if fasta.find(" ") != -1: - print_error("Genome entry contains spaces!", "Line", line) - if len(fasta.split(".")) > 1: - if ( - fasta[-6:] != ".fasta" - and fasta[-3:] != ".fa" - and fasta[-9:] != ".fasta.gz" - and fasta[-6:] != ".fa.gz" - ): - print_error( - "Genome entry does not have extension '.fasta', '.fa', '.fasta.gz' or '.fa.gz'!", - "Line", - line, - ) - - ## Check transcriptome entries - # gtf = '' - is_transcripts = "0" - if gtf: - if gtf.find(" ") != -1: - print_error("Transcriptome entry contains spaces!", "Line", line) - print(gtf[-4:]) - if gtf[-4:] != ".gtf" and gtf[-7:] != ".gtf.gz": - print_error("Transcriptome entry does not have extension '.gtf' or '.gtf.gz'!", "Line", line) - # if transcriptome[-6:] != '.fasta' and transcriptome[-3:] != '.fa' and transcriptome[-9:] != '.fasta.gz' and transcriptome[-6:] != '.fa.gz' and transcriptome[-4:] != '.gtf' and transcriptome[-7:] != '.gtf.gz': - # print_error("Transcriptome entry does not have extension '.fasta', '.fa', '.fasta.gz', '.fa.gz', '.gtf' or '.gtf.gz'!", 'Line', line) - # if transcriptome[-4:] == '.gtf' or transcriptome[-7:] == '.gtf.gz': - # gtf = transcriptome - # if not genome: - # print_error("If genome isn't provided, transcriptome must be in fasta format for mapping!", 'Line', line) - # else: - # is_transcripts = '1' - # genome = transcriptome - ## Create sample mapping dictionary = {group: {replicate : [ barcode, input_file, genome, gtf, is_transcripts, nanopolish_fast5 ]}} - sample_info = [barcode, input_file, fasta, gtf, is_transcripts, nanopolish_fast5] + sample_info = [barcode, input_file, nanopolish_fast5] if group not in sample_info_dict: sample_info_dict[group] = {} if replicate not in sample_info_dict[group]: @@ -200,7 +164,7 @@ def check_samplesheet(file_in, updated_path, file_out): make_dir(out_dir) with open(file_out, "w") as fout: fout.write( - ",".join(["sample", "barcode", "input_file", "fasta", "gtf", "is_transcripts", "nanopolish_fast5"]) + ",".join(["sample", "barcode", "input_file", "nanopolish_fast5"]) + "\n" ) for sample in sorted(sample_info_dict.keys()): From 962aa516b116ae88c48b919a671e31c97db12825 Mon Sep 17 00:00:00 2001 From: Yuk Kei Wan <41866052+yuukiiwa@users.noreply.github.com> Date: Mon, 13 Mar 2023 13:52:40 +0800 Subject: [PATCH 08/77] python blacked --- bin/check_samplesheet.py | 53 +++++++++++++++++++++++++++++++--------- 1 file changed, 42 insertions(+), 11 deletions(-) diff --git a/bin/check_samplesheet.py b/bin/check_samplesheet.py index 8cdcd6b3..ca40c9ce 100755 --- a/bin/check_samplesheet.py +++ b/bin/check_samplesheet.py @@ -64,7 +64,11 @@ def check_samplesheet(file_in, updated_path, file_out): HEADER = ["group", "replicate", "barcode", "input_file"] header = fin.readline().strip().split(",") if header[: len(HEADER)] != HEADER: - print("ERROR: Please check samplesheet header -> {} != {}".format(",".join(header), ",".join(HEADER))) + print( + "ERROR: Please check samplesheet header -> {} != {}".format( + ",".join(header), ",".join(HEADER) + ) + ) sys.exit(1) ## Check sample entries @@ -73,11 +77,21 @@ def check_samplesheet(file_in, updated_path, file_out): ## Check valid number of columns per row if len(lspl) < len(HEADER): - print_error("Invalid number of columns (minimum = {})!".format(len(HEADER)), "Line", line) + print_error( + "Invalid number of columns (minimum = {})!".format(len(HEADER)), + "Line", + line, + ) num_cols = len([x for x in lspl if x]) if num_cols < MIN_COLS: - print_error("Invalid number of populated columns (minimum = {})!".format(MIN_COLS), "Line", line) + print_error( + "Invalid number of populated columns (minimum = {})!".format( + MIN_COLS + ), + "Line", + line, + ) ## Check group name entries group, replicate, barcode, input_file = lspl[: len(HEADER)] @@ -122,20 +136,31 @@ def check_samplesheet(file_in, updated_path, file_out): if "fast5" in list_dir and "fastq" in list_dir: nanopolish_fast5 = input_file + "/fast5" ## CHECK FAST5 DIRECTORY - if not (all(fname.endswith(".fast5") for fname in os.listdir(nanopolish_fast5))): + if not ( + all( + fname.endswith(".fast5") + for fname in os.listdir(nanopolish_fast5) + ) + ): print_error("fast5 directory contains non-fast5 files.") ## CHECK PROVIDED BASECALLED FASTQ fastq_path = input_file + "/fastq" basecalled_fastq = [ - fn for fn in os.listdir(fastq_path) if fn.endswith(".fastq.gz") or fn.endswith(".fq.gz") + fn + for fn in os.listdir(fastq_path) + if fn.endswith(".fastq.gz") or fn.endswith(".fq.gz") ] if len(basecalled_fastq) != 1: - print_error("Please input one basecalled fastq per sample.") + print_error( + "Please input one basecalled fastq per sample." + ) else: input_file = fastq_path + "/" + basecalled_fastq[0] if not basecalled_fastq[0].endswith(".fastq.gz"): if not basecalled_fastq[0].endswith(".fq.gz"): - print_error('basecalled fastq input does not end with ".fastq.gz" or ".fq.gz"') + print_error( + 'basecalled fastq input does not end with ".fastq.gz" or ".fq.gz"' + ) else: print_error( 'path does not end with ".fastq.gz", ".fq.gz", or ".bam" and is not an existing directory with correct fast5 and/or fastq inputs.' @@ -164,19 +189,25 @@ def check_samplesheet(file_in, updated_path, file_out): make_dir(out_dir) with open(file_out, "w") as fout: fout.write( - ",".join(["sample", "barcode", "input_file", "nanopolish_fast5"]) - + "\n" + ",".join(["sample", "barcode", "input_file", "nanopolish_fast5"]) + "\n" ) for sample in sorted(sample_info_dict.keys()): ## Check that replicate ids are in format 1.. uniq_rep_ids = set(sample_info_dict[sample].keys()) if len(uniq_rep_ids) != max(uniq_rep_ids): - print_error("Replicate ids must start with 1..!", "Group", sample) + print_error( + "Replicate ids must start with 1..!", + "Group", + sample, + ) ### Write to file for replicate in sorted(sample_info_dict[sample].keys()): sample_id = "{}_R{}".format(sample, replicate) - fout.write(",".join([sample_id] + sample_info_dict[sample][replicate]) + "\n") + fout.write( + ",".join([sample_id] + sample_info_dict[sample][replicate]) + + "\n" + ) def main(args=None): From 6c6d67be41a62f5db428ee4bb78fb84e863cd10b Mon Sep 17 00:00:00 2001 From: Yuk Kei Wan Date: Tue, 14 Mar 2023 17:11:20 +0800 Subject: [PATCH 09/77] convert local modules with existing nf-core/modules --- conf/base.config | 12 + conf/test.config | 12 +- conf/test_nodx_rnamod.config | 1 + conf/test_nodx_stringtie.config | 4 +- conf/test_nodx_vc.config | 4 +- modules.json | 159 ++++-- modules/local/bedtools_bamtobed.nf | 32 -- modules/local/bedtools_genomecov.nf | 34 -- modules/local/graphmap2_align.nf | 40 -- modules/local/graphmap2_index.nf | 37 -- modules/local/medaka_variant.nf | 4 +- modules/local/minimap2_align.nf | 42 -- modules/local/minimap2_index.nf | 47 -- modules/local/samtools_sort_index.nf | 32 -- modules/local/samtools_view_bam.nf | 29 -- modules/local/stringtie2.nf | 33 -- modules/local/subread_featurecounts.nf | 57 --- modules/local/ucsc_bed12tobigbed.nf | 33 -- modules/local/ucsc_bedgraphtobigwig.nf | 30 -- modules/nf-core/bcftools/sort/main.nf | 47 -- modules/nf-core/bcftools/sort/meta.yml | 43 -- modules/nf-core/bedtools/bamtobed/main.nf | 35 ++ modules/nf-core/bedtools/bamtobed/meta.yml | 38 ++ modules/nf-core/bedtools/genomecov/main.nf | 59 +++ modules/nf-core/bedtools/genomecov/meta.yml | 51 ++ .../custom/dumpsoftwareversions/main.nf | 6 +- .../getchromsizes/custom-getchromsizes.diff | 24 - modules/nf-core/custom/getchromsizes/main.nf | 10 +- modules/nf-core/deepvariant/main.nf | 57 +++ modules/nf-core/deepvariant/meta.yml | 62 +++ modules/nf-core/minimap2/index/main.nf | 6 +- .../minimap2/index/minimap2-index.diff | 20 - modules/nf-core/multiqc/main.nf | 53 -- modules/nf-core/multiqc/meta.yml | 55 -- .../{local/qcat.nf => nf-core/qcat/main.nf} | 35 +- modules/nf-core/{untar => qcat}/meta.yml | 36 +- modules/nf-core/samtools/faidx/main.nf | 44 -- modules/nf-core/samtools/faidx/meta.yml | 47 -- modules/nf-core/samtools/flagstat/meta.yml | 2 +- modules/nf-core/samtools/idxstats/meta.yml | 2 +- modules/nf-core/samtools/index/meta.yml | 2 +- modules/nf-core/samtools/sort/meta.yml | 2 +- modules/nf-core/samtools/stats/meta.yml | 14 +- modules/nf-core/samtools/view/main.nf | 66 +++ modules/nf-core/samtools/view/meta.yml | 79 +++ modules/nf-core/stringtie/stringtie/main.nf | 68 +++ modules/nf-core/stringtie/stringtie/meta.yml | 57 +++ modules/nf-core/subread/featurecounts/main.nf | 47 ++ .../nf-core/subread/featurecounts/meta.yml | 52 ++ modules/nf-core/tabix/bgziptabix/main.nf | 45 -- modules/nf-core/tabix/bgziptabix/meta.yml | 45 -- modules/nf-core/ucsc/bedgraphtobigwig/main.nf | 37 ++ .../nf-core/ucsc/bedgraphtobigwig/meta.yml | 44 ++ modules/nf-core/ucsc/bedtobigbed/main.nf | 41 ++ modules/nf-core/ucsc/bedtobigbed/meta.yml | 48 ++ modules/nf-core/untar/main.nf | 63 --- subworkflows/local/align_graphmap2.nf | 70 ++- subworkflows/local/align_minimap2.nf | 114 ++--- subworkflows/local/bam_sort_index_samtools.nf | 54 -- subworkflows/local/bedtools_ucsc_bigbed.nf | 25 +- subworkflows/local/bedtools_ucsc_bigwig.nf | 22 +- .../local/differential_deseq2_dexseq.nf | 1 + subworkflows/local/input_check.nf | 32 +- subworkflows/local/prepare_genome.nf | 56 --- subworkflows/local/qcfastq_nanoplot_fastqc.nf | 17 +- .../local/quantify_stringtie_featurecounts.nf | 53 +- subworkflows/local/short_variant_calling.nf | 47 +- .../local/structural_variant_calling.nf | 34 +- .../nf-core/bam_stats_samtools/main.nf | 18 +- .../nf-core/bam_stats_samtools/meta.yml | 52 +- workflows/nanoseq.nf | 435 ++++++++-------- workflows/nanoseq.nf.save | 472 ++++++++++++++++++ 72 files changed, 2001 insertions(+), 1585 deletions(-) delete mode 100644 modules/local/bedtools_bamtobed.nf delete mode 100644 modules/local/bedtools_genomecov.nf delete mode 100644 modules/local/graphmap2_align.nf delete mode 100644 modules/local/graphmap2_index.nf delete mode 100644 modules/local/minimap2_align.nf delete mode 100644 modules/local/minimap2_index.nf delete mode 100644 modules/local/samtools_sort_index.nf delete mode 100644 modules/local/samtools_view_bam.nf delete mode 100644 modules/local/stringtie2.nf delete mode 100644 modules/local/subread_featurecounts.nf delete mode 100644 modules/local/ucsc_bed12tobigbed.nf delete mode 100644 modules/local/ucsc_bedgraphtobigwig.nf delete mode 100644 modules/nf-core/bcftools/sort/main.nf delete mode 100644 modules/nf-core/bcftools/sort/meta.yml create mode 100644 modules/nf-core/bedtools/bamtobed/main.nf create mode 100644 modules/nf-core/bedtools/bamtobed/meta.yml create mode 100644 modules/nf-core/bedtools/genomecov/main.nf create mode 100644 modules/nf-core/bedtools/genomecov/meta.yml delete mode 100644 modules/nf-core/custom/getchromsizes/custom-getchromsizes.diff create mode 100644 modules/nf-core/deepvariant/main.nf create mode 100644 modules/nf-core/deepvariant/meta.yml delete mode 100644 modules/nf-core/minimap2/index/minimap2-index.diff delete mode 100644 modules/nf-core/multiqc/main.nf delete mode 100644 modules/nf-core/multiqc/meta.yml rename modules/{local/qcat.nf => nf-core/qcat/main.nf} (54%) rename modules/nf-core/{untar => qcat}/meta.yml (51%) delete mode 100644 modules/nf-core/samtools/faidx/main.nf delete mode 100644 modules/nf-core/samtools/faidx/meta.yml create mode 100644 modules/nf-core/samtools/view/main.nf create mode 100644 modules/nf-core/samtools/view/meta.yml create mode 100644 modules/nf-core/stringtie/stringtie/main.nf create mode 100644 modules/nf-core/stringtie/stringtie/meta.yml create mode 100644 modules/nf-core/subread/featurecounts/main.nf create mode 100644 modules/nf-core/subread/featurecounts/meta.yml delete mode 100644 modules/nf-core/tabix/bgziptabix/main.nf delete mode 100644 modules/nf-core/tabix/bgziptabix/meta.yml create mode 100644 modules/nf-core/ucsc/bedgraphtobigwig/main.nf create mode 100755 modules/nf-core/ucsc/bedgraphtobigwig/meta.yml create mode 100644 modules/nf-core/ucsc/bedtobigbed/main.nf create mode 100755 modules/nf-core/ucsc/bedtobigbed/meta.yml delete mode 100644 modules/nf-core/untar/main.nf delete mode 100644 subworkflows/local/bam_sort_index_samtools.nf delete mode 100644 subworkflows/local/prepare_genome.nf create mode 100644 workflows/nanoseq.nf.save diff --git a/conf/base.config b/conf/base.config index e925219d..63060142 100644 --- a/conf/base.config +++ b/conf/base.config @@ -63,6 +63,18 @@ process { errorStrategy = 'retry' maxRetries = 2 } + withName:SAMTOOLS_VIEW { + ext.args = '--output-fmt bam' + } + withName:BEDTOOLS_GENOMECOV { + ext.args = '-bg' + } + withName:SUBREAD_FEATURECOUNTS_GENE { + ext.args = '-g gene_id -t exon -o counts_gene.txt' + } + withName:SUBREAD_FEATURECOUNTS_TRANSCRIPT{ + ext.args = '--primary --fraction -F GTF -g transcript_id -t transcript --extraAttributes gene_id -o counts_transcript.txt' + } withName:CUSTOM_DUMPSOFTWAREVERSIONS { cache = false } diff --git a/conf/test.config b/conf/test.config index d93073a1..db8c5bff 100644 --- a/conf/test.config +++ b/conf/test.config @@ -17,16 +17,16 @@ params { max_time = 12.h // Input data to perform demultipexing - input = 'https://raw.githubusercontent.com/nf-core/test-datasets/nanoseq/3.0/samplesheet/samplesheet_nobc_dx.csv' - fasta = 'https://raw.githubusercontent.com/nf-core/test-datasets/nanoseq/reference/chr22_23800000-23980000.fa' - gtf = 'https://raw.githubusercontent.com/nf-core/test-datasets/nanoseq/reference/chr22_23800000-23980000.gtf' + input = 'https://raw.githubusercontent.com/yuukiiwa/test-datasets/nanoseq/3.0/samplesheet/samplesheet_nobc_dx.csv' + fasta = 'https://raw.githubusercontent.com/yuukiiwa/test-datasets/nanoseq/reference/chr22_23800000-23980000.fa' + gtf = 'https://raw.githubusercontent.com/yuukiiwa/test-datasets/nanoseq/reference/chr22_23800000-23980000.gtf' + run_nanolyse = true protocol = 'DNA' barcode_kit = 'NBD103/NBD104' input_path = 'https://raw.githubusercontent.com/nf-core/test-datasets/nanoseq/fastq/nondemultiplexed/sample_nobc_dx.fastq.gz' + //skip_bigwig = true + //skip_bigbed = true skip_quantification = true - skip_bigwig = true - skip_bigbed = true skip_fusion_analysis= true skip_modification_analysis=true - } diff --git a/conf/test_nodx_rnamod.config b/conf/test_nodx_rnamod.config index 8e721795..f6d1abe2 100644 --- a/conf/test_nodx_rnamod.config +++ b/conf/test_nodx_rnamod.config @@ -19,6 +19,7 @@ params { // Input data to skip demultiplexing and rna modification analysis input = 'https://raw.githubusercontent.com/nf-core/test-datasets/nanoseq/3.0/samplesheet/samplesheet_nobc_nodx_rnamod.csv' protocol = 'directRNA' + run_nanolyse = true skip_demultiplexing = true skip_quantification = true skip_fusion_analysis= true diff --git a/conf/test_nodx_stringtie.config b/conf/test_nodx_stringtie.config index 86f9b94f..2178a5fa 100644 --- a/conf/test_nodx_stringtie.config +++ b/conf/test_nodx_stringtie.config @@ -17,7 +17,9 @@ params { max_time = 12.h // Input data to skip demultiplexing and stringtie - input = 'https://raw.githubusercontent.com/nf-core/test-datasets/nanoseq/3.0/samplesheet/samplesheet_nobc_nodx_stringtie.csv' + input = 'https://raw.githubusercontent.com/yuukiiwa/test-datasets/nanoseq/3.0/samplesheet/samplesheet_nobc_nodx_stringtie.csv' + fasta = 'https://raw.githubusercontent.com/yuukiiwa/test-datasets/nanoseq/reference/chr22_23800000-23980000.fa' + gtf = 'https://raw.githubusercontent.com/yuukiiwa/test-datasets/nanoseq/reference/chr22_23800000-23980000.gtf' protocol = 'directRNA' skip_demultiplexing = true skip_fusion_analysis= true diff --git a/conf/test_nodx_vc.config b/conf/test_nodx_vc.config index 910df6d3..dd4d6661 100644 --- a/conf/test_nodx_vc.config +++ b/conf/test_nodx_vc.config @@ -17,13 +17,13 @@ params { max_time = 12.h // Input data to skip demultiplexing and variant call - input = 'https://raw.githubusercontent.com/nf-core/test-datasets/nanoseq/3.0/samplesheet/samplesheet_nobc_nodx_vc.csv' + input = 'https://raw.githubusercontent.com/yuukiiwa/test-datasets/nanoseq/3.0/samplesheet/samplesheet_nobc_nodx_vc.csv' fasta = 'https://raw.githubusercontent.com/nf-core/test-datasets/nanoseq/reference/hg19_KCMF1.fa' protocol = 'DNA' skip_quantification = true skip_demultiplexing = true call_variants = true - variant_caller = 'medaka' + variant_caller = 'deepvariant' structural_variant_caller = 'sniffles' } diff --git a/modules.json b/modules.json index b86c2519..42153071 100644 --- a/modules.json +++ b/modules.json @@ -5,118 +5,187 @@ "https://github.com/nf-core/modules.git": { "modules": { "nf-core": { - "bcftools/sort": { + "bedtools/bamtobed": { + "branch": "master", + "git_sha": "1d48427957205cb6acf1ffe330bd35b6bb8baa90", + "installed_by": [ + "modules" + ] + }, + "bedtools/genomecov": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "custom/dumpsoftwareversions": { "branch": "master", - "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] + "git_sha": "b6d4d476aee074311c89d82a69c1921bd70c8180", + "installed_by": [ + "modules" + ] }, "custom/getchromsizes": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"], - "patch": "modules/nf-core/custom/getchromsizes/custom-getchromsizes.diff" + "installed_by": [ + "modules" + ] + }, + "deepvariant": { + "branch": "master", + "git_sha": "0f8a77ff00e65eaeebc509b8156eaa983192474b", + "installed_by": [ + "modules" + ] }, "fastqc": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "graphmap2/align": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "graphmap2/index": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "minimap2/align": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"], - "patch": "modules/nf-core/minimap2/align/minimap2-align.diff" + "installed_by": [ + "modules" + ] }, "minimap2/index": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"], - "patch": "modules/nf-core/minimap2/index/minimap2-index.diff" - }, - "multiqc": { - "branch": "master", - "git_sha": "ee80d14721e76e2e079103b8dcd5d57129e584ba", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "nanolyse": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "nanoplot": { "branch": "master", "git_sha": "3822e04e49b6d89b7092feb3480d744cb5d9986b", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, - "samtools/faidx": { + "qcat": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "samtools/flagstat": { "branch": "master", - "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["bam_stats_samtools", "modules"] + "git_sha": "0f8a77ff00e65eaeebc509b8156eaa983192474b", + "installed_by": [ + "bam_stats_samtools" + ] }, "samtools/idxstats": { "branch": "master", - "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["bam_stats_samtools", "modules"] + "git_sha": "0f8a77ff00e65eaeebc509b8156eaa983192474b", + "installed_by": [ + "bam_stats_samtools" + ] }, "samtools/index": { "branch": "master", - "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] + "git_sha": "0f8a77ff00e65eaeebc509b8156eaa983192474b", + "installed_by": [ + "modules" + ] }, "samtools/sort": { "branch": "master", - "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] + "git_sha": "0f8a77ff00e65eaeebc509b8156eaa983192474b", + "installed_by": [ + "modules" + ] }, "samtools/stats": { "branch": "master", - "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["bam_stats_samtools", "modules"] + "git_sha": "0f8a77ff00e65eaeebc509b8156eaa983192474b", + "installed_by": [ + "bam_stats_samtools" + ] + }, + "samtools/view": { + "branch": "master", + "git_sha": "0f8a77ff00e65eaeebc509b8156eaa983192474b", + "installed_by": [ + "modules" + ] }, "stringtie/merge": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, - "tabix/bgzip": { + "stringtie/stringtie": { "branch": "master", - "git_sha": "90294980a903ecebd99ac31d8b6c66af48fa8259", - "installed_by": ["modules"] + "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", + "installed_by": [ + "modules" + ] }, - "tabix/bgziptabix": { + "subread/featurecounts": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] + }, + "tabix/bgzip": { + "branch": "master", + "git_sha": "90294980a903ecebd99ac31d8b6c66af48fa8259", + "installed_by": [ + "modules" + ] }, "tabix/tabix": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] + }, + "ucsc/bedgraphtobigwig": { + "branch": "master", + "git_sha": "0f8a77ff00e65eaeebc509b8156eaa983192474b", + "installed_by": [ + "modules" + ] }, - "untar": { + "ucsc/bedtobigbed": { "branch": "master", - "git_sha": "cc1f997fab6d8fde5dc0e6e2a310814df5b53ce7", - "installed_by": ["modules"] + "git_sha": "0f8a77ff00e65eaeebc509b8156eaa983192474b", + "installed_by": [ + "modules" + ] } } }, @@ -124,8 +193,10 @@ "nf-core": { "bam_stats_samtools": { "branch": "master", - "git_sha": "92eb5091ae5368a60cda58b3a0ced8b36d715b0f", - "installed_by": ["subworkflows"] + "git_sha": "b4b7f89e7fd6d2293f0c176213f710e0bcdaf19e", + "installed_by": [ + "subworkflows" + ] } } } diff --git a/modules/local/bedtools_bamtobed.nf b/modules/local/bedtools_bamtobed.nf deleted file mode 100644 index 4eb3b8e6..00000000 --- a/modules/local/bedtools_bamtobed.nf +++ /dev/null @@ -1,32 +0,0 @@ -process BEDTOOLS_BAMBED { - label 'process_medium' - - conda "bioconda::bedtools=2.29.2" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/bedtools:2.29.2--hc088bd4_0' : - 'quay.io/biocontainers/bedtools:2.29.2--hc088bd4_0' }" - - input: - tuple val(meta), path(sizes), val(is_transcripts), path(bam), path(bai) - - output: - tuple val(meta), path(sizes), path("*.bed12"), emit: bed12 - path "versions.yml" , emit: versions - - when: - !params.skip_alignment && !params.skip_bigbed && (params.protocol == 'directRNA' || params.protocol == 'cDNA') - - script: - """ - bedtools \\ - bamtobed \\ - -bed12 \\ - -cigar \\ - -i ${bam[0]} \\ - | bedtools sort > ${meta.id}.bed12 - cat <<-END_VERSIONS > versions.yml - "${task.process}": - bedtools: \$(bedtools --version | sed -e "s/bedtools v//g") - END_VERSIONS - """ -} diff --git a/modules/local/bedtools_genomecov.nf b/modules/local/bedtools_genomecov.nf deleted file mode 100644 index 147d1b02..00000000 --- a/modules/local/bedtools_genomecov.nf +++ /dev/null @@ -1,34 +0,0 @@ -process BEDTOOLS_GENOMECOV { - tag "$meta.id" - label 'process_medium' - - conda "bioconda::bedtools=2.29.2" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/bedtools:2.29.2--hc088bd4_0' : - 'quay.io/biocontainers/bedtools:2.29.2--hc088bd4_0' }" - - input: - tuple val(meta), path(sizes), val(is_transcripts), path(bam), path(bai) - - output: - tuple val(meta), path(sizes), path("*.bedGraph"), emit: bedgraph - path "versions.yml" , emit: versions - - when: - task.ext.when == null || task.ext.when - - script: - split = (params.protocol == 'DNA' || is_transcripts) ? "" : "-split" - """ - bedtools \\ - genomecov \\ - -split \\ - -ibam ${bam[0]} \\ - -bg \\ - | bedtools sort > ${meta.id}.bedGraph - cat <<-END_VERSIONS > versions.yml - "${task.process}": - bedtools: \$(bedtools --version | sed -e "s/bedtools v//g") - END_VERSIONS - """ -} diff --git a/modules/local/graphmap2_align.nf b/modules/local/graphmap2_align.nf deleted file mode 100644 index 41641320..00000000 --- a/modules/local/graphmap2_align.nf +++ /dev/null @@ -1,40 +0,0 @@ -process GRAPHMAP2_ALIGN { - tag "$meta.id" - label 'process_high' - - conda "bioconda::graphmap=0.6.3" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/graphmap:0.6.3--he513fc3_0' : - 'quay.io/biocontainers/graphmap:0.6.3--he513fc3_0' }" - - input: - tuple val(meta), path(fastq), path(fasta), path(sizes), val(gtf), val(bed), val(is_transcripts), path(index) - - output: - tuple val(meta), path(sizes), val(is_transcripts), path("*.sam"), emit: align_sam - path "versions.yml" , emit: versions - - when: - task.ext.when == null || task.ext.when - - script: - def preset = (params.protocol == 'DNA' || is_transcripts) ? "" : "-x rnaseq" - def junctions = (params.protocol != 'DNA' && !is_transcripts && gtf) ? "--gtf $gtf" : "" - """ - graphmap2 \\ - align \\ - $preset \\ - $junctions \\ - -t $task.cpus \\ - -r $fasta \\ - -i $index \\ - -d $fastq \\ - -o ${meta.id}.sam \\ - --extcigar - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - graphmap2: \$(echo \$(graphmap2 align 2>&1) | sed 's/^.*Version: v//; s/ .*\$//') - END_VERSIONS - """ -} diff --git a/modules/local/graphmap2_index.nf b/modules/local/graphmap2_index.nf deleted file mode 100644 index b0971e1b..00000000 --- a/modules/local/graphmap2_index.nf +++ /dev/null @@ -1,37 +0,0 @@ -process GRAPHMAP2_INDEX { - tag "$fasta" - label 'process_high' - - conda "bioconda::graphmap=0.6.3" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/graphmap:0.6.3--he513fc3_0' : - 'quay.io/biocontainers/graphmap:0.6.3--he513fc3_0' }" - - input: - tuple path(fasta), path(sizes), val(gtf), val(bed), val(is_transcripts), val(annotation_str) - - output: - tuple path(fasta), path(sizes), path(gtf), val(bed), val(is_transcripts), path("*.gmidx"), val(annotation_str), emit: index - path "versions.yml" , emit: versions - - when: - task.ext.when == null || task.ext.when - - script: - def preset = (params.protocol == 'DNA' || is_transcripts) ? "" : "-x rnaseq" - def junctions = (params.protocol != 'DNA' && !is_transcripts && gtf) ? "--gtf $gtf" : "" - """ - graphmap2 \\ - align \\ - $preset \\ - $junctions \\ - -t $task.cpus \\ - -I \\ - -r $fasta - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - graphmap2: \$(echo \$(graphmap2 align 2>&1) | sed 's/^.*Version: v//; s/ .*\$//') - END_VERSIONS - """ -} diff --git a/modules/local/medaka_variant.nf b/modules/local/medaka_variant.nf index 0b2f9f59..9c5621c8 100644 --- a/modules/local/medaka_variant.nf +++ b/modules/local/medaka_variant.nf @@ -8,7 +8,7 @@ process MEDAKA_VARIANT { 'quay.io/biocontainers/medaka:1.4.4--py38h130def0_0' }" input: - tuple val(meta), path(sizes), val(is_transcripts), path(input), path(index) + tuple val(meta), path(bam), path(bai) path(fasta) output: @@ -29,7 +29,7 @@ process MEDAKA_VARIANT { medaka_variant \\ -d \\ -f $fasta \\ - -i $input \\ + -i $bam \\ -o $output_dir \\ -t $task.cpus \\ $split_mnps \\ diff --git a/modules/local/minimap2_align.nf b/modules/local/minimap2_align.nf deleted file mode 100644 index d5544f3d..00000000 --- a/modules/local/minimap2_align.nf +++ /dev/null @@ -1,42 +0,0 @@ -process MINIMAP2_ALIGN { - tag "$meta.id" - label 'process_medium' - - conda "bioconda::minimap2=2.17" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/minimap2:2.17--hed695b0_3' : - 'quay.io/biocontainers/minimap2:2.17--hed695b0_3' }" - - input: - tuple val(meta), path(fastq), path(fasta), path(sizes), val(gtf), val(bed), val(is_transcripts), path(index) - - output: - tuple val(meta), path(sizes), val(is_transcripts), path("*.sam"), emit: align_sam - path "versions.yml" , emit: versions - - when: - task.ext.when == null || task.ext.when - - script: - def preset = (params.protocol == 'DNA' || is_transcripts) ? "--MD -ax map-ont" : "-ax splice" - def kmer = (params.protocol == 'directRNA') ? "-k14" : "" - def stranded = (params.stranded || params.protocol == 'directRNA') ? "-uf" : "" - def junctions = (params.protocol != 'DNA' && bed) ? "--junc-bed ${file(bed)}" : "" - def md = (params.call_variants && params.protocol == 'DNA') ? "--MD" : "" - """ - minimap2 \\ - $preset \\ - $kmer \\ - $stranded \\ - $junctions \\ - $md \\ - -t $task.cpus \\ - $index \\ - $fastq > ${meta.id}.sam - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - minimap2: \$(minimap2 --version 2>&1) - END_VERSIONS - """ -} diff --git a/modules/local/minimap2_index.nf b/modules/local/minimap2_index.nf deleted file mode 100644 index 15557770..00000000 --- a/modules/local/minimap2_index.nf +++ /dev/null @@ -1,47 +0,0 @@ -process MINIMAP2_INDEX { - tag "$fasta" - label 'process_high' - - conda "bioconda::minimap2=2.17" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/minimap2:2.17--hed695b0_3' : - 'quay.io/biocontainers/minimap2:2.17--hed695b0_3' }" - - input: - tuple path(fasta), path(sizes), val(gtf), val(bed), val(is_transcripts), val(annotation_str) - - output: - tuple path(fasta), path(sizes), val(gtf), val(bed), val(is_transcripts), path("*.mmi"), val(annotation_str), emit: index - path "versions.yml" , emit: versions - - when: - task.ext.when == null || task.ext.when - - script: - def preset = (params.protocol == 'DNA' || is_transcripts) ? "-ax map-ont" : "-ax splice" - def kmer = (params.protocol == 'directRNA') ? "-k14" : "" - def stranded = (params.stranded || params.protocol == 'directRNA') ? "-uf" : "" - def junctions = (params.protocol != 'DNA' && bed) ? "--junc-bed ${file(bed)}" : "" - - ext.args = [ - (params.protocol == 'DNA' || is_transcripts) ? "-ax map-ont" : "-ax splice", - (params.protocol == 'directRNA') ? "-k14" : "", - (params.stranded || params.protocol == 'directRNA') ? "-uf" : "", - (params.protocol != 'DNA' && bed) ? "--junc-bed ${file(bed)}" : "" - ].join(' ').trim() - """ - minimap2 \\ - $preset \\ - $kmer \\ - $stranded \\ - $junctions \\ - -t $task.cpus \\ - -d ${fasta}.mmi \\ - $fasta - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - minimap2: \$(minimap2 --version 2>&1) - END_VERSIONS - """ -} diff --git a/modules/local/samtools_sort_index.nf b/modules/local/samtools_sort_index.nf deleted file mode 100644 index a542ded8..00000000 --- a/modules/local/samtools_sort_index.nf +++ /dev/null @@ -1,32 +0,0 @@ -process SAMTOOLS_SORT_INDEX { - tag "$meta.id" - label 'process_low' - - conda "bioconda::samtools=1.14" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/samtools:1.15.1--h1170115_0' : - 'quay.io/biocontainers/samtools:1.15.1--h1170115_0' }" - - input: - tuple val(meta), path(bam) - - output: - tuple val(meta), path("*sorted.bam"), path("*.bai"), optional:true, emit: bam_bai - tuple val(meta), path("*sorted.bam"), path("*.csi"), optional:true, emit: bam_csi - path "versions.yml" , emit: versions - - when: - task.ext.when == null || task.ext.when - - script: - """ - samtools sort -@ $task.cpus -o ${meta.id}.sorted.bam -T $meta.id $bam - - samtools index ${meta.id}.sorted.bam - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') - END_VERSIONS - """ -} diff --git a/modules/local/samtools_view_bam.nf b/modules/local/samtools_view_bam.nf deleted file mode 100644 index 4a5eb46e..00000000 --- a/modules/local/samtools_view_bam.nf +++ /dev/null @@ -1,29 +0,0 @@ -process SAMTOOLS_VIEW_BAM { - tag "$meta.id" - label 'process_medium' - - conda "bioconda::samtools=1.10" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/samtools:1.15.1--h1170115_0' : - 'quay.io/biocontainers/samtools:1.15.1--h1170115_0' }" - - input: - tuple val(meta), path(sizes), val(is_transcripts), path(sam) - - output: - tuple val(meta), path("*.bam"), emit: bam - path "versions.yml" , emit: versions - - when: - task.ext.when == null || task.ext.when - - script: - """ - samtools view -b -h -O BAM -@ $task.cpus -o ${meta.id}.bam $sam - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') - END_VERSIONS - """ -} diff --git a/modules/local/stringtie2.nf b/modules/local/stringtie2.nf deleted file mode 100644 index a64a7e82..00000000 --- a/modules/local/stringtie2.nf +++ /dev/null @@ -1,33 +0,0 @@ -process STRINGTIE2 { - tag "$meta.id" - label 'process_medium' - - // Note: 2.7X indices incompatible with AWS iGenomes. - conda "bioconda::stringtie=2.1.4" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/stringtie:2.1.4--h7e0af3c_0' : - 'quay.io/biocontainers/stringtie:2.1.4--h7e0af3c_0' }" - - input: - tuple val(meta), path(fasta), path(gtf), path(bam) - - output: - path "*.stringtie.gtf", emit: stringtie_gtf - path "versions.yml" , emit: versions - - when: - task.ext.when == null || task.ext.when - - script: - """ - stringtie \\ - -L \\ - -G $gtf \\ - -o ${meta.id}.stringtie.gtf $bam - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - stringtie2: \$(stringtie --version 2>&1) - END_VERSIONS - """ -} diff --git a/modules/local/subread_featurecounts.nf b/modules/local/subread_featurecounts.nf deleted file mode 100644 index 5da69be6..00000000 --- a/modules/local/subread_featurecounts.nf +++ /dev/null @@ -1,57 +0,0 @@ -process SUBREAD_FEATURECOUNTS { - label 'process_medium' - - // Note: 2.7X indices incompatible with AWS iGenomes. - conda "bioconda::subread=2.0.1" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/subread:2.0.1--hed695b0_0' : - 'quay.io/biocontainers/subread:2.0.1--hed695b0_0' }" - - input: - path gtf - path bams - - output: - path "counts_gene.txt" , emit: gene_counts - path "counts_transcript.txt" , emit: transcript_counts - path "counts_gene.txt.summary" , emit: featurecounts_gene_multiqc - path "counts_transcript.txt.summary", emit: featurecounts_transcript_multiqc - path "versions.yml" , emit: versions - - when: - task.ext.when == null || task.ext.when - - script: - """ - featureCounts \\ - -L \\ - -O \\ - -f \\ - -g gene_id \\ - -t exon \\ - -T $task.cpus \\ - -a $gtf \\ - -o counts_gene.txt \\ - $bams - - featureCounts \\ - -L \\ - -O \\ - -f \\ - --primary \\ - --fraction \\ - -F GTF \\ - -g transcript_id \\ - -t transcript \\ - --extraAttributes gene_id \\ - -T $task.cpus \\ - -a $gtf \\ - -o counts_transcript.txt \\ - $bams - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - featureCounts: \$( echo \$(featureCounts -v 2>&1) | sed -e "s/featureCounts v//g") - END_VERSIONS - """ -} diff --git a/modules/local/ucsc_bed12tobigbed.nf b/modules/local/ucsc_bed12tobigbed.nf deleted file mode 100644 index 296ceb19..00000000 --- a/modules/local/ucsc_bed12tobigbed.nf +++ /dev/null @@ -1,33 +0,0 @@ -process UCSC_BED12TOBIGBED { - tag "$meta.id" - label 'process_medium' - - conda "bioconda::ucsc-bedtobigbed=377" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/ucsc-bedtobigbed:377--h446ed27_1' : - 'quay.io/biocontainers/ucsc-bedtobigbed:377--h446ed27_1' }" - - input: - tuple val(meta), path(sizes), path(bed12) - - output: - tuple val(meta), path(sizes), path("*.bigBed"), emit: bigbed - path "versions.yml" , emit: versions - - when: - !params.skip_alignment && !params.skip_bigbed && (params.protocol == 'directRNA' || params.protocol == 'cDNA') - - script: - def VERSION = '377' - """ - bedToBigBed \\ - $bed12 \\ - $sizes \\ - ${meta.id}.bigBed - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - ucsc_bed12tobigbed: \$(echo $VERSION) - END_VERSIONS - """ -} diff --git a/modules/local/ucsc_bedgraphtobigwig.nf b/modules/local/ucsc_bedgraphtobigwig.nf deleted file mode 100644 index d3b8d1c7..00000000 --- a/modules/local/ucsc_bedgraphtobigwig.nf +++ /dev/null @@ -1,30 +0,0 @@ -process UCSC_BEDGRAPHTOBIGWIG { - tag "$meta.id" - label 'process_medium' - - conda "bioconda::ucsc-bedgraphtobigwig=377" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/ucsc-bedgraphtobigwig:377--h446ed27_1' : - 'quay.io/biocontainers/ucsc-bedgraphtobigwig:377--h446ed27_1' }" - - input: - tuple val(meta), path(sizes), path(bedgraph) - - output: - tuple val(meta), path(sizes), path("*.bigWig"), emit: bigwig - path "versions.yml" , emit: versions - - when: - task.ext.when == null || task.ext.when - - script: - def VERSION = '377' - """ - bedGraphToBigWig $bedgraph $sizes ${meta.id}.bigWig - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - ucsc_bedgraphtobigwig: \$(echo $VERSION) - END_VERSIONS - """ -} diff --git a/modules/nf-core/bcftools/sort/main.nf b/modules/nf-core/bcftools/sort/main.nf deleted file mode 100644 index 13d75b27..00000000 --- a/modules/nf-core/bcftools/sort/main.nf +++ /dev/null @@ -1,47 +0,0 @@ -process BCFTOOLS_SORT { - tag "$meta.id" - label 'process_medium' - - conda "bioconda::bcftools=1.16" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/bcftools:1.16--hfe4b78e_1': - 'quay.io/biocontainers/bcftools:1.16--hfe4b78e_1' }" - - input: - tuple val(meta), path(vcf) - - output: - tuple val(meta), path("*.gz"), emit: vcf - path "versions.yml" , emit: versions - - when: - task.ext.when == null || task.ext.when - - script: - def args = task.ext.args ?: '' - def prefix = task.ext.prefix ?: "${meta.id}" - """ - bcftools \\ - sort \\ - --output ${prefix}.vcf.gz \\ - $args \\ - $vcf - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - bcftools: \$(bcftools --version 2>&1 | head -n1 | sed 's/^.*bcftools //; s/ .*\$//') - END_VERSIONS - """ - - stub: - def prefix = task.ext.prefix ?: "${meta.id}" - - """ - touch ${prefix}.vcf.gz - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - bcftools: \$(bcftools --version 2>&1 | head -n1 | sed 's/^.*bcftools //; s/ .*\$//') - END_VERSIONS - """ -} diff --git a/modules/nf-core/bcftools/sort/meta.yml b/modules/nf-core/bcftools/sort/meta.yml deleted file mode 100644 index 0c244a48..00000000 --- a/modules/nf-core/bcftools/sort/meta.yml +++ /dev/null @@ -1,43 +0,0 @@ -name: bcftools_sort -description: Sorts VCF files -keywords: - - sorting - - VCF - - variant calling -tools: - - sort: - description: Sort VCF files by coordinates. - homepage: http://samtools.github.io/bcftools/bcftools.html - documentation: http://www.htslib.org/doc/bcftools.html - tool_dev_url: https://github.com/samtools/bcftools - doi: "10.1093/bioinformatics/btp352" - licence: ["MIT"] - -input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - vcf: - type: file - description: The VCF/BCF file to be sorted - pattern: "*.{vcf.gz,vcf,bcf}" - -output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" - - vcf: - type: file - description: Sorted VCF file - pattern: "*.{vcf.gz}" - -authors: - - "@Gwennid" diff --git a/modules/nf-core/bedtools/bamtobed/main.nf b/modules/nf-core/bedtools/bamtobed/main.nf new file mode 100644 index 00000000..e9673571 --- /dev/null +++ b/modules/nf-core/bedtools/bamtobed/main.nf @@ -0,0 +1,35 @@ +process BEDTOOLS_BAMTOBED { + tag "$meta.id" + label 'process_medium' + + conda "bioconda::bedtools=2.30.0" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/bedtools:2.30.0--hc088bd4_0' : + 'quay.io/biocontainers/bedtools:2.30.0--hc088bd4_0' }" + + input: + tuple val(meta), path(bam) + + output: + tuple val(meta), path("*.bed"), emit: bed + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + """ + bedtools \\ + bamtobed \\ + $args \\ + -i $bam \\ + > ${prefix}.bed + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + bedtools: \$(bedtools --version | sed -e "s/bedtools v//g") + END_VERSIONS + """ +} diff --git a/modules/nf-core/bedtools/bamtobed/meta.yml b/modules/nf-core/bedtools/bamtobed/meta.yml new file mode 100644 index 00000000..5a4ff73a --- /dev/null +++ b/modules/nf-core/bedtools/bamtobed/meta.yml @@ -0,0 +1,38 @@ +name: bedtools_bamtobed +description: Converts a bam file to a bed12 file. +keywords: + - bam + - bed +tools: + - bedtools: + description: | + A set of tools for genomic analysis tasks, specifically enabling genome arithmetic (merge, count, complement) on various file types. + documentation: https://bedtools.readthedocs.io/en/latest/content/tools/complement.html + licence: ["MIT"] +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bam: + type: file + description: Input BAM file + pattern: "*.{bam}" +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bed: + type: file + description: Bed file containing genomic intervals. + pattern: "*.{bed}" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" +authors: + - "@yuukiiwa" + - "@drpatelh" diff --git a/modules/nf-core/bedtools/genomecov/main.nf b/modules/nf-core/bedtools/genomecov/main.nf new file mode 100644 index 00000000..17e38a8b --- /dev/null +++ b/modules/nf-core/bedtools/genomecov/main.nf @@ -0,0 +1,59 @@ +process BEDTOOLS_GENOMECOV { + tag "$meta.id" + label 'process_single' + + conda "bioconda::bedtools=2.30.0" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/bedtools:2.30.0--hc088bd4_0' : + 'quay.io/biocontainers/bedtools:2.30.0--hc088bd4_0' }" + + input: + tuple val(meta), path(intervals), val(scale) + path sizes + val extension + + output: + tuple val(meta), path("*.${extension}"), emit: genomecov + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def args_list = args.tokenize() + args += (scale > 0 && scale != 1) ? " -scale $scale" : "" + if (!args_list.contains('-bg') && (scale > 0 && scale != 1)) { + args += " -bg" + } + + def prefix = task.ext.prefix ?: "${meta.id}" + if (intervals.name =~ /\.bam/) { + """ + bedtools \\ + genomecov \\ + -ibam $intervals \\ + $args \\ + > ${prefix}.${extension} + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + bedtools: \$(bedtools --version | sed -e "s/bedtools v//g") + END_VERSIONS + """ + } else { + """ + bedtools \\ + genomecov \\ + -i $intervals \\ + -g $sizes \\ + $args \\ + > ${prefix}.${extension} + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + bedtools: \$(bedtools --version | sed -e "s/bedtools v//g") + END_VERSIONS + """ + } +} diff --git a/modules/nf-core/bedtools/genomecov/meta.yml b/modules/nf-core/bedtools/genomecov/meta.yml new file mode 100644 index 00000000..83bfab98 --- /dev/null +++ b/modules/nf-core/bedtools/genomecov/meta.yml @@ -0,0 +1,51 @@ +name: bedtools_genomecov +description: Computes histograms (default), per-base reports (-d) and BEDGRAPH (-bg) summaries of feature coverage (e.g., aligned sequences) for a given genome. +keywords: + - bed + - bam + - genomecov +tools: + - bedtools: + description: | + A set of tools for genomic analysis tasks, specifically enabling genome arithmetic (merge, count, complement) on various file types. + documentation: https://bedtools.readthedocs.io/en/latest/content/tools/genomecov.html + licence: ["MIT"] +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - intervals: + type: file + description: BAM/BED/GFF/VCF + pattern: "*.{bam|bed|gff|vcf}" + - scale: + type: value + description: Number containing the scale factor for the output. Set to 1 to disable. Setting to a value other than 1 will also get the -bg bedgraph output format as this is required for this command switch + - sizes: + type: file + description: Tab-delimited table of chromosome names in the first column and chromosome sizes in the second column + - extension: + type: string + description: Extension of the output file (e. g., ".bg", ".bedgraph", ".txt", ".tab", etc.) It is set arbitrarily by the user and corresponds to the file format which depends on arguments. +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - genomecov: + type: file + description: Computed genome coverage file + pattern: "*.${extension}" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" +authors: + - "@Emiller88" + - "@sruthipsuresh" + - "@drpatelh" + - "@sidorov-si" + - "@chris-cheshire" diff --git a/modules/nf-core/custom/dumpsoftwareversions/main.nf b/modules/nf-core/custom/dumpsoftwareversions/main.nf index 3df21765..800a6099 100644 --- a/modules/nf-core/custom/dumpsoftwareversions/main.nf +++ b/modules/nf-core/custom/dumpsoftwareversions/main.nf @@ -2,10 +2,10 @@ process CUSTOM_DUMPSOFTWAREVERSIONS { label 'process_single' // Requires `pyyaml` which does not have a dedicated container but is in the MultiQC container - conda "bioconda::multiqc=1.13" + conda "bioconda::multiqc=1.14" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/multiqc:1.13--pyhdfd78af_0' : - 'quay.io/biocontainers/multiqc:1.13--pyhdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/multiqc:1.14--pyhdfd78af_0' : + 'quay.io/biocontainers/multiqc:1.14--pyhdfd78af_0' }" input: path versions diff --git a/modules/nf-core/custom/getchromsizes/custom-getchromsizes.diff b/modules/nf-core/custom/getchromsizes/custom-getchromsizes.diff deleted file mode 100644 index 42e2ab1a..00000000 --- a/modules/nf-core/custom/getchromsizes/custom-getchromsizes.diff +++ /dev/null @@ -1,24 +0,0 @@ -Changes in module 'nf-core/custom/getchromsizes' ---- modules/nf-core/custom/getchromsizes/main.nf -+++ modules/nf-core/custom/getchromsizes/main.nf -@@ -8,13 +8,13 @@ - 'quay.io/biocontainers/samtools:1.16.1--h6899075_1' }" - - input: -- tuple val(meta), path(fasta) -+ path fasta - - output: -- tuple val(meta), path ("*.sizes"), emit: sizes -- tuple val(meta), path ("*.fai") , emit: fai -- tuple val(meta), path ("*.gzi") , emit: gzi, optional: true -- path "versions.yml" , emit: versions -+ path "*.sizes" , emit: sizes -+ path "*.fai" , emit: fai -+ path "*.gzi" , emit: gzi, optional: true -+ path "versions.yml" , emit: versions - - when: - task.ext.when == null || task.ext.when - -************************************************************ diff --git a/modules/nf-core/custom/getchromsizes/main.nf b/modules/nf-core/custom/getchromsizes/main.nf index 85ad9552..580f87fe 100644 --- a/modules/nf-core/custom/getchromsizes/main.nf +++ b/modules/nf-core/custom/getchromsizes/main.nf @@ -8,13 +8,13 @@ process CUSTOM_GETCHROMSIZES { 'quay.io/biocontainers/samtools:1.16.1--h6899075_1' }" input: - path fasta + tuple val(meta), path(fasta) output: - path "*.sizes" , emit: sizes - path "*.fai" , emit: fai - path "*.gzi" , emit: gzi, optional: true - path "versions.yml" , emit: versions + tuple val(meta), path ("*.sizes"), emit: sizes + tuple val(meta), path ("*.fai") , emit: fai + tuple val(meta), path ("*.gzi") , emit: gzi, optional: true + path "versions.yml" , emit: versions when: task.ext.when == null || task.ext.when diff --git a/modules/nf-core/deepvariant/main.nf b/modules/nf-core/deepvariant/main.nf new file mode 100644 index 00000000..7e11b766 --- /dev/null +++ b/modules/nf-core/deepvariant/main.nf @@ -0,0 +1,57 @@ +process DEEPVARIANT { + tag "$meta.id" + label 'process_medium' + + container "google/deepvariant:1.4.0" + + // Exit if running this module with -profile conda / -profile mamba + if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { + exit 1, "DEEPVARIANT module does not support Conda. Please use Docker / Singularity / Podman instead." + } + + input: + tuple val(meta), path(input), path(index), path(intervals) + path(fasta) + path(fai) + + output: + tuple val(meta), path("${prefix}.vcf.gz") , emit: vcf + tuple val(meta), path("${prefix}.g.vcf.gz"), emit: gvcf + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + prefix = task.ext.prefix ?: "${meta.id}" + def regions = intervals ? "--regions ${intervals}" : "" + + """ + /opt/deepvariant/bin/run_deepvariant \\ + --ref=${fasta} \\ + --reads=${input} \\ + --output_vcf=${prefix}.vcf.gz \\ + --output_gvcf=${prefix}.g.vcf.gz \\ + ${args} \\ + ${regions} \\ + --num_shards=${task.cpus} + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + deepvariant: \$(echo \$(/opt/deepvariant/bin/run_deepvariant --version) | sed 's/^.*version //; s/ .*\$//' ) + END_VERSIONS + """ + + stub: + prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}.vcf.gz + touch ${prefix}.g.vcf.gz + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + deepvariant: \$(echo \$(/opt/deepvariant/bin/run_deepvariant --version) | sed 's/^.*version //; s/ .*\$//' ) + END_VERSIONS + """ +} diff --git a/modules/nf-core/deepvariant/meta.yml b/modules/nf-core/deepvariant/meta.yml new file mode 100644 index 00000000..7ecb40f2 --- /dev/null +++ b/modules/nf-core/deepvariant/meta.yml @@ -0,0 +1,62 @@ +name: deepvariant +description: DeepVariant is an analysis pipeline that uses a deep neural network to call genetic variants from next-generation DNA sequencing data +keywords: + - variant calling + - machine learning +tools: + - deepvariant: + description: DeepVariant is an analysis pipeline that uses a deep neural network to call genetic variants from next-generation DNA sequencing data + homepage: https://github.com/google/deepvariant + documentation: https://github.com/google/deepvariant + tool_dev_url: https://github.com/google/deepvariant + doi: "10.1038/nbt.4235" + licence: ["BSD-3-clause"] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - input: + type: file + description: BAM/CRAM file + pattern: "*.bam/cram" + - index: + type: file + description: Index of BAM/CRAM file + pattern: "*.bai/crai" + - interval: + type: file + description: Interval file for targeted regions + pattern: "*.bed" + - fasta: + type: file + description: The reference fasta file + pattern: "*.fasta" + - fai: + type: file + description: Index of reference fasta file + pattern: "*.fai" + +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - vcf: + type: file + description: Compressed VCF file + pattern: "*.vcf.gz" + - gvcf: + type: file + description: Compressed GVCF file + pattern: "*.g.vcf.gz" + - version: + type: file + description: File containing software version + pattern: "*.{version.txt}" + +authors: + - "@abhi18av" diff --git a/modules/nf-core/minimap2/index/main.nf b/modules/nf-core/minimap2/index/main.nf index 5fc64e82..73dd4eef 100644 --- a/modules/nf-core/minimap2/index/main.nf +++ b/modules/nf-core/minimap2/index/main.nf @@ -8,11 +8,11 @@ process MINIMAP2_INDEX { 'quay.io/biocontainers/minimap2:2.24--h7132678_1' }" input: - path fasta + tuple val(meta), path(fasta) output: - path "*.mmi" , emit: index - path "versions.yml" , emit: versions + tuple val(meta), path("*.mmi"), emit: index + path "versions.yml" , emit: versions when: task.ext.when == null || task.ext.when diff --git a/modules/nf-core/minimap2/index/minimap2-index.diff b/modules/nf-core/minimap2/index/minimap2-index.diff deleted file mode 100644 index d5b50216..00000000 --- a/modules/nf-core/minimap2/index/minimap2-index.diff +++ /dev/null @@ -1,20 +0,0 @@ -Changes in module 'nf-core/minimap2/index' ---- modules/nf-core/minimap2/index/main.nf -+++ modules/nf-core/minimap2/index/main.nf -@@ -8,11 +8,11 @@ - 'quay.io/biocontainers/minimap2:2.24--h7132678_1' }" - - input: -- tuple val(meta), path(fasta) -+ path fasta - - output: -- tuple val(meta), path("*.mmi"), emit: index -- path "versions.yml" , emit: versions -+ path "*.mmi" , emit: index -+ path "versions.yml" , emit: versions - - when: - task.ext.when == null || task.ext.when - -************************************************************ diff --git a/modules/nf-core/multiqc/main.nf b/modules/nf-core/multiqc/main.nf deleted file mode 100644 index 4b604749..00000000 --- a/modules/nf-core/multiqc/main.nf +++ /dev/null @@ -1,53 +0,0 @@ -process MULTIQC { - label 'process_single' - - conda "bioconda::multiqc=1.14" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/multiqc:1.14--pyhdfd78af_0' : - 'quay.io/biocontainers/multiqc:1.14--pyhdfd78af_0' }" - - input: - path multiqc_files, stageAs: "?/*" - path(multiqc_config) - path(extra_multiqc_config) - path(multiqc_logo) - - output: - path "*multiqc_report.html", emit: report - path "*_data" , emit: data - path "*_plots" , optional:true, emit: plots - path "versions.yml" , emit: versions - - when: - task.ext.when == null || task.ext.when - - script: - def args = task.ext.args ?: '' - def config = multiqc_config ? "--config $multiqc_config" : '' - def extra_config = extra_multiqc_config ? "--config $extra_multiqc_config" : '' - """ - multiqc \\ - --force \\ - $args \\ - $config \\ - $extra_config \\ - . - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - multiqc: \$( multiqc --version | sed -e "s/multiqc, version //g" ) - END_VERSIONS - """ - - stub: - """ - touch multiqc_data - touch multiqc_plots - touch multiqc_report.html - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - multiqc: \$( multiqc --version | sed -e "s/multiqc, version //g" ) - END_VERSIONS - """ -} diff --git a/modules/nf-core/multiqc/meta.yml b/modules/nf-core/multiqc/meta.yml deleted file mode 100644 index ebc29b27..00000000 --- a/modules/nf-core/multiqc/meta.yml +++ /dev/null @@ -1,55 +0,0 @@ -name: MultiQC -description: Aggregate results from bioinformatics analyses across many samples into a single report -keywords: - - QC - - bioinformatics tools - - Beautiful stand-alone HTML report -tools: - - multiqc: - description: | - MultiQC searches a given directory for analysis logs and compiles a HTML report. - It's a general use tool, perfect for summarising the output from numerous bioinformatics tools. - homepage: https://multiqc.info/ - documentation: https://multiqc.info/docs/ - licence: ["GPL-3.0-or-later"] - -input: - - multiqc_files: - type: file - description: | - List of reports / files recognised by MultiQC, for example the html and zip output of FastQC - - multiqc_config: - type: file - description: Optional config yml for MultiQC - pattern: "*.{yml,yaml}" - - extra_multiqc_config: - type: file - description: Second optional config yml for MultiQC. Will override common sections in multiqc_config. - pattern: "*.{yml,yaml}" - - multiqc_logo: - type: file - description: Optional logo file for MultiQC - pattern: "*.{png}" - -output: - - report: - type: file - description: MultiQC report file - pattern: "multiqc_report.html" - - data: - type: dir - description: MultiQC data dir - pattern: "multiqc_data" - - plots: - type: file - description: Plots created by MultiQC - pattern: "*_data" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" -authors: - - "@abhi18av" - - "@bunop" - - "@drpatelh" - - "@jfy133" diff --git a/modules/local/qcat.nf b/modules/nf-core/qcat/main.nf similarity index 54% rename from modules/local/qcat.nf rename to modules/nf-core/qcat/main.nf index d26e7136..77d98e3d 100644 --- a/modules/local/qcat.nf +++ b/modules/nf-core/qcat/main.nf @@ -1,5 +1,5 @@ process QCAT { - tag "$input_path" + tag "$meta.id" label 'process_medium' conda "bioconda::qcat=1.1.0" @@ -8,34 +8,35 @@ process QCAT { 'quay.io/biocontainers/qcat:1.1.0--py_0' }" input: - path input_path + tuple val(meta), path(reads) + val barcode_kit output: - path "fastq/*.fastq.gz", emit: fastq - path "versions.yml" , emit: versions + tuple val(meta), path("fastq/*.fastq.gz"), emit: reads + path "versions.yml" , emit: versions when: task.ext.when == null || task.ext.when script: - def detect_middle = params.qcat_detect_middle ? "--detect-middle $params.qcat_detect_middle" : "" + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" """ ## Unzip fastq file - ## qcat doesnt support zipped files yet - FILE=$input_path + ## qcat doesn't support zipped files yet + FILE=$reads if [[ \$FILE == *.gz ]] then - zcat $input_path > unzipped.fastq - FILE=unzipped.fastq + zcat $reads > unzipped.fastq + FILE=unzipped.fastq fi - qcat \\ - -f \$FILE \\ - -b ./fastq \\ - --kit $params.barcode_kit \\ - --min-score $params.qcat_min_score \\ - $detect_middle - - ## Zip fastq files (cannot find pigz command) + + qcat \\ + -f \$FILE \\ + -b ./fastq \\ + --kit $barcode_kit + + ## Zip fastq files gzip fastq/* cat <<-END_VERSIONS > versions.yml diff --git a/modules/nf-core/untar/meta.yml b/modules/nf-core/qcat/meta.yml similarity index 51% rename from modules/nf-core/untar/meta.yml rename to modules/nf-core/qcat/meta.yml index ea7a3f38..97b9b884 100644 --- a/modules/nf-core/untar/meta.yml +++ b/modules/nf-core/qcat/meta.yml @@ -1,40 +1,40 @@ -name: untar -description: Extract files. +name: qcat +description: Demultiplexer for Nanopore samples keywords: - - untar - - uncompress + - demultiplex + tools: - - untar: + - qcat: description: | - Extract tar.gz files. - documentation: https://www.gnu.org/software/tar/manual/ - licence: ["GPL-3.0-or-later"] + A demultiplexer for Nanopore samples + homepage: https://github.com/nanoporetech/qcat + documentation: https://github.com/nanoporetech/qcat#qcat + licence: ["MPL-2.0"] input: - meta: type: map description: | Groovy Map containing sample information e.g. [ id:'test', single_end:false ] - - archive: + - reads: type: file - description: File to be untar - pattern: "*.{tar}.{gz}" + description: | + Non-demultiplexed fastq files + output: - meta: type: map description: | Groovy Map containing sample information e.g. [ id:'test', single_end:false ] - - untar: - type: directory - description: Directory containing contents of archive - pattern: "*/" + - reads: + type: file + description: Demultiplexed fastq samples + pattern: "*.fastq.gz" - versions: type: file description: File containing software versions pattern: "versions.yml" authors: - - "@joseespinosa" + - "@yuukiiwa" - "@drpatelh" - - "@matthdsm" - - "@jfy133" diff --git a/modules/nf-core/samtools/faidx/main.nf b/modules/nf-core/samtools/faidx/main.nf deleted file mode 100644 index ce6580d2..00000000 --- a/modules/nf-core/samtools/faidx/main.nf +++ /dev/null @@ -1,44 +0,0 @@ -process SAMTOOLS_FAIDX { - tag "$fasta" - label 'process_single' - - conda "bioconda::samtools=1.16.1" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/samtools:1.16.1--h6899075_1' : - 'quay.io/biocontainers/samtools:1.16.1--h6899075_1' }" - - input: - tuple val(meta), path(fasta) - - output: - tuple val(meta), path ("*.fai"), emit: fai - tuple val(meta), path ("*.gzi"), emit: gzi, optional: true - path "versions.yml" , emit: versions - - when: - task.ext.when == null || task.ext.when - - script: - def args = task.ext.args ?: '' - """ - samtools \\ - faidx \\ - $args \\ - $fasta - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') - END_VERSIONS - """ - - stub: - """ - touch ${fasta}.fai - cat <<-END_VERSIONS > versions.yml - - "${task.process}": - samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') - END_VERSIONS - """ -} diff --git a/modules/nf-core/samtools/faidx/meta.yml b/modules/nf-core/samtools/faidx/meta.yml deleted file mode 100644 index fe2fe9a1..00000000 --- a/modules/nf-core/samtools/faidx/meta.yml +++ /dev/null @@ -1,47 +0,0 @@ -name: samtools_faidx -description: Index FASTA file -keywords: - - index - - fasta -tools: - - samtools: - description: | - SAMtools is a set of utilities for interacting with and post-processing - short DNA sequence read alignments in the SAM, BAM and CRAM formats, written by Heng Li. - These files are generated as output by short read aligners like BWA. - homepage: http://www.htslib.org/ - documentation: http://www.htslib.org/doc/samtools.html - doi: 10.1093/bioinformatics/btp352 - licence: ["MIT"] -input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - fasta: - type: file - description: FASTA file - pattern: "*.{fa,fasta}" -output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - fai: - type: file - description: FASTA index file - pattern: "*.{fai}" - - gzi: - type: file - description: Optional gzip index file for compressed inputs - pattern: "*.gzi" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" -authors: - - "@drpatelh" - - "@ewels" - - "@phue" diff --git a/modules/nf-core/samtools/flagstat/meta.yml b/modules/nf-core/samtools/flagstat/meta.yml index 95269063..954225df 100644 --- a/modules/nf-core/samtools/flagstat/meta.yml +++ b/modules/nf-core/samtools/flagstat/meta.yml @@ -14,7 +14,7 @@ tools: short DNA sequence read alignments in the SAM, BAM and CRAM formats, written by Heng Li. These files are generated as output by short read aligners like BWA. homepage: http://www.htslib.org/ - documentation: hhttp://www.htslib.org/doc/samtools.html + documentation: http://www.htslib.org/doc/samtools.html doi: 10.1093/bioinformatics/btp352 licence: ["MIT"] input: diff --git a/modules/nf-core/samtools/idxstats/meta.yml b/modules/nf-core/samtools/idxstats/meta.yml index 3710ab88..dda87e1e 100644 --- a/modules/nf-core/samtools/idxstats/meta.yml +++ b/modules/nf-core/samtools/idxstats/meta.yml @@ -15,7 +15,7 @@ tools: short DNA sequence read alignments in the SAM, BAM and CRAM formats, written by Heng Li. These files are generated as output by short read aligners like BWA. homepage: http://www.htslib.org/ - documentation: hhttp://www.htslib.org/doc/samtools.html + documentation: http://www.htslib.org/doc/samtools.html doi: 10.1093/bioinformatics/btp352 licence: ["MIT"] input: diff --git a/modules/nf-core/samtools/index/meta.yml b/modules/nf-core/samtools/index/meta.yml index e5cadbc2..8bd2fa6f 100644 --- a/modules/nf-core/samtools/index/meta.yml +++ b/modules/nf-core/samtools/index/meta.yml @@ -12,7 +12,7 @@ tools: short DNA sequence read alignments in the SAM, BAM and CRAM formats, written by Heng Li. These files are generated as output by short read aligners like BWA. homepage: http://www.htslib.org/ - documentation: hhttp://www.htslib.org/doc/samtools.html + documentation: http://www.htslib.org/doc/samtools.html doi: 10.1093/bioinformatics/btp352 licence: ["MIT"] input: diff --git a/modules/nf-core/samtools/sort/meta.yml b/modules/nf-core/samtools/sort/meta.yml index 09289751..07328431 100644 --- a/modules/nf-core/samtools/sort/meta.yml +++ b/modules/nf-core/samtools/sort/meta.yml @@ -12,7 +12,7 @@ tools: short DNA sequence read alignments in the SAM, BAM and CRAM formats, written by Heng Li. These files are generated as output by short read aligners like BWA. homepage: http://www.htslib.org/ - documentation: hhttp://www.htslib.org/doc/samtools.html + documentation: http://www.htslib.org/doc/samtools.html doi: 10.1093/bioinformatics/btp352 licence: ["MIT"] input: diff --git a/modules/nf-core/samtools/stats/meta.yml b/modules/nf-core/samtools/stats/meta.yml index cac50b1c..1d68a5d8 100644 --- a/modules/nf-core/samtools/stats/meta.yml +++ b/modules/nf-core/samtools/stats/meta.yml @@ -13,7 +13,7 @@ tools: short DNA sequence read alignments in the SAM, BAM and CRAM formats, written by Heng Li. These files are generated as output by short read aligners like BWA. homepage: http://www.htslib.org/ - documentation: hhttp://www.htslib.org/doc/samtools.html + documentation: http://www.htslib.org/doc/samtools.html doi: 10.1093/bioinformatics/btp352 licence: ["MIT"] input: @@ -23,13 +23,13 @@ input: Groovy Map containing sample information e.g. [ id:'test', single_end:false ] - input: - type: file - description: BAM/CRAM file from alignment - pattern: "*.{bam,cram}" + type: file + description: BAM/CRAM file from alignment + pattern: "*.{bam,cram}" - input_index: - type: file - description: BAI/CRAI file from alignment - pattern: "*.{bai,crai}" + type: file + description: BAI/CRAI file from alignment + pattern: "*.{bai,crai}" - fasta: type: optional file description: Reference file the CRAM was created with diff --git a/modules/nf-core/samtools/view/main.nf b/modules/nf-core/samtools/view/main.nf new file mode 100644 index 00000000..729c85e5 --- /dev/null +++ b/modules/nf-core/samtools/view/main.nf @@ -0,0 +1,66 @@ +process SAMTOOLS_VIEW { + tag "$meta.id" + label 'process_low' + + conda "bioconda::samtools=1.16.1" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/samtools:1.16.1--h6899075_1' : + 'quay.io/biocontainers/samtools:1.16.1--h6899075_1' }" + + input: + tuple val(meta), path(input), path(index) + path fasta + path qname + + output: + tuple val(meta), path("*.bam"), emit: bam, optional: true + tuple val(meta), path("*.cram"), emit: cram, optional: true + tuple val(meta), path("*.sam"), emit: sam, optional: true + tuple val(meta), path("*.bai"), emit: bai, optional: true + tuple val(meta), path("*.csi"), emit: csi, optional: true + tuple val(meta), path("*.crai"), emit: crai, optional: true + path "versions.yml", emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def args2 = task.ext.args2 ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + def reference = fasta ? "--reference ${fasta}" : "" + def readnames = qname ? "--qname-file ${qname}": "" + def file_type = args.contains("--output-fmt sam") ? "sam" : + args.contains("--output-fmt bam") ? "bam" : + args.contains("--output-fmt cram") ? "cram" : + input.getExtension() + if ("$input" == "${prefix}.${file_type}") error "Input and output names are the same, use \"task.ext.prefix\" to disambiguate!" + """ + samtools \\ + view \\ + --threads ${task.cpus-1} \\ + ${reference} \\ + ${readnames} \\ + $args \\ + -o ${prefix}.${file_type} \\ + $input \\ + $args2 + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') + END_VERSIONS + """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}.bam + touch ${prefix}.cram + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') + END_VERSIONS + """ +} diff --git a/modules/nf-core/samtools/view/meta.yml b/modules/nf-core/samtools/view/meta.yml new file mode 100644 index 00000000..2e597d34 --- /dev/null +++ b/modules/nf-core/samtools/view/meta.yml @@ -0,0 +1,79 @@ +name: samtools_view +description: filter/convert SAM/BAM/CRAM file +keywords: + - view + - bam + - sam + - cram +tools: + - samtools: + description: | + SAMtools is a set of utilities for interacting with and post-processing + short DNA sequence read alignments in the SAM, BAM and CRAM formats, written by Heng Li. + These files are generated as output by short read aligners like BWA. + homepage: http://www.htslib.org/ + documentation: http://www.htslib.org/doc/samtools.html + doi: 10.1093/bioinformatics/btp352 + licence: ["MIT"] +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - input: + type: file + description: BAM/CRAM/SAM file + pattern: "*.{bam,cram,sam}" + - index: + type: optional file + description: BAM.BAI/CRAM.CRAI file + pattern: "*.{.bai,.crai}" + - fasta: + type: optional file + description: Reference file the CRAM was created with + pattern: "*.{fasta,fa}" + - qname: + type: file + description: Optional file with read names to output only select alignments + pattern: "*.{txt,list}" +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bam: + type: file + description: optional filtered/converted BAM file + pattern: "*.{bam}" + - cram: + type: file + description: optional filtered/converted CRAM file + pattern: "*.{cram}" + - sam: + type: file + description: optional filtered/converted SAM file + pattern: "*.{sam}" + # bai, csi, and crai are created with `--write-index` + - bai: + type: file + description: optional BAM file index + pattern: "*.{bai}" + - csi: + type: file + description: optional tabix BAM file index + pattern: "*.{csi}" + - crai: + type: file + description: optional CRAM file index + pattern: "*.{crai}" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" +authors: + - "@drpatelh" + - "@joseespinosa" + - "@FriederikeHanssen" + - "@priyanka-surana" diff --git a/modules/nf-core/stringtie/stringtie/main.nf b/modules/nf-core/stringtie/stringtie/main.nf new file mode 100644 index 00000000..2d5b035f --- /dev/null +++ b/modules/nf-core/stringtie/stringtie/main.nf @@ -0,0 +1,68 @@ +process STRINGTIE_STRINGTIE { + tag "$meta.id" + label 'process_medium' + + conda "bioconda::stringtie=2.2.1" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/stringtie:2.2.1--hecb563c_2' : + 'quay.io/biocontainers/stringtie:2.2.1--hecb563c_2' }" + + input: + tuple val(meta), path(bam) + path annotation_gtf + + output: + tuple val(meta), path("*.transcripts.gtf"), emit: transcript_gtf + tuple val(meta), path("*.abundance.txt") , emit: abundance + tuple val(meta), path("*.coverage.gtf") , optional: true, emit: coverage_gtf + tuple val(meta), path("*.ballgown") , optional: true, emit: ballgown + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + def reference = annotation_gtf ? "-G $annotation_gtf" : "" + def ballgown = annotation_gtf ? "-b ${prefix}.ballgown" : "" + def coverage = annotation_gtf ? "-C ${prefix}.coverage.gtf" : "" + + def strandedness = '' + if (meta.strandedness == 'forward') { + strandedness = '--fr' + } else if (meta.strandedness == 'reverse') { + strandedness = '--rf' + } + """ + stringtie \\ + $bam \\ + $strandedness \\ + $reference \\ + -o ${prefix}.transcripts.gtf \\ + -A ${prefix}.gene.abundance.txt \\ + $coverage \\ + $ballgown \\ + -p $task.cpus \\ + $args + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + stringtie: \$(stringtie --version 2>&1) + END_VERSIONS + """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}.transcripts.gtf + touch ${prefix}.gene.abundance.txt + touch ${prefix}.coverage.gtf + touch ${prefix}.ballgown + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + stringtie: \$(stringtie --version 2>&1) + END_VERSIONS + """ +} diff --git a/modules/nf-core/stringtie/stringtie/meta.yml b/modules/nf-core/stringtie/stringtie/meta.yml new file mode 100644 index 00000000..75518470 --- /dev/null +++ b/modules/nf-core/stringtie/stringtie/meta.yml @@ -0,0 +1,57 @@ +name: stringtie_stringtie +description: Transcript assembly and quantification for RNA-Se +keywords: + - transcript + - assembly + - quantification + - gtf + +tools: + - stringtie2: + description: | + Transcript assembly and quantification for RNA-Seq + homepage: https://ccb.jhu.edu/software/stringtie/index.shtml + documentation: https://ccb.jhu.edu/software/stringtie/index.shtml?t=manual + licence: ["MIT"] +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bam: + type: file + description: | + Stringtie transcript gtf output(s). + - annotation_gtf: + type: file + description: | + Annotation gtf file (optional). +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - transcript_gtf: + type: file + description: transcript gtf + pattern: "*.{transcripts.gtf}" + - coverage_gtf: + type: file + description: coverage gtf + pattern: "*.{coverage.gtf}" + - abudance: + type: file + description: abudance + pattern: "*.{abudance.txt}" + - ballgown: + type: file + description: for running ballgown + pattern: "*.{ballgown}" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" +authors: + - "@drpatelh" diff --git a/modules/nf-core/subread/featurecounts/main.nf b/modules/nf-core/subread/featurecounts/main.nf new file mode 100644 index 00000000..cbc833fe --- /dev/null +++ b/modules/nf-core/subread/featurecounts/main.nf @@ -0,0 +1,47 @@ +process SUBREAD_FEATURECOUNTS { + tag "$meta.id" + label 'process_medium' + + conda "bioconda::subread=2.0.1" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/subread:2.0.1--hed695b0_0' : + 'quay.io/biocontainers/subread:2.0.1--hed695b0_0' }" + + input: + tuple val(meta), path(bams), path(annotation) + + output: + tuple val(meta), path("*featureCounts.txt") , emit: counts + tuple val(meta), path("*featureCounts.txt.summary"), emit: summary + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + def paired_end = meta.single_end ? '' : '-p' + + def strandedness = 0 + if (meta.strandedness == 'forward') { + strandedness = 1 + } else if (meta.strandedness == 'reverse') { + strandedness = 2 + } + """ + featureCounts \\ + $args \\ + $paired_end \\ + -T $task.cpus \\ + -a $annotation \\ + -s $strandedness \\ + -o ${prefix}.featureCounts.txt \\ + ${bams.join(' ')} + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + subread: \$( echo \$(featureCounts -v 2>&1) | sed -e "s/featureCounts v//g") + END_VERSIONS + """ +} diff --git a/modules/nf-core/subread/featurecounts/meta.yml b/modules/nf-core/subread/featurecounts/meta.yml new file mode 100644 index 00000000..cf02f1ea --- /dev/null +++ b/modules/nf-core/subread/featurecounts/meta.yml @@ -0,0 +1,52 @@ +name: subread_featurecounts +description: Count reads that map to genomic features +keywords: + - counts + - fasta + - genome + - reference + +tools: + - featurecounts: + description: featureCounts is a highly efficient general-purpose read summarization program that counts mapped reads for genomic features such as genes, exons, promoter, gene bodies, genomic bins and chromosomal locations. It can be used to count both RNA-seq and genomic DNA-seq reads. + homepage: http://bioinf.wehi.edu.au/featureCounts/ + documentation: http://bioinf.wehi.edu.au/subread-package/SubreadUsersGuide.pdf + doi: "10.1093/bioinformatics/btt656" + licence: ["GPL v3"] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bam: + type: file + description: BAM/SAM file containing read alignments + pattern: "*.{bam}" + - annotation: + type: file + description: Genomic features annotation in GTF or SAF + pattern: "*.{gtf,saf}" + +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - counts: + type: file + description: Counts of reads mapping to features + pattern: "*featureCounts.txt" + - summary: + type: file + description: Summary log file + pattern: "*.featureCounts.txt.summary" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + +authors: + - "@ntoda03" diff --git a/modules/nf-core/tabix/bgziptabix/main.nf b/modules/nf-core/tabix/bgziptabix/main.nf deleted file mode 100644 index d3a3bbff..00000000 --- a/modules/nf-core/tabix/bgziptabix/main.nf +++ /dev/null @@ -1,45 +0,0 @@ -process TABIX_BGZIPTABIX { - tag "$meta.id" - label 'process_single' - - conda "bioconda::tabix=1.11" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/tabix:1.11--hdfd78af_0' : - 'quay.io/biocontainers/tabix:1.11--hdfd78af_0' }" - - input: - tuple val(meta), path(input) - - output: - tuple val(meta), path("*.gz"), path("*.tbi"), emit: gz_tbi - path "versions.yml" , emit: versions - - when: - task.ext.when == null || task.ext.when - - script: - def args = task.ext.args ?: '' - def args2 = task.ext.args2 ?: '' - def prefix = task.ext.prefix ?: "${meta.id}" - """ - bgzip --threads ${task.cpus} -c $args $input > ${prefix}.${input.getExtension()}.gz - tabix $args2 ${prefix}.${input.getExtension()}.gz - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - tabix: \$(echo \$(tabix -h 2>&1) | sed 's/^.*Version: //; s/ .*\$//') - END_VERSIONS - """ - - stub: - def prefix = task.ext.prefix ?: "${meta.id}" - """ - touch ${prefix}.gz - touch ${prefix}.gz.tbi - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - tabix: \$(echo \$(tabix -h 2>&1) | sed 's/^.*Version: //; s/ .*\$//') - END_VERSIONS - """ -} diff --git a/modules/nf-core/tabix/bgziptabix/meta.yml b/modules/nf-core/tabix/bgziptabix/meta.yml deleted file mode 100644 index 49c03289..00000000 --- a/modules/nf-core/tabix/bgziptabix/meta.yml +++ /dev/null @@ -1,45 +0,0 @@ -name: tabix_bgziptabix -description: bgzip a sorted tab-delimited genome file and then create tabix index -keywords: - - bgzip - - compress - - index - - tabix - - vcf -tools: - - tabix: - description: Generic indexer for TAB-delimited genome position files. - homepage: https://www.htslib.org/doc/tabix.html - documentation: https://www.htslib.org/doc/tabix.1.html - doi: 10.1093/bioinformatics/btq671 - licence: ["MIT"] -input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - tab: - type: file - description: TAB-delimited genome position file - pattern: "*.{bed,gff,sam,vcf}" -output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - gz: - type: file - description: Output compressed file - pattern: "*.{gz}" - - tbi: - type: file - description: tabix index file - pattern: "*.{gz.tbi}" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" -authors: - - "@maxulysse" diff --git a/modules/nf-core/ucsc/bedgraphtobigwig/main.nf b/modules/nf-core/ucsc/bedgraphtobigwig/main.nf new file mode 100644 index 00000000..defda3ef --- /dev/null +++ b/modules/nf-core/ucsc/bedgraphtobigwig/main.nf @@ -0,0 +1,37 @@ +process UCSC_BEDGRAPHTOBIGWIG { + tag "$meta.id" + label 'process_single' + + // WARN: Version information not provided by tool on CLI. Please update version string below when bumping container versions. + conda "bioconda::ucsc-bedgraphtobigwig=377" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/ucsc-bedgraphtobigwig:377--h446ed27_1' : + 'quay.io/biocontainers/ucsc-bedgraphtobigwig:377--h446ed27_1' }" + + input: + tuple val(meta), path(bedgraph) + path sizes + + output: + tuple val(meta), path("*.bigWig"), emit: bigwig + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + def VERSION = '377' // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions. + """ + bedGraphToBigWig \\ + $bedgraph \\ + $sizes \\ + ${prefix}.bigWig + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + ucsc: $VERSION + END_VERSIONS + """ +} diff --git a/modules/nf-core/ucsc/bedgraphtobigwig/meta.yml b/modules/nf-core/ucsc/bedgraphtobigwig/meta.yml new file mode 100755 index 00000000..ba8915be --- /dev/null +++ b/modules/nf-core/ucsc/bedgraphtobigwig/meta.yml @@ -0,0 +1,44 @@ +name: ucsc_bedgraphtobigwig +description: Convert a bedGraph file to bigWig format. +keywords: + - bedgraph + - bigwig +tools: + - ucsc: + description: Convert a bedGraph file to bigWig format. + homepage: http://hgdownload.cse.ucsc.edu/admin/exe/ + documentation: https://genome.ucsc.edu/goldenPath/help/bigWig.html + licence: ["varies; see http://genome.ucsc.edu/license"] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bedgraph: + type: file + description: bedGraph file + pattern: "*.{bedGraph}" + - sizes: + type: file + description: chromosome sizes file + pattern: "*.{sizes}" + +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + - bigwig: + type: file + description: bigWig file + pattern: "*.{bigWig}" + +authors: + - "@drpatelh" diff --git a/modules/nf-core/ucsc/bedtobigbed/main.nf b/modules/nf-core/ucsc/bedtobigbed/main.nf new file mode 100644 index 00000000..efa62f9a --- /dev/null +++ b/modules/nf-core/ucsc/bedtobigbed/main.nf @@ -0,0 +1,41 @@ +process UCSC_BEDTOBIGBED { + tag "$meta.id" + label 'process_single' + + // WARN: Version information not provided by tool on CLI. Please update version string below when bumping container versions. + conda "bioconda::ucsc-bedtobigbed=377" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/ucsc-bedtobigbed:377--ha8a8165_3' : + 'quay.io/biocontainers/ucsc-bedtobigbed:377--ha8a8165_3' }" + + input: + tuple val(meta), path(bed) + path sizes + path autosql + + output: + tuple val(meta), path("*.bigBed"), emit: bigbed + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + def as_option = autosql ? "-as=${autosql}" : "" + def VERSION = '377' // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions. + """ + bedToBigBed \\ + $bed \\ + $sizes \\ + $as_option \\ + $args \\ + ${prefix}.bigBed + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + ucsc: $VERSION + END_VERSIONS + """ +} diff --git a/modules/nf-core/ucsc/bedtobigbed/meta.yml b/modules/nf-core/ucsc/bedtobigbed/meta.yml new file mode 100755 index 00000000..babb220d --- /dev/null +++ b/modules/nf-core/ucsc/bedtobigbed/meta.yml @@ -0,0 +1,48 @@ +name: ucsc_bedtobigbed +description: Convert file from bed to bigBed format +keywords: + - bed + - bigbed +tools: + - ucsc: + description: Convert file from bed to bigBed format + homepage: http://hgdownload.cse.ucsc.edu/admin/exe/ + documentation: https://genome.ucsc.edu/goldenPath/help/bigBed.html + licence: ["varies; see http://genome.ucsc.edu/license"] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bed: + type: file + description: bed file + pattern: "*.{bed}" + - sizes: + type: file + description: chromosome sizes file + pattern: "*.{sizes}" + - autosql: + type: file + description: autoSql file to describe the columns of the BED file + pattern: "*.{as}" + +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + - bigbed: + type: file + description: bigBed file + pattern: "*.{bigBed}" + +authors: + - "@drpatelh" diff --git a/modules/nf-core/untar/main.nf b/modules/nf-core/untar/main.nf deleted file mode 100644 index 3384847a..00000000 --- a/modules/nf-core/untar/main.nf +++ /dev/null @@ -1,63 +0,0 @@ -process UNTAR { - tag "$archive" - label 'process_single' - - conda "conda-forge::sed=4.7 bioconda::grep=3.4 conda-forge::tar=1.34" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/ubuntu:20.04' : - 'ubuntu:20.04' }" - - input: - tuple val(meta), path(archive) - - output: - tuple val(meta), path("$prefix"), emit: untar - path "versions.yml" , emit: versions - - when: - task.ext.when == null || task.ext.when - - script: - def args = task.ext.args ?: '' - def args2 = task.ext.args2 ?: '' - prefix = task.ext.prefix ?: ( meta.id ? "${meta.id}" : archive.baseName.toString().replaceFirst(/\.tar$/, "")) - - """ - mkdir $prefix - - ## Ensures --strip-components only applied when top level of tar contents is a directory - ## If just files or multiple directories, place all in prefix - if [[ \$(tar -taf ${archive} | grep -o -P "^.*?\\/" | uniq | wc -l) -eq 1 ]]; then - tar \\ - -C $prefix --strip-components 1 \\ - -xavf \\ - $args \\ - $archive \\ - $args2 - else - tar \\ - -C $prefix \\ - -xavf \\ - $args \\ - $archive \\ - $args2 - fi - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - untar: \$(echo \$(tar --version 2>&1) | sed 's/^.*(GNU tar) //; s/ Copyright.*\$//') - END_VERSIONS - """ - - stub: - prefix = task.ext.prefix ?: ( meta.id ? "${meta.id}" : archive.toString().replaceFirst(/\.[^\.]+(.gz)?$/, "")) - """ - mkdir $prefix - touch ${prefix}/file.txt - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - untar: \$(echo \$(tar --version 2>&1) | sed 's/^.*(GNU tar) //; s/ Copyright.*\$//') - END_VERSIONS - """ -} diff --git a/subworkflows/local/align_graphmap2.nf b/subworkflows/local/align_graphmap2.nf index 50909436..92f594d6 100644 --- a/subworkflows/local/align_graphmap2.nf +++ b/subworkflows/local/align_graphmap2.nf @@ -2,38 +2,76 @@ * Alignment with GRAPHMAP2 */ -include { GRAPHMAP2_INDEX } from '../../modules/local/graphmap2_index' -include { GRAPHMAP2_ALIGN } from '../../modules/local/graphmap2_align' +include { GRAPHMAP2_INDEX } from '../../modules/nf-core/graphmap2/index/main' +include { GRAPHMAP2_ALIGN } from '../../modules/nf-core/graphmap2/align/main' +include { SAMTOOLS_VIEW } from '../../modules/nf-core/samtools/view/main' +include { SAMTOOLS_SORT } from '../../modules/nf-core/samtools/sort/main' +include { SAMTOOLS_INDEX } from '../../modules/nf-core/samtools/index/main' +include { BAM_STATS_SAMTOOLS } from '../../subworkflows/nf-core/bam_stats_samtools/main' workflow ALIGN_GRAPHMAP2 { take: - ch_fasta_index // channel: [ val(meta), [ reads ] ] + ch_fasta ch_fastq main: /* * Create genome/transcriptome index */ - GRAPHMAP2_INDEX ( ch_fasta_index ) - ch_index = GRAPHMAP2_INDEX.out.index + ch_fasta + .map { it -> it[1] } + .set { ch_fasta } + GRAPHMAP2_INDEX ( ch_fasta ) + ch_graphmap_index = GRAPHMAP2_INDEX.out.index graphmap2_version = GRAPHMAP2_INDEX.out.versions - ch_index - .cross(ch_fastq) { it -> it[-1] } - .flatten() - .collate(12) // [fasta, fasta sizes, gtf, bed, fasta_index, annotation_string, meta, fastq, fasta, gtf, is_transcript, fasta_gtf_string] - .map { it -> [ it[6], it[7], it[0], it[1], it[2], it[3], it[10], it[4] ] } // [ sample, fastq, fasta, sizes, gtf, bed, is_transcripts, index ] - .set { ch_index } - /* * Map reads with GRAPHMAP2 */ + ch_fastq + .map { it -> [ it[0], it[1] ] } + .set { ch_alignment_input } + ch_alignment_input + .combine (ch_fasta) + .map { it -> it[2] } + .set { ch_reference } + ch_alignment_input + .combine (ch_graphmap_index) + .map { it -> it[2] } + .set { ch_reference_index } + + GRAPHMAP2_ALIGN ( ch_alignment_input, ch_reference, ch_reference_index ) + GRAPHMAP2_ALIGN.out.sam + .map { it -> [ it[0], it[1], [] ] } + .set { ch_samtools_input } + ch_samtools_input + .map { it -> it[2] } + .set { ch_notneeded_fasta } + ch_samtools_input + .map { it -> it[2] } + .set { ch_notneeded_qname } + SAMTOOLS_VIEW ( ch_samtools_input, ch_notneeded_fasta, ch_notneeded_qname ) + SAMTOOLS_SORT ( SAMTOOLS_VIEW.out.bam ) + ch_sorted_bam = SAMTOOLS_SORT.out.bam + SAMTOOLS_INDEX ( ch_sorted_bam ) + ch_sorted_bai = SAMTOOLS_INDEX.out.bai + samtools_version=SAMTOOLS_INDEX.out.versions - GRAPHMAP2_ALIGN ( ch_index ) - ch_align_sam = GRAPHMAP2_ALIGN.out.align_sam + ch_sorted_bam + .join(ch_sorted_bai, by: 0) + .set { ch_bam_bai } + BAM_STATS_SAMTOOLS ( ch_bam_bai, ch_fasta ) + ch_stats = BAM_STATS_SAMTOOLS.out.stats + ch_flagstat = BAM_STATS_SAMTOOLS.out.flagstat + ch_idxstats = BAM_STATS_SAMTOOLS.out.idxstats emit: - ch_index + ch_graphmap_index graphmap2_version - ch_align_sam + ch_sorted_bam + ch_sorted_bai + samtools_version + ch_stats + ch_flagstat + ch_idxstats } diff --git a/subworkflows/local/align_minimap2.nf b/subworkflows/local/align_minimap2.nf index c05c1c6a..247aeaf5 100644 --- a/subworkflows/local/align_minimap2.nf +++ b/subworkflows/local/align_minimap2.nf @@ -2,83 +2,63 @@ * Alignment with MINIMAP2 */ -include { MINIMAP2_INDEX as MINIMAP2_INDEX_VARIANT } from '../../modules/nf-core/minimap2/index/main' -include { MINIMAP2_ALIGN as MINIMAP2_ALIGN_VARIANT } from '../../modules/nf-core/minimap2/align/main' -//include { MINIMAP2_INDEX as MINIMAP2_INDEX_SPLICE } from '../../modules/nf-core/minimap2/index/main' -//include { MINIMAP2_ALIGN as MINIMAP2_ALIGN_SPLICE } from '../../modules/nf-core/minimap2/align/main' -include { SAMTOOLS_INDEX } from '../../modules/nf-core/samtools/index/main' -include { BAM_STATS_SAMTOOLS } from '../../subworkflows/nf-core/bam_stats_samtools/main' - +include { MINIMAP2_INDEX } from '../../modules/nf-core/minimap2/index/main' +include { MINIMAP2_ALIGN } from '../../modules/nf-core/minimap2/align/main' +include { SAMTOOLS_INDEX } from '../../modules/nf-core/samtools/index/main' +include { BAM_STATS_SAMTOOLS } from '../../subworkflows/nf-core/bam_stats_samtools/main' workflow ALIGN_MINIMAP2 { take: - ch_fasta // channel: [ path fasta ] - ch_sizes // channel: [ path sizes ] - ch_gtf // channel: [ path gtf ] - ch_bed // channel: [ path bed ] - ch_fastq // channel: [ val(meta), path(fastq) ] + ch_fasta + ch_fastq main: - - ch_versions = Channel.empty() - - if (params.protocol == "DNA") { - - /* - * Create genome/transcriptome index for variant calling with MINIMAP2 - */ - MINIMAP2_INDEX_VARIANT (ch_fasta) - ch_index = MINIMAP2_INDEX_VARIANT.out.index - ch_versions = ch_versions.mix(MINIMAP2_INDEX_VARIANT.out.versions) - - /* - * Map reads with MINIMAP2 - */ - MINIMAP2_ALIGN_VARIANT (ch_fastq, ch_fasta, true, false, false) - ch_bam = MINIMAP2_ALIGN_VARIANT.out.bam // channel: [ val (meta) , path (bam) ] ] - ch_versions = ch_versions.mix(MINIMAP2_ALIGN_VARIANT.out.versions) - } - - //if (params.protocol == 'cDNA' || params.protocol == 'directRNA') { - - /* - * Create genome/transcriptome index for splice variant calling - */ - //MINIMAP2_INDEX_SPLICE (ch_fasta) - //ch_index = MINIMAP2_INDEX_SPLICE.out.index - //ch_versions = ch_versions.mix(MINIMAP2_INDEX_SPLICE.out.versions) - - /* - * Map reads with MINIMAP2 - */ - //MINIMAP2_ALIGN (ch_fastq, ch_fasta, ch_index, ch_bed) - //ch_bam = MINIMAP2_ALIGN.out.bam - //ch_versions = ch_versions.mix(MINIMAP2_ALIGN.out.versions) - - //} - /* - * Index mapped reads with SAMTOOLS - */ - SAMTOOLS_INDEX(ch_bam) - ch_bai = SAMTOOLS_INDEX.out.bai // channel: [ val (meta) , path (bai) ] ] - ch_versions = ch_versions.mix(SAMTOOLS_INDEX.out.versions) + * Create genome/transcriptome index + */ + MINIMAP2_INDEX ( ch_fasta ) + ch_minimap_index = MINIMAP2_INDEX.out.index + minimap2_version = MINIMAP2_INDEX.out.versions + ch_fasta + .map { it -> it[1] } + .set { ch_fasta } - ch_bam - .join(ch_bai, by: 0) - .set{ ch_bam_bai } - - BAM_STATS_SAMTOOLS(ch_bam_bai, ch_fasta) - ch_stats = BAM_STATS_SAMTOOLS.out.stats // channel: [ val(meta), [ stats ] ] - ch_flagstat = BAM_STATS_SAMTOOLS.out.flagstat // channel: [ val(meta), [ flagstat ] ] - ch_idxstats = BAM_STATS_SAMTOOLS.out.idxstats // channel: [ val(meta), [ idxstats ] ] - ch_versions = ch_versions.mix(BAM_STATS_SAMTOOLS.out.versions) + /* + * Map reads with MINIMAP2 + */ + ch_fastq + .map { it -> [ it[0], it[1] ] } + .set { ch_alignment_input } + ch_alignment_input + .combine ( ch_minimap_index ) + .map { it -> it[3] } + .set { ch_reference } + bam_format = true + cigar_paf_format = false + cigar_bam = false + MINIMAP2_ALIGN ( ch_alignment_input, ch_reference, bam_format, cigar_paf_format, cigar_bam ) + ch_sorted_bam = MINIMAP2_ALIGN.out.bam + + SAMTOOLS_INDEX ( ch_sorted_bam ) + ch_sorted_bai = SAMTOOLS_INDEX.out.bai + samtools_version = SAMTOOLS_INDEX.out.versions + + ch_sorted_bam + .join(ch_sorted_bai, by: 0) + .set { ch_bam_bai } + BAM_STATS_SAMTOOLS ( ch_bam_bai, ch_fasta ) + ch_stats = BAM_STATS_SAMTOOLS.out.stats + ch_flagstat = BAM_STATS_SAMTOOLS.out.flagstat + ch_idxstats = BAM_STATS_SAMTOOLS.out.idxstats emit: - ch_index - ch_bam_bai + ch_minimap_index + minimap2_version + ch_sorted_bam + ch_sorted_bai + samtools_version ch_stats ch_flagstat ch_idxstats - ch_versions } + diff --git a/subworkflows/local/bam_sort_index_samtools.nf b/subworkflows/local/bam_sort_index_samtools.nf deleted file mode 100644 index eb0ab0f7..00000000 --- a/subworkflows/local/bam_sort_index_samtools.nf +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Sort, index BAM file and run samtools stats, flagstat and idxstats - */ - -include { SAMTOOLS_VIEW_BAM } from '../../modules/local/samtools_view_bam' -include { SAMTOOLS_SORT } from '../../modules/nf-core/samtools/sort/main' -include { SAMTOOLS_INDEX } from '../../modules/nf-core/samtools/index/main' -include { SAMTOOLS_SORT_INDEX } from '../../modules/local/samtools_sort_index' -include { BAM_STATS_SAMTOOLS } from '../../subworkflows/nf-core/bam_stats_samtools' - -workflow BAM_SORT_INDEX_SAMTOOLS { - take: - ch_sam // channel: [ val(meta), [ bam ] ] - call_variants - ch_fasta - - main: - /* - * Sam to bam conversion - */ - SAMTOOLS_VIEW_BAM ( ch_sam ) - if ( call_variants ) { - SAMTOOLS_SORT_INDEX ( SAMTOOLS_VIEW_BAM.out.bam ) - ch_sam - .join( SAMTOOLS_SORT_INDEX.out.bam_bai ) - .map { it -> [ it[0], it[1], it[2], it[4], it[5] ] } - .set { sortbam } - BAM_STATS_SAMTOOLS ( SAMTOOLS_SORT_INDEX.out.bam_bai, ch_fasta ) - } else { - SAMTOOLS_SORT ( SAMTOOLS_VIEW_BAM.out.bam ) - SAMTOOLS_INDEX ( SAMTOOLS_SORT.out.bam ) - ch_sam - .join( SAMTOOLS_SORT.out.bam ) - .join( SAMTOOLS_INDEX.out.bai ) - .map { it -> [ it[0], it[1], it[2], it[4], it[5] ] } - .set { sortbam } - BAM_STATS_SAMTOOLS ( SAMTOOLS_SORT.out.bam.join(SAMTOOLS_INDEX.out.bai, by: [0]), ch_fasta ) - } - - /* - * SUBWORKFLOW: Create stats using samtools - */ - BAM_STATS_SAMTOOLS.out.stats - .join ( BAM_STATS_SAMTOOLS.out.idxstats ) - .join ( BAM_STATS_SAMTOOLS.out.flagstat ) - .map { it -> [ it[1], it[2], it[3] ] } - .set { sortbam_stats_multiqc } - samtools_versions = BAM_STATS_SAMTOOLS.out.versions - - emit: - sortbam - sortbam_stats_multiqc - samtools_versions -} diff --git a/subworkflows/local/bedtools_ucsc_bigbed.nf b/subworkflows/local/bedtools_ucsc_bigbed.nf index 0a8d94b3..51f74b84 100644 --- a/subworkflows/local/bedtools_ucsc_bigbed.nf +++ b/subworkflows/local/bedtools_ucsc_bigbed.nf @@ -2,30 +2,35 @@ * Convert BAM to BigBed */ -include { BEDTOOLS_BAMBED } from '../../modules/local/bedtools_bamtobed' -include { UCSC_BED12TOBIGBED } from '../../modules/local/ucsc_bed12tobigbed' +include { BEDTOOLS_BAMTOBED } from '../../modules/nf-core/bedtools/bamtobed/main' +include { UCSC_BEDTOBIGBED } from '../../modules/nf-core/ucsc/bedtobigbed/main' workflow BEDTOOLS_UCSC_BIGBED { take: - ch_sortbam + ch_sorted_bam + ch_chr_sizes main: /* * Convert BAM to BED12 */ - BEDTOOLS_BAMBED ( ch_sortbam ) - ch_bed12 = BEDTOOLS_BAMBED.out.bed12 - bedtools_version = BEDTOOLS_BAMBED.out.versions + BEDTOOLS_BAMTOBED ( ch_sorted_bam ) + ch_bed = BEDTOOLS_BAMTOBED.out.bed + bedtools_version = BEDTOOLS_BAMTOBED.out.versions /* * Convert BED12 to BigBED */ - UCSC_BED12TOBIGBED ( ch_bed12 ) - ch_bigbed = UCSC_BED12TOBIGBED.out.bigbed - bed12tobigbed_version = UCSC_BED12TOBIGBED.out.versions + ch_bed + .combine(ch_chr_sizes) + .map { it -> it[3] } + .set { ch_sizes } + UCSC_BEDTOBIGBED ( ch_bed, ch_sizes, [] ) + ch_bigbed = UCSC_BEDTOBIGBED.out.bigbed + bed12tobigbed_version = UCSC_BEDTOBIGBED.out.versions emit: - bedtools_version ch_bigbed + bedtools_version bed12tobigbed_version } diff --git a/subworkflows/local/bedtools_ucsc_bigwig.nf b/subworkflows/local/bedtools_ucsc_bigwig.nf index a00748cb..a0cbf19e 100644 --- a/subworkflows/local/bedtools_ucsc_bigwig.nf +++ b/subworkflows/local/bedtools_ucsc_bigwig.nf @@ -2,25 +2,35 @@ * Convert BAM to BigWig */ -include { BEDTOOLS_GENOMECOV } from '../../modules/local/bedtools_genomecov' -include { UCSC_BEDGRAPHTOBIGWIG } from '../../modules/local/ucsc_bedgraphtobigwig' +include { BEDTOOLS_GENOMECOV } from '../../modules/nf-core/bedtools/genomecov/main' +include { UCSC_BEDGRAPHTOBIGWIG } from '../../modules/nf-core/ucsc/bedgraphtobigwig/main' workflow BEDTOOLS_UCSC_BIGWIG { take: - ch_sortbam // channel: [ val(meta), [ reads ] ] + ch_sorted_bam + ch_chr_sizes main: /* * Convert BAM to BEDGraph */ - BEDTOOLS_GENOMECOV ( ch_sortbam ) - ch_bedgraph = BEDTOOLS_GENOMECOV.out.bedgraph + ch_sorted_bam + .combine([1]) + .set { ch_genomecov_input } + ch_genomecov_input + .combine(ch_chr_sizes) + .map { it -> it[4] } + .set { ch_sizes } + extension = 'bedGraph' + + BEDTOOLS_GENOMECOV ( ch_genomecov_input, ch_sizes, extension ) + ch_bedgraph = BEDTOOLS_GENOMECOV.out.genomecov bedtools_version = BEDTOOLS_GENOMECOV.out.versions /* * Convert BEDGraph to BigWig */ - UCSC_BEDGRAPHTOBIGWIG ( ch_bedgraph ) + UCSC_BEDGRAPHTOBIGWIG ( ch_bedgraph, ch_sizes ) ch_bigwig = UCSC_BEDGRAPHTOBIGWIG.out.bigwig bedgraphtobigwig_version = UCSC_BEDGRAPHTOBIGWIG.out.versions diff --git a/subworkflows/local/differential_deseq2_dexseq.nf b/subworkflows/local/differential_deseq2_dexseq.nf index df42c79e..9764e75c 100644 --- a/subworkflows/local/differential_deseq2_dexseq.nf +++ b/subworkflows/local/differential_deseq2_dexseq.nf @@ -14,6 +14,7 @@ workflow DIFFERENTIAL_DESEQ2_DEXSEQ { /* * DESeq2 differential expression of genes */ + ch_gene_counts.view() DESEQ2 ( ch_gene_counts ) ch_deseq2_txt = DESEQ2.out.deseq2_txt deseq2_version = DESEQ2.out.versions diff --git a/subworkflows/local/input_check.nf b/subworkflows/local/input_check.nf index e222ad70..eee0e292 100644 --- a/subworkflows/local/input_check.nf +++ b/subworkflows/local/input_check.nf @@ -20,17 +20,31 @@ workflow INPUT_CHECK { .set { ch_sample } emit: - ch_sample // [ sample, barcode, fasta ] + ch_sample // [ meta, input_file, barcode, nanopolish_fast5 ] } -// Function to get list of [ meta, fastq ] -def get_sample_info(LinkedHashMap row) { - def meta = [:] - meta.id = row.sample - meta.barcode = row.barcode - input_file = row.reads ? file(row.reads, checkIfExists: true) : null +// Function to resolve fasta and gtf file if using iGenomes +// Returns [ sample, input_file, barcode, fasta, gtf, is_transcripts, annotation_str, nanopolish_fast5 ] +def get_sample_info(LinkedHashMap sample) { + def meta = [:] + meta.id = sample.sample - fastq_meta = [ meta, [ input_file ] ] + // Resolve fasta and gtf file if using iGenomes +// def fasta = false +// def gtf = false +// if (sample.fasta) { +// if (genomeMap && genomeMap.containsKey(sample.fasta)) { +// fasta = file(genomeMap[sample.fasta].fasta, checkIfExists: true) +// gtf = file(genomeMap[sample.fasta].gtf, checkIfExists: true) +// } else { +// fasta = file(sample.fasta, checkIfExists: true) +// } +// } - return fastq_meta + // Check if input file and gtf file exists + input_file = sample.input_file ? file(sample.input_file, checkIfExists: true) : null +// gtf = sample.gtf ? file(sample.gtf, checkIfExists: true) : gtf + + return [ meta, input_file, sample.barcode, sample.nanopolish_fast5 ] } + diff --git a/subworkflows/local/prepare_genome.nf b/subworkflows/local/prepare_genome.nf deleted file mode 100644 index 3e7bec9f..00000000 --- a/subworkflows/local/prepare_genome.nf +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Prepare genome/transcriptome before alignment - */ -include { CUSTOM_GETCHROMSIZES } from '../../modules/nf-core/custom/getchromsizes/main' -include { GTF2BED } from '../../modules/local/gtf2bed' - -workflow PREPARE_GENOME { - - main: - - ch_versions = Channel.empty() - ch_fasta = Channel.empty() - ch_fai = Channel.empty() - ch_sizes = Channel.empty() - ch_gtf = Channel.empty() - ch_bed = Channel.empty() - - if (params.fasta) { - - Channel.fromPath(params.fasta) - .collect() - .set { ch_fasta } - - /* - * Generates a FASTA file of chromosome sizes and a fasta index file - */ - CUSTOM_GETCHROMSIZES (ch_fasta) - ch_chrom_sizes = CUSTOM_GETCHROMSIZES.out.sizes.collect() - ch_fai = CUSTOM_GETCHROMSIZES.out.fai.collect() - ch_versions = ch_versions.mix(CUSTOM_GETCHROMSIZES.out.versions) - - } - - if (params.gtf) { - - Channel.fromPath(params.gtf) - .collect() - .set { ch_gtf } - - /* - * Convert GTF to BED12 - */ - GTF2BED (ch_gtf) - ch_bed = GTF2BED.out.gtf_bed.collect() - ch_versions = ch_versions.mix(GTF2BED.out.versions) - - } - - emit: - ch_fasta - ch_fai - ch_sizes - ch_gtf - ch_bed - ch_versions -} diff --git a/subworkflows/local/qcfastq_nanoplot_fastqc.nf b/subworkflows/local/qcfastq_nanoplot_fastqc.nf index 26ed980d..b2c0f54d 100644 --- a/subworkflows/local/qcfastq_nanoplot_fastqc.nf +++ b/subworkflows/local/qcfastq_nanoplot_fastqc.nf @@ -8,8 +8,13 @@ include { FASTQC } from '../../modules/nf-core/fastqc/main' workflow QCFASTQ_NANOPLOT_FASTQC { take: ch_fastq + skip_nanoplot + skip_fastqc main: + ch_fastq + .map { ch -> [ ch[0], ch[1] ] } + .set { ch_fastq } /* * FastQ QC using NanoPlot @@ -19,10 +24,9 @@ workflow QCFASTQ_NANOPLOT_FASTQC { nanoplot_txt = Channel.empty() nanoplot_log = Channel.empty() nanoplot_version = Channel.empty() - - if (!params.skip_nanoplot) { + if (!skip_nanoplot){ NANOPLOT ( ch_fastq ) - nanoplot_png = NANOPLOT.out.png + //nanoplot_png = NANOPLOT.out.png nanoplot_html = NANOPLOT.out.html nanoplot_txt = NANOPLOT.out.txt nanoplot_log = NANOPLOT.out.log @@ -36,12 +40,10 @@ workflow QCFASTQ_NANOPLOT_FASTQC { fastqc_html = Channel.empty() fastqc_multiqc = Channel.empty() fastqc_version = Channel.empty() - - if (!params.skip_fastqc){ - FASTQC(ch_fastq) + if (!skip_fastqc){ + FASTQC ( ch_fastq ) fastqc_zip = FASTQC.out.zip fastqc_html = FASTQC.out.html - fastqc_version = FASTQC.out.versions fastqc_zip .map { it -> [ it[1] ] } .set { fastqc_zip_only } @@ -49,6 +51,7 @@ workflow QCFASTQ_NANOPLOT_FASTQC { .map { it -> [ it[1] ] } .set { fastqc_html_only } fastqc_multiqc = fastqc_multiqc.mix( fastqc_zip_only, fastqc_html_only ) +// fastqc_version = FASTQC.out.versions } emit: diff --git a/subworkflows/local/quantify_stringtie_featurecounts.nf b/subworkflows/local/quantify_stringtie_featurecounts.nf index 0e67cf4b..8d856437 100644 --- a/subworkflows/local/quantify_stringtie_featurecounts.nf +++ b/subworkflows/local/quantify_stringtie_featurecounts.nf @@ -2,60 +2,57 @@ * Transcript Discovery and Quantification with StringTie2 and FeatureCounts */ -include { STRINGTIE2 } from '../../modules/local/stringtie2' -include { STRINGTIE_MERGE } from '../../modules/nf-core/stringtie/merge/main' -include { SUBREAD_FEATURECOUNTS } from '../../modules/local/subread_featurecounts' +include { STRINGTIE_STRINGTIE } from '../../modules/nf-core/stringtie/stringtie/main' +include { STRINGTIE_MERGE } from '../../modules/nf-core/stringtie/merge/main' +include { SUBREAD_FEATURECOUNTS as SUBREAD_FEATURECOUNTS_GENE } from '../../modules/nf-core/subread/featurecounts/main' +include { SUBREAD_FEATURECOUNTS as SUBREAD_FEATURECOUNTS_TRANSCRIPT } from '../../modules/nf-core/subread/featurecounts/main' workflow QUANTIFY_STRINGTIE_FEATURECOUNTS { take: - ch_sample - ch_sortbam + ch_sorted_bam main: - ch_sample - .map { it -> [ it[0], it[2], it[3] ] } - .join ( ch_sortbam ) - .set { ch_sample } - /* * Novel isoform detection with StringTie */ - STRINGTIE2 ( ch_sample ) - ch_stringtie_gtf = STRINGTIE2.out.stringtie_gtf - stringtie2_version = STRINGTIE2.out.versions + ch_annotation_gtf = Channel.from(file(params.gtf)) + ch_sorted_bam + .combine(ch_annotation_gtf) + .map { it -> it[2] } + .set { ch_annotation_gtf } - ch_sample - .map { it -> [ it[2] ] } - .unique() - .set { ch_sample_gtf } + STRINGTIE_STRINGTIE ( ch_sorted_bam, ch_annotation_gtf ) + ch_stringtie_gtf = STRINGTIE_STRINGTIE.out.transcript_gtf + stringtie2_version = STRINGTIE_STRINGTIE.out.versions /* * Merge isoforms across samples called by StringTie */ - STRINGTIE_MERGE ( ch_stringtie_gtf.collect(), ch_sample_gtf ) + STRINGTIE_MERGE ( ch_stringtie_gtf.collect{it[1]}, ch_annotation_gtf.unique() ) ch_stringtie_merged_gtf = STRINGTIE_MERGE.out.gtf /* * Gene and transcript quantification with featureCounts */ - ch_sample - .collect { it[-1] } - .set { ch_sample } - SUBREAD_FEATURECOUNTS ( ch_stringtie_merged_gtf, ch_sample ) - ch_gene_counts = SUBREAD_FEATURECOUNTS.out.gene_counts - ch_transcript_counts = SUBREAD_FEATURECOUNTS.out.transcript_counts - featurecounts_gene_multiqc = SUBREAD_FEATURECOUNTS.out.featurecounts_gene_multiqc - featurecounts_transcript_multiqc = SUBREAD_FEATURECOUNTS.out.featurecounts_transcript_multiqc - featurecounts_version = SUBREAD_FEATURECOUNTS.out.versions + ch_sorted_bam + .combine (ch_stringtie_merged_gtf) + .set { ch_featurecounts_input } + SUBREAD_FEATURECOUNTS_GENE ( ch_featurecounts_input ) + SUBREAD_FEATURECOUNTS_TRANSCRIPT ( ch_featurecounts_input ) + ch_gene_counts = SUBREAD_FEATURECOUNTS_GENE.out.counts + ch_transcript_counts = SUBREAD_FEATURECOUNTS_TRANSCRIPT.out.counts + featurecounts_gene_multiqc = SUBREAD_FEATURECOUNTS_GENE.out.summary + featurecounts_transcript_multiqc = SUBREAD_FEATURECOUNTS_TRANSCRIPT.out.summary + featurecounts_version = SUBREAD_FEATURECOUNTS_GENE.out.versions emit: ch_stringtie_gtf ch_stringtie_merged_gtf + stringtie2_version ch_gene_counts ch_transcript_counts featurecounts_gene_multiqc featurecounts_transcript_multiqc - stringtie2_version featurecounts_version } diff --git a/subworkflows/local/short_variant_calling.nf b/subworkflows/local/short_variant_calling.nf index 8d947989..f3a5107f 100644 --- a/subworkflows/local/short_variant_calling.nf +++ b/subworkflows/local/short_variant_calling.nf @@ -5,7 +5,7 @@ include { MEDAKA_VARIANT } from '../../modules/local/medaka_variant' include { TABIX_BGZIP as MEDAKA_BGZIP_VCF } from '../../modules/nf-core/tabix/bgzip/main' include { TABIX_TABIX as MEDAKA_TABIX_VCF } from '../../modules/nf-core/tabix/tabix/main' -include { DEEPVARIANT } from '../../modules/local/deepvariant' +include { DEEPVARIANT } from '../../modules/nf-core/deepvariant/main' include { TABIX_TABIX as DEEPVARIANT_TABIX_VCF } from '../../modules/nf-core/tabix/tabix/main' include { TABIX_TABIX as DEEPVARIANT_TABIX_GVCF } from '../../modules/nf-core/tabix/tabix/main' include { PEPPER_MARGIN_DEEPVARIANT } from '../../modules/local/pepper_margin_deepvariant' @@ -13,7 +13,8 @@ include { PEPPER_MARGIN_DEEPVARIANT } from '../../modules/local/pepp workflow SHORT_VARIANT_CALLING { take: - ch_view_sortbam + ch_sorted_bam + ch_sorted_bai ch_fasta ch_fai @@ -32,7 +33,15 @@ workflow SHORT_VARIANT_CALLING { /* * Call short variants with medaka */ - MEDAKA_VARIANT( ch_view_sortbam, ch_fasta ) + ch_sorted_bam + .join(ch_sorted_bai, by: 0) + .view() + .set { ch_sorted_bam_bai } + ch_sorted_bam + .combine(ch_fasta.map{it->it[1]}) + .map { it -> it[2] } + .set { ch_fasta } + MEDAKA_VARIANT ( ch_sorted_bam_bai, ch_fasta ) ch_versions = ch_versions.mix(medaka_version = MEDAKA_VARIANT.out.versions) /* @@ -52,9 +61,23 @@ workflow SHORT_VARIANT_CALLING { } else if (params.variant_caller == 'deepvariant') { /* - * Call variants with deepvariant - */ - DEEPVARIANT( ch_view_sortbam, ch_fasta, ch_fai ) + * Call variants with deepvariant + */ + ch_sorted_bam + .join(ch_sorted_bai, by: 0) + .map { it -> [ it[0], it[1], it[2], [] ] } + .view() + .set { ch_deepvariant_input } + ch_sorted_bam + .combine(ch_fasta.map{it->it[1]}) + .map { it -> it[2] } + .set { ch_fasta } + ch_sorted_bam + .combine(ch_fai.map{it->it[1]}) + .map { it -> it[2] } + .set { ch_fai } + + DEEPVARIANT( ch_deepvariant_input, ch_fasta, ch_fai ) ch_short_calls_vcf = DEEPVARIANT.out.vcf ch_short_calls_gvcf = DEEPVARIANT.out.gvcf ch_versions = ch_versions.mix(DEEPVARIANT.out.versions) @@ -84,10 +107,10 @@ workflow SHORT_VARIANT_CALLING { ch_versions = ch_versions.mix(PEPPER_MARGIN_DEEPVARIANT.out.versions) } - emit: - ch_short_calls_vcf - ch_short_calls_vcf_tbi - ch_short_calls_gvcf - ch_short_calls_gvcf_tbi - ch_versions +// emit: +// ch_short_calls_vcf +// ch_short_calls_vcf_tbi +// ch_short_calls_gvcf +// ch_short_calls_gvcf_tbi +// ch_versions } diff --git a/subworkflows/local/structural_variant_calling.nf b/subworkflows/local/structural_variant_calling.nf index d9311df5..5b0cc963 100644 --- a/subworkflows/local/structural_variant_calling.nf +++ b/subworkflows/local/structural_variant_calling.nf @@ -15,13 +15,14 @@ include { TABIX_TABIX as CUTESV_TABIX_VCF } from '../../modules/nf-core/ta workflow STRUCTURAL_VARIANT_CALLING { take: - ch_bam_bai + ch_view_sortbam ch_fasta ch_fai main: ch_sv_calls_vcf = Channel.empty() ch_sv_calls_vcf_tbi = Channel.empty() + ch_versions = Channel.empty() /* @@ -32,21 +33,21 @@ workflow STRUCTURAL_VARIANT_CALLING { /* * Call structural variants with sniffles */ - SNIFFLES (ch_bam_bai, ch_fasta) + SNIFFLES( ch_view_sortbam ) ch_versions = ch_versions.mix(SNIFFLES.out.versions) /* * Sort structural variants with bcftools */ - SNIFFLES_SORT_VCF( SNIFFLES.out.sv_vcf ) - ch_sv_vcf_sorted = SNIFFLES_SORT_VCF.out.vcf + SNIFFLES_SORT_VCF( SNIFFLES.out.sv_calls ) + ch_sv_calls_vcf = SNIFFLES_SORT_VCF.out.vcf ch_versions = ch_versions.mix(SNIFFLES_SORT_VCF.out.versions) /* * Index sniffles vcf.gz */ - SNIFFLES_TABIX_VCF( ch_sv_vcf_sorted ) - ch_sv_vcf_sorted_tbi = SNIFFLES_TABIX_VCF.out.tbi + SNIFFLES_TABIX_VCF( ch_sv_calls_vcf ) + ch_sv_calls_tbi = SNIFFLES_TABIX_VCF.out.tbi ch_versions = ch_versions.mix(SNIFFLES_TABIX_VCF.out.versions) } else if (params.structural_variant_caller == 'cutesv') { @@ -54,26 +55,27 @@ workflow STRUCTURAL_VARIANT_CALLING { /* * Call structural variants with cutesv */ - CUTESV(ch_bam_bai, ch_fasta) - //ch_versions = ch_versions.mix(CUTESV.out.versions) + CUTESV( ch_view_sortbam, ch_fasta ) + ch_versions = ch_versions.mix(CUTESV.out.versions) /* * Sort structural variants with bcftools */ - //CUTESV_SORT_VCF( CUTESV.out.sv_calls ) - //ch_sv_calls_vcf = CUTESV_SORT_VCF.out.vcf - //ch_versions = ch_versions.mix(CUTESV_SORT_VCF.out.versions) + CUTESV_SORT_VCF( CUTESV.out.sv_calls ) + ch_sv_calls_vcf = CUTESV_SORT_VCF.out.vcf + ch_versions = ch_versions.mix(CUTESV_SORT_VCF.out.versions) /* * Zip cutesv vcf.gz */ - //CUTESV_TABIX_VCF( ch_sv_calls_vcf ) - //ch_sv_calls_tbi = CUTESV_TABIX_VCF.out.tbi - //ch_versions = ch_versions.mix(CUTESV_TABIX_VCF.out.versions) + CUTESV_TABIX_VCF( ch_sv_calls_vcf ) + ch_sv_calls_tbi = CUTESV_TABIX_VCF.out.tbi + ch_versions = ch_versions.mix(CUTESV_TABIX_VCF.out.versions) } emit: ch_sv_calls_vcf - //ch_sv_calls_vcf_tbi - //ch_versions + ch_sv_calls_vcf_tbi + ch_versions } + diff --git a/subworkflows/nf-core/bam_stats_samtools/main.nf b/subworkflows/nf-core/bam_stats_samtools/main.nf index cfcc48dd..c9d7c8b7 100644 --- a/subworkflows/nf-core/bam_stats_samtools/main.nf +++ b/subworkflows/nf-core/bam_stats_samtools/main.nf @@ -8,25 +8,25 @@ include { SAMTOOLS_FLAGSTAT } from '../../../modules/nf-core/samtools/flagstat/m workflow BAM_STATS_SAMTOOLS { take: - bam_bai // channel: [ val(meta), [ bam/cram ], [bai/csi] ] - fasta // channel: [ fasta ] + ch_bam_bai // channel: [ val(meta), path(bam), path(bai) ] + ch_fasta // channel: [ path(fasta) ] main: ch_versions = Channel.empty() - SAMTOOLS_STATS ( bam_bai, fasta ) + SAMTOOLS_STATS ( ch_bam_bai, ch_fasta ) ch_versions = ch_versions.mix(SAMTOOLS_STATS.out.versions) - SAMTOOLS_FLAGSTAT ( bam_bai ) + SAMTOOLS_FLAGSTAT ( ch_bam_bai ) ch_versions = ch_versions.mix(SAMTOOLS_FLAGSTAT.out.versions) - SAMTOOLS_IDXSTATS ( bam_bai ) + SAMTOOLS_IDXSTATS ( ch_bam_bai ) ch_versions = ch_versions.mix(SAMTOOLS_IDXSTATS.out.versions) emit: - stats = SAMTOOLS_STATS.out.stats // channel: [ val(meta), [ stats ] ] - flagstat = SAMTOOLS_FLAGSTAT.out.flagstat // channel: [ val(meta), [ flagstat ] ] - idxstats = SAMTOOLS_IDXSTATS.out.idxstats // channel: [ val(meta), [ idxstats ] ] + stats = SAMTOOLS_STATS.out.stats // channel: [ val(meta), path(stats) ] + flagstat = SAMTOOLS_FLAGSTAT.out.flagstat // channel: [ val(meta), path(flagstat) ] + idxstats = SAMTOOLS_IDXSTATS.out.idxstats // channel: [ val(meta), path(idxstats) ] - versions = ch_versions // channel: [ versions.yml ] + versions = ch_versions // channel: [ path(versions.yml) ] } diff --git a/subworkflows/nf-core/bam_stats_samtools/meta.yml b/subworkflows/nf-core/bam_stats_samtools/meta.yml index 5252b0e4..b6072686 100644 --- a/subworkflows/nf-core/bam_stats_samtools/meta.yml +++ b/subworkflows/nf-core/bam_stats_samtools/meta.yml @@ -11,44 +11,30 @@ modules: - samtools/idxstats - samtools/flagstat input: - - meta: - type: map + - ch_bam_bai: description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - bam: - type: file - description: BAM/CRAM/SAM file - pattern: "*.{bam,cram,sam}" - - bai: - type: file - description: Index for BAM/CRAM/SAM file - pattern: "*.{bai,crai,sai}" - - fasta: - type: file - description: Reference genome fasta file - pattern: "*.{fasta,fa}" -output: - - meta: - type: map + The input channel containing the BAM/CRAM and it's index + Structure: [ val(meta), path(bam), path(bai) ] + - ch_fasta: description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] + Reference genome fasta file + Structure: [ path(fasta) ] +output: - stats: - type: file - description: File containing samtools stats output - pattern: "*.{stats}" + description: | + File containing samtools stats output + Structure: [ val(meta), path(stats) ] - flagstat: - type: file - description: File containing samtools flagstat output - pattern: "*.{flagstat}" + description: | + File containing samtools flagstat output + Structure: [ val(meta), path(flagstat) ] - idxstats: - type: file - description: File containing samtools idxstats output - pattern: "*.{idxstats}" + description: | + File containing samtools idxstats output + Structure: [ val(meta), path(idxstats)] - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + description: | + Files containing software versions + Structure: [ path(versions.yml) ] authors: - "@drpatelh" diff --git a/workflows/nanoseq.nf b/workflows/nanoseq.nf index b236cc7c..402d6176 100644 --- a/workflows/nanoseq.nf +++ b/workflows/nanoseq.nf @@ -11,16 +11,24 @@ def summary_params = NfcoreSchema.paramsSummaryMap(workflow, params) //////////////////////////////////////////////////// // Check input path parameters to see if they exist -checkPathParamList = [ params.input, params.multiqc_config, params.fasta ] +checkPathParamList = [ params.input, params.multiqc_config ] for (param in checkPathParamList) { if (param) { file(param, checkIfExists: true) } } -// Check mandatory parameters +// Check mandatory parameters (missing protocol or profile will exit the run.) if (params.input) { ch_input = file(params.input) } else { exit 1, 'Input samplesheet not specified!' } +if (params.fasta){ + ch_fasta = file(params.fasta) +} + +if (params.gtf){ + ch_gtf = file(params.gtf) +} + // Function to check if running offline def isOffline() { try { @@ -55,6 +63,7 @@ if (!params.skip_demultiplexing) { } } + if (!params.skip_alignment) { if (params.aligner != 'minimap2' && params.aligner != 'graphmap2') { exit 1, "Invalid aligner option: ${params.aligner}. Valid options: 'minimap2', 'graphmap2'" @@ -99,35 +108,22 @@ ch_multiqc_custom_config = params.multiqc_config ? Channel.fromPath(params.multi /* -- IMPORT LOCAL MODULES/SUBWORKFLOWS -- */ //////////////////////////////////////////////////// -/* - * MODULE: Local - */ - include { GET_TEST_DATA } from '../modules/local/get_test_data' include { GET_NANOLYSE_FASTA } from '../modules/local/get_nanolyse_fasta' -include { QCAT } from '../modules/local/qcat' include { BAM_RENAME } from '../modules/local/bam_rename' -include { BAMBU } from '../modules/local/bambu' -include { MULTIQC } from '../modules/local/multiqc' +//include { BAMBU } from '../modules/local/bambu' +//include { MULTIQC } from '../modules/local/multiqc' /* * SUBWORKFLOW: Consisting of a mix of local and nf-core/modules */ include { INPUT_CHECK } from '../subworkflows/local/input_check' -include { PREPARE_GENOME } from '../subworkflows/local/prepare_genome' -include { QCFASTQ_NANOPLOT_FASTQC } from '../subworkflows/local/qcfastq_nanoplot_fastqc' -include { ALIGN_GRAPHMAP2 } from '../subworkflows/local/align_graphmap2' -include { ALIGN_MINIMAP2 } from '../subworkflows/local/align_minimap2' -include { BAM_SORT_INDEX_SAMTOOLS } from '../subworkflows/local/bam_sort_index_samtools' include { SHORT_VARIANT_CALLING } from '../subworkflows/local/short_variant_calling' -include { STRUCTURAL_VARIANT_CALLING } from '../subworkflows/local/structural_variant_calling' -include { BEDTOOLS_UCSC_BIGWIG } from '../subworkflows/local/bedtools_ucsc_bigwig' -include { BEDTOOLS_UCSC_BIGBED } from '../subworkflows/local/bedtools_ucsc_bigbed' -include { QUANTIFY_STRINGTIE_FEATURECOUNTS } from '../subworkflows/local/quantify_stringtie_featurecounts' +//include { STRUCTURAL_VARIANT_CALLING } from '../subworkflows/local/structural_variant_calling' include { DIFFERENTIAL_DESEQ2_DEXSEQ } from '../subworkflows/local/differential_deseq2_dexseq' -include { RNA_MODIFICATION_XPORE_M6ANET } from '../subworkflows/local/rna_modifications_xpore_m6anet' -include { RNA_FUSIONS_JAFFAL } from '../subworkflows/local/rna_fusions_jaffal' +//include { RNA_MODIFICATION_XPORE_M6ANET } from '../subworkflows/local/rna_modifications_xpore_m6anet' +//include { RNA_FUSIONS_JAFFAL } from '../subworkflows/local/rna_fusions_jaffal' //////////////////////////////////////////////////// /* -- IMPORT NF-CORE MODULES/SUBWORKFLOWS -- */ @@ -136,12 +132,20 @@ include { RNA_FUSIONS_JAFFAL } from '../subworkflows/local/rna_fus /* * MODULE: Installed directly from nf-core/modules */ -include { NANOLYSE } from '../modules/nf-core/nanolyse/main' +include { QCAT } from '../modules/nf-core/qcat/main' +include { NANOLYSE } from '../modules/nf-core/nanolyse/main' +include { CUSTOM_GETCHROMSIZES } from '../modules/nf-core/custom/getchromsizes/main' include { CUSTOM_DUMPSOFTWAREVERSIONS } from '../modules/nf-core/custom/dumpsoftwareversions/main' /* * SUBWORKFLOW: Consisting entirely of nf-core/modules */ +include { QCFASTQ_NANOPLOT_FASTQC } from '../subworkflows/local/qcfastq_nanoplot_fastqc' +include { ALIGN_MINIMAP2 } from '../subworkflows/local/align_minimap2' +include { ALIGN_GRAPHMAP2 } from '../subworkflows/local/align_graphmap2' +include { BEDTOOLS_UCSC_BIGWIG } from '../subworkflows/local/bedtools_ucsc_bigwig' +include { BEDTOOLS_UCSC_BIGBED } from '../subworkflows/local/bedtools_ucsc_bigbed' +include { QUANTIFY_STRINGTIE_FEATURECOUNTS } from '../subworkflows/local/quantify_stringtie_featurecounts' //////////////////////////////////////////////////// /* -- RUN MAIN WORKFLOW -- */ @@ -152,9 +156,8 @@ def multiqc_report = [] workflow NANOSEQ{ - /* - * Download test dataset for '--input_path' if applicable - */ + // Pre-download test-dataset to get files for '--input_path' parameter + // Nextflow is unable to recursively download directories via HTTPS if (workflow.profile.contains('test') && !workflow.profile.contains('vc')) { if (!params.skip_modification_analysis) { if (!isOffline()) { @@ -166,29 +169,28 @@ workflow NANOSEQ{ } } else { if (params.input_path) { - Channel.fromPath(params.input_path, checkIfExists: true) - .set { ch_input_path } + ch_input_path = Channel.fromPath(params.input_path, checkIfExists: true) } else { - Channel.of('not_changed') - .set { ch_input_path } + ch_input_path = 'not_changed' } } } else { if (params.input_path) { - Channel.fromPath(params.input_path, checkIfExists: true) - .set { ch_input_path } + ch_input_path = Channel.fromPath(params.input_path, checkIfExists: true) } else { - Channel.of('not_changed') - .set { ch_input_path } + ch_input_path = 'not_changed' } } + /* + * Create empty software versions channel to mix + */ ch_software_versions = Channel.empty() /* - * SUBWORKFLOW: Read samplesheet, validate samplesheet, and stage input files + * SUBWORKFLOW: Read in samplesheet, validate and stage input files */ - INPUT_CHECK (ch_input, ch_input_path) + INPUT_CHECK ( ch_input, ch_input_path ) .set { ch_sample } if (!params.skip_demultiplexing) { @@ -196,28 +198,40 @@ workflow NANOSEQ{ /* * MODULE: Demultipexing using qcat */ - QCAT (ch_input_path) - QCAT.out.fastq + ch_input_path + .combine( [[id:'undemultiplexed']] ) + .map { it -> [ it[1], it[0] ]} + .set { ch_undemultiplexed_fastq } + ch_barcode_kit = Channel.from(params.barcode_kit) + + QCAT ( ch_undemultiplexed_fastq , ch_barcode_kit ) + ch_fastq = Channel.empty() + ch_sample + .map { it -> [ it[0], it[2], it[1] ] } // [ meta, barcode, replicate ] + .set { ch_sample_fields_reordered } + QCAT.out.reads + .map { it -> it[1] } .flatten() - .map { it -> [ it.baseName.substring(0,it.baseName.lastIndexOf('.')), it ] } - .join(ch_sample.map{ meta, empty -> [meta.barcode, meta] }, by: [0] ) - .map { it -> [ it[2], it[1] ] } - .set { ch_fastq_dirty } + .map { it -> [ it, it.baseName.substring(0,it.baseName.lastIndexOf('.'))] } + .join(ch_sample_fields_reordered, by: 1) + .map { it -> [ it[2], it[1], it[0], it[3] ] } // [ meta, replicate, barcode ] + .set { ch_fastq } ch_software_versions = ch_software_versions.mix(QCAT.out.versions.ifEmpty(null)) } else { if (!params.skip_alignment) { ch_sample - .set { ch_fastq_dirty } + .map { it -> if (it[1].toString().endsWith('.gz')) [ it[0], it[1], it[2], it[3] ] } + .set { ch_fastq } } else { - ch_fastq_dirty = Channel.empty() + ch_fastq = Channel.empty() } } if (params.run_nanolyse) { + ch_fastq + .map { it -> [ it[0], it[1] ] } + .set { ch_fastq_nanolyse } - /* - * MODULE: Get NanoLyse test data - */ if (!params.nanolyse_fasta) { if (!isOffline()) { GET_NANOLYSE_FASTA() @@ -229,18 +243,13 @@ workflow NANOSEQ{ } else { ch_nanolyse_fasta = file(params.nanolyse_fasta, checkIfExists: true) } - /* * MODULE: DNA contaminant removal using NanoLyse */ - NANOLYSE (ch_fastq_dirty, ch_nanolyse_fasta) + NANOLYSE ( ch_fastq_nanolyse, ch_nanolyse_fasta ) NANOLYSE.out.fastq .set { ch_fastq } ch_software_versions = ch_software_versions.mix(NANOLYSE.out.versions.first().ifEmpty(null)) - } else { - ch_fastq_dirty - .map { it -> [ it[0], it[1] ] } - .set { ch_fastq } } ch_fastqc_multiqc = Channel.empty() @@ -249,204 +258,194 @@ workflow NANOSEQ{ /* * SUBWORKFLOW: Fastq QC with Nanoplot and fastqc */ - QCFASTQ_NANOPLOT_FASTQC (ch_fastq) + QCFASTQ_NANOPLOT_FASTQC ( ch_fastq, params.skip_nanoplot, params.skip_fastqc) ch_software_versions = ch_software_versions.mix(QCFASTQ_NANOPLOT_FASTQC.out.fastqc_version.first().ifEmpty(null)) ch_fastqc_multiqc = QCFASTQ_NANOPLOT_FASTQC.out.fastqc_multiqc.ifEmpty([]) } ch_samtools_multiqc = Channel.empty() - if (!params.skip_alignment) { /* * SUBWORKFLOW: Make chromosome size file and covert GTF to BED12 */ - PREPARE_GENOME () - ch_fasta = PREPARE_GENOME.out.ch_fasta - ch_fai = PREPARE_GENOME.out.ch_fai - ch_sizes = PREPARE_GENOME.out.ch_sizes - ch_gtf = PREPARE_GENOME.out.ch_gtf - ch_bed = PREPARE_GENOME.out.ch_bed - ch_software_versions = ch_software_versions.mix(PREPARE_GENOME.out.ch_versions.first().ifEmpty(null)) - + ch_fasta = Channel.from( [id:'reference'], params.fasta ).collect() + CUSTOM_GETCHROMSIZES( ch_fasta ) + ch_chr_sizes = CUSTOM_GETCHROMSIZES.out.sizes + ch_fai = CUSTOM_GETCHROMSIZES.out.fai + ch_software_versions = ch_software_versions.mix(CUSTOM_GETCHROMSIZES.out.versions.first().ifEmpty(null)) if (params.aligner == 'minimap2') { /* - * SUBWORKFLOW: Create index and align fastq files with MINIMAP2 - */ - ALIGN_MINIMAP2 ( ch_fasta, ch_sizes, ch_gtf, ch_bed, ch_fastq ) - ch_index = ALIGN_MINIMAP2.out.ch_index - ch_bam_bai = ALIGN_MINIMAP2.out.ch_bam_bai - ch_software_versions = ch_software_versions.mix(ALIGN_MINIMAP2.out.ch_versions.first().ifEmpty(null)) + * SUBWORKFLOW: Align fastq files with minimap2 and sort bam files + */ + ALIGN_MINIMAP2 ( ch_fasta, ch_fastq ) + ch_sorted_bam = ALIGN_MINIMAP2.out.ch_sorted_bam + ch_sorted_bai = ALIGN_MINIMAP2.out.ch_sorted_bai + ch_software_versions = ch_software_versions.mix(ALIGN_MINIMAP2.out.minimap2_version.first().ifEmpty(null)) + ch_software_versions = ch_software_versions.mix(ALIGN_MINIMAP2.out.samtools_version.first().ifEmpty(null)) } else { /* * SUBWORKFLOW: Align fastq files with graphmap2 and sort bam files */ - //ALIGN_GRAPHMAP2 ( ch_fasta_index, ch_fastq ) - //ch_align_sam = ALIGN_GRAPHMAP2.out.ch_align_sam - //ch_index = ALIGN_GRAPHMAP2.out.ch_index - //ch_software_versions = ch_software_versions.mix(ALIGN_GRAPHMAP2.out.graphmap2_version.first().ifEmpty(null)) + ALIGN_GRAPHMAP2 ( ch_fasta, ch_fastq ) + ch_sorted_bam = ALIGN_GRAPHMAP2.out.ch_sorted_bam + ch_sorted_bai = ALIGN_GRAPHMAP2.out.ch_sorted_bai + ch_software_versions = ch_software_versions.mix(ALIGN_GRAPHMAP2.out.graphmap2_version.first().ifEmpty(null)) + ch_software_versions = ch_software_versions.mix(ALIGN_GRAPHMAP2.out.samtools_version.first().ifEmpty(null)) } if (params.call_variants && params.protocol == 'DNA') { + /* + * SUBWORKFLOW: Short variant calling + */ + if (!params.skip_vc) { + SHORT_VARIANT_CALLING ( ch_sorted_bam, ch_sorted_bai, ch_fasta, ch_fai ) + //ch_software_versions = ch_software_versions.mix(SHORT_VARIANT_CALLING.out.ch_versions.first().ifEmpty(null)) + } + +// /* +// * SUBWORKFLOW: Structural variant calling +// */ +// if (!params.skip_sv) { +// STRUCTURAL_VARIANT_CALLING ( ch_view_sortbam, ch_fasta.map{ it [1] }, ch_fai.map{ it [1] } ) +// ch_software_versions = ch_software_versions.mix(STRUCTURAL_VARIANT_CALLING.out.ch_versions.first().ifEmpty(null)) +// } + } + + ch_bedtools_version = Channel.empty() + if (!params.skip_bigwig) { /* - * SUBWORKFLOW: Short variant calling + * SUBWORKFLOW: Convert BAM -> BEDGraph -> BigWig */ - //if (!params.skip_vc) { - // SHORT_VARIANT_CALLING (ch_bam, ch_bai, ch_fasta, ch_fai) - // ch_software_versions = ch_software_versions.mix(SHORT_VARIANT_CALLING.out.ch_versions.first().ifEmpty(null)) - //} + BEDTOOLS_UCSC_BIGWIG ( ch_sorted_bam, ch_chr_sizes ) + ch_bedtools_version = ch_bedtools_version.mix(BEDTOOLS_UCSC_BIGWIG.out.bedtools_version.first().ifEmpty(null)) + ch_software_versions = ch_software_versions.mix(BEDTOOLS_UCSC_BIGWIG.out.bedgraphtobigwig_version.first().ifEmpty(null)) + } + if (!params.skip_bigbed) { /* - * SUBWORKFLOW: Structural variant calling + * SUBWORKFLOW: Convert BAM -> BED12 -> BigBED */ - if (!params.skip_sv) { - STRUCTURAL_VARIANT_CALLING (ch_bam_bai, ch_fasta, ch_fai) - ch_software_versions = ch_software_versions.mix(STRUCTURAL_VARIANT_CALLING.out.ch_versions.first().ifEmpty(null)) - } + BEDTOOLS_UCSC_BIGBED ( ch_sorted_bam, ch_chr_sizes ) + ch_bedtools_version = ch_bedtools_version.mix(BEDTOOLS_UCSC_BIGBED.out.bedtools_version.first().ifEmpty(null)) + ch_software_versions = ch_software_versions.mix(BEDTOOLS_UCSC_BIGBED.out.bed12tobigbed_version.first().ifEmpty(null)) } + ch_software_versions = ch_software_versions.mix(ch_bedtools_version.first().ifEmpty(null)) + + ch_sorted_bam + .join(ch_sample,by:0) + .map { it -> [ it[0], it[1], it[4] ] } + .set { ch_nanopolish_bam_fast5 } + } else { + ch_sample + .map { it -> if (it[1].toString().endsWith('.bam')) [ it[0], it[1] ] } + .set { ch_sample_bam } + BAM_RENAME ( ch_sample_bam ) + ch_sortbam = BAM_RENAME.out.bam + } + + ch_featurecounts_gene_multiqc = Channel.empty() + ch_featurecounts_transcript_multiqc = Channel.empty() + if (!params.skip_quantification && (params.protocol == 'cDNA' || params.protocol == 'directRNA')) { + + // Check that reference genome and annotation are the same for all samples if perfoming quantification + // Check if we have replicates and multiple conditions in the input samplesheet + REPLICATES_EXIST = false + MULTIPLE_CONDITIONS = false + // BUG: ".val" halts the pipeline /////////////////////// + // if ( gtfs.map{it[0]} == false || fastas.map{it[0]} == false || gtfs.size().val != 1 || fasta.size().val != 1 ) { + // exit 1, """Quantification can only be performed if all samples in the samplesheet have the same reference fasta and GTF file." + // Please specify the '--skip_quantification' parameter if you wish to skip these steps.""" + // } + // REPLICATES_EXIST = ch_sample.map { it -> it[0].split('_')[-1].replaceAll('R','').toInteger() }.max().val > 1 + // MULTIPLE_CONDITIONS = ch_sample.map { it -> it[0].split('_')[0..-2].join('_') }.unique().count().val > 1 + + ch_r_version = Channel.empty() + if (params.quantification_method == 'bambu') { +// ch_sample +// .map { it -> [ it[2], it[3] ]} +// .unique() +// .set { ch_sample_annotation } +// +// /* +// * MODULE: Quantification and novel isoform detection with bambu +// */ +// BAMBU ( ch_sample_annotation, ch_sorted_bam.collect{ it [1] } ) +// ch_gene_counts = BAMBU.out.ch_gene_counts +// ch_transcript_counts = BAMBU.out.ch_transcript_counts +// ch_software_versions = ch_software_versions.mix(BAMBU.out.versions.first().ifEmpty(null)) + } else { -// if (!params.skip_bigwig) { - -// /* -// * SUBWORKFLOW: Convert BAM -> BEDGraph -> BigWig -// */ -// BEDTOOLS_UCSC_BIGWIG (ch_view_sortbam) -// ch_bedtools_version = ch_bedtools_version.mix(BEDTOOLS_UCSC_BIGWIG.out.bedtools_version.first().ifEmpty(null)) -// ch_software_versions = ch_software_versions.mix(BEDTOOLS_UCSC_BIGWIG.out.bedgraphtobigwig_version.first().ifEmpty(null)) -// } -// if (!params.skip_bigbed) { - -// /* -// * SUBWORKFLOW: Convert BAM -> BED12 -> BigBED -// */ -// BEDTOOLS_UCSC_BIGBED (ch_view_sortbam) -// ch_bedtools_version = ch_bedtools_version.mix(BEDTOOLS_UCSC_BIGBED.out.bedtools_version.first().ifEmpty(null)) -// ch_software_versions = ch_software_versions.mix(BEDTOOLS_UCSC_BIGBED.out.bed12tobigbed_version.first().ifEmpty(null)) -// } -// ch_software_versions = ch_software_versions.mix(ch_bedtools_version.first().ifEmpty(null)) - -// ch_view_sortbam -// .map { it -> [ it[0], it[3] ] } -// .set { ch_sortbam } -// ch_view_sortbam -// .map { it -> [ it[0], it[3], it[4] ] } -// .set { ch_nanopolish_sortbam } -// } else { -// ch_sample -// .map { it -> if (it[6].toString().endsWith('.bam')) [ it[0], it[6] ] } -// .set { ch_sample_bam } - -// /* -// * MODULE: Rename bam files -// */ -// BAM_RENAME (ch_sample_bam) -// ch_sortbam = BAM_RENAME.out.bam -// } - -// ch_featurecounts_gene_multiqc = Channel.empty() -// ch_featurecounts_transcript_multiqc = Channel.empty() -// if (!params.skip_quantification && (params.protocol == 'cDNA' || params.protocol == 'directRNA')) { - -// // Check that reference genome and annotation are the same for all samples if perfoming quantification -// // Check if we have replicates and multiple conditions in the input samplesheet -// REPLICATES_EXIST = false -// MULTIPLE_CONDITIONS = false -// ch_sample.map{ it[2] }.unique().toList().set { fastas } -// ch_sample.map{ it[3] }.unique().toList().set { gtfs } -// // BUG: ".val" halts the pipeline /////////////////////// -// // if ( gtfs.map{it[0]} == false || fastas.map{it[0]} == false || gtfs.size().val != 1 || fasta.size().val != 1 ) { -// // exit 1, """Quantification can only be performed if all samples in the samplesheet have the same reference fasta and GTF file." -// // Please specify the '--skip_quantification' parameter if you wish to skip these steps.""" -// // } -// // REPLICATES_EXIST = ch_sample.map { it -> it[0].split('_')[-1].replaceAll('R','').toInteger() }.max().val > 1 -// // MULTIPLE_CONDITIONS = ch_sample.map { it -> it[0].split('_')[0..-2].join('_') }.unique().count().val > 1 - -// ch_r_version = Channel.empty() -// if (params.quantification_method == 'bambu') { -// ch_sample -// .map { it -> [ it[2], it[3] ]} -// .unique() -// .set { ch_sample_annotation } - -// /* -// * MODULE: Quantification and novel isoform detection with bambu -// */ -// BAMBU (ch_sample_annotation, ch_sortbam.collect{ it [1] }) -// ch_gene_counts = BAMBU.out.ch_gene_counts -// ch_transcript_counts = BAMBU.out.ch_transcript_counts -// ch_software_versions = ch_software_versions.mix(BAMBU.out.versions.first().ifEmpty(null)) -// } else { - -// /* -// * SUBWORKFLOW: Novel isoform detection with StringTie and Quantification with featureCounts -// */ -// QUANTIFY_STRINGTIE_FEATURECOUNTS(ch_sample, ch_sortbam) -// ch_gene_counts = QUANTIFY_STRINGTIE_FEATURECOUNTS.out.ch_gene_counts -// ch_transcript_counts = QUANTIFY_STRINGTIE_FEATURECOUNTS.out.ch_transcript_counts -// ch_software_versions = ch_software_versions.mix(QUANTIFY_STRINGTIE_FEATURECOUNTS.out.stringtie2_version.first().ifEmpty(null)) -// ch_software_versions = ch_software_versions.mix(QUANTIFY_STRINGTIE_FEATURECOUNTS.out.featurecounts_version.first().ifEmpty(null)) -// ch_featurecounts_gene_multiqc = QUANTIFY_STRINGTIE_FEATURECOUNTS.out.featurecounts_gene_multiqc.ifEmpty([]) -// ch_featurecounts_transcript_multiqc = QUANTIFY_STRINGTIE_FEATURECOUNTS.out.featurecounts_transcript_multiqc.ifEmpty([]) -// } -// if (!params.skip_differential_analysis) { - -// /* -// * SUBWORKFLOW: Differential gene and transcript analysis with DESeq2 and DEXseq -// */ -// DIFFERENTIAL_DESEQ2_DEXSEQ( ch_gene_counts, ch_transcript_counts ) -// ch_software_versions = ch_software_versions.mix(DIFFERENTIAL_DESEQ2_DEXSEQ.out.deseq2_version.first().ifEmpty(null)) -// ch_software_versions = ch_software_versions.mix(DIFFERENTIAL_DESEQ2_DEXSEQ.out.dexseq_version.first().ifEmpty(null)) -// } + /* + * SUBWORKFLOW: Novel isoform detection with StringTie and Quantification with featureCounts + */ + QUANTIFY_STRINGTIE_FEATURECOUNTS( ch_sorted_bam ) + ch_gene_counts = QUANTIFY_STRINGTIE_FEATURECOUNTS.out.ch_gene_counts + ch_transcript_counts = QUANTIFY_STRINGTIE_FEATURECOUNTS.out.ch_transcript_counts + ch_software_versions = ch_software_versions.mix(QUANTIFY_STRINGTIE_FEATURECOUNTS.out.stringtie2_version.first().ifEmpty(null)) + ch_software_versions = ch_software_versions.mix(QUANTIFY_STRINGTIE_FEATURECOUNTS.out.featurecounts_version.first().ifEmpty(null)) + ch_featurecounts_gene_multiqc = QUANTIFY_STRINGTIE_FEATURECOUNTS.out.featurecounts_gene_multiqc.ifEmpty([]) + ch_featurecounts_transcript_multiqc = QUANTIFY_STRINGTIE_FEATURECOUNTS.out.featurecounts_transcript_multiqc.ifEmpty([]) + } +// if (!params.skip_differential_analysis) { +// +// /* +// * SUBWORKFLOW: Differential gene and transcript analysis with DESeq2 and DEXseq +// */ +// DIFFERENTIAL_DESEQ2_DEXSEQ( ch_gene_counts, ch_transcript_counts ) +// ch_software_versions = ch_software_versions.mix(DIFFERENTIAL_DESEQ2_DEXSEQ.out.deseq2_version.first().ifEmpty(null)) +// ch_software_versions = ch_software_versions.mix(DIFFERENTIAL_DESEQ2_DEXSEQ.out.dexseq_version.first().ifEmpty(null)) +// } } -// if (!params.skip_modification_analysis && params.protocol == 'directRNA') { - -// /* -// * SUBWORKFLOW: RNA modification detection with xPore and m6anet -// */ -// RNA_MODIFICATION_XPORE_M6ANET( ch_sample, ch_nanopolish_sortbam ) -// } - -// if (!params.skip_fusion_analysis && (params.protocol == 'cDNA' || params.protocol == 'directRNA')) { - -// /* -// * SUBWORKFLOW: RNA_FUSIONS_JAFFAL -// */ -// ch_fastq -// .map { it -> [ it[0], it[1] ] } -// .set { ch_fastq_simple } - -// RNA_FUSIONS_JAFFAL( ch_fastq_simple, params.jaffal_ref_dir ) -// } - -// /* -// * MODULE: Parse software version numbers -// */ -// CUSTOM_DUMPSOFTWAREVERSIONS ( -// ch_software_versions.unique().collectFile() -// ) - -// if (!params.skip_multiqc) { -// workflow_summary = WorkflowNanoseq.paramsSummaryMultiqc(workflow, summary_params) -// ch_workflow_summary = Channel.value(workflow_summary) - -// /* -// * MODULE: MultiQC -// */ -// MULTIQC ( -// ch_multiqc_config, -// ch_multiqc_custom_config.collect().ifEmpty([]), -// ch_fastqc_multiqc.ifEmpty([]), -// ch_samtools_multiqc.collect().ifEmpty([]), -// ch_featurecounts_gene_multiqc.ifEmpty([]), -// ch_featurecounts_transcript_multiqc.ifEmpty([]), -// CUSTOM_DUMPSOFTWAREVERSIONS.out.mqc_yml.collect(), -// ch_workflow_summary.collectFile(name: 'workflow_summary_mqc.yaml') -// ) -// } +// if (!params.skip_modification_analysis && params.protocol == 'directRNA') { +// +// /* +// * SUBWORKFLOW: RNA modification detection with xPore and m6anet +// */ +// RNA_MODIFICATION_XPORE_M6ANET( ch_sample, ch_nanopolish_sortbam ) +// } +// +// if (!params.skip_fusion_analysis && (params.protocol == 'cDNA' || params.protocol == 'directRNA')) { +// +// /* +// * SUBWORKFLOW: RNA_FUSIONS_JAFFAL +// */ +// ch_fastq +// .map { it -> [ it[0], it[1] ] } +// .set { ch_fastq_simple } +// +// RNA_FUSIONS_JAFFAL( ch_fastq_simple, params.jaffal_ref_dir ) +// } + + /* + * MODULE: Parse software version numbers + */ + CUSTOM_DUMPSOFTWAREVERSIONS ( + ch_software_versions.unique().collectFile() + ) + +// if (!params.skip_multiqc) { +// workflow_summary = WorkflowNanoseq.paramsSummaryMultiqc(workflow, summary_params) +// ch_workflow_summary = Channel.value(workflow_summary) +// +// /* +// * MODULE: MultiQC +// */ +// MULTIQC ( +// ch_multiqc_config, +// ch_multiqc_custom_config.collect().ifEmpty([]), +// ch_fastqc_multiqc.ifEmpty([]), +// ch_samtools_multiqc.collect().ifEmpty([]), +// ch_featurecounts_gene_multiqc.ifEmpty([]), +// ch_featurecounts_transcript_multiqc.ifEmpty([]), +// CUSTOM_DUMPSOFTWAREVERSIONS.out.mqc_yml.collect(), +// ch_workflow_summary.collectFile(name: 'workflow_summary_mqc.yaml') +// ) +// } } //////////////////////////////////////////////////// diff --git a/workflows/nanoseq.nf.save b/workflows/nanoseq.nf.save new file mode 100644 index 00000000..a4640294 --- /dev/null +++ b/workflows/nanoseq.nf.save @@ -0,0 +1,472 @@ +/* +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + VALIDATE INPUTS +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +*/ + +def summary_params = NfcoreSchema.paramsSummaryMap(workflow, params) + +//////////////////////////////////////////////////// +/* -- VALIDATE INPUTS -- */ +//////////////////////////////////////////////////// + +// Check input path parameters to see if they exist +checkPathParamList = [ params.input, params.multiqc_config, params.fasta ] +for (param in checkPathParamList) { if (param) { file(param, checkIfExists: true) } } + +// Check mandatory parameters +if (params.input) { + ch_input = file(params.input) +} else { + exit 1, 'Input samplesheet not specified!' +} + +// Function to check if running offline +def isOffline() { + try { + return NXF_OFFLINE as Boolean + } + catch( Exception e ) { + return false + } +} + +if (params.protocol != 'DNA' && params.protocol != 'cDNA' && params.protocol != 'directRNA') { + exit 1, "Invalid protocol option: ${params.protocol}. Valid options: 'DNA', 'cDNA', 'directRNA'" +} + +if (!params.skip_demultiplexing) { + if (!params.barcode_kit) { + params.barcode_kit = 'Auto' + } + + def qcatBarcodeKitList = ['Auto', 'RBK001', 'RBK004', 'NBD103/NBD104', + 'NBD114', 'NBD104/NBD114', 'PBC001', 'PBC096', + 'RPB004/RLB001', 'PBK004/LWB001', 'RAB204', 'VMK001', 'DUAL'] + + if (params.barcode_kit && qcatBarcodeKitList.contains(params.barcode_kit)) { + if (params.input_path) { + ch_input_path = Channel.fromPath(params.input_path, checkIfExists: true) + } else { + exit 1, "Please specify a valid input fastq file to perform demultiplexing!" + } + } else { + exit 1, "Please provide a barcode kit to demultiplex with qcat. Valid options: ${qcatBarcodeKitList}" + } +} + +if (!params.skip_alignment) { + if (params.aligner != 'minimap2' && params.aligner != 'graphmap2') { + exit 1, "Invalid aligner option: ${params.aligner}. Valid options: 'minimap2', 'graphmap2'" + } + if (params.protocol != 'DNA' && params.protocol != 'cDNA' && params.protocol != 'directRNA') { + exit 1, "Invalid protocol option: ${params.protocol}. Valid options: 'DNA', 'cDNA', 'directRNA'" + } +} + +if (params.call_variants) { + if (params.protocol != 'DNA') { + exit 1, "Invalid protocol option: ${params.protocol}. Valid options: 'DNA'" + } + if (!params.skip_vc && params.variant_caller != 'medaka' && params.variant_caller != 'deepvariant' && params.variant_caller != 'pepper_margin_deepvariant') { + exit 1, "Invalid variant caller option: ${params.variant_caller}. Valid options: 'medaka', 'deepvariant' or 'pepper_margin_deepvariant'" + } + if (!params.skip_sv && params.structural_variant_caller != 'sniffles' && params.structural_variant_caller != 'cutesv') { + exit 1, "Invalid structural variant caller option: ${params.structural_variant_caller}. Valid options: 'sniffles', 'cutesv" + } + if (!params.skip_vc && params.enable_conda && params.variant_caller != 'medaka') { + exit 1, "Conda environments cannot be used when using the deepvariant or pepper_margin_deepvariant tools. Valid options: 'docker', 'singularity'" + } +} + +if (!params.skip_quantification) { + if (params.quantification_method != 'bambu' && params.quantification_method != 'stringtie2') { + exit 1, "Invalid transcript quantification option: ${params.quantification_method}. Valid options: 'bambu', 'stringtie2'" + } + if (params.protocol != 'cDNA' && params.protocol != 'directRNA') { + exit 1, "Invalid protocol option if performing quantification: ${params.protocol}. Valid options: 'cDNA', 'directRNA'" + } +} + +//////////////////////////////////////////////////// +/* -- CONFIG FILES -- */ +//////////////////////////////////////////////////// + +ch_multiqc_config = file("$baseDir/assets/multiqc_config.yml", checkIfExists: true) +ch_multiqc_custom_config = params.multiqc_config ? Channel.fromPath(params.multiqc_config) : Channel.empty() + +//////////////////////////////////////////////////// +/* -- IMPORT LOCAL MODULES/SUBWORKFLOWS -- */ +//////////////////////////////////////////////////// + +/* + * MODULE: Local + */ + +include { GET_TEST_DATA } from '../modules/local/get_test_data' +include { GET_NANOLYSE_FASTA } from '../modules/local/get_nanolyse_fasta' +include { QCAT } from '../modules/local/qcat' +include { BAM_RENAME } from '../modules/local/bam_rename' +include { BAMBU } from '../modules/local/bambu' +include { MULTIQC } from '../modules/local/multiqc' + +/* + * SUBWORKFLOW: Consisting of a mix of local and nf-core/modules + */ + +include { INPUT_CHECK } from '../subworkflows/local/input_check' +include { PREPARE_GENOME } from '../subworkflows/local/prepare_genome' +include { QCFASTQ_NANOPLOT_FASTQC } from '../subworkflows/local/qcfastq_nanoplot_fastqc' +include { ALIGN_GRAPHMAP2 } from '../subworkflows/local/align_graphmap2' +include { ALIGN_MINIMAP2 } from '../subworkflows/local/align_minimap2' +include { BAM_SORT_INDEX_SAMTOOLS } from '../subworkflows/local/bam_sort_index_samtools' +include { SHORT_VARIANT_CALLING } from '../subworkflows/local/short_variant_calling' +include { STRUCTURAL_VARIANT_CALLING } from '../subworkflows/local/structural_variant_calling' +include { BEDTOOLS_UCSC_BIGWIG } from '../subworkflows/local/bedtools_ucsc_bigwig' +include { BEDTOOLS_UCSC_BIGBED } from '../subworkflows/local/bedtools_ucsc_bigbed' +include { QUANTIFY_STRINGTIE_FEATURECOUNTS } from '../subworkflows/local/quantify_stringtie_featurecounts' +include { DIFFERENTIAL_DESEQ2_DEXSEQ } from '../subworkflows/local/differential_deseq2_dexseq' +include { RNA_MODIFICATION_XPORE_M6ANET } from '../subworkflows/local/rna_modifications_xpore_m6anet' +include { RNA_FUSIONS_JAFFAL } from '../subworkflows/local/rna_fusions_jaffal' + +//////////////////////////////////////////////////// +/* -- IMPORT NF-CORE MODULES/SUBWORKFLOWS -- */ +//////////////////////////////////////////////////// + +/* + * MODULE: Installed directly from nf-core/modules + */ +include { NANOLYSE } from '../modules/nf-core/nanolyse/main' +include { CUSTOM_DUMPSOFTWAREVERSIONS } from '../modules/nf-core/custom/dumpsoftwareversions/main' + +/* + * SUBWORKFLOW: Consisting entirely of nf-core/modules + */ + +//////////////////////////////////////////////////// +/* -- RUN MAIN WORKFLOW -- */ +//////////////////////////////////////////////////// + +// Info required for completion email and summary +def multiqc_report = [] + +workflow NANOSEQ{ + + /* + * Download test dataset for '--input_path' if applicable + */ + if (workflow.profile.contains('test') && !workflow.profile.contains('vc')) { + if (!params.skip_modification_analysis) { + if (!isOffline()) { + GET_TEST_DATA () + GET_TEST_DATA.out.ch_input_dir_path + .set { ch_input_path } + } else { + exit 1, "NXF_OFFLINE=true or -offline has been set so cannot download and run any test dataset!" + } + } else { + if (params.input_path) { + Channel.fromPath(params.input_path, checkIfExists: true) + .set { ch_input_path } + } else { + Channel.of('not_changed') + .set { ch_input_path } + } + } + } else { + if (params.input_path) { + Channel.fromPath(params.input_path, checkIfExists: true) + .set { ch_input_path } + } else { + Channel.of('not_changed') + .set { ch_input_path } + } + } + + ch_software_versions = Channel.empty() + + /* + * SUBWORKFLOW: Read samplesheet, validate samplesheet, and stage input files + */ + INPUT_CHECK (ch_input, ch_input_path) + .set { ch_sample } + + if (!params.skip_demultiplexing) { + + /* + * MODULE: Demultipexing using qcat + */ + QCAT (ch_input_path) + QCAT.out.fastq + .flatten() + .map { it -> [ it.baseName.substring(0,it.baseName.lastIndexOf('.')), it ] } + .join(ch_sample.map{ meta, empty -> [meta.barcode, meta] }, by: [0] ) + .map { it -> [ it[2], it[1] ] } + .set { ch_fastq_dirty } + ch_software_versions = ch_software_versions.mix(QCAT.out.versions.ifEmpty(null)) + } else { + if (!params.skip_alignment) { + ch_sample + .set { ch_fastq_dirty } + } else { + ch_fastq_dirty = Channel.empty() + } + } + + if (params.run_nanolyse) { + + /* + * MODULE: Get NanoLyse test data + */ + if (!params.nanolyse_fasta) { + if (!isOffline()) { + GET_NANOLYSE_FASTA() + GET_NANOLYSE_FASTA.out.ch_nanolyse_fasta + .set{ ch_nanolyse_fasta } + } else { + exit 1, "NXF_OFFLINE=true or -offline has been set so cannot download lambda.fasta.gz file for running NanoLyse! Please explicitly specify --nanolyse_fasta." + } + } else { + ch_nanolyse_fasta = file(params.nanolyse_fasta, checkIfExists: true) + } + + /* + * MODULE: DNA contaminant removal using NanoLyse + */ + NANOLYSE (ch_fastq_dirty, ch_nanolyse_fasta) + NANOLYSE.out.fastq + .set { ch_fastq } + ch_software_versions = ch_software_versions.mix(NANOLYSE.out.versions.first().ifEmpty(null)) + } else { + ch_fastq_dirty + .map { it -> [ it[0], it[1] ] } + .set { ch_fastq } + } + + ch_fastqc_multiqc = Channel.empty() + if (!params.skip_qc) { + + /* + * SUBWORKFLOW: Fastq QC with Nanoplot and fastqc + */ + QCFASTQ_NANOPLOT_FASTQC (ch_fastq) + ch_software_versions = ch_software_versions.mix(QCFASTQ_NANOPLOT_FASTQC.out.fastqc_version.first().ifEmpty(null)) + ch_fastqc_multiqc = QCFASTQ_NANOPLOT_FASTQC.out.fastqc_multiqc.ifEmpty([]) + } + + ch_samtools_multiqc = Channel.empty() + + if (!params.skip_alignment) { + + /* + * SUBWORKFLOW: Make chromosome size file and covert GTF to BED12 + */ + PREPARE_GENOME () + ch_fasta = PREPARE_GENOME.out.ch_fasta + ch_fai = PREPARE_GENOME.out.ch_fai + ch_sizes = PREPARE_GENOME.out.ch_sizes + ch_gtf = PREPARE_GENOME.out.ch_gtf + ch_bed = PREPARE_GENOME.out.ch_bed + ch_software_versions = ch_software_versions.mix(PREPARE_GENOME.out.ch_versions.first().ifEmpty(null)) + +// if (params.aligner == 'minimap2') { + + /* + * SUBWORKFLOW: Create index and align fastq files with MINIMAP2 + */ +// ALIGN_MINIMAP2 ( ch_fasta, ch_sizes, ch_gtf, ch_bed, ch_fastq ) +// ch_index = ALIGN_MINIMAP2.out.ch_index +// ch_bam_bai = ALIGN_MINIMAP2.out.ch_bam_bai +// ch_software_versions = ch_software_versions.mix(ALIGN_MINIMAP2.out.ch_versions.first().ifEmpty(null)) +// } else { + + /* + * SUBWORKFLOW: Align fastq files with graphmap2 and sort bam files + */ +// ALIGN_GRAPHMAP2 ( ch_fasta_index, ch_fastq ) +// ch_align_sam = ALIGN_GRAPHMAP2.out.ch_align_sam +// ch_index = ALIGN_GRAPHMAP2.out.ch_index +// ch_software_versions = ch_software_versions.mix(ALIGN_GRAPHMAP2.out.graphmap2_version.first().ifEmpty(null)) +// } + +// if (params.call_variants && params.protocol == 'DNA') { + + /* + * SUBWORKFLOW: Short variant calling + */ +// if (!params.skip_vc) { +// SHORT_VARIANT_CALLING (ch_bam, ch_bai, ch_fasta, ch_fai) +// ch_software_versions = ch_software_versions.mix(SHORT_VARIANT_CALLING.out.ch_versions.first().ifEmpty(null)) +// } + + /* + * SUBWORKFLOW: Structural variant calling + */ +// if (!params.skip_sv) { +// STRUCTURAL_VARIANT_CALLING (ch_bam_bai, ch_fasta, ch_fai) +// ch_software_versions = ch_software_versions.mix(STRUCTURAL_VARIANT_CALLING.out.ch_versions.first().ifEmpty(null)) +// } +// } + +// if (!params.skip_bigwig) { + +// /* +// * SUBWORKFLOW: Convert BAM -> BEDGraph -> BigWig +// */ +// BEDTOOLS_UCSC_BIGWIG (ch_view_sortbam) +// ch_bedtools_version = ch_bedtools_version.mix(BEDTOOLS_UCSC_BIGWIG.out.bedtools_version.first().ifEmpty(null)) +// ch_software_versions = ch_software_versions.mix(BEDTOOLS_UCSC_BIGWIG.out.bedgraphtobigwig_version.first().ifEmpty(null)) +// } +// if (!params.skip_bigbed) { + +// /* +// * SUBWORKFLOW: Convert BAM -> BED12 -> BigBED +// */ +// BEDTOOLS_UCSC_BIGBED (ch_view_sortbam) +// ch_bedtools_version = ch_bedtools_version.mix(BEDTOOLS_UCSC_BIGBED.out.bedtools_version.first().ifEmpty(null)) +// ch_software_versions = ch_software_versions.mix(BEDTOOLS_UCSC_BIGBED.out.bed12tobigbed_version.first().ifEmpty(null)) +// } +// ch_software_versions = ch_software_versions.mix(ch_bedtools_version.first().ifEmpty(null)) + +// ch_view_sortbam +// .map { it -> [ it[0], it[3] ] } +// .set { ch_sortbam } +// ch_view_sortbam +// .map { it -> [ it[0], it[3], it[4] ] } +// .set { ch_nanopolish_sortbam } +// } else { +// ch_sample +// .map { it -> if (it[6].toString().endsWith('.bam')) [ it[0], it[6] ] } +// .set { ch_sample_bam } + +// /* +// * MODULE: Rename bam files +// */ +// BAM_RENAME (ch_sample_bam) +// ch_sortbam = BAM_RENAME.out.bam +// } + +// ch_featurecounts_gene_multiqc = Channel.empty() +// ch_featurecounts_transcript_multiqc = Channel.empty() +// if (!params.skip_quantification && (params.protocol == 'cDNA' || params.protocol == 'directRNA')) { + +// // Check that reference genome and annotation are the same for all samples if perfoming quantification +// // Check if we have replicates and multiple conditions in the input samplesheet +// REPLICATES_EXIST = false +// MULTIPLE_CONDITIONS = false +// ch_sample.map{ it[2] }.unique().toList().set { fastas } +// ch_sample.map{ it[3] }.unique().toList().set { gtfs } +// // BUG: ".val" halts the pipeline /////////////////////// +// // if ( gtfs.map{it[0]} == false || fastas.map{it[0]} == false || gtfs.size().val != 1 || fasta.size().val != 1 ) { +// // exit 1, """Quantification can only be performed if all samples in the samplesheet have the same reference fasta and GTF file." +// // Please specify the '--skip_quantification' parameter if you wish to skip these steps.""" +// // } +// // REPLICATES_EXIST = ch_sample.map { it -> it[0].split('_')[-1].replaceAll('R','').toInteger() }.max().val > 1 +// // MULTIPLE_CONDITIONS = ch_sample.map { it -> it[0].split('_')[0..-2].join('_') }.unique().count().val > 1 + +// ch_r_version = Channel.empty() +// if (params.quantification_method == 'bambu') { +// ch_sample +// .map { it -> [ it[2], it[3] ]} +// .unique() +// .set { ch_sample_annotation } + +// /* +// * MODULE: Quantification and novel isoform detection with bambu +// */ +// BAMBU (ch_sample_annotation, ch_sortbam.collect{ it [1] }) +// ch_gene_counts = BAMBU.out.ch_gene_counts +// ch_transcript_counts = BAMBU.out.ch_transcript_counts +// ch_software_versions = ch_software_versions.mix(BAMBU.out.versions.first().ifEmpty(null)) +// } else { + +// /* +// * SUBWORKFLOW: Novel isoform detection with StringTie and Quantification with featureCounts +// */ +// QUANTIFY_STRINGTIE_FEATURECOUNTS(ch_sample, ch_sortbam) +// ch_gene_counts = QUANTIFY_STRINGTIE_FEATURECOUNTS.out.ch_gene_counts +// ch_transcript_counts = QUANTIFY_STRINGTIE_FEATURECOUNTS.out.ch_transcript_counts +// ch_software_versions = ch_software_versions.mix(QUANTIFY_STRINGTIE_FEATURECOUNTS.out.stringtie2_version.first().ifEmpty(null)) +// ch_software_versions = ch_software_versions.mix(QUANTIFY_STRINGTIE_FEATURECOUNTS.out.featurecounts_version.first().ifEmpty(null)) +// ch_featurecounts_gene_multiqc = QUANTIFY_STRINGTIE_FEATURECOUNTS.out.featurecounts_gene_multiqc.ifEmpty([]) +// ch_featurecounts_transcript_multiqc = QUANTIFY_STRINGTIE_FEATURECOUNTS.out.featurecounts_transcript_multiqc.ifEmpty([]) +// } +// if (!params.skip_differential_analysis) { + +// /* +// * SUBWORKFLOW: Differential gene and transcript analysis with DESeq2 and DEXseq +// */ +// DIFFERENTIAL_DESEQ2_DEXSEQ( ch_gene_counts, ch_transcript_counts ) +// ch_software_versions = ch_software_versions.mix(DIFFERENTIAL_DESEQ2_DEXSEQ.out.deseq2_version.first().ifEmpty(null)) +// ch_software_versions = ch_software_versions.mix(DIFFERENTIAL_DESEQ2_DEXSEQ.out.dexseq_version.first().ifEmpty(null)) +// } + } + +// if (!params.skip_modification_analysis && params.protocol == 'directRNA') { + +// /* +// * SUBWORKFLOW: RNA modification detection with xPore and m6anet +// */ +// RNA_MODIFICATION_XPORE_M6ANET( ch_sample, ch_nanopolish_sortbam ) +// } + +// if (!params.skip_fusion_analysis && (params.protocol == 'cDNA' || params.protocol == 'directRNA')) { + +// /* +// * SUBWORKFLOW: RNA_FUSIONS_JAFFAL +// */ +// ch_fastq +// .map { it -> [ it[0], it[1] ] } +// .set { ch_fastq_simple } + +// RNA_FUSIONS_JAFFAL( ch_fastq_simple, params.jaffal_ref_dir ) +// } + +// /* +// * MODULE: Parse software version numbers +// */ +// CUSTOM_DUMPSOFTWAREVERSIONS ( +// ch_software_versions.unique().collectFile() +// ) + +// if (!params.skip_multiqc) { +// workflow_summary = WorkflowNanoseq.paramsSummaryMultiqc(workflow, summary_params) +// ch_workflow_summary = Channel.value(workflow_summary) + +// /* +// * MODULE: MultiQC +// */ +// MULTIQC ( +// ch_multiqc_config, +// ch_multiqc_custom_config.collect().ifEmpty([]), +// ch_fastqc_multiqc.ifEmpty([]), +// ch_samtools_multiqc.collect().ifEmpty([]), +// ch_featurecounts_gene_multiqc.ifEmpty([]), +// ch_featurecounts_transcript_multiqc.ifEmpty([]), +// CUSTOM_DUMPSOFTWAREVERSIONS.out.mqc_yml.collect(), +// ch_workflow_summary.collectFile(name: 'workflow_summary_mqc.yaml') +// ) +// } +} + +//////////////////////////////////////////////////// +/* -- COMPLETION EMAIL -- */ +//////////////////////////////////////////////////// + +workflow.onComplete { + if (params.email) { + NfcoreTemplate.email(workflow, params, summary_params, projectDir, log, multiqc_report) + //Completion.email(workflow, params, params.summary_params, log, multiqc_report) + } +// Completion.summary(workflow, params, log) + NfcoreTemplate.summary(workflow, params, log) + if (params.hook_url) { + NfcoreTemplate.IM_notification(workflow, params, summary_params, projectDir, log) + } +} + +/* +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + THE END +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +*/ From 45d21a57ba8f87c25d97c1e6fbf9990d737c0288 Mon Sep 17 00:00:00 2001 From: Yuk Kei Wan Date: Thu, 16 Mar 2023 16:47:44 +0800 Subject: [PATCH 10/77] refactoring --- conf/test_nodx_noaln.config | 4 +- conf/test_nodx_stringtie.config | 1 + .../local/differential_deseq2_dexseq.nf | 12 ++-- .../local/quantify_stringtie_featurecounts.nf | 22 ++++-- workflows/nanoseq.nf | 68 +++++++++---------- 5 files changed, 58 insertions(+), 49 deletions(-) diff --git a/conf/test_nodx_noaln.config b/conf/test_nodx_noaln.config index c42e2309..d8e8805b 100644 --- a/conf/test_nodx_noaln.config +++ b/conf/test_nodx_noaln.config @@ -17,7 +17,9 @@ params { max_time = 12.h // Input data to skip demultiplexing and alignment - input = 'https://raw.githubusercontent.com/nf-core/test-datasets/nanoseq/3.0/samplesheet/samplesheet_nobc_nodx_noaln.csv' + input = 'https://raw.githubusercontent.com/yuukiiwa/test-datasets/nanoseq/3.0/samplesheet/samplesheet_nobc_nodx_noaln.csv' + fasta = 'https://raw.githubusercontent.com/nf-core/test-datasets/nanoseq/reference/chr22_1-17550000.fa' + gtf = 'https://raw.githubusercontent.com/nf-core/test-datasets/nanoseq/reference/chr22_1-17500000.gtf' protocol = 'directRNA' skip_demultiplexing = true skip_alignment = true diff --git a/conf/test_nodx_stringtie.config b/conf/test_nodx_stringtie.config index 2178a5fa..3015d6b4 100644 --- a/conf/test_nodx_stringtie.config +++ b/conf/test_nodx_stringtie.config @@ -25,4 +25,5 @@ params { skip_fusion_analysis= true skip_modification_analysis=true quantification_method = 'stringtie2' + skip_differential_analysis = true //all transcripts from the test subset got filtered out in DEXSEQ2 } diff --git a/subworkflows/local/differential_deseq2_dexseq.nf b/subworkflows/local/differential_deseq2_dexseq.nf index 9764e75c..4bfb24cc 100644 --- a/subworkflows/local/differential_deseq2_dexseq.nf +++ b/subworkflows/local/differential_deseq2_dexseq.nf @@ -14,10 +14,10 @@ workflow DIFFERENTIAL_DESEQ2_DEXSEQ { /* * DESeq2 differential expression of genes */ - ch_gene_counts.view() - DESEQ2 ( ch_gene_counts ) - ch_deseq2_txt = DESEQ2.out.deseq2_txt - deseq2_version = DESEQ2.out.versions + ch_gene_counts +// DESEQ2 ( ch_gene_counts ) +// ch_deseq2_txt = DESEQ2.out.deseq2_txt +// deseq2_version = DESEQ2.out.versions /* * DEXseq differential expression of transcripts @@ -27,8 +27,8 @@ workflow DIFFERENTIAL_DESEQ2_DEXSEQ { dexseq_version = DEXSEQ.out.versions emit: - ch_deseq2_txt +// ch_deseq2_txt ch_dexseq_txt - deseq2_version +// deseq2_version dexseq_version } diff --git a/subworkflows/local/quantify_stringtie_featurecounts.nf b/subworkflows/local/quantify_stringtie_featurecounts.nf index 8d856437..07df79fd 100644 --- a/subworkflows/local/quantify_stringtie_featurecounts.nf +++ b/subworkflows/local/quantify_stringtie_featurecounts.nf @@ -35,13 +35,21 @@ workflow QUANTIFY_STRINGTIE_FEATURECOUNTS { /* * Gene and transcript quantification with featureCounts */ - ch_sorted_bam - .combine (ch_stringtie_merged_gtf) - .set { ch_featurecounts_input } - SUBREAD_FEATURECOUNTS_GENE ( ch_featurecounts_input ) - SUBREAD_FEATURECOUNTS_TRANSCRIPT ( ch_featurecounts_input ) - ch_gene_counts = SUBREAD_FEATURECOUNTS_GENE.out.counts - ch_transcript_counts = SUBREAD_FEATURECOUNTS_TRANSCRIPT.out.counts + ch_stringtie_merged_gtf + .combine( [[id:'gene']] ) + .combine( [ch_sorted_bam.collect{it[1]}]) + .map {it -> [it[1], it[2].value, it[0]]} + .set { ch_featurecounts_gene_input } + ch_stringtie_merged_gtf + .combine( [[id:'transcript']] ) + .combine( [ch_sorted_bam.collect{it[1]}]) + .map {it -> [it[1], it[2].value, it[0]]} + .set { ch_featurecounts_transcript_input } + + SUBREAD_FEATURECOUNTS_GENE ( ch_featurecounts_gene_input ) + SUBREAD_FEATURECOUNTS_TRANSCRIPT ( ch_featurecounts_transcript_input ) + ch_gene_counts = SUBREAD_FEATURECOUNTS_GENE.out.counts.map{it -> it[1]} + ch_transcript_counts = SUBREAD_FEATURECOUNTS_TRANSCRIPT.out.counts.map{it -> it[1]} featurecounts_gene_multiqc = SUBREAD_FEATURECOUNTS_GENE.out.summary featurecounts_transcript_multiqc = SUBREAD_FEATURECOUNTS_TRANSCRIPT.out.summary featurecounts_version = SUBREAD_FEATURECOUNTS_GENE.out.versions diff --git a/workflows/nanoseq.nf b/workflows/nanoseq.nf index 402d6176..9f2bba0d 100644 --- a/workflows/nanoseq.nf +++ b/workflows/nanoseq.nf @@ -111,7 +111,7 @@ ch_multiqc_custom_config = params.multiqc_config ? Channel.fromPath(params.multi include { GET_TEST_DATA } from '../modules/local/get_test_data' include { GET_NANOLYSE_FASTA } from '../modules/local/get_nanolyse_fasta' include { BAM_RENAME } from '../modules/local/bam_rename' -//include { BAMBU } from '../modules/local/bambu' +include { BAMBU } from '../modules/local/bambu' //include { MULTIQC } from '../modules/local/multiqc' /* @@ -344,7 +344,7 @@ workflow NANOSEQ{ .map { it -> if (it[1].toString().endsWith('.bam')) [ it[0], it[1] ] } .set { ch_sample_bam } BAM_RENAME ( ch_sample_bam ) - ch_sortbam = BAM_RENAME.out.bam + ch_sorted_bam = BAM_RENAME.out.bam } ch_featurecounts_gene_multiqc = Channel.empty() @@ -365,18 +365,16 @@ workflow NANOSEQ{ ch_r_version = Channel.empty() if (params.quantification_method == 'bambu') { -// ch_sample -// .map { it -> [ it[2], it[3] ]} -// .unique() -// .set { ch_sample_annotation } -// -// /* -// * MODULE: Quantification and novel isoform detection with bambu -// */ -// BAMBU ( ch_sample_annotation, ch_sorted_bam.collect{ it [1] } ) -// ch_gene_counts = BAMBU.out.ch_gene_counts -// ch_transcript_counts = BAMBU.out.ch_transcript_counts -// ch_software_versions = ch_software_versions.mix(BAMBU.out.versions.first().ifEmpty(null)) + ch_sample_annotation=Channel.from(params.fasta,params.gtf).collect() + ch_sample_annotation.view() + + /* + * MODULE: Quantification and novel isoform detection with bambu + */ + BAMBU ( ch_sample_annotation, ch_sorted_bam.collect{ it [1] } ) + ch_gene_counts = BAMBU.out.ch_gene_counts + ch_transcript_counts = BAMBU.out.ch_transcript_counts + ch_software_versions = ch_software_versions.mix(BAMBU.out.versions.first().ifEmpty(null)) } else { /* @@ -390,15 +388,15 @@ workflow NANOSEQ{ ch_featurecounts_gene_multiqc = QUANTIFY_STRINGTIE_FEATURECOUNTS.out.featurecounts_gene_multiqc.ifEmpty([]) ch_featurecounts_transcript_multiqc = QUANTIFY_STRINGTIE_FEATURECOUNTS.out.featurecounts_transcript_multiqc.ifEmpty([]) } -// if (!params.skip_differential_analysis) { -// -// /* -// * SUBWORKFLOW: Differential gene and transcript analysis with DESeq2 and DEXseq -// */ -// DIFFERENTIAL_DESEQ2_DEXSEQ( ch_gene_counts, ch_transcript_counts ) -// ch_software_versions = ch_software_versions.mix(DIFFERENTIAL_DESEQ2_DEXSEQ.out.deseq2_version.first().ifEmpty(null)) -// ch_software_versions = ch_software_versions.mix(DIFFERENTIAL_DESEQ2_DEXSEQ.out.dexseq_version.first().ifEmpty(null)) -// } + if (!params.skip_differential_analysis) { + + /* + * SUBWORKFLOW: Differential gene and transcript analysis with DESeq2 and DEXseq + */ + DIFFERENTIAL_DESEQ2_DEXSEQ( ch_gene_counts, ch_transcript_counts ) + //ch_software_versions = ch_software_versions.mix(DIFFERENTIAL_DESEQ2_DEXSEQ.out.deseq2_version.first().ifEmpty(null)) + ch_software_versions = ch_software_versions.mix(DIFFERENTIAL_DESEQ2_DEXSEQ.out.dexseq_version.first().ifEmpty(null)) + } } // if (!params.skip_modification_analysis && params.protocol == 'directRNA') { @@ -408,18 +406,18 @@ workflow NANOSEQ{ // */ // RNA_MODIFICATION_XPORE_M6ANET( ch_sample, ch_nanopolish_sortbam ) // } -// -// if (!params.skip_fusion_analysis && (params.protocol == 'cDNA' || params.protocol == 'directRNA')) { -// -// /* -// * SUBWORKFLOW: RNA_FUSIONS_JAFFAL -// */ -// ch_fastq -// .map { it -> [ it[0], it[1] ] } -// .set { ch_fastq_simple } -// -// RNA_FUSIONS_JAFFAL( ch_fastq_simple, params.jaffal_ref_dir ) -// } + + if (!params.skip_fusion_analysis && (params.protocol == 'cDNA' || params.protocol == 'directRNA')) { + + /* + * SUBWORKFLOW: RNA_FUSIONS_JAFFAL + */ + ch_fastq + .map { it -> [ it[0], it[1] ] } + .set { ch_fastq } + + RNA_FUSIONS_JAFFAL( ch_fastq, params.jaffal_ref_dir ) + } /* * MODULE: Parse software version numbers From 5f5dcd177d2e51c2a4127db363bb9ffd467921b1 Mon Sep 17 00:00:00 2001 From: Yuk Kei Wan Date: Fri, 17 Mar 2023 13:36:49 +0800 Subject: [PATCH 11/77] replace medaka with clair3 --- conf/test_nodx_vc.config | 5 +- modules.json | 16 ++++- modules/local/cutesv.nf | 2 +- modules/local/get_jaffal_ref.nf | 4 +- modules/local/jaffal.nf | 4 +- modules/local/pepper_margin_deepvariant.nf | 2 +- modules/nf-core/bcftools/sort/main.nf | 60 ++++++++++++++++++ modules/nf-core/bcftools/sort/meta.yml | 43 +++++++++++++ modules/nf-core/untar/main.nf | 63 +++++++++++++++++++ modules/nf-core/untar/meta.yml | 40 ++++++++++++ subworkflows/local/short_variant_calling.nf | 61 ++++++++++-------- .../local/structural_variant_calling.nf | 21 +++++-- workflows/nanoseq.nf | 29 +++++---- 13 files changed, 296 insertions(+), 54 deletions(-) create mode 100644 modules/nf-core/bcftools/sort/main.nf create mode 100644 modules/nf-core/bcftools/sort/meta.yml create mode 100644 modules/nf-core/untar/main.nf create mode 100644 modules/nf-core/untar/meta.yml diff --git a/conf/test_nodx_vc.config b/conf/test_nodx_vc.config index dd4d6661..a9058562 100644 --- a/conf/test_nodx_vc.config +++ b/conf/test_nodx_vc.config @@ -23,7 +23,6 @@ params { skip_quantification = true skip_demultiplexing = true call_variants = true - - variant_caller = 'deepvariant' - structural_variant_caller = 'sniffles' + variant_caller = 'clair3' + //structural_variant_caller = 'cutesv' } diff --git a/modules.json b/modules.json index 42153071..0a756096 100644 --- a/modules.json +++ b/modules.json @@ -5,6 +5,13 @@ "https://github.com/nf-core/modules.git": { "modules": { "nf-core": { + "bcftools/sort": { + "branch": "master", + "git_sha": "4a21e4cca35e72ec059abd67f790e0b192ce5d81", + "installed_by": [ + "modules" + ] + }, "bedtools/bamtobed": { "branch": "master", "git_sha": "1d48427957205cb6acf1ffe330bd35b6bb8baa90", @@ -186,6 +193,13 @@ "installed_by": [ "modules" ] + }, + "untar": { + "branch": "master", + "git_sha": "cc1f997fab6d8fde5dc0e6e2a310814df5b53ce7", + "installed_by": [ + "modules" + ] } } }, @@ -202,4 +216,4 @@ } } } -} +} \ No newline at end of file diff --git a/modules/local/cutesv.nf b/modules/local/cutesv.nf index c78e540c..d476cbda 100644 --- a/modules/local/cutesv.nf +++ b/modules/local/cutesv.nf @@ -12,7 +12,7 @@ process CUTESV { path(fasta) output: - tuple val(meta), path("*_cuteSV.vcf"), emit: sv_calls // vcf files + tuple val(meta), path("*_cuteSV.vcf"), emit: sv_vcf // vcf files path "versions.yml" , emit: versions when: diff --git a/modules/local/get_jaffal_ref.nf b/modules/local/get_jaffal_ref.nf index c0b8985b..cf4815b5 100644 --- a/modules/local/get_jaffal_ref.nf +++ b/modules/local/get_jaffal_ref.nf @@ -3,8 +3,8 @@ process GET_JAFFAL_REF { conda "conda-forge::sed=4.7" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/ubuntu:20.04' : - 'ubuntu:20.04' }" + 'https://containers.biocontainers.pro/s3/SingImgsRepo/biocontainers/v1.2.0_cv1/biocontainers_v1.2.0_cv1.img' : + 'biocontainers/biocontainers:v1.2.0_cv1' }" output: tuple val(null), path("for_jaffal.tar.gz"), emit: ch_jaffal_ref diff --git a/modules/local/jaffal.nf b/modules/local/jaffal.nf index a0668bcb..ea430265 100644 --- a/modules/local/jaffal.nf +++ b/modules/local/jaffal.nf @@ -4,8 +4,8 @@ process JAFFAL { conda "bioconda::jaffa=2.3.0" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/jaffa:2.3--hdfd78af_0' : - 'quay.io/biocontainers/jaffa:2.3--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/jaffa:2.00--hdfd78af_1' : + 'docker.io/yuukiiwa/jaffa:2.0' }" input: tuple val(meta), path(fastq) diff --git a/modules/local/pepper_margin_deepvariant.nf b/modules/local/pepper_margin_deepvariant.nf index 11190c1f..6b44d93c 100644 --- a/modules/local/pepper_margin_deepvariant.nf +++ b/modules/local/pepper_margin_deepvariant.nf @@ -9,7 +9,7 @@ process PEPPER_MARGIN_DEEPVARIANT { } input: - tuple val(meta), path(sizes), val(is_transcripts), path(input), path(index) + tuple val(meta), path(input), path(index), val(intervals) path(fasta) path(fai) diff --git a/modules/nf-core/bcftools/sort/main.nf b/modules/nf-core/bcftools/sort/main.nf new file mode 100644 index 00000000..9ae3253b --- /dev/null +++ b/modules/nf-core/bcftools/sort/main.nf @@ -0,0 +1,60 @@ +process BCFTOOLS_SORT { + tag "$meta.id" + label 'process_medium' + + conda "bioconda::bcftools=1.16" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/bcftools:1.16--hfe4b78e_1': + 'quay.io/biocontainers/bcftools:1.16--hfe4b78e_1' }" + + input: + tuple val(meta), path(vcf) + + output: + tuple val(meta), path("*.{vcf,vcf.gz,bcf,bcf.gz}") , emit: vcf + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '--output-type z' + def prefix = task.ext.prefix ?: "${meta.id}" + def extension = args.contains("--output-type b") || args.contains("-Ob") ? "bcf.gz" : + args.contains("--output-type u") || args.contains("-Ou") ? "bcf" : + args.contains("--output-type z") || args.contains("-Oz") ? "vcf.gz" : + args.contains("--output-type v") || args.contains("-Ov") ? "vcf" : + "vcf" + + """ + bcftools \\ + sort \\ + --output ${prefix}.${extension} \\ + $args \\ + $vcf + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + bcftools: \$(bcftools --version 2>&1 | head -n1 | sed 's/^.*bcftools //; s/ .*\$//') + END_VERSIONS + """ + + stub: + def args = task.ext.args ?: '--output-type z' + def prefix = task.ext.prefix ?: "${meta.id}" + + def extension = args.contains("--output-type b") || args.contains("-Ob") ? "bcf.gz" : + args.contains("--output-type u") || args.contains("-Ou") ? "bcf" : + args.contains("--output-type z") || args.contains("-Oz") ? "vcf.gz" : + args.contains("--output-type v") || args.contains("-Ov") ? "vcf" : + "vcf" + + """ + touch ${prefix}.${extension} + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + bcftools: \$(bcftools --version 2>&1 | head -n1 | sed 's/^.*bcftools //; s/ .*\$//') + END_VERSIONS + """ +} diff --git a/modules/nf-core/bcftools/sort/meta.yml b/modules/nf-core/bcftools/sort/meta.yml new file mode 100644 index 00000000..0c244a48 --- /dev/null +++ b/modules/nf-core/bcftools/sort/meta.yml @@ -0,0 +1,43 @@ +name: bcftools_sort +description: Sorts VCF files +keywords: + - sorting + - VCF + - variant calling +tools: + - sort: + description: Sort VCF files by coordinates. + homepage: http://samtools.github.io/bcftools/bcftools.html + documentation: http://www.htslib.org/doc/bcftools.html + tool_dev_url: https://github.com/samtools/bcftools + doi: "10.1093/bioinformatics/btp352" + licence: ["MIT"] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - vcf: + type: file + description: The VCF/BCF file to be sorted + pattern: "*.{vcf.gz,vcf,bcf}" + +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + - vcf: + type: file + description: Sorted VCF file + pattern: "*.{vcf.gz}" + +authors: + - "@Gwennid" diff --git a/modules/nf-core/untar/main.nf b/modules/nf-core/untar/main.nf new file mode 100644 index 00000000..3384847a --- /dev/null +++ b/modules/nf-core/untar/main.nf @@ -0,0 +1,63 @@ +process UNTAR { + tag "$archive" + label 'process_single' + + conda "conda-forge::sed=4.7 bioconda::grep=3.4 conda-forge::tar=1.34" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/ubuntu:20.04' : + 'ubuntu:20.04' }" + + input: + tuple val(meta), path(archive) + + output: + tuple val(meta), path("$prefix"), emit: untar + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def args2 = task.ext.args2 ?: '' + prefix = task.ext.prefix ?: ( meta.id ? "${meta.id}" : archive.baseName.toString().replaceFirst(/\.tar$/, "")) + + """ + mkdir $prefix + + ## Ensures --strip-components only applied when top level of tar contents is a directory + ## If just files or multiple directories, place all in prefix + if [[ \$(tar -taf ${archive} | grep -o -P "^.*?\\/" | uniq | wc -l) -eq 1 ]]; then + tar \\ + -C $prefix --strip-components 1 \\ + -xavf \\ + $args \\ + $archive \\ + $args2 + else + tar \\ + -C $prefix \\ + -xavf \\ + $args \\ + $archive \\ + $args2 + fi + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + untar: \$(echo \$(tar --version 2>&1) | sed 's/^.*(GNU tar) //; s/ Copyright.*\$//') + END_VERSIONS + """ + + stub: + prefix = task.ext.prefix ?: ( meta.id ? "${meta.id}" : archive.toString().replaceFirst(/\.[^\.]+(.gz)?$/, "")) + """ + mkdir $prefix + touch ${prefix}/file.txt + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + untar: \$(echo \$(tar --version 2>&1) | sed 's/^.*(GNU tar) //; s/ Copyright.*\$//') + END_VERSIONS + """ +} diff --git a/modules/nf-core/untar/meta.yml b/modules/nf-core/untar/meta.yml new file mode 100644 index 00000000..ea7a3f38 --- /dev/null +++ b/modules/nf-core/untar/meta.yml @@ -0,0 +1,40 @@ +name: untar +description: Extract files. +keywords: + - untar + - uncompress +tools: + - untar: + description: | + Extract tar.gz files. + documentation: https://www.gnu.org/software/tar/manual/ + licence: ["GPL-3.0-or-later"] +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - archive: + type: file + description: File to be untar + pattern: "*.{tar}.{gz}" +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - untar: + type: directory + description: Directory containing contents of archive + pattern: "*/" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" +authors: + - "@joseespinosa" + - "@drpatelh" + - "@matthdsm" + - "@jfy133" diff --git a/subworkflows/local/short_variant_calling.nf b/subworkflows/local/short_variant_calling.nf index f3a5107f..19b4cd48 100644 --- a/subworkflows/local/short_variant_calling.nf +++ b/subworkflows/local/short_variant_calling.nf @@ -2,9 +2,9 @@ * Short variant calling test */ -include { MEDAKA_VARIANT } from '../../modules/local/medaka_variant' -include { TABIX_BGZIP as MEDAKA_BGZIP_VCF } from '../../modules/nf-core/tabix/bgzip/main' -include { TABIX_TABIX as MEDAKA_TABIX_VCF } from '../../modules/nf-core/tabix/tabix/main' +include { CLAIR3 } from '../../modules/local/clair3' +include { TABIX_BGZIP as CLAIR3_BGZIP_VCF } from '../../modules/nf-core/tabix/bgzip/main' +include { TABIX_TABIX as CLAIR3_TABIX_VCF } from '../../modules/nf-core/tabix/tabix/main' include { DEEPVARIANT } from '../../modules/nf-core/deepvariant/main' include { TABIX_TABIX as DEEPVARIANT_TABIX_VCF } from '../../modules/nf-core/tabix/tabix/main' include { TABIX_TABIX as DEEPVARIANT_TABIX_GVCF } from '../../modules/nf-core/tabix/tabix/main' @@ -28,35 +28,42 @@ workflow SHORT_VARIANT_CALLING { /* * Call short variants */ - if (params.variant_caller == 'medaka') { + + ch_sorted_bam + .join(ch_sorted_bai, by: 0) + .map { it -> [ it[0], it[1], it[2], [] ] } + .view() + .set { ch_shortv_input } + ch_sorted_bam + .combine(ch_fasta.map{it->it[1]}) + .map { it -> it[2] } + .set { ch_fasta } + ch_sorted_bam + .combine(ch_fai.map{it->it[1]}) + .map { it -> it[2] } + .set { ch_fai } + + if (params.variant_caller == 'clair3') { /* * Call short variants with medaka */ - ch_sorted_bam - .join(ch_sorted_bai, by: 0) - .view() - .set { ch_sorted_bam_bai } - ch_sorted_bam - .combine(ch_fasta.map{it->it[1]}) - .map { it -> it[2] } - .set { ch_fasta } - MEDAKA_VARIANT ( ch_sorted_bam_bai, ch_fasta ) - ch_versions = ch_versions.mix(medaka_version = MEDAKA_VARIANT.out.versions) + CLAIR3 ( ch_shortv_input, ch_fasta, ch_fai ) + ch_versions = ch_versions.mix(medaka_version = CLAIR3.out.versions) /* * Zip medaka vcf */ - MEDAKA_BGZIP_VCF( MEDAKA_VARIANT.out.vcf ) - ch_short_calls_vcf = MEDAKA_BGZIP_VCF.out.output - ch_versions = ch_versions.mix(bgzip_version = MEDAKA_BGZIP_VCF.out.versions) + CLAIR3_BGZIP_VCF( CLAIR3.out.vcf ) + ch_short_calls_vcf = CLAIR3_BGZIP_VCF.out.output + ch_versions = ch_versions.mix(bgzip_version = CLAIR3_BGZIP_VCF.out.versions) /* * Index medaka vcf.gz */ - MEDAKA_TABIX_VCF( ch_short_calls_vcf ) - ch_short_calls_vcf_tbi = MEDAKA_TABIX_VCF.out.tbi - ch_versions = ch_versions.mix(tabix_version = MEDAKA_TABIX_VCF.out.versions) + CLAIR3_TABIX_VCF( ch_short_calls_vcf ) + ch_short_calls_vcf_tbi = CLAIR3_TABIX_VCF.out.tbi + ch_versions = ch_versions.mix(tabix_version = CLAIR3_TABIX_VCF.out.versions) } else if (params.variant_caller == 'deepvariant') { @@ -101,16 +108,16 @@ workflow SHORT_VARIANT_CALLING { /* * Call variants with pepper_margin_deepvariant (automatic zip + index, docker + singularity only) */ - PEPPER_MARGIN_DEEPVARIANT( ch_view_sortbam, ch_fasta, ch_fai ) + PEPPER_MARGIN_DEEPVARIANT( ch_shortv_input, ch_fasta, ch_fai ) ch_short_calls_vcf = PEPPER_MARGIN_DEEPVARIANT.out.vcf ch_short_calls_vcf_tbi = PEPPER_MARGIN_DEEPVARIANT.out.tbi ch_versions = ch_versions.mix(PEPPER_MARGIN_DEEPVARIANT.out.versions) } -// emit: -// ch_short_calls_vcf -// ch_short_calls_vcf_tbi -// ch_short_calls_gvcf -// ch_short_calls_gvcf_tbi -// ch_versions + emit: + ch_short_calls_vcf + ch_short_calls_vcf_tbi + ch_short_calls_gvcf + ch_short_calls_gvcf_tbi + ch_versions } diff --git a/subworkflows/local/structural_variant_calling.nf b/subworkflows/local/structural_variant_calling.nf index 5b0cc963..fbb963a1 100644 --- a/subworkflows/local/structural_variant_calling.nf +++ b/subworkflows/local/structural_variant_calling.nf @@ -15,7 +15,8 @@ include { TABIX_TABIX as CUTESV_TABIX_VCF } from '../../modules/nf-core/ta workflow STRUCTURAL_VARIANT_CALLING { take: - ch_view_sortbam + ch_sorted_bam + ch_sorted_bai ch_fasta ch_fai @@ -25,6 +26,16 @@ workflow STRUCTURAL_VARIANT_CALLING { ch_versions = Channel.empty() + ch_sorted_bam + .join(ch_sorted_bai, by: 0) + .map { it -> [ it[0], it[1], it[2] ] } + .view() + .set { ch_sv_input } + ch_sorted_bam + .combine(ch_fasta.map{it->it[1]}) + .map { it -> it[2] } + .set { ch_fasta } + /* * Call structural variants with sniffles */ @@ -33,13 +44,13 @@ workflow STRUCTURAL_VARIANT_CALLING { /* * Call structural variants with sniffles */ - SNIFFLES( ch_view_sortbam ) + SNIFFLES( ch_sv_input, ch_fasta ) ch_versions = ch_versions.mix(SNIFFLES.out.versions) /* * Sort structural variants with bcftools */ - SNIFFLES_SORT_VCF( SNIFFLES.out.sv_calls ) + SNIFFLES_SORT_VCF( SNIFFLES.out.sv_vcf ) ch_sv_calls_vcf = SNIFFLES_SORT_VCF.out.vcf ch_versions = ch_versions.mix(SNIFFLES_SORT_VCF.out.versions) @@ -55,13 +66,13 @@ workflow STRUCTURAL_VARIANT_CALLING { /* * Call structural variants with cutesv */ - CUTESV( ch_view_sortbam, ch_fasta ) + CUTESV( ch_sv_input, ch_fasta ) ch_versions = ch_versions.mix(CUTESV.out.versions) /* * Sort structural variants with bcftools */ - CUTESV_SORT_VCF( CUTESV.out.sv_calls ) + CUTESV_SORT_VCF( CUTESV.out.sv_vcf ) ch_sv_calls_vcf = CUTESV_SORT_VCF.out.vcf ch_versions = ch_versions.mix(CUTESV_SORT_VCF.out.versions) diff --git a/workflows/nanoseq.nf b/workflows/nanoseq.nf index 9f2bba0d..86d60eca 100644 --- a/workflows/nanoseq.nf +++ b/workflows/nanoseq.nf @@ -77,7 +77,7 @@ if (params.call_variants) { if (params.protocol != 'DNA') { exit 1, "Invalid protocol option: ${params.protocol}. Valid options: 'DNA'" } - if (!params.skip_vc && params.variant_caller != 'medaka' && params.variant_caller != 'deepvariant' && params.variant_caller != 'pepper_margin_deepvariant') { + if (!params.skip_vc && params.variant_caller != 'clair3' && params.variant_caller != 'deepvariant' && params.variant_caller != 'pepper_margin_deepvariant') { exit 1, "Invalid variant caller option: ${params.variant_caller}. Valid options: 'medaka', 'deepvariant' or 'pepper_margin_deepvariant'" } if (!params.skip_sv && params.structural_variant_caller != 'sniffles' && params.structural_variant_caller != 'cutesv') { @@ -120,10 +120,10 @@ include { BAMBU } from '../modules/local/bambu' include { INPUT_CHECK } from '../subworkflows/local/input_check' include { SHORT_VARIANT_CALLING } from '../subworkflows/local/short_variant_calling' -//include { STRUCTURAL_VARIANT_CALLING } from '../subworkflows/local/structural_variant_calling' +include { STRUCTURAL_VARIANT_CALLING } from '../subworkflows/local/structural_variant_calling' include { DIFFERENTIAL_DESEQ2_DEXSEQ } from '../subworkflows/local/differential_deseq2_dexseq' //include { RNA_MODIFICATION_XPORE_M6ANET } from '../subworkflows/local/rna_modifications_xpore_m6anet' -//include { RNA_FUSIONS_JAFFAL } from '../subworkflows/local/rna_fusions_jaffal' +include { RNA_FUSIONS_JAFFAL } from '../subworkflows/local/rna_fusions_jaffal' //////////////////////////////////////////////////// /* -- IMPORT NF-CORE MODULES/SUBWORKFLOWS -- */ @@ -218,7 +218,7 @@ workflow NANOSEQ{ .set { ch_fastq } ch_software_versions = ch_software_versions.mix(QCAT.out.versions.ifEmpty(null)) } else { - if (!params.skip_alignment) { + if (!params.skip_alignment || !params.skip_fusion_analysis) { ch_sample .map { it -> if (it[1].toString().endsWith('.gz')) [ it[0], it[1], it[2], it[3] ] } .set { ch_fastq } @@ -302,16 +302,16 @@ workflow NANOSEQ{ */ if (!params.skip_vc) { SHORT_VARIANT_CALLING ( ch_sorted_bam, ch_sorted_bai, ch_fasta, ch_fai ) - //ch_software_versions = ch_software_versions.mix(SHORT_VARIANT_CALLING.out.ch_versions.first().ifEmpty(null)) + ch_software_versions = ch_software_versions.mix(SHORT_VARIANT_CALLING.out.ch_versions.first().ifEmpty(null)) } -// /* -// * SUBWORKFLOW: Structural variant calling -// */ -// if (!params.skip_sv) { -// STRUCTURAL_VARIANT_CALLING ( ch_view_sortbam, ch_fasta.map{ it [1] }, ch_fai.map{ it [1] } ) -// ch_software_versions = ch_software_versions.mix(STRUCTURAL_VARIANT_CALLING.out.ch_versions.first().ifEmpty(null)) -// } + /* + * SUBWORKFLOW: Structural variant calling + */ + if (!params.skip_sv) { + STRUCTURAL_VARIANT_CALLING ( ch_sorted_bam, ch_sorted_bai, ch_fasta, ch_fai ) + ch_software_versions = ch_software_versions.mix(STRUCTURAL_VARIANT_CALLING.out.ch_versions.first().ifEmpty(null)) + } } ch_bedtools_version = Channel.empty() @@ -415,6 +415,11 @@ workflow NANOSEQ{ ch_fastq .map { it -> [ it[0], it[1] ] } .set { ch_fastq } + ch_jaffal_ref_dir = Channel.of(params.jaffal_ref_dir) + ch_fastq + .combine ( ch_jaffal_ref_dir ) + .map { it -> it[2] } + .set { ch_jaffal_ref_dir } RNA_FUSIONS_JAFFAL( ch_fastq, params.jaffal_ref_dir ) } From 4f8a9f580eb64aec1179b444449a6974e74a57ab Mon Sep 17 00:00:00 2001 From: Yuk Kei Wan Date: Fri, 17 Mar 2023 17:01:40 +0800 Subject: [PATCH 12/77] done refactoring: one fasta & gtf per run; replaced local modules with existing nf-core modules --- conf/base.config | 3 + conf/modules.config | 65 ++- conf/test_nodx_rnamod.config | 4 + modules/local/get_chrom_sizes.nf | 30 -- modules/local/gtf2bed.nf | 28 -- modules/local/medaka_variant.nf | 43 -- subworkflows/local/align_minimap2.nf | 12 +- .../local/rna_modifications_xpore_m6anet.nf | 9 +- workflows/nanoseq.nf | 70 +-- workflows/nanoseq.nf.save | 472 ------------------ 10 files changed, 86 insertions(+), 650 deletions(-) delete mode 100644 modules/local/get_chrom_sizes.nf delete mode 100644 modules/local/gtf2bed.nf delete mode 100644 modules/local/medaka_variant.nf delete mode 100644 workflows/nanoseq.nf.save diff --git a/conf/base.config b/conf/base.config index 63060142..552da670 100644 --- a/conf/base.config +++ b/conf/base.config @@ -63,6 +63,9 @@ process { errorStrategy = 'retry' maxRetries = 2 } + withName:MINIMAP2_ALIGN_VARIANT{ + ext.args = { "--MD -ax map-ont --eqx" } + } withName:SAMTOOLS_VIEW { ext.args = '--output-fmt bam' } diff --git a/conf/modules.config b/conf/modules.config index 4c279f64..53b1bb9c 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -110,23 +110,7 @@ if (!params.skip_qc) { if (!params.skip_alignment) { process { - withName: GTF2BED { - publishDir = [ - path: { "${params.outdir}/genome" }, - mode: 'copy', - enabled: false, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } - ] - } - withName: GET_CHROM_SIZES { - publishDir = [ - path: { "${params.outdir}/genome" }, - mode: 'copy', - enabled: false, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } - ] - } - withName: SAMTOOLS_FAIDX { + withName: CUSTOM_GETCHROMSIZES { publishDir = [ path: { "${params.outdir}/genome" }, mode: 'copy', @@ -137,7 +121,7 @@ if (!params.skip_alignment) { } if (params.aligner == "graphmap2") { process { - withName: GRAPHMAP2_INDEX_VARIANT { + withName: GRAPHMAP2_INDEX { ext.args = { "" } publishDir = [ path: { "${params.outdir}/${params.aligner}" }, @@ -146,7 +130,7 @@ if (!params.skip_alignment) { saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] } - withName: GRAPHMAP2_ALIGN_VARIANT { + withName: GRAPHMAP2_ALIGN { ext.args = { "" } publishDir = [ path: { "${params.outdir}/${params.aligner}" }, @@ -159,7 +143,7 @@ if (!params.skip_alignment) { } if (params.aligner == "minimap2") { process { - withName: MINIMAP2_INDEX_VARIANT { + withName: MINIMAP2_INDEX { ext.args = { "-ax map-ont" } publishDir = [ path: { "${params.outdir}/${params.aligner}" }, @@ -169,7 +153,14 @@ if (!params.skip_alignment) { ] } withName: MINIMAP2_ALIGN_VARIANT { - ext.args = { "--MD -ax map-ont --eqx" } + publishDir = [ + path: { "${params.outdir}/${params.aligner}" }, + mode: 'copy', + enabled: false, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + ] + } + withName: MINIMAP2_ALIGN_OTHER { publishDir = [ path: { "${params.outdir}/${params.aligner}" }, mode: 'copy', @@ -180,7 +171,7 @@ if (!params.skip_alignment) { } } process { - withName: SAMTOOLS_VIEW_BAM { + withName: SAMTOOLS_VIEW { publishDir = [ path: { "${params.outdir}/${params.aligner}" }, mode: 'copy', @@ -234,7 +225,7 @@ if (!params.skip_alignment) { } if (!params.skip_bigbed) { process { - withName: BEDTOOLS_BAMBED { + withName: BEDTOOLS_BAMTOBED { publishDir = [ path: { "${params.outdir}/${params.aligner}/bigbed" }, mode: 'copy', @@ -243,7 +234,7 @@ if (!params.skip_alignment) { saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] } - withName: UCSC_BED12TOBIGBED { + withName: UCSC_BEDTOBIGBED { publishDir = [ path: { "${params.outdir}/${params.aligner}/bigbed" }, mode: 'copy', @@ -281,11 +272,11 @@ if (!params.skip_alignment) { } if (params.call_variants) { - if (params.variant_caller == 'medaka') { + if (params.variant_caller == 'clair3') { process { - withName: MEDAKA_VARIANT { + withName: CLAIR3 { publishDir = [ - path: { "${params.outdir}/variant_calling/medaka_variant" }, + path: { "${params.outdir}/variant_calling/clair3" }, mode: 'copy', enabled: false, saveAs: { filename -> filename.equals('versions.yml') ? null : filename } @@ -293,9 +284,9 @@ if (params.call_variants) { } } process { - withName: MEDAKA_BGZIP_VCF { + withName: CLAIR3_BGZIP_VCF { publishDir = [ - path: { "${params.outdir}/variant_calling/medaka_variant" }, + path: { "${params.outdir}/variant_calling/clair3" }, mode: 'copy', enabled: true, saveAs: { filename -> filename.equals('versions.yml') ? null : filename } @@ -303,9 +294,9 @@ if (params.call_variants) { } } process { - withName: MEDAKA_TABIX_VCF { + withName: CLAIR3_TABIX_VCF { publishDir = [ - path: { "${params.outdir}/variant_calling/medaka_variant" }, + path: { "${params.outdir}/variant_calling/clair3" }, mode: 'copy', enabled: true, saveAs: { filename -> filename.equals('versions.yml') ? null : filename } @@ -470,9 +461,17 @@ if (!params.skip_quantification) { saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] } - withName: SUBREAD_FEATURECOUNTS { + withName: SUBREAD_FEATURECOUNTS_GENE { + publishDir = [ + path: { "${params.outdir}/stringtie2/featureCounts_genes" }, + mode: 'copy', + enabled: true, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + ] + } + withName: SUBREAD_FEATURECOUNTS_TRANSCRIPT { publishDir = [ - path: { "${params.outdir}/stringtie2/featureCounts" }, + path: { "${params.outdir}/stringtie2/featureCounts_transcript" }, mode: 'copy', enabled: true, saveAs: { filename -> filename.equals('versions.yml') ? null : filename } diff --git a/conf/test_nodx_rnamod.config b/conf/test_nodx_rnamod.config index f6d1abe2..0debc37d 100644 --- a/conf/test_nodx_rnamod.config +++ b/conf/test_nodx_rnamod.config @@ -18,8 +18,12 @@ params { // Input data to skip demultiplexing and rna modification analysis input = 'https://raw.githubusercontent.com/nf-core/test-datasets/nanoseq/3.0/samplesheet/samplesheet_nobc_nodx_rnamod.csv' + fasta = 'https://raw.githubusercontent.com/nf-core/test-datasets/nanoseq/reference/modification_transcriptome_subset.fa' + gtf = 'https://raw.githubusercontent.com/nf-core/test-datasets/nanoseq/reference/modification_transcriptome_subset.gtf' protocol = 'directRNA' run_nanolyse = true + skip_bigbed = true + skip_bigwig = true skip_demultiplexing = true skip_quantification = true skip_fusion_analysis= true diff --git a/modules/local/get_chrom_sizes.nf b/modules/local/get_chrom_sizes.nf deleted file mode 100644 index bf2d851e..00000000 --- a/modules/local/get_chrom_sizes.nf +++ /dev/null @@ -1,30 +0,0 @@ -process GET_CHROM_SIZES { - tag "$fasta" - label 'process_medium' - - conda "bioconda::samtools=1.10" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/samtools:1.13--h8c37831_0' : - 'quay.io/biocontainers/samtools:1.13--h8c37831_0' }" - - input: - path fasta - - output: - path "*.sizes" , emit: sizes - path "versions.yml" , emit: versions - - when: - task.ext.when == null || task.ext.when - - script: - """ - samtools faidx $fasta - cut -f 1,2 ${fasta}.fai > ${fasta}.sizes - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') - END_VERSIONS - """ -} diff --git a/modules/local/gtf2bed.nf b/modules/local/gtf2bed.nf deleted file mode 100644 index 8a3a70c7..00000000 --- a/modules/local/gtf2bed.nf +++ /dev/null @@ -1,28 +0,0 @@ -process GTF2BED { - label 'process_low' - - conda "conda-forge::perl=5.26.2" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/perl:5.26.2' : - 'quay.io/biocontainers/perl:5.26.2' }" - - input: - path gtf - - output: - path "*.bed" , emit: gtf_bed - path "versions.yml" , emit: versions - - when: - task.ext.when == null || task.ext.when - - script: - """ - gtf2bed $gtf > ${gtf.baseName}.bed - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - perl: \$(echo \$(perl --version 2>&1) | sed 's/.*v\\(.*\\)) built.*/\\1/') - END_VERSIONS - """ -} diff --git a/modules/local/medaka_variant.nf b/modules/local/medaka_variant.nf deleted file mode 100644 index 9c5621c8..00000000 --- a/modules/local/medaka_variant.nf +++ /dev/null @@ -1,43 +0,0 @@ -process MEDAKA_VARIANT { - tag "$meta.id" - label 'process_high' - - conda "bioconda::medaka=1.4.4" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/medaka:1.4.4--py38h130def0_0' : - 'quay.io/biocontainers/medaka:1.4.4--py38h130def0_0' }" - - input: - tuple val(meta), path(bam), path(bai) - path(fasta) - - output: - tuple val(meta), path ("$output_vcf"), emit: vcf // vcf files - path "versions.yml" , emit: versions - - when: - task.ext.when == null || task.ext.when - - script: - def split_mnps = params.split_mnps ? "-l" : '' - def phase_vcf = params.phase_vcf ? "-p" : '' - - output_dir = "${meta.id}" - output_vcf = output_dir+"/round_1.vcf" - """ - - medaka_variant \\ - -d \\ - -f $fasta \\ - -i $bam \\ - -o $output_dir \\ - -t $task.cpus \\ - $split_mnps \\ - $phase_vcf - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - medaka: \$( medaka --version 2>&1 | sed 's/medaka //g' ) - END_VERSIONS - """ -} diff --git a/subworkflows/local/align_minimap2.nf b/subworkflows/local/align_minimap2.nf index 247aeaf5..7f5d9209 100644 --- a/subworkflows/local/align_minimap2.nf +++ b/subworkflows/local/align_minimap2.nf @@ -3,7 +3,8 @@ */ include { MINIMAP2_INDEX } from '../../modules/nf-core/minimap2/index/main' -include { MINIMAP2_ALIGN } from '../../modules/nf-core/minimap2/align/main' +include { MINIMAP2_ALIGN as MINIMAP2_ALIGN_OTHER } from '../../modules/nf-core/minimap2/align/main' +include { MINIMAP2_ALIGN as MINIMAP2_ALIGN_VARIANT } from '../../modules/nf-core/minimap2/align/main' include { SAMTOOLS_INDEX } from '../../modules/nf-core/samtools/index/main' include { BAM_STATS_SAMTOOLS } from '../../subworkflows/nf-core/bam_stats_samtools/main' @@ -36,8 +37,13 @@ workflow ALIGN_MINIMAP2 { bam_format = true cigar_paf_format = false cigar_bam = false - MINIMAP2_ALIGN ( ch_alignment_input, ch_reference, bam_format, cigar_paf_format, cigar_bam ) - ch_sorted_bam = MINIMAP2_ALIGN.out.bam + if (params.call_variants) { + MINIMAP2_ALIGN_VARIANT ( ch_alignment_input, ch_reference, bam_format, cigar_paf_format, cigar_bam ) + ch_sorted_bam = MINIMAP2_ALIGN_VARIANT.out.bam + } else { + MINIMAP2_ALIGN_OTHER ( ch_alignment_input, ch_reference, bam_format, cigar_paf_format, cigar_bam ) + ch_sorted_bam = MINIMAP2_ALIGN_OTHER.out.bam + } SAMTOOLS_INDEX ( ch_sorted_bam ) ch_sorted_bai = SAMTOOLS_INDEX.out.bai diff --git a/subworkflows/local/rna_modifications_xpore_m6anet.nf b/subworkflows/local/rna_modifications_xpore_m6anet.nf index 04a58211..5c35cc73 100644 --- a/subworkflows/local/rna_modifications_xpore_m6anet.nf +++ b/subworkflows/local/rna_modifications_xpore_m6anet.nf @@ -10,19 +10,14 @@ include { M6ANET_INFERENCE } from '../../modules/local/m6anet_inference' workflow RNA_MODIFICATION_XPORE_M6ANET { take: - ch_sample - ch_nanopolish_sortbam + ch_nanopolish_bam_fast5 main: - ch_sample - .join(ch_nanopolish_sortbam) - .map { it -> [ it[0], it[2], it[3], it[7], it[6], it[8], it[9] ] } - .set { ch_nanopolish_input } /* * Align current signals to reference with Nanopolish */ - NANOPOLISH_INDEX_EVENTALIGN { ch_nanopolish_input } + NANOPOLISH_INDEX_EVENTALIGN { ch_nanopolish_bam_fast5 } ch_nanopolish_outputs = NANOPOLISH_INDEX_EVENTALIGN.out.nanopolish_outputs nanopolish_version = NANOPOLISH_INDEX_EVENTALIGN.out.versions diff --git a/workflows/nanoseq.nf b/workflows/nanoseq.nf index 86d60eca..f288e646 100644 --- a/workflows/nanoseq.nf +++ b/workflows/nanoseq.nf @@ -112,7 +112,7 @@ include { GET_TEST_DATA } from '../modules/local/get_test_data' include { GET_NANOLYSE_FASTA } from '../modules/local/get_nanolyse_fasta' include { BAM_RENAME } from '../modules/local/bam_rename' include { BAMBU } from '../modules/local/bambu' -//include { MULTIQC } from '../modules/local/multiqc' +include { MULTIQC } from '../modules/local/multiqc' /* * SUBWORKFLOW: Consisting of a mix of local and nf-core/modules @@ -122,7 +122,7 @@ include { INPUT_CHECK } from '../subworkflows/local/input_c include { SHORT_VARIANT_CALLING } from '../subworkflows/local/short_variant_calling' include { STRUCTURAL_VARIANT_CALLING } from '../subworkflows/local/structural_variant_calling' include { DIFFERENTIAL_DESEQ2_DEXSEQ } from '../subworkflows/local/differential_deseq2_dexseq' -//include { RNA_MODIFICATION_XPORE_M6ANET } from '../subworkflows/local/rna_modifications_xpore_m6anet' +include { RNA_MODIFICATION_XPORE_M6ANET } from '../subworkflows/local/rna_modifications_xpore_m6anet' include { RNA_FUSIONS_JAFFAL } from '../subworkflows/local/rna_fusions_jaffal' //////////////////////////////////////////////////// @@ -334,11 +334,6 @@ workflow NANOSEQ{ ch_software_versions = ch_software_versions.mix(BEDTOOLS_UCSC_BIGBED.out.bed12tobigbed_version.first().ifEmpty(null)) } ch_software_versions = ch_software_versions.mix(ch_bedtools_version.first().ifEmpty(null)) - - ch_sorted_bam - .join(ch_sample,by:0) - .map { it -> [ it[0], it[1], it[4] ] } - .set { ch_nanopolish_bam_fast5 } } else { ch_sample .map { it -> if (it[1].toString().endsWith('.bam')) [ it[0], it[1] ] } @@ -366,7 +361,6 @@ workflow NANOSEQ{ ch_r_version = Channel.empty() if (params.quantification_method == 'bambu') { ch_sample_annotation=Channel.from(params.fasta,params.gtf).collect() - ch_sample_annotation.view() /* * MODULE: Quantification and novel isoform detection with bambu @@ -394,18 +388,26 @@ workflow NANOSEQ{ * SUBWORKFLOW: Differential gene and transcript analysis with DESeq2 and DEXseq */ DIFFERENTIAL_DESEQ2_DEXSEQ( ch_gene_counts, ch_transcript_counts ) - //ch_software_versions = ch_software_versions.mix(DIFFERENTIAL_DESEQ2_DEXSEQ.out.deseq2_version.first().ifEmpty(null)) + ch_software_versions = ch_software_versions.mix(DIFFERENTIAL_DESEQ2_DEXSEQ.out.deseq2_version.first().ifEmpty(null)) ch_software_versions = ch_software_versions.mix(DIFFERENTIAL_DESEQ2_DEXSEQ.out.dexseq_version.first().ifEmpty(null)) } } -// if (!params.skip_modification_analysis && params.protocol == 'directRNA') { -// -// /* -// * SUBWORKFLOW: RNA modification detection with xPore and m6anet -// */ -// RNA_MODIFICATION_XPORE_M6ANET( ch_sample, ch_nanopolish_sortbam ) -// } + if (!params.skip_modification_analysis && params.protocol == 'directRNA') { + + /* + * SUBWORKFLOW: RNA modification detection with xPore and m6anet + */ + ch_sorted_bam + .combine([params.fasta]) + .combine([params.gtf]) + .join(ch_sorted_bai,by:0) + .join(ch_sample,by:0) + .map { it -> [ it[0], it[2], it[3], it[7], it[5], it[1], it[4] ] } + .set { ch_nanopolish_input } + + RNA_MODIFICATION_XPORE_M6ANET( ch_nanopolish_input ) + } if (!params.skip_fusion_analysis && (params.protocol == 'cDNA' || params.protocol == 'directRNA')) { @@ -431,24 +433,24 @@ workflow NANOSEQ{ ch_software_versions.unique().collectFile() ) -// if (!params.skip_multiqc) { -// workflow_summary = WorkflowNanoseq.paramsSummaryMultiqc(workflow, summary_params) -// ch_workflow_summary = Channel.value(workflow_summary) -// -// /* -// * MODULE: MultiQC -// */ -// MULTIQC ( -// ch_multiqc_config, -// ch_multiqc_custom_config.collect().ifEmpty([]), -// ch_fastqc_multiqc.ifEmpty([]), -// ch_samtools_multiqc.collect().ifEmpty([]), -// ch_featurecounts_gene_multiqc.ifEmpty([]), -// ch_featurecounts_transcript_multiqc.ifEmpty([]), -// CUSTOM_DUMPSOFTWAREVERSIONS.out.mqc_yml.collect(), -// ch_workflow_summary.collectFile(name: 'workflow_summary_mqc.yaml') -// ) -// } + if (!params.skip_multiqc) { + workflow_summary = WorkflowNanoseq.paramsSummaryMultiqc(workflow, summary_params) + ch_workflow_summary = Channel.value(workflow_summary) + + /* + * MODULE: MultiQC + */ + MULTIQC ( + ch_multiqc_config, + ch_multiqc_custom_config.collect().ifEmpty([]), + ch_fastqc_multiqc.ifEmpty([]), + ch_samtools_multiqc.collect().ifEmpty([]), + ch_featurecounts_gene_multiqc.ifEmpty([]), + ch_featurecounts_transcript_multiqc.ifEmpty([]), + CUSTOM_DUMPSOFTWAREVERSIONS.out.mqc_yml.collect(), + ch_workflow_summary.collectFile(name: 'workflow_summary_mqc.yaml') + ) + } } //////////////////////////////////////////////////// diff --git a/workflows/nanoseq.nf.save b/workflows/nanoseq.nf.save deleted file mode 100644 index a4640294..00000000 --- a/workflows/nanoseq.nf.save +++ /dev/null @@ -1,472 +0,0 @@ -/* -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - VALIDATE INPUTS -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -*/ - -def summary_params = NfcoreSchema.paramsSummaryMap(workflow, params) - -//////////////////////////////////////////////////// -/* -- VALIDATE INPUTS -- */ -//////////////////////////////////////////////////// - -// Check input path parameters to see if they exist -checkPathParamList = [ params.input, params.multiqc_config, params.fasta ] -for (param in checkPathParamList) { if (param) { file(param, checkIfExists: true) } } - -// Check mandatory parameters -if (params.input) { - ch_input = file(params.input) -} else { - exit 1, 'Input samplesheet not specified!' -} - -// Function to check if running offline -def isOffline() { - try { - return NXF_OFFLINE as Boolean - } - catch( Exception e ) { - return false - } -} - -if (params.protocol != 'DNA' && params.protocol != 'cDNA' && params.protocol != 'directRNA') { - exit 1, "Invalid protocol option: ${params.protocol}. Valid options: 'DNA', 'cDNA', 'directRNA'" -} - -if (!params.skip_demultiplexing) { - if (!params.barcode_kit) { - params.barcode_kit = 'Auto' - } - - def qcatBarcodeKitList = ['Auto', 'RBK001', 'RBK004', 'NBD103/NBD104', - 'NBD114', 'NBD104/NBD114', 'PBC001', 'PBC096', - 'RPB004/RLB001', 'PBK004/LWB001', 'RAB204', 'VMK001', 'DUAL'] - - if (params.barcode_kit && qcatBarcodeKitList.contains(params.barcode_kit)) { - if (params.input_path) { - ch_input_path = Channel.fromPath(params.input_path, checkIfExists: true) - } else { - exit 1, "Please specify a valid input fastq file to perform demultiplexing!" - } - } else { - exit 1, "Please provide a barcode kit to demultiplex with qcat. Valid options: ${qcatBarcodeKitList}" - } -} - -if (!params.skip_alignment) { - if (params.aligner != 'minimap2' && params.aligner != 'graphmap2') { - exit 1, "Invalid aligner option: ${params.aligner}. Valid options: 'minimap2', 'graphmap2'" - } - if (params.protocol != 'DNA' && params.protocol != 'cDNA' && params.protocol != 'directRNA') { - exit 1, "Invalid protocol option: ${params.protocol}. Valid options: 'DNA', 'cDNA', 'directRNA'" - } -} - -if (params.call_variants) { - if (params.protocol != 'DNA') { - exit 1, "Invalid protocol option: ${params.protocol}. Valid options: 'DNA'" - } - if (!params.skip_vc && params.variant_caller != 'medaka' && params.variant_caller != 'deepvariant' && params.variant_caller != 'pepper_margin_deepvariant') { - exit 1, "Invalid variant caller option: ${params.variant_caller}. Valid options: 'medaka', 'deepvariant' or 'pepper_margin_deepvariant'" - } - if (!params.skip_sv && params.structural_variant_caller != 'sniffles' && params.structural_variant_caller != 'cutesv') { - exit 1, "Invalid structural variant caller option: ${params.structural_variant_caller}. Valid options: 'sniffles', 'cutesv" - } - if (!params.skip_vc && params.enable_conda && params.variant_caller != 'medaka') { - exit 1, "Conda environments cannot be used when using the deepvariant or pepper_margin_deepvariant tools. Valid options: 'docker', 'singularity'" - } -} - -if (!params.skip_quantification) { - if (params.quantification_method != 'bambu' && params.quantification_method != 'stringtie2') { - exit 1, "Invalid transcript quantification option: ${params.quantification_method}. Valid options: 'bambu', 'stringtie2'" - } - if (params.protocol != 'cDNA' && params.protocol != 'directRNA') { - exit 1, "Invalid protocol option if performing quantification: ${params.protocol}. Valid options: 'cDNA', 'directRNA'" - } -} - -//////////////////////////////////////////////////// -/* -- CONFIG FILES -- */ -//////////////////////////////////////////////////// - -ch_multiqc_config = file("$baseDir/assets/multiqc_config.yml", checkIfExists: true) -ch_multiqc_custom_config = params.multiqc_config ? Channel.fromPath(params.multiqc_config) : Channel.empty() - -//////////////////////////////////////////////////// -/* -- IMPORT LOCAL MODULES/SUBWORKFLOWS -- */ -//////////////////////////////////////////////////// - -/* - * MODULE: Local - */ - -include { GET_TEST_DATA } from '../modules/local/get_test_data' -include { GET_NANOLYSE_FASTA } from '../modules/local/get_nanolyse_fasta' -include { QCAT } from '../modules/local/qcat' -include { BAM_RENAME } from '../modules/local/bam_rename' -include { BAMBU } from '../modules/local/bambu' -include { MULTIQC } from '../modules/local/multiqc' - -/* - * SUBWORKFLOW: Consisting of a mix of local and nf-core/modules - */ - -include { INPUT_CHECK } from '../subworkflows/local/input_check' -include { PREPARE_GENOME } from '../subworkflows/local/prepare_genome' -include { QCFASTQ_NANOPLOT_FASTQC } from '../subworkflows/local/qcfastq_nanoplot_fastqc' -include { ALIGN_GRAPHMAP2 } from '../subworkflows/local/align_graphmap2' -include { ALIGN_MINIMAP2 } from '../subworkflows/local/align_minimap2' -include { BAM_SORT_INDEX_SAMTOOLS } from '../subworkflows/local/bam_sort_index_samtools' -include { SHORT_VARIANT_CALLING } from '../subworkflows/local/short_variant_calling' -include { STRUCTURAL_VARIANT_CALLING } from '../subworkflows/local/structural_variant_calling' -include { BEDTOOLS_UCSC_BIGWIG } from '../subworkflows/local/bedtools_ucsc_bigwig' -include { BEDTOOLS_UCSC_BIGBED } from '../subworkflows/local/bedtools_ucsc_bigbed' -include { QUANTIFY_STRINGTIE_FEATURECOUNTS } from '../subworkflows/local/quantify_stringtie_featurecounts' -include { DIFFERENTIAL_DESEQ2_DEXSEQ } from '../subworkflows/local/differential_deseq2_dexseq' -include { RNA_MODIFICATION_XPORE_M6ANET } from '../subworkflows/local/rna_modifications_xpore_m6anet' -include { RNA_FUSIONS_JAFFAL } from '../subworkflows/local/rna_fusions_jaffal' - -//////////////////////////////////////////////////// -/* -- IMPORT NF-CORE MODULES/SUBWORKFLOWS -- */ -//////////////////////////////////////////////////// - -/* - * MODULE: Installed directly from nf-core/modules - */ -include { NANOLYSE } from '../modules/nf-core/nanolyse/main' -include { CUSTOM_DUMPSOFTWAREVERSIONS } from '../modules/nf-core/custom/dumpsoftwareversions/main' - -/* - * SUBWORKFLOW: Consisting entirely of nf-core/modules - */ - -//////////////////////////////////////////////////// -/* -- RUN MAIN WORKFLOW -- */ -//////////////////////////////////////////////////// - -// Info required for completion email and summary -def multiqc_report = [] - -workflow NANOSEQ{ - - /* - * Download test dataset for '--input_path' if applicable - */ - if (workflow.profile.contains('test') && !workflow.profile.contains('vc')) { - if (!params.skip_modification_analysis) { - if (!isOffline()) { - GET_TEST_DATA () - GET_TEST_DATA.out.ch_input_dir_path - .set { ch_input_path } - } else { - exit 1, "NXF_OFFLINE=true or -offline has been set so cannot download and run any test dataset!" - } - } else { - if (params.input_path) { - Channel.fromPath(params.input_path, checkIfExists: true) - .set { ch_input_path } - } else { - Channel.of('not_changed') - .set { ch_input_path } - } - } - } else { - if (params.input_path) { - Channel.fromPath(params.input_path, checkIfExists: true) - .set { ch_input_path } - } else { - Channel.of('not_changed') - .set { ch_input_path } - } - } - - ch_software_versions = Channel.empty() - - /* - * SUBWORKFLOW: Read samplesheet, validate samplesheet, and stage input files - */ - INPUT_CHECK (ch_input, ch_input_path) - .set { ch_sample } - - if (!params.skip_demultiplexing) { - - /* - * MODULE: Demultipexing using qcat - */ - QCAT (ch_input_path) - QCAT.out.fastq - .flatten() - .map { it -> [ it.baseName.substring(0,it.baseName.lastIndexOf('.')), it ] } - .join(ch_sample.map{ meta, empty -> [meta.barcode, meta] }, by: [0] ) - .map { it -> [ it[2], it[1] ] } - .set { ch_fastq_dirty } - ch_software_versions = ch_software_versions.mix(QCAT.out.versions.ifEmpty(null)) - } else { - if (!params.skip_alignment) { - ch_sample - .set { ch_fastq_dirty } - } else { - ch_fastq_dirty = Channel.empty() - } - } - - if (params.run_nanolyse) { - - /* - * MODULE: Get NanoLyse test data - */ - if (!params.nanolyse_fasta) { - if (!isOffline()) { - GET_NANOLYSE_FASTA() - GET_NANOLYSE_FASTA.out.ch_nanolyse_fasta - .set{ ch_nanolyse_fasta } - } else { - exit 1, "NXF_OFFLINE=true or -offline has been set so cannot download lambda.fasta.gz file for running NanoLyse! Please explicitly specify --nanolyse_fasta." - } - } else { - ch_nanolyse_fasta = file(params.nanolyse_fasta, checkIfExists: true) - } - - /* - * MODULE: DNA contaminant removal using NanoLyse - */ - NANOLYSE (ch_fastq_dirty, ch_nanolyse_fasta) - NANOLYSE.out.fastq - .set { ch_fastq } - ch_software_versions = ch_software_versions.mix(NANOLYSE.out.versions.first().ifEmpty(null)) - } else { - ch_fastq_dirty - .map { it -> [ it[0], it[1] ] } - .set { ch_fastq } - } - - ch_fastqc_multiqc = Channel.empty() - if (!params.skip_qc) { - - /* - * SUBWORKFLOW: Fastq QC with Nanoplot and fastqc - */ - QCFASTQ_NANOPLOT_FASTQC (ch_fastq) - ch_software_versions = ch_software_versions.mix(QCFASTQ_NANOPLOT_FASTQC.out.fastqc_version.first().ifEmpty(null)) - ch_fastqc_multiqc = QCFASTQ_NANOPLOT_FASTQC.out.fastqc_multiqc.ifEmpty([]) - } - - ch_samtools_multiqc = Channel.empty() - - if (!params.skip_alignment) { - - /* - * SUBWORKFLOW: Make chromosome size file and covert GTF to BED12 - */ - PREPARE_GENOME () - ch_fasta = PREPARE_GENOME.out.ch_fasta - ch_fai = PREPARE_GENOME.out.ch_fai - ch_sizes = PREPARE_GENOME.out.ch_sizes - ch_gtf = PREPARE_GENOME.out.ch_gtf - ch_bed = PREPARE_GENOME.out.ch_bed - ch_software_versions = ch_software_versions.mix(PREPARE_GENOME.out.ch_versions.first().ifEmpty(null)) - -// if (params.aligner == 'minimap2') { - - /* - * SUBWORKFLOW: Create index and align fastq files with MINIMAP2 - */ -// ALIGN_MINIMAP2 ( ch_fasta, ch_sizes, ch_gtf, ch_bed, ch_fastq ) -// ch_index = ALIGN_MINIMAP2.out.ch_index -// ch_bam_bai = ALIGN_MINIMAP2.out.ch_bam_bai -// ch_software_versions = ch_software_versions.mix(ALIGN_MINIMAP2.out.ch_versions.first().ifEmpty(null)) -// } else { - - /* - * SUBWORKFLOW: Align fastq files with graphmap2 and sort bam files - */ -// ALIGN_GRAPHMAP2 ( ch_fasta_index, ch_fastq ) -// ch_align_sam = ALIGN_GRAPHMAP2.out.ch_align_sam -// ch_index = ALIGN_GRAPHMAP2.out.ch_index -// ch_software_versions = ch_software_versions.mix(ALIGN_GRAPHMAP2.out.graphmap2_version.first().ifEmpty(null)) -// } - -// if (params.call_variants && params.protocol == 'DNA') { - - /* - * SUBWORKFLOW: Short variant calling - */ -// if (!params.skip_vc) { -// SHORT_VARIANT_CALLING (ch_bam, ch_bai, ch_fasta, ch_fai) -// ch_software_versions = ch_software_versions.mix(SHORT_VARIANT_CALLING.out.ch_versions.first().ifEmpty(null)) -// } - - /* - * SUBWORKFLOW: Structural variant calling - */ -// if (!params.skip_sv) { -// STRUCTURAL_VARIANT_CALLING (ch_bam_bai, ch_fasta, ch_fai) -// ch_software_versions = ch_software_versions.mix(STRUCTURAL_VARIANT_CALLING.out.ch_versions.first().ifEmpty(null)) -// } -// } - -// if (!params.skip_bigwig) { - -// /* -// * SUBWORKFLOW: Convert BAM -> BEDGraph -> BigWig -// */ -// BEDTOOLS_UCSC_BIGWIG (ch_view_sortbam) -// ch_bedtools_version = ch_bedtools_version.mix(BEDTOOLS_UCSC_BIGWIG.out.bedtools_version.first().ifEmpty(null)) -// ch_software_versions = ch_software_versions.mix(BEDTOOLS_UCSC_BIGWIG.out.bedgraphtobigwig_version.first().ifEmpty(null)) -// } -// if (!params.skip_bigbed) { - -// /* -// * SUBWORKFLOW: Convert BAM -> BED12 -> BigBED -// */ -// BEDTOOLS_UCSC_BIGBED (ch_view_sortbam) -// ch_bedtools_version = ch_bedtools_version.mix(BEDTOOLS_UCSC_BIGBED.out.bedtools_version.first().ifEmpty(null)) -// ch_software_versions = ch_software_versions.mix(BEDTOOLS_UCSC_BIGBED.out.bed12tobigbed_version.first().ifEmpty(null)) -// } -// ch_software_versions = ch_software_versions.mix(ch_bedtools_version.first().ifEmpty(null)) - -// ch_view_sortbam -// .map { it -> [ it[0], it[3] ] } -// .set { ch_sortbam } -// ch_view_sortbam -// .map { it -> [ it[0], it[3], it[4] ] } -// .set { ch_nanopolish_sortbam } -// } else { -// ch_sample -// .map { it -> if (it[6].toString().endsWith('.bam')) [ it[0], it[6] ] } -// .set { ch_sample_bam } - -// /* -// * MODULE: Rename bam files -// */ -// BAM_RENAME (ch_sample_bam) -// ch_sortbam = BAM_RENAME.out.bam -// } - -// ch_featurecounts_gene_multiqc = Channel.empty() -// ch_featurecounts_transcript_multiqc = Channel.empty() -// if (!params.skip_quantification && (params.protocol == 'cDNA' || params.protocol == 'directRNA')) { - -// // Check that reference genome and annotation are the same for all samples if perfoming quantification -// // Check if we have replicates and multiple conditions in the input samplesheet -// REPLICATES_EXIST = false -// MULTIPLE_CONDITIONS = false -// ch_sample.map{ it[2] }.unique().toList().set { fastas } -// ch_sample.map{ it[3] }.unique().toList().set { gtfs } -// // BUG: ".val" halts the pipeline /////////////////////// -// // if ( gtfs.map{it[0]} == false || fastas.map{it[0]} == false || gtfs.size().val != 1 || fasta.size().val != 1 ) { -// // exit 1, """Quantification can only be performed if all samples in the samplesheet have the same reference fasta and GTF file." -// // Please specify the '--skip_quantification' parameter if you wish to skip these steps.""" -// // } -// // REPLICATES_EXIST = ch_sample.map { it -> it[0].split('_')[-1].replaceAll('R','').toInteger() }.max().val > 1 -// // MULTIPLE_CONDITIONS = ch_sample.map { it -> it[0].split('_')[0..-2].join('_') }.unique().count().val > 1 - -// ch_r_version = Channel.empty() -// if (params.quantification_method == 'bambu') { -// ch_sample -// .map { it -> [ it[2], it[3] ]} -// .unique() -// .set { ch_sample_annotation } - -// /* -// * MODULE: Quantification and novel isoform detection with bambu -// */ -// BAMBU (ch_sample_annotation, ch_sortbam.collect{ it [1] }) -// ch_gene_counts = BAMBU.out.ch_gene_counts -// ch_transcript_counts = BAMBU.out.ch_transcript_counts -// ch_software_versions = ch_software_versions.mix(BAMBU.out.versions.first().ifEmpty(null)) -// } else { - -// /* -// * SUBWORKFLOW: Novel isoform detection with StringTie and Quantification with featureCounts -// */ -// QUANTIFY_STRINGTIE_FEATURECOUNTS(ch_sample, ch_sortbam) -// ch_gene_counts = QUANTIFY_STRINGTIE_FEATURECOUNTS.out.ch_gene_counts -// ch_transcript_counts = QUANTIFY_STRINGTIE_FEATURECOUNTS.out.ch_transcript_counts -// ch_software_versions = ch_software_versions.mix(QUANTIFY_STRINGTIE_FEATURECOUNTS.out.stringtie2_version.first().ifEmpty(null)) -// ch_software_versions = ch_software_versions.mix(QUANTIFY_STRINGTIE_FEATURECOUNTS.out.featurecounts_version.first().ifEmpty(null)) -// ch_featurecounts_gene_multiqc = QUANTIFY_STRINGTIE_FEATURECOUNTS.out.featurecounts_gene_multiqc.ifEmpty([]) -// ch_featurecounts_transcript_multiqc = QUANTIFY_STRINGTIE_FEATURECOUNTS.out.featurecounts_transcript_multiqc.ifEmpty([]) -// } -// if (!params.skip_differential_analysis) { - -// /* -// * SUBWORKFLOW: Differential gene and transcript analysis with DESeq2 and DEXseq -// */ -// DIFFERENTIAL_DESEQ2_DEXSEQ( ch_gene_counts, ch_transcript_counts ) -// ch_software_versions = ch_software_versions.mix(DIFFERENTIAL_DESEQ2_DEXSEQ.out.deseq2_version.first().ifEmpty(null)) -// ch_software_versions = ch_software_versions.mix(DIFFERENTIAL_DESEQ2_DEXSEQ.out.dexseq_version.first().ifEmpty(null)) -// } - } - -// if (!params.skip_modification_analysis && params.protocol == 'directRNA') { - -// /* -// * SUBWORKFLOW: RNA modification detection with xPore and m6anet -// */ -// RNA_MODIFICATION_XPORE_M6ANET( ch_sample, ch_nanopolish_sortbam ) -// } - -// if (!params.skip_fusion_analysis && (params.protocol == 'cDNA' || params.protocol == 'directRNA')) { - -// /* -// * SUBWORKFLOW: RNA_FUSIONS_JAFFAL -// */ -// ch_fastq -// .map { it -> [ it[0], it[1] ] } -// .set { ch_fastq_simple } - -// RNA_FUSIONS_JAFFAL( ch_fastq_simple, params.jaffal_ref_dir ) -// } - -// /* -// * MODULE: Parse software version numbers -// */ -// CUSTOM_DUMPSOFTWAREVERSIONS ( -// ch_software_versions.unique().collectFile() -// ) - -// if (!params.skip_multiqc) { -// workflow_summary = WorkflowNanoseq.paramsSummaryMultiqc(workflow, summary_params) -// ch_workflow_summary = Channel.value(workflow_summary) - -// /* -// * MODULE: MultiQC -// */ -// MULTIQC ( -// ch_multiqc_config, -// ch_multiqc_custom_config.collect().ifEmpty([]), -// ch_fastqc_multiqc.ifEmpty([]), -// ch_samtools_multiqc.collect().ifEmpty([]), -// ch_featurecounts_gene_multiqc.ifEmpty([]), -// ch_featurecounts_transcript_multiqc.ifEmpty([]), -// CUSTOM_DUMPSOFTWAREVERSIONS.out.mqc_yml.collect(), -// ch_workflow_summary.collectFile(name: 'workflow_summary_mqc.yaml') -// ) -// } -} - -//////////////////////////////////////////////////// -/* -- COMPLETION EMAIL -- */ -//////////////////////////////////////////////////// - -workflow.onComplete { - if (params.email) { - NfcoreTemplate.email(workflow, params, summary_params, projectDir, log, multiqc_report) - //Completion.email(workflow, params, params.summary_params, log, multiqc_report) - } -// Completion.summary(workflow, params, log) - NfcoreTemplate.summary(workflow, params, log) - if (params.hook_url) { - NfcoreTemplate.IM_notification(workflow, params, summary_params, projectDir, log) - } -} - -/* -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - THE END -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -*/ From d094261ea5334b19b132a4fbb4776f64a01c8c9a Mon Sep 17 00:00:00 2001 From: Yuk Kei Wan Date: Tue, 21 Mar 2023 03:37:54 +0000 Subject: [PATCH 13/77] PRETTY --- modules.json | 118 +++++++++++++-------------------------------------- 1 file changed, 30 insertions(+), 88 deletions(-) diff --git a/modules.json b/modules.json index 0a756096..7e29f4c7 100644 --- a/modules.json +++ b/modules.json @@ -8,198 +8,142 @@ "bcftools/sort": { "branch": "master", "git_sha": "4a21e4cca35e72ec059abd67f790e0b192ce5d81", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "bedtools/bamtobed": { "branch": "master", "git_sha": "1d48427957205cb6acf1ffe330bd35b6bb8baa90", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "bedtools/genomecov": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "custom/dumpsoftwareversions": { "branch": "master", "git_sha": "b6d4d476aee074311c89d82a69c1921bd70c8180", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "custom/getchromsizes": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "deepvariant": { "branch": "master", "git_sha": "0f8a77ff00e65eaeebc509b8156eaa983192474b", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "fastqc": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "graphmap2/align": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "graphmap2/index": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "minimap2/align": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "minimap2/index": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "nanolyse": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "nanoplot": { "branch": "master", "git_sha": "3822e04e49b6d89b7092feb3480d744cb5d9986b", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "qcat": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "samtools/flagstat": { "branch": "master", "git_sha": "0f8a77ff00e65eaeebc509b8156eaa983192474b", - "installed_by": [ - "bam_stats_samtools" - ] + "installed_by": ["bam_stats_samtools"] }, "samtools/idxstats": { "branch": "master", "git_sha": "0f8a77ff00e65eaeebc509b8156eaa983192474b", - "installed_by": [ - "bam_stats_samtools" - ] + "installed_by": ["bam_stats_samtools"] }, "samtools/index": { "branch": "master", "git_sha": "0f8a77ff00e65eaeebc509b8156eaa983192474b", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "samtools/sort": { "branch": "master", "git_sha": "0f8a77ff00e65eaeebc509b8156eaa983192474b", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "samtools/stats": { "branch": "master", "git_sha": "0f8a77ff00e65eaeebc509b8156eaa983192474b", - "installed_by": [ - "bam_stats_samtools" - ] + "installed_by": ["bam_stats_samtools"] }, "samtools/view": { "branch": "master", "git_sha": "0f8a77ff00e65eaeebc509b8156eaa983192474b", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "stringtie/merge": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "stringtie/stringtie": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "subread/featurecounts": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "tabix/bgzip": { "branch": "master", "git_sha": "90294980a903ecebd99ac31d8b6c66af48fa8259", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "tabix/tabix": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "ucsc/bedgraphtobigwig": { "branch": "master", "git_sha": "0f8a77ff00e65eaeebc509b8156eaa983192474b", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "ucsc/bedtobigbed": { "branch": "master", "git_sha": "0f8a77ff00e65eaeebc509b8156eaa983192474b", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "untar": { "branch": "master", "git_sha": "cc1f997fab6d8fde5dc0e6e2a310814df5b53ce7", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] } } }, @@ -208,12 +152,10 @@ "bam_stats_samtools": { "branch": "master", "git_sha": "b4b7f89e7fd6d2293f0c176213f710e0bcdaf19e", - "installed_by": [ - "subworkflows" - ] + "installed_by": ["subworkflows"] } } } } } -} \ No newline at end of file +} From 38507c519d30773f33cd8842ba21500c41222ab3 Mon Sep 17 00:00:00 2001 From: Yuk Kei Wan Date: Tue, 21 Mar 2023 12:01:01 +0800 Subject: [PATCH 14/77] fix --- bin/check_samplesheet.py | 38 ++++--------------- conf/base.config | 2 +- conf/test.config | 3 +- .../local/differential_deseq2_dexseq.nf | 11 +++--- workflows/nanoseq.nf | 6 +-- 5 files changed, 18 insertions(+), 42 deletions(-) diff --git a/bin/check_samplesheet.py b/bin/check_samplesheet.py index ca40c9ce..3f22c875 100755 --- a/bin/check_samplesheet.py +++ b/bin/check_samplesheet.py @@ -64,11 +64,7 @@ def check_samplesheet(file_in, updated_path, file_out): HEADER = ["group", "replicate", "barcode", "input_file"] header = fin.readline().strip().split(",") if header[: len(HEADER)] != HEADER: - print( - "ERROR: Please check samplesheet header -> {} != {}".format( - ",".join(header), ",".join(HEADER) - ) - ) + print("ERROR: Please check samplesheet header -> {} != {}".format(",".join(header), ",".join(HEADER))) sys.exit(1) ## Check sample entries @@ -86,9 +82,7 @@ def check_samplesheet(file_in, updated_path, file_out): num_cols = len([x for x in lspl if x]) if num_cols < MIN_COLS: print_error( - "Invalid number of populated columns (minimum = {})!".format( - MIN_COLS - ), + "Invalid number of populated columns (minimum = {})!".format(MIN_COLS), "Line", line, ) @@ -136,31 +130,20 @@ def check_samplesheet(file_in, updated_path, file_out): if "fast5" in list_dir and "fastq" in list_dir: nanopolish_fast5 = input_file + "/fast5" ## CHECK FAST5 DIRECTORY - if not ( - all( - fname.endswith(".fast5") - for fname in os.listdir(nanopolish_fast5) - ) - ): + if not (all(fname.endswith(".fast5") for fname in os.listdir(nanopolish_fast5))): print_error("fast5 directory contains non-fast5 files.") ## CHECK PROVIDED BASECALLED FASTQ fastq_path = input_file + "/fastq" basecalled_fastq = [ - fn - for fn in os.listdir(fastq_path) - if fn.endswith(".fastq.gz") or fn.endswith(".fq.gz") + fn for fn in os.listdir(fastq_path) if fn.endswith(".fastq.gz") or fn.endswith(".fq.gz") ] if len(basecalled_fastq) != 1: - print_error( - "Please input one basecalled fastq per sample." - ) + print_error("Please input one basecalled fastq per sample.") else: input_file = fastq_path + "/" + basecalled_fastq[0] if not basecalled_fastq[0].endswith(".fastq.gz"): if not basecalled_fastq[0].endswith(".fq.gz"): - print_error( - 'basecalled fastq input does not end with ".fastq.gz" or ".fq.gz"' - ) + print_error('basecalled fastq input does not end with ".fastq.gz" or ".fq.gz"') else: print_error( 'path does not end with ".fastq.gz", ".fq.gz", or ".bam" and is not an existing directory with correct fast5 and/or fastq inputs.' @@ -188,9 +171,7 @@ def check_samplesheet(file_in, updated_path, file_out): out_dir = os.path.dirname(file_out) make_dir(out_dir) with open(file_out, "w") as fout: - fout.write( - ",".join(["sample", "barcode", "input_file", "nanopolish_fast5"]) + "\n" - ) + fout.write(",".join(["sample", "barcode", "input_file", "nanopolish_fast5"]) + "\n") for sample in sorted(sample_info_dict.keys()): ## Check that replicate ids are in format 1.. uniq_rep_ids = set(sample_info_dict[sample].keys()) @@ -204,10 +185,7 @@ def check_samplesheet(file_in, updated_path, file_out): ### Write to file for replicate in sorted(sample_info_dict[sample].keys()): sample_id = "{}_R{}".format(sample, replicate) - fout.write( - ",".join([sample_id] + sample_info_dict[sample][replicate]) - + "\n" - ) + fout.write(",".join([sample_id] + sample_info_dict[sample][replicate]) + "\n") def main(args=None): diff --git a/conf/base.config b/conf/base.config index 552da670..91643306 100644 --- a/conf/base.config +++ b/conf/base.config @@ -67,7 +67,7 @@ process { ext.args = { "--MD -ax map-ont --eqx" } } withName:SAMTOOLS_VIEW { - ext.args = '--output-fmt bam' + ext.args = '--output-fmt bam' } withName:BEDTOOLS_GENOMECOV { ext.args = '-bg' diff --git a/conf/test.config b/conf/test.config index db8c5bff..07e538cc 100644 --- a/conf/test.config +++ b/conf/test.config @@ -24,8 +24,7 @@ params { protocol = 'DNA' barcode_kit = 'NBD103/NBD104' input_path = 'https://raw.githubusercontent.com/nf-core/test-datasets/nanoseq/fastq/nondemultiplexed/sample_nobc_dx.fastq.gz' - //skip_bigwig = true - //skip_bigbed = true + skip_bigbed = true skip_quantification = true skip_fusion_analysis= true skip_modification_analysis=true diff --git a/subworkflows/local/differential_deseq2_dexseq.nf b/subworkflows/local/differential_deseq2_dexseq.nf index 4bfb24cc..df42c79e 100644 --- a/subworkflows/local/differential_deseq2_dexseq.nf +++ b/subworkflows/local/differential_deseq2_dexseq.nf @@ -14,10 +14,9 @@ workflow DIFFERENTIAL_DESEQ2_DEXSEQ { /* * DESeq2 differential expression of genes */ - ch_gene_counts -// DESEQ2 ( ch_gene_counts ) -// ch_deseq2_txt = DESEQ2.out.deseq2_txt -// deseq2_version = DESEQ2.out.versions + DESEQ2 ( ch_gene_counts ) + ch_deseq2_txt = DESEQ2.out.deseq2_txt + deseq2_version = DESEQ2.out.versions /* * DEXseq differential expression of transcripts @@ -27,8 +26,8 @@ workflow DIFFERENTIAL_DESEQ2_DEXSEQ { dexseq_version = DEXSEQ.out.versions emit: -// ch_deseq2_txt + ch_deseq2_txt ch_dexseq_txt -// deseq2_version + deseq2_version dexseq_version } diff --git a/workflows/nanoseq.nf b/workflows/nanoseq.nf index f288e646..b9d670f3 100644 --- a/workflows/nanoseq.nf +++ b/workflows/nanoseq.nf @@ -368,7 +368,7 @@ workflow NANOSEQ{ BAMBU ( ch_sample_annotation, ch_sorted_bam.collect{ it [1] } ) ch_gene_counts = BAMBU.out.ch_gene_counts ch_transcript_counts = BAMBU.out.ch_transcript_counts - ch_software_versions = ch_software_versions.mix(BAMBU.out.versions.first().ifEmpty(null)) + ch_software_versions = ch_software_versions.mix(BAMBU.out.versions.ifEmpty(null)) } else { /* @@ -388,8 +388,8 @@ workflow NANOSEQ{ * SUBWORKFLOW: Differential gene and transcript analysis with DESeq2 and DEXseq */ DIFFERENTIAL_DESEQ2_DEXSEQ( ch_gene_counts, ch_transcript_counts ) - ch_software_versions = ch_software_versions.mix(DIFFERENTIAL_DESEQ2_DEXSEQ.out.deseq2_version.first().ifEmpty(null)) - ch_software_versions = ch_software_versions.mix(DIFFERENTIAL_DESEQ2_DEXSEQ.out.dexseq_version.first().ifEmpty(null)) + ch_software_versions = ch_software_versions.mix(DIFFERENTIAL_DESEQ2_DEXSEQ.out.deseq2_version.ifEmpty(null)) + ch_software_versions = ch_software_versions.mix(DIFFERENTIAL_DESEQ2_DEXSEQ.out.dexseq_version.ifEmpty(null)) } } From 9eabb157cc1f0c206dcf01c911f24e781d12963e Mon Sep 17 00:00:00 2001 From: Yuk Kei Wan Date: Tue, 21 Mar 2023 12:06:42 +0800 Subject: [PATCH 15/77] fix --- conf/test.config | 1 + 1 file changed, 1 insertion(+) diff --git a/conf/test.config b/conf/test.config index 07e538cc..0392c999 100644 --- a/conf/test.config +++ b/conf/test.config @@ -24,6 +24,7 @@ params { protocol = 'DNA' barcode_kit = 'NBD103/NBD104' input_path = 'https://raw.githubusercontent.com/nf-core/test-datasets/nanoseq/fastq/nondemultiplexed/sample_nobc_dx.fastq.gz' + skip_bigwig = true skip_bigbed = true skip_quantification = true skip_fusion_analysis= true From e3ac9c4de8a5dc9cf91ce0a2ea110cac2516a889 Mon Sep 17 00:00:00 2001 From: Yuk Kei Wan Date: Tue, 21 Mar 2023 12:26:21 +0800 Subject: [PATCH 16/77] fix --- workflows/nanoseq.nf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/workflows/nanoseq.nf b/workflows/nanoseq.nf index b9d670f3..620cf82a 100644 --- a/workflows/nanoseq.nf +++ b/workflows/nanoseq.nf @@ -379,8 +379,8 @@ workflow NANOSEQ{ ch_transcript_counts = QUANTIFY_STRINGTIE_FEATURECOUNTS.out.ch_transcript_counts ch_software_versions = ch_software_versions.mix(QUANTIFY_STRINGTIE_FEATURECOUNTS.out.stringtie2_version.first().ifEmpty(null)) ch_software_versions = ch_software_versions.mix(QUANTIFY_STRINGTIE_FEATURECOUNTS.out.featurecounts_version.first().ifEmpty(null)) - ch_featurecounts_gene_multiqc = QUANTIFY_STRINGTIE_FEATURECOUNTS.out.featurecounts_gene_multiqc.ifEmpty([]) - ch_featurecounts_transcript_multiqc = QUANTIFY_STRINGTIE_FEATURECOUNTS.out.featurecounts_transcript_multiqc.ifEmpty([]) + ch_featurecounts_gene_multiqc = QUANTIFY_STRINGTIE_FEATURECOUNTS.out.featurecounts_gene_multiqc.map{it->it[1]}.ifEmpty([]) + ch_featurecounts_transcript_multiqc = QUANTIFY_STRINGTIE_FEATURECOUNTS.out.featurecounts_transcript_multiqc.map{it->it[1]}.ifEmpty([]) } if (!params.skip_differential_analysis) { From 17fd627b4a1632258f7eedc036a68d7f0c181fc2 Mon Sep 17 00:00:00 2001 From: Chris Hakkaart Date: Tue, 21 Mar 2023 14:53:24 +0000 Subject: [PATCH 17/77] Remove mapping and add in more meta information --- bin/check_samplesheet.py | 93 ++++++++++++------------------- subworkflows/local/input_check.nf | 33 ++++------- workflows/nanoseq.nf | 76 +++++++++++++------------ 3 files changed, 86 insertions(+), 116 deletions(-) diff --git a/bin/check_samplesheet.py b/bin/check_samplesheet.py index 3f22c875..14d0bae3 100755 --- a/bin/check_samplesheet.py +++ b/bin/check_samplesheet.py @@ -46,24 +46,23 @@ def read_head(handle, num_lines=10): return "".join(lines) -def check_samplesheet(file_in, updated_path, file_out): +def check_samplesheet(file_in, file_out): """ This function checks that the samplesheet follows the following structure: group,replicate,barcode,input_file MCF7,1,,MCF7_directcDNA_replicate1.fastq.gz MCF7,2,,MCF7_directcDNA_replicate3.fastq.gz - K562,1,,K562_directcDNA_replicate1.fastq.gz - K562,2,,K562_directcDNA_replicate4.fastq.gz """ input_extensions = [] sample_info_dict = {} with open(file_in, "r") as fin: + ## Check header MIN_COLS = 3 - HEADER = ["group", "replicate", "barcode", "input_file"] + HEADER = ['group', 'replicate', 'barcode', 'input_file'] header = fin.readline().strip().split(",") - if header[: len(HEADER)] != HEADER: + if header[:len(HEADER)] != HEADER: print("ERROR: Please check samplesheet header -> {} != {}".format(",".join(header), ",".join(HEADER))) sys.exit(1) @@ -73,48 +72,40 @@ def check_samplesheet(file_in, updated_path, file_out): ## Check valid number of columns per row if len(lspl) < len(HEADER): - print_error( - "Invalid number of columns (minimum = {})!".format(len(HEADER)), - "Line", - line, - ) + print_error("Invalid number of columns (minimum = {})!".format(len(HEADER)), 'Line', line) num_cols = len([x for x in lspl if x]) if num_cols < MIN_COLS: - print_error( - "Invalid number of populated columns (minimum = {})!".format(MIN_COLS), - "Line", - line, - ) + print_error("Invalid number of populated columns (minimum = {})!".format(MIN_COLS), 'Line', line) ## Check group name entries - group, replicate, barcode, input_file = lspl[: len(HEADER)] + group, replicate, barcode, input_file = lspl[:len(HEADER)] if group: if group.find(" ") != -1: - print_error("Group entry contains spaces!", "Line", line) + print_error("Group entry contains spaces!", 'Line', line) else: - print_error("Group entry has not been specified!", "Line", line) + print_error("Group entry has not been specified!", 'Line', line) ## Check replicate entry is integer if replicate: if not replicate.isdigit(): - print_error("Replicate id not an integer!", "Line", line) + print_error("Replicate id not an integer!", 'Line', line) else: - print_error("Replicate id not specified!", "Line", line) + print_error("Replicate id not specified!", 'Line', line) replicate = int(replicate) ## Check barcode entry if barcode: if not barcode.isdigit(): - print_error("Barcode entry is not an integer!", "Line", line) + print_error("Barcode entry is not an integer!", 'Line', line) else: - barcode = "barcode%s" % (barcode.zfill(2)) + barcode = 'barcode%s' % (barcode.zfill(2)) ## Check input file extension - nanopolish_fast5 = "" + nanopolish_fast5 = '' if input_file: if input_file.find(" ") != -1: - print_error("Input file contains spaces!", "Line", line) + print_error("Input file contains spaces!", 'Line', line) if input_file.endswith(".fastq.gz"): input_extensions.append("*.fastq.gz") elif input_file.endswith(".fq.gz"): @@ -123,75 +114,65 @@ def check_samplesheet(file_in, updated_path, file_out): input_extensions.append("*.bam") else: if updated_path != "not_changed": - input_file = "/".join([updated_path, input_file.split("/")[-1]]) - list_dir = os.listdir(input_file) + input_file='/'.join([updated_path,input_file.split("/")[-1]]) + list_dir = os.listdir(input_file) nanopolish_fast5 = input_file - if not (all(fname.endswith(".fast5") for fname in list_dir)): + if not (all(fname.endswith('.fast5') for fname in list_dir)): if "fast5" in list_dir and "fastq" in list_dir: - nanopolish_fast5 = input_file + "/fast5" + nanopolish_fast5 = input_file+'/fast5' ## CHECK FAST5 DIRECTORY - if not (all(fname.endswith(".fast5") for fname in os.listdir(nanopolish_fast5))): - print_error("fast5 directory contains non-fast5 files.") + if not (all(fname.endswith('.fast5') for fname in os.listdir(nanopolish_fast5))): + print_error('fast5 directory contains non-fast5 files.') ## CHECK PROVIDED BASECALLED FASTQ - fastq_path = input_file + "/fastq" - basecalled_fastq = [ - fn for fn in os.listdir(fastq_path) if fn.endswith(".fastq.gz") or fn.endswith(".fq.gz") - ] + fastq_path = input_file+'/fastq' + basecalled_fastq = [fn for fn in os.listdir(fastq_path) if fn.endswith(".fastq.gz") or fn.endswith(".fq.gz") ] if len(basecalled_fastq) != 1: - print_error("Please input one basecalled fastq per sample.") + print_error('Please input one basecalled fastq per sample.') else: - input_file = fastq_path + "/" + basecalled_fastq[0] + input_file = fastq_path+'/'+basecalled_fastq[0] if not basecalled_fastq[0].endswith(".fastq.gz"): if not basecalled_fastq[0].endswith(".fq.gz"): print_error('basecalled fastq input does not end with ".fastq.gz" or ".fq.gz"') else: - print_error( - 'path does not end with ".fastq.gz", ".fq.gz", or ".bam" and is not an existing directory with correct fast5 and/or fastq inputs.' - ) + print_error('path does not end with ".fastq.gz", ".fq.gz", or ".bam" and is not an existing directory with correct fast5 and/or fastq inputs.') - ## Create sample mapping dictionary = {group: {replicate : [ barcode, input_file, genome, gtf, is_transcripts, nanopolish_fast5 ]}} + ## Create sample mapping dictionary = {group: {replicate : [ barcode, input_file, nanopolish_fast5 ]}} sample_info = [barcode, input_file, nanopolish_fast5] if group not in sample_info_dict: sample_info_dict[group] = {} if replicate not in sample_info_dict[group]: sample_info_dict[group][replicate] = sample_info else: - print_error("Same replicate id provided multiple times!", "Line", line) + print_error("Same replicate id provided multiple times!", 'Line', line) ## Check all input files have the same extension if len(set(input_extensions)) > 1: - print_error( - "All input files must have the same extension!", - "Multiple extensions found", - ", ".join(set(input_extensions)), - ) + print_error("All input files must have the same extension!", 'Multiple extensions found', ', '.join(set(input_extensions))) ## Write validated samplesheet with appropriate columns if len(sample_info_dict) > 0: out_dir = os.path.dirname(file_out) make_dir(out_dir) with open(file_out, "w") as fout: - fout.write(",".join(["sample", "barcode", "input_file", "nanopolish_fast5"]) + "\n") + + fout.write(",".join(['sample', 'barcode', 'reads','nanopolish_fast5']) + "\n") for sample in sorted(sample_info_dict.keys()): + ## Check that replicate ids are in format 1.. uniq_rep_ids = set(sample_info_dict[sample].keys()) if len(uniq_rep_ids) != max(uniq_rep_ids): - print_error( - "Replicate ids must start with 1..!", - "Group", - sample, - ) + print_error("Replicate ids must start with 1..!", 'Group', sample) ### Write to file for replicate in sorted(sample_info_dict[sample].keys()): - sample_id = "{}_R{}".format(sample, replicate) - fout.write(",".join([sample_id] + sample_info_dict[sample][replicate]) + "\n") + sample_id = "{}_R{}".format(sample,replicate) + fout.write(','.join([sample_id] + sample_info_dict[sample][replicate]) + '\n') def main(args=None): args = parse_args(args) - check_samplesheet(args.FILE_IN, args.UPDATED_PATH, args.FILE_OUT) + check_samplesheet(args.FILE_IN, args.FILE_OUT) -if __name__ == "__main__": +if __name__ == '__main__': sys.exit(main()) diff --git a/subworkflows/local/input_check.nf b/subworkflows/local/input_check.nf index eee0e292..9eec33a3 100644 --- a/subworkflows/local/input_check.nf +++ b/subworkflows/local/input_check.nf @@ -20,31 +20,18 @@ workflow INPUT_CHECK { .set { ch_sample } emit: - ch_sample // [ meta, input_file, barcode, nanopolish_fast5 ] + ch_sample // [[id:, barcode:, nanopolish_fast5:], [input_file]] } -// Function to resolve fasta and gtf file if using iGenomes -// Returns [ sample, input_file, barcode, fasta, gtf, is_transcripts, annotation_str, nanopolish_fast5 ] -def get_sample_info(LinkedHashMap sample) { - def meta = [:] - meta.id = sample.sample +// Function to get list of [ meta, fastq ] +def get_sample_info(LinkedHashMap row) { + def meta = [:] + meta.id = row.sample + meta.barcode = row.barcode + meta.nanopolish_fast5 = row.nanopolish_fast5 + input_file = row.reads ? file(row.reads, checkIfExists: true) : null - // Resolve fasta and gtf file if using iGenomes -// def fasta = false -// def gtf = false -// if (sample.fasta) { -// if (genomeMap && genomeMap.containsKey(sample.fasta)) { -// fasta = file(genomeMap[sample.fasta].fasta, checkIfExists: true) -// gtf = file(genomeMap[sample.fasta].gtf, checkIfExists: true) -// } else { -// fasta = file(sample.fasta, checkIfExists: true) -// } -// } + fastq_meta = [ meta, [ input_file ] ] - // Check if input file and gtf file exists - input_file = sample.input_file ? file(sample.input_file, checkIfExists: true) : null -// gtf = sample.gtf ? file(sample.gtf, checkIfExists: true) : gtf - - return [ meta, input_file, sample.barcode, sample.nanopolish_fast5 ] + return fastq_meta } - diff --git a/workflows/nanoseq.nf b/workflows/nanoseq.nf index 620cf82a..12ce2b2d 100644 --- a/workflows/nanoseq.nf +++ b/workflows/nanoseq.nf @@ -25,7 +25,7 @@ if (params.fasta){ ch_fasta = file(params.fasta) } -if (params.gtf){ +if (params.gtf){ ch_gtf = file(params.gtf) } @@ -132,9 +132,9 @@ include { RNA_FUSIONS_JAFFAL } from '../subworkflows/local/rna_fus /* * MODULE: Installed directly from nf-core/modules */ -include { QCAT } from '../modules/nf-core/qcat/main' -include { NANOLYSE } from '../modules/nf-core/nanolyse/main' -include { CUSTOM_GETCHROMSIZES } from '../modules/nf-core/custom/getchromsizes/main' +include { QCAT } from '../modules/nf-core/qcat/main' +include { NANOLYSE } from '../modules/nf-core/nanolyse/main' +include { CUSTOM_GETCHROMSIZES } from '../modules/nf-core/custom/getchromsizes/main' include { CUSTOM_DUMPSOFTWAREVERSIONS } from '../modules/nf-core/custom/dumpsoftwareversions/main' /* @@ -182,9 +182,7 @@ workflow NANOSEQ{ } } - /* - * Create empty software versions channel to mix - */ + // Create empty software versions channel to mix ch_software_versions = Channel.empty() /* @@ -195,32 +193,30 @@ workflow NANOSEQ{ if (!params.skip_demultiplexing) { - /* - * MODULE: Demultipexing using qcat - */ + // Create barcode channel + ch_barcode_kit = Channel.from(params.barcode_kit) + + // Map ch_undemultiplexed_fastq ch_input_path - .combine( [[id:'undemultiplexed']] ) - .map { it -> [ it[1], it[0] ]} + .map { it -> [ [id:'undemultiplexed'], it ] } .set { ch_undemultiplexed_fastq } - ch_barcode_kit = Channel.from(params.barcode_kit) + /* + * MODULE: Demultipexing using qcat + */ QCAT ( ch_undemultiplexed_fastq , ch_barcode_kit ) - ch_fastq = Channel.empty() - ch_sample - .map { it -> [ it[0], it[2], it[1] ] } // [ meta, barcode, replicate ] - .set { ch_sample_fields_reordered } QCAT.out.reads .map { it -> it[1] } .flatten() - .map { it -> [ it, it.baseName.substring(0,it.baseName.lastIndexOf('.'))] } - .join(ch_sample_fields_reordered, by: 1) - .map { it -> [ it[2], it[1], it[0], it[3] ] } // [ meta, replicate, barcode ] - .set { ch_fastq } + .map { it -> [ it.baseName.substring(0,it.baseName.lastIndexOf('.')), it ] } + .join(ch_sample.map{ meta, empty -> [meta.barcode, meta] }, by: [0] ) + .map { it -> [ it[2], it[1] ] } + .set { ch_fastq } // [ meta, .fastq.qz ] ch_software_versions = ch_software_versions.mix(QCAT.out.versions.ifEmpty(null)) } else { if (!params.skip_alignment || !params.skip_fusion_analysis) { ch_sample - .map { it -> if (it[1].toString().endsWith('.gz')) [ it[0], it[1], it[2], it[3] ] } + .map { it -> if (it[1].toString().endsWith('.gz')) [ it[0], it[1] ] } .set { ch_fastq } } else { ch_fastq = Channel.empty() @@ -228,10 +224,6 @@ workflow NANOSEQ{ } if (params.run_nanolyse) { - ch_fastq - .map { it -> [ it[0], it[1] ] } - .set { ch_fastq_nanolyse } - if (!params.nanolyse_fasta) { if (!isOffline()) { GET_NANOLYSE_FASTA() @@ -243,13 +235,17 @@ workflow NANOSEQ{ } else { ch_nanolyse_fasta = file(params.nanolyse_fasta, checkIfExists: true) } + /* * MODULE: DNA contaminant removal using NanoLyse */ - NANOLYSE ( ch_fastq_nanolyse, ch_nanolyse_fasta ) + NANOLYSE ( ch_fastq, ch_nanolyse_fasta ) NANOLYSE.out.fastq - .set { ch_fastq } + .set { ch_fastq_nanolyse } ch_software_versions = ch_software_versions.mix(NANOLYSE.out.versions.first().ifEmpty(null)) + } else { + ch_fastq + .set { ch_fastq_nanolyse } } ch_fastqc_multiqc = Channel.empty() @@ -258,7 +254,7 @@ workflow NANOSEQ{ /* * SUBWORKFLOW: Fastq QC with Nanoplot and fastqc */ - QCFASTQ_NANOPLOT_FASTQC ( ch_fastq, params.skip_nanoplot, params.skip_fastqc) + QCFASTQ_NANOPLOT_FASTQC ( ch_fastq_nanolyse, params.skip_nanoplot, params.skip_fastqc) ch_software_versions = ch_software_versions.mix(QCFASTQ_NANOPLOT_FASTQC.out.fastqc_version.first().ifEmpty(null)) ch_fastqc_multiqc = QCFASTQ_NANOPLOT_FASTQC.out.fastqc_multiqc.ifEmpty([]) } @@ -266,14 +262,16 @@ workflow NANOSEQ{ ch_samtools_multiqc = Channel.empty() if (!params.skip_alignment) { + ch_fasta = Channel.from( [id:'reference'], params.fasta ).collect() + /* * SUBWORKFLOW: Make chromosome size file and covert GTF to BED12 */ - ch_fasta = Channel.from( [id:'reference'], params.fasta ).collect() CUSTOM_GETCHROMSIZES( ch_fasta ) ch_chr_sizes = CUSTOM_GETCHROMSIZES.out.sizes ch_fai = CUSTOM_GETCHROMSIZES.out.fai ch_software_versions = ch_software_versions.mix(CUSTOM_GETCHROMSIZES.out.versions.first().ifEmpty(null)) + if (params.aligner == 'minimap2') { /* @@ -297,6 +295,7 @@ workflow NANOSEQ{ } if (params.call_variants && params.protocol == 'DNA') { + /* * SUBWORKFLOW: Short variant calling */ @@ -338,6 +337,9 @@ workflow NANOSEQ{ ch_sample .map { it -> if (it[1].toString().endsWith('.bam')) [ it[0], it[1] ] } .set { ch_sample_bam } + /* + * MODULE: Rename bam file + */ BAM_RENAME ( ch_sample_bam ) ch_sorted_bam = BAM_RENAME.out.bam } @@ -350,13 +352,13 @@ workflow NANOSEQ{ // Check if we have replicates and multiple conditions in the input samplesheet REPLICATES_EXIST = false MULTIPLE_CONDITIONS = false - // BUG: ".val" halts the pipeline /////////////////////// - // if ( gtfs.map{it[0]} == false || fastas.map{it[0]} == false || gtfs.size().val != 1 || fasta.size().val != 1 ) { - // exit 1, """Quantification can only be performed if all samples in the samplesheet have the same reference fasta and GTF file." - // Please specify the '--skip_quantification' parameter if you wish to skip these steps.""" - // } - // REPLICATES_EXIST = ch_sample.map { it -> it[0].split('_')[-1].replaceAll('R','').toInteger() }.max().val > 1 - // MULTIPLE_CONDITIONS = ch_sample.map { it -> it[0].split('_')[0..-2].join('_') }.unique().count().val > 1 + /* BUG: ".val" halts the pipeline /////////////////////// + * if ( gtfs.map{it[0]} == false || fastas.map{it[0]} == false || gtfs.size().val != 1 || fasta.size().val != 1 ) { + * exit 1, """Quantification can only be performed if all samples in the samplesheet have the same reference fasta and GTF file." + * Please specify the '--skip_quantification' parameter if you wish to skip these steps.""" + * } + * REPLICATES_EXIST = ch_sample.map { it -> it[0].split('_')[-1].replaceAll('R','').toInteger() }.max().val > 1 + */ MULTIPLE_CONDITIONS = ch_sample.map { it -> it[0].split('_')[0..-2].join('_') }.unique().count().val > 1 ch_r_version = Channel.empty() if (params.quantification_method == 'bambu') { From 3d05290505503d394f5937a3acf1d471f8270839 Mon Sep 17 00:00:00 2001 From: Chris Hakkaart Date: Tue, 21 Mar 2023 19:32:26 +0000 Subject: [PATCH 18/77] tidy lines --- workflows/nanoseq.nf | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/workflows/nanoseq.nf b/workflows/nanoseq.nf index 12ce2b2d..73d1a597 100644 --- a/workflows/nanoseq.nf +++ b/workflows/nanoseq.nf @@ -268,8 +268,8 @@ workflow NANOSEQ{ * SUBWORKFLOW: Make chromosome size file and covert GTF to BED12 */ CUSTOM_GETCHROMSIZES( ch_fasta ) - ch_chr_sizes = CUSTOM_GETCHROMSIZES.out.sizes - ch_fai = CUSTOM_GETCHROMSIZES.out.fai + ch_chr_sizes = CUSTOM_GETCHROMSIZES.out.sizes + ch_fai = CUSTOM_GETCHROMSIZES.out.fai ch_software_versions = ch_software_versions.mix(CUSTOM_GETCHROMSIZES.out.versions.first().ifEmpty(null)) if (params.aligner == 'minimap2') { @@ -278,8 +278,8 @@ workflow NANOSEQ{ * SUBWORKFLOW: Align fastq files with minimap2 and sort bam files */ ALIGN_MINIMAP2 ( ch_fasta, ch_fastq ) - ch_sorted_bam = ALIGN_MINIMAP2.out.ch_sorted_bam - ch_sorted_bai = ALIGN_MINIMAP2.out.ch_sorted_bai + ch_sorted_bam = ALIGN_MINIMAP2.out.ch_sorted_bam + ch_sorted_bai = ALIGN_MINIMAP2.out.ch_sorted_bai ch_software_versions = ch_software_versions.mix(ALIGN_MINIMAP2.out.minimap2_version.first().ifEmpty(null)) ch_software_versions = ch_software_versions.mix(ALIGN_MINIMAP2.out.samtools_version.first().ifEmpty(null)) } else { @@ -288,8 +288,8 @@ workflow NANOSEQ{ * SUBWORKFLOW: Align fastq files with graphmap2 and sort bam files */ ALIGN_GRAPHMAP2 ( ch_fasta, ch_fastq ) - ch_sorted_bam = ALIGN_GRAPHMAP2.out.ch_sorted_bam - ch_sorted_bai = ALIGN_GRAPHMAP2.out.ch_sorted_bai + ch_sorted_bam = ALIGN_GRAPHMAP2.out.ch_sorted_bam + ch_sorted_bai = ALIGN_GRAPHMAP2.out.ch_sorted_bai ch_software_versions = ch_software_versions.mix(ALIGN_GRAPHMAP2.out.graphmap2_version.first().ifEmpty(null)) ch_software_versions = ch_software_versions.mix(ALIGN_GRAPHMAP2.out.samtools_version.first().ifEmpty(null)) } @@ -320,7 +320,7 @@ workflow NANOSEQ{ * SUBWORKFLOW: Convert BAM -> BEDGraph -> BigWig */ BEDTOOLS_UCSC_BIGWIG ( ch_sorted_bam, ch_chr_sizes ) - ch_bedtools_version = ch_bedtools_version.mix(BEDTOOLS_UCSC_BIGWIG.out.bedtools_version.first().ifEmpty(null)) + ch_bedtools_version = ch_bedtools_version.mix(BEDTOOLS_UCSC_BIGWIG.out.bedtools_version.first().ifEmpty(null)) ch_software_versions = ch_software_versions.mix(BEDTOOLS_UCSC_BIGWIG.out.bedgraphtobigwig_version.first().ifEmpty(null)) } if (!params.skip_bigbed) { @@ -329,7 +329,7 @@ workflow NANOSEQ{ * SUBWORKFLOW: Convert BAM -> BED12 -> BigBED */ BEDTOOLS_UCSC_BIGBED ( ch_sorted_bam, ch_chr_sizes ) - ch_bedtools_version = ch_bedtools_version.mix(BEDTOOLS_UCSC_BIGBED.out.bedtools_version.first().ifEmpty(null)) + ch_bedtools_version = ch_bedtools_version.mix(BEDTOOLS_UCSC_BIGBED.out.bedtools_version.first().ifEmpty(null)) ch_software_versions = ch_software_versions.mix(BEDTOOLS_UCSC_BIGBED.out.bed12tobigbed_version.first().ifEmpty(null)) } ch_software_versions = ch_software_versions.mix(ch_bedtools_version.first().ifEmpty(null)) @@ -352,17 +352,19 @@ workflow NANOSEQ{ // Check if we have replicates and multiple conditions in the input samplesheet REPLICATES_EXIST = false MULTIPLE_CONDITIONS = false - /* BUG: ".val" halts the pipeline /////////////////////// + /* + * BUG: ".val" halts the pipeline /////////////////////// * if ( gtfs.map{it[0]} == false || fastas.map{it[0]} == false || gtfs.size().val != 1 || fasta.size().val != 1 ) { * exit 1, """Quantification can only be performed if all samples in the samplesheet have the same reference fasta and GTF file." * Please specify the '--skip_quantification' parameter if you wish to skip these steps.""" * } * REPLICATES_EXIST = ch_sample.map { it -> it[0].split('_')[-1].replaceAll('R','').toInteger() }.max().val > 1 - */ MULTIPLE_CONDITIONS = ch_sample.map { it -> it[0].split('_')[0..-2].join('_') }.unique().count().val > 1 + * MULTIPLE_CONDITIONS = ch_sample.map { it -> it[0].split('_')[0..-2].join('_') }.unique().count().val > 1 + */ ch_r_version = Channel.empty() if (params.quantification_method == 'bambu') { - ch_sample_annotation=Channel.from(params.fasta,params.gtf).collect() + ch_sample_annotation = Channel.from(params.fasta, params.gtf).collect() /* * MODULE: Quantification and novel isoform detection with bambu From ada62a96544421332c2f7ad4b4cf1ed069d4e58f Mon Sep 17 00:00:00 2001 From: Chris Hakkaart Date: Tue, 21 Mar 2023 19:58:46 +0000 Subject: [PATCH 19/77] fix check_samplesheet --- bin/check_samplesheet.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/check_samplesheet.py b/bin/check_samplesheet.py index 14d0bae3..2af4d572 100755 --- a/bin/check_samplesheet.py +++ b/bin/check_samplesheet.py @@ -46,7 +46,7 @@ def read_head(handle, num_lines=10): return "".join(lines) -def check_samplesheet(file_in, file_out): +def check_samplesheet(file_in, updated_path, file_out): """ This function checks that the samplesheet follows the following structure: group,replicate,barcode,input_file @@ -171,7 +171,7 @@ def check_samplesheet(file_in, file_out): def main(args=None): args = parse_args(args) - check_samplesheet(args.FILE_IN, args.FILE_OUT) + check_samplesheet(args.FILE_IN, args.UPDATED_PATH, args.FILE_OUT) if __name__ == '__main__': From b127e3a342f33a42aa96e58700716be44aebfcde Mon Sep 17 00:00:00 2001 From: Yuk Kei Wan Date: Fri, 24 Mar 2023 10:33:54 +0800 Subject: [PATCH 20/77] convert sniffles and cutesv to nf-core/modules --- bin/check_samplesheet.py | 73 +++++----- conf/test_nodx_vc.config | 2 +- modules.json | 132 ++++++++++++++---- modules/local/nanopolish_index_eventalign.nf | 4 +- .../cutesv.nf => nf-core/cutesv/main.nf} | 15 +- modules/nf-core/cutesv/meta.yml | 55 ++++++++ .../sniffles.nf => nf-core/sniffles/main.nf} | 14 +- modules/nf-core/sniffles/meta.yml | 59 ++++++++ subworkflows/local/input_check.nf | 2 +- subworkflows/local/short_variant_calling.nf | 2 +- .../local/structural_variant_calling.nf | 11 +- workflows/nanoseq.nf | 12 +- 12 files changed, 283 insertions(+), 98 deletions(-) rename modules/{local/cutesv.nf => nf-core/cutesv/main.nf} (72%) create mode 100644 modules/nf-core/cutesv/meta.yml rename modules/{local/sniffles.nf => nf-core/sniffles/main.nf} (77%) create mode 100644 modules/nf-core/sniffles/meta.yml diff --git a/bin/check_samplesheet.py b/bin/check_samplesheet.py index 2af4d572..94c0d9e0 100755 --- a/bin/check_samplesheet.py +++ b/bin/check_samplesheet.py @@ -57,12 +57,11 @@ def check_samplesheet(file_in, updated_path, file_out): input_extensions = [] sample_info_dict = {} with open(file_in, "r") as fin: - ## Check header MIN_COLS = 3 - HEADER = ['group', 'replicate', 'barcode', 'input_file'] + HEADER = ["group", "replicate", "barcode", "input_file"] header = fin.readline().strip().split(",") - if header[:len(HEADER)] != HEADER: + if header[: len(HEADER)] != HEADER: print("ERROR: Please check samplesheet header -> {} != {}".format(",".join(header), ",".join(HEADER))) sys.exit(1) @@ -72,40 +71,40 @@ def check_samplesheet(file_in, updated_path, file_out): ## Check valid number of columns per row if len(lspl) < len(HEADER): - print_error("Invalid number of columns (minimum = {})!".format(len(HEADER)), 'Line', line) + print_error("Invalid number of columns (minimum = {})!".format(len(HEADER)), "Line", line) num_cols = len([x for x in lspl if x]) if num_cols < MIN_COLS: - print_error("Invalid number of populated columns (minimum = {})!".format(MIN_COLS), 'Line', line) + print_error("Invalid number of populated columns (minimum = {})!".format(MIN_COLS), "Line", line) ## Check group name entries - group, replicate, barcode, input_file = lspl[:len(HEADER)] + group, replicate, barcode, input_file = lspl[: len(HEADER)] if group: if group.find(" ") != -1: - print_error("Group entry contains spaces!", 'Line', line) + print_error("Group entry contains spaces!", "Line", line) else: - print_error("Group entry has not been specified!", 'Line', line) + print_error("Group entry has not been specified!", "Line", line) ## Check replicate entry is integer if replicate: if not replicate.isdigit(): - print_error("Replicate id not an integer!", 'Line', line) + print_error("Replicate id not an integer!", "Line", line) else: - print_error("Replicate id not specified!", 'Line', line) + print_error("Replicate id not specified!", "Line", line) replicate = int(replicate) ## Check barcode entry if barcode: if not barcode.isdigit(): - print_error("Barcode entry is not an integer!", 'Line', line) + print_error("Barcode entry is not an integer!", "Line", line) else: - barcode = 'barcode%s' % (barcode.zfill(2)) + barcode = "barcode%s" % (barcode.zfill(2)) ## Check input file extension - nanopolish_fast5 = '' + nanopolish_fast5 = "" if input_file: if input_file.find(" ") != -1: - print_error("Input file contains spaces!", 'Line', line) + print_error("Input file contains spaces!", "Line", line) if input_file.endswith(".fastq.gz"): input_extensions.append("*.fastq.gz") elif input_file.endswith(".fq.gz"): @@ -114,27 +113,31 @@ def check_samplesheet(file_in, updated_path, file_out): input_extensions.append("*.bam") else: if updated_path != "not_changed": - input_file='/'.join([updated_path,input_file.split("/")[-1]]) - list_dir = os.listdir(input_file) + input_file = "/".join([updated_path, input_file.split("/")[-1]]) + list_dir = os.listdir(input_file) nanopolish_fast5 = input_file - if not (all(fname.endswith('.fast5') for fname in list_dir)): + if not (all(fname.endswith(".fast5") for fname in list_dir)): if "fast5" in list_dir and "fastq" in list_dir: - nanopolish_fast5 = input_file+'/fast5' + nanopolish_fast5 = input_file + "/fast5" ## CHECK FAST5 DIRECTORY - if not (all(fname.endswith('.fast5') for fname in os.listdir(nanopolish_fast5))): - print_error('fast5 directory contains non-fast5 files.') + if not (all(fname.endswith(".fast5") for fname in os.listdir(nanopolish_fast5))): + print_error("fast5 directory contains non-fast5 files.") ## CHECK PROVIDED BASECALLED FASTQ - fastq_path = input_file+'/fastq' - basecalled_fastq = [fn for fn in os.listdir(fastq_path) if fn.endswith(".fastq.gz") or fn.endswith(".fq.gz") ] + fastq_path = input_file + "/fastq" + basecalled_fastq = [ + fn for fn in os.listdir(fastq_path) if fn.endswith(".fastq.gz") or fn.endswith(".fq.gz") + ] if len(basecalled_fastq) != 1: - print_error('Please input one basecalled fastq per sample.') + print_error("Please input one basecalled fastq per sample.") else: - input_file = fastq_path+'/'+basecalled_fastq[0] + input_file = fastq_path + "/" + basecalled_fastq[0] if not basecalled_fastq[0].endswith(".fastq.gz"): if not basecalled_fastq[0].endswith(".fq.gz"): print_error('basecalled fastq input does not end with ".fastq.gz" or ".fq.gz"') else: - print_error('path does not end with ".fastq.gz", ".fq.gz", or ".bam" and is not an existing directory with correct fast5 and/or fastq inputs.') + print_error( + 'path does not end with ".fastq.gz", ".fq.gz", or ".bam" and is not an existing directory with correct fast5 and/or fastq inputs.' + ) ## Create sample mapping dictionary = {group: {replicate : [ barcode, input_file, nanopolish_fast5 ]}} sample_info = [barcode, input_file, nanopolish_fast5] @@ -143,30 +146,32 @@ def check_samplesheet(file_in, updated_path, file_out): if replicate not in sample_info_dict[group]: sample_info_dict[group][replicate] = sample_info else: - print_error("Same replicate id provided multiple times!", 'Line', line) + print_error("Same replicate id provided multiple times!", "Line", line) ## Check all input files have the same extension if len(set(input_extensions)) > 1: - print_error("All input files must have the same extension!", 'Multiple extensions found', ', '.join(set(input_extensions))) + print_error( + "All input files must have the same extension!", + "Multiple extensions found", + ", ".join(set(input_extensions)), + ) ## Write validated samplesheet with appropriate columns if len(sample_info_dict) > 0: out_dir = os.path.dirname(file_out) make_dir(out_dir) with open(file_out, "w") as fout: - - fout.write(",".join(['sample', 'barcode', 'reads','nanopolish_fast5']) + "\n") + fout.write(",".join(["sample", "barcode", "reads", "nanopolish_fast5"]) + "\n") for sample in sorted(sample_info_dict.keys()): - ## Check that replicate ids are in format 1.. uniq_rep_ids = set(sample_info_dict[sample].keys()) if len(uniq_rep_ids) != max(uniq_rep_ids): - print_error("Replicate ids must start with 1..!", 'Group', sample) + print_error("Replicate ids must start with 1..!", "Group", sample) ### Write to file for replicate in sorted(sample_info_dict[sample].keys()): - sample_id = "{}_R{}".format(sample,replicate) - fout.write(','.join([sample_id] + sample_info_dict[sample][replicate]) + '\n') + sample_id = "{}_R{}".format(sample, replicate) + fout.write(",".join([sample_id] + sample_info_dict[sample][replicate]) + "\n") def main(args=None): @@ -174,5 +179,5 @@ def main(args=None): check_samplesheet(args.FILE_IN, args.UPDATED_PATH, args.FILE_OUT) -if __name__ == '__main__': +if __name__ == "__main__": sys.exit(main()) diff --git a/conf/test_nodx_vc.config b/conf/test_nodx_vc.config index a9058562..1937e331 100644 --- a/conf/test_nodx_vc.config +++ b/conf/test_nodx_vc.config @@ -24,5 +24,5 @@ params { skip_demultiplexing = true call_variants = true variant_caller = 'clair3' - //structural_variant_caller = 'cutesv' + structural_variant_caller = 'sniffles' } diff --git a/modules.json b/modules.json index 7e29f4c7..9ac99f99 100644 --- a/modules.json +++ b/modules.json @@ -8,142 +8,212 @@ "bcftools/sort": { "branch": "master", "git_sha": "4a21e4cca35e72ec059abd67f790e0b192ce5d81", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "bedtools/bamtobed": { "branch": "master", "git_sha": "1d48427957205cb6acf1ffe330bd35b6bb8baa90", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "bedtools/genomecov": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "custom/dumpsoftwareversions": { "branch": "master", "git_sha": "b6d4d476aee074311c89d82a69c1921bd70c8180", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "custom/getchromsizes": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] + }, + "cutesv": { + "branch": "master", + "git_sha": "37224e9ae3bbfb5e417030cd8bfeb451a1fe989b", + "installed_by": [ + "modules" + ] }, "deepvariant": { "branch": "master", "git_sha": "0f8a77ff00e65eaeebc509b8156eaa983192474b", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "fastqc": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "graphmap2/align": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "graphmap2/index": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "minimap2/align": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "minimap2/index": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "nanolyse": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "nanoplot": { "branch": "master", "git_sha": "3822e04e49b6d89b7092feb3480d744cb5d9986b", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "qcat": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "samtools/flagstat": { "branch": "master", "git_sha": "0f8a77ff00e65eaeebc509b8156eaa983192474b", - "installed_by": ["bam_stats_samtools"] + "installed_by": [ + "bam_stats_samtools" + ] }, "samtools/idxstats": { "branch": "master", "git_sha": "0f8a77ff00e65eaeebc509b8156eaa983192474b", - "installed_by": ["bam_stats_samtools"] + "installed_by": [ + "bam_stats_samtools" + ] }, "samtools/index": { "branch": "master", "git_sha": "0f8a77ff00e65eaeebc509b8156eaa983192474b", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "samtools/sort": { "branch": "master", "git_sha": "0f8a77ff00e65eaeebc509b8156eaa983192474b", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "samtools/stats": { "branch": "master", "git_sha": "0f8a77ff00e65eaeebc509b8156eaa983192474b", - "installed_by": ["bam_stats_samtools"] + "installed_by": [ + "bam_stats_samtools" + ] }, "samtools/view": { "branch": "master", "git_sha": "0f8a77ff00e65eaeebc509b8156eaa983192474b", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] + }, + "sniffles": { + "branch": "master", + "git_sha": "9b8401b7eb47d81f607798481e044262eca1c718", + "installed_by": [ + "modules" + ] }, "stringtie/merge": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "stringtie/stringtie": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "subread/featurecounts": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "tabix/bgzip": { "branch": "master", "git_sha": "90294980a903ecebd99ac31d8b6c66af48fa8259", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "tabix/tabix": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "ucsc/bedgraphtobigwig": { "branch": "master", "git_sha": "0f8a77ff00e65eaeebc509b8156eaa983192474b", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "ucsc/bedtobigbed": { "branch": "master", "git_sha": "0f8a77ff00e65eaeebc509b8156eaa983192474b", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "untar": { "branch": "master", "git_sha": "cc1f997fab6d8fde5dc0e6e2a310814df5b53ce7", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] } } }, @@ -152,10 +222,12 @@ "bam_stats_samtools": { "branch": "master", "git_sha": "b4b7f89e7fd6d2293f0c176213f710e0bcdaf19e", - "installed_by": ["subworkflows"] + "installed_by": [ + "subworkflows" + ] } } } } } -} +} \ No newline at end of file diff --git a/modules/local/nanopolish_index_eventalign.nf b/modules/local/nanopolish_index_eventalign.nf index d5290c03..9058d8ec 100644 --- a/modules/local/nanopolish_index_eventalign.nf +++ b/modules/local/nanopolish_index_eventalign.nf @@ -8,7 +8,7 @@ process NANOPOLISH_INDEX_EVENTALIGN { 'quay.io/biocontainers/nanopolish:0.13.2--he3b7ca5_2' }" input: - tuple val(meta), path(genome), path(gtf), path(fast5), path(fastq), path(bam), path(bai) + tuple val(meta), path(genome), path(gtf), path(fastq), path(bam), path(bai) output: tuple val(meta), path(genome), path(gtf), path("*eventalign.txt"), path("*summary.txt"), emit: nanopolish_outputs @@ -21,7 +21,7 @@ process NANOPOLISH_INDEX_EVENTALIGN { sample_summary = "$meta.id" +"_summary.txt" sample_eventalign = "$meta.id" +"_eventalign.txt" """ - nanopolish index -d $fast5 $fastq + nanopolish index -d $meta.nanopolish_fast5 $fastq nanopolish eventalign --reads $fastq --bam $bam --genome $genome --scale-events --signal-index --summary $sample_summary --threads $task.cpus > $sample_eventalign cat <<-END_VERSIONS > versions.yml diff --git a/modules/local/cutesv.nf b/modules/nf-core/cutesv/main.nf similarity index 72% rename from modules/local/cutesv.nf rename to modules/nf-core/cutesv/main.nf index d476cbda..958fd75b 100644 --- a/modules/local/cutesv.nf +++ b/modules/nf-core/cutesv/main.nf @@ -5,14 +5,14 @@ process CUTESV { conda "bioconda::cutesv=2.0.2" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/cutesv:1.0.12--pyhdfd78af_0' : - 'quay.io/biocontainers/cutesv:2.0.2--pyhdfd78af_0 ' }" + 'quay.io/biocontainers/cutesv:2.0.2--pyhdfd78af_0' }" input: tuple val(meta), path(bam), path(bai) - path(fasta) + tuple val(meta2), path(fasta) output: - tuple val(meta), path("*_cuteSV.vcf"), emit: sv_vcf // vcf files + tuple val(meta), path("*.vcf"), emit: vcf path "versions.yml" , emit: versions when: @@ -20,23 +20,18 @@ process CUTESV { script: def args = task.ext.args ?: '' - def genotyping = params.enable_genotyping ? "--genotyping" : '' + def prefix = task.ext.prefix ?: "${meta.id}" """ cuteSV \ ${bam} \\ ${fasta} \\ - ${meta.id}_cuteSV.vcf \\ + ${prefix}.vcf \\ . \\ --threads $task.cpus \\ - --sample ${meta.id} \\ - $genotyping \\ $args - - cat <<-END_VERSIONS > versions.yml "${task.process}": cuteSV: \$( cuteSV --version 2>&1 | sed 's/cuteSV //g' ) END_VERSIONS """ } - diff --git a/modules/nf-core/cutesv/meta.yml b/modules/nf-core/cutesv/meta.yml new file mode 100644 index 00000000..10f3edb6 --- /dev/null +++ b/modules/nf-core/cutesv/meta.yml @@ -0,0 +1,55 @@ +name: cutesv +description: structural-variant calling with cutesv +keywords: + - cutesv + - structural-variant calling +tools: + - cutesv: + description: a clustering-and-refinement method to analyze the signatures to implement sensitive SV detection. + homepage: https://github.com/tjiangHIT/cuteSV + documentation: https://github.com/tjiangHIT/cuteSV#readme + tool_dev_url: https://github.com/tjiangHIT/cuteSV + licence: ["MIT"] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test' ] + - bam: + type: file + description: BAM file + pattern: "*.bam" + - bai: + type: file + description: Index of BAM file + pattern: "*.bai" + - meta2: + type: map + description: | + Groovy Map containing reference information + e.g. [ id:'fasta' ] + - fasta: + type: file + description: | + Reference database in FASTA format + +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test' ] + - vcf: + type: file + description: VCF file containing called variants from CuteSV + pattern: "*.vcf" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + +authors: + - "@christopher-hakkaart" + - "@yuukiiwa" diff --git a/modules/local/sniffles.nf b/modules/nf-core/sniffles/main.nf similarity index 77% rename from modules/local/sniffles.nf rename to modules/nf-core/sniffles/main.nf index 33bec787..305e9b0b 100644 --- a/modules/local/sniffles.nf +++ b/modules/nf-core/sniffles/main.nf @@ -9,12 +9,12 @@ process SNIFFLES { input: tuple val(meta), path(bam), path(bai) - path fasta + tuple val(meta2), path(fasta) output: - tuple val(meta), path("*_sniffles.vcf"), emit: sv_vcf - tuple val(meta), path("*_sniffles.snf"), emit: sv_snf + tuple val(meta), path("*.vcf"), emit: vcf + tuple val(meta), path("*.snf"), emit: snf path "versions.yml" , emit: versions when: @@ -22,18 +22,18 @@ process SNIFFLES { script: def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" """ sniffles \\ --input $bam \\ - --vcf ${meta.id}_sniffles.vcf \\ - --snf ${meta.id}_sniffles.snf \\ + --vcf ${prefix}.vcf \\ + --snf ${prefix}.snf \\ --reference $fasta \\ -t $task.cpus \\ $args - cat <<-END_VERSIONS > versions.yml "${task.process}": - sniffles: \$(sniffles --help 2>&1 | grep Version |sed 's/^.*Version: //') + sniffles: \$(sniffles --help 2>&1 | grep Version |sed 's/^.*Version //') END_VERSIONS """ } diff --git a/modules/nf-core/sniffles/meta.yml b/modules/nf-core/sniffles/meta.yml new file mode 100644 index 00000000..35643016 --- /dev/null +++ b/modules/nf-core/sniffles/meta.yml @@ -0,0 +1,59 @@ +name: sniffles +description: structural-variant calling with sniffles +keywords: + - sniffles + - structural-variant calling +tools: + - sniffles: + description: a fast structural variant caller for long-read sequencing + homepage: https://github.com/fritzsedlazeck/Sniffles + documentation: https://github.com/fritzsedlazeck/Sniffles#readme + tool_dev_url: https://github.com/fritzsedlazeck/Sniffles + licence: ["MIT"] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test' ] + - bam: + type: file + description: BAM file + pattern: "*.bam" + - bai: + type: file + description: Index of BAM file + pattern: "*.bai" + - meta2: + type: map + description: | + Groovy Map containing reference information + e.g. [ id:'fasta' ] + - fasta: + type: file + description: | + Reference database in FASTA format + +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test' ] + - vcf: + type: file + description: Compressed VCF file + pattern: "*.vcf.gz" + - snf: + type: file + description: Compressed SNF file + pattern: "*.snf.gz" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + +authors: + - "@christopher-hakkaart" + - "@yuukiiwa" diff --git a/subworkflows/local/input_check.nf b/subworkflows/local/input_check.nf index 9eec33a3..c774888a 100644 --- a/subworkflows/local/input_check.nf +++ b/subworkflows/local/input_check.nf @@ -31,7 +31,7 @@ def get_sample_info(LinkedHashMap row) { meta.nanopolish_fast5 = row.nanopolish_fast5 input_file = row.reads ? file(row.reads, checkIfExists: true) : null - fastq_meta = [ meta, [ input_file ] ] + fastq_meta = [ meta, input_file ] return fastq_meta } diff --git a/subworkflows/local/short_variant_calling.nf b/subworkflows/local/short_variant_calling.nf index 19b4cd48..c4c717fd 100644 --- a/subworkflows/local/short_variant_calling.nf +++ b/subworkflows/local/short_variant_calling.nf @@ -48,7 +48,7 @@ workflow SHORT_VARIANT_CALLING { /* * Call short variants with medaka */ - CLAIR3 ( ch_shortv_input, ch_fasta, ch_fai ) + CLAIR3 ( ch_shortv_input.map{ it -> [ it[0], it[1], it[2] ] }, ch_fasta, ch_fai ) ch_versions = ch_versions.mix(medaka_version = CLAIR3.out.versions) /* diff --git a/subworkflows/local/structural_variant_calling.nf b/subworkflows/local/structural_variant_calling.nf index fbb963a1..138d03eb 100644 --- a/subworkflows/local/structural_variant_calling.nf +++ b/subworkflows/local/structural_variant_calling.nf @@ -2,11 +2,11 @@ * Structural variant calling */ -include { SNIFFLES } from '../../modules/local/sniffles' +include { SNIFFLES } from '../../modules/nf-core/sniffles/main' include { BCFTOOLS_SORT as SNIFFLES_SORT_VCF } from '../../modules/nf-core/bcftools/sort/main' include { TABIX_BGZIP as SNIFFLES_BGZIP_VCF } from '../../modules/nf-core/tabix/bgzip/main' include { TABIX_TABIX as SNIFFLES_TABIX_VCF } from '../../modules/nf-core/tabix/tabix/main' -include { CUTESV } from '../../modules/local/cutesv' +include { CUTESV } from '../../modules/nf-core/cutesv/main' include { BCFTOOLS_SORT as CUTESV_SORT_VCF } from '../../modules/nf-core/bcftools/sort/main' include { TABIX_BGZIP as CUTESV_BGZIP_VCF } from '../../modules/nf-core/tabix/bgzip/main' include { TABIX_TABIX as CUTESV_TABIX_VCF } from '../../modules/nf-core/tabix/tabix/main' @@ -29,11 +29,10 @@ workflow STRUCTURAL_VARIANT_CALLING { ch_sorted_bam .join(ch_sorted_bai, by: 0) .map { it -> [ it[0], it[1], it[2] ] } - .view() .set { ch_sv_input } ch_sorted_bam .combine(ch_fasta.map{it->it[1]}) - .map { it -> it[2] } + .map { it -> [ [id:'fasta'], it[2] ] } .set { ch_fasta } /* @@ -50,7 +49,7 @@ workflow STRUCTURAL_VARIANT_CALLING { /* * Sort structural variants with bcftools */ - SNIFFLES_SORT_VCF( SNIFFLES.out.sv_vcf ) + SNIFFLES_SORT_VCF( SNIFFLES.out.vcf ) ch_sv_calls_vcf = SNIFFLES_SORT_VCF.out.vcf ch_versions = ch_versions.mix(SNIFFLES_SORT_VCF.out.versions) @@ -72,7 +71,7 @@ workflow STRUCTURAL_VARIANT_CALLING { /* * Sort structural variants with bcftools */ - CUTESV_SORT_VCF( CUTESV.out.sv_vcf ) + CUTESV_SORT_VCF( CUTESV.out.vcf ) ch_sv_calls_vcf = CUTESV_SORT_VCF.out.vcf ch_versions = ch_versions.mix(CUTESV_SORT_VCF.out.versions) diff --git a/workflows/nanoseq.nf b/workflows/nanoseq.nf index 73d1a597..7ab4dc50 100644 --- a/workflows/nanoseq.nf +++ b/workflows/nanoseq.nf @@ -241,11 +241,11 @@ workflow NANOSEQ{ */ NANOLYSE ( ch_fastq, ch_nanolyse_fasta ) NANOLYSE.out.fastq - .set { ch_fastq_nanolyse } + .set { ch_fastq_to_align } ch_software_versions = ch_software_versions.mix(NANOLYSE.out.versions.first().ifEmpty(null)) } else { ch_fastq - .set { ch_fastq_nanolyse } + .set { ch_fastq_to_align } } ch_fastqc_multiqc = Channel.empty() @@ -254,7 +254,7 @@ workflow NANOSEQ{ /* * SUBWORKFLOW: Fastq QC with Nanoplot and fastqc */ - QCFASTQ_NANOPLOT_FASTQC ( ch_fastq_nanolyse, params.skip_nanoplot, params.skip_fastqc) + QCFASTQ_NANOPLOT_FASTQC ( ch_fastq_to_align, params.skip_nanoplot, params.skip_fastqc) ch_software_versions = ch_software_versions.mix(QCFASTQ_NANOPLOT_FASTQC.out.fastqc_version.first().ifEmpty(null)) ch_fastqc_multiqc = QCFASTQ_NANOPLOT_FASTQC.out.fastqc_multiqc.ifEmpty([]) } @@ -277,7 +277,7 @@ workflow NANOSEQ{ /* * SUBWORKFLOW: Align fastq files with minimap2 and sort bam files */ - ALIGN_MINIMAP2 ( ch_fasta, ch_fastq ) + ALIGN_MINIMAP2 ( ch_fasta, ch_fastq_to_align ) ch_sorted_bam = ALIGN_MINIMAP2.out.ch_sorted_bam ch_sorted_bai = ALIGN_MINIMAP2.out.ch_sorted_bai ch_software_versions = ch_software_versions.mix(ALIGN_MINIMAP2.out.minimap2_version.first().ifEmpty(null)) @@ -287,7 +287,7 @@ workflow NANOSEQ{ /* * SUBWORKFLOW: Align fastq files with graphmap2 and sort bam files */ - ALIGN_GRAPHMAP2 ( ch_fasta, ch_fastq ) + ALIGN_GRAPHMAP2 ( ch_fasta, ch_fastq_to_align ) ch_sorted_bam = ALIGN_GRAPHMAP2.out.ch_sorted_bam ch_sorted_bai = ALIGN_GRAPHMAP2.out.ch_sorted_bai ch_software_versions = ch_software_versions.mix(ALIGN_GRAPHMAP2.out.graphmap2_version.first().ifEmpty(null)) @@ -407,7 +407,7 @@ workflow NANOSEQ{ .combine([params.gtf]) .join(ch_sorted_bai,by:0) .join(ch_sample,by:0) - .map { it -> [ it[0], it[2], it[3], it[7], it[5], it[1], it[4] ] } + .map { it -> [ it[0], it[2], it[3], it[5], it[1], it[4] ] } .set { ch_nanopolish_input } RNA_MODIFICATION_XPORE_M6ANET( ch_nanopolish_input ) From 403b456036d4fb461bfb9daa71263fda46571b49 Mon Sep 17 00:00:00 2001 From: Yuk Kei Wan Date: Fri, 24 Mar 2023 02:42:52 +0000 Subject: [PATCH 21/77] PRETTY --- modules.json | 126 +++++++++++++-------------------------------------- 1 file changed, 32 insertions(+), 94 deletions(-) diff --git a/modules.json b/modules.json index 9ac99f99..3301b135 100644 --- a/modules.json +++ b/modules.json @@ -8,212 +8,152 @@ "bcftools/sort": { "branch": "master", "git_sha": "4a21e4cca35e72ec059abd67f790e0b192ce5d81", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "bedtools/bamtobed": { "branch": "master", "git_sha": "1d48427957205cb6acf1ffe330bd35b6bb8baa90", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "bedtools/genomecov": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "custom/dumpsoftwareversions": { "branch": "master", "git_sha": "b6d4d476aee074311c89d82a69c1921bd70c8180", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "custom/getchromsizes": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "cutesv": { "branch": "master", "git_sha": "37224e9ae3bbfb5e417030cd8bfeb451a1fe989b", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "deepvariant": { "branch": "master", "git_sha": "0f8a77ff00e65eaeebc509b8156eaa983192474b", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "fastqc": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "graphmap2/align": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "graphmap2/index": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "minimap2/align": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "minimap2/index": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "nanolyse": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "nanoplot": { "branch": "master", "git_sha": "3822e04e49b6d89b7092feb3480d744cb5d9986b", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "qcat": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "samtools/flagstat": { "branch": "master", "git_sha": "0f8a77ff00e65eaeebc509b8156eaa983192474b", - "installed_by": [ - "bam_stats_samtools" - ] + "installed_by": ["bam_stats_samtools"] }, "samtools/idxstats": { "branch": "master", "git_sha": "0f8a77ff00e65eaeebc509b8156eaa983192474b", - "installed_by": [ - "bam_stats_samtools" - ] + "installed_by": ["bam_stats_samtools"] }, "samtools/index": { "branch": "master", "git_sha": "0f8a77ff00e65eaeebc509b8156eaa983192474b", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "samtools/sort": { "branch": "master", "git_sha": "0f8a77ff00e65eaeebc509b8156eaa983192474b", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "samtools/stats": { "branch": "master", "git_sha": "0f8a77ff00e65eaeebc509b8156eaa983192474b", - "installed_by": [ - "bam_stats_samtools" - ] + "installed_by": ["bam_stats_samtools"] }, "samtools/view": { "branch": "master", "git_sha": "0f8a77ff00e65eaeebc509b8156eaa983192474b", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "sniffles": { "branch": "master", "git_sha": "9b8401b7eb47d81f607798481e044262eca1c718", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "stringtie/merge": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "stringtie/stringtie": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "subread/featurecounts": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "tabix/bgzip": { "branch": "master", "git_sha": "90294980a903ecebd99ac31d8b6c66af48fa8259", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "tabix/tabix": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "ucsc/bedgraphtobigwig": { "branch": "master", "git_sha": "0f8a77ff00e65eaeebc509b8156eaa983192474b", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "ucsc/bedtobigbed": { "branch": "master", "git_sha": "0f8a77ff00e65eaeebc509b8156eaa983192474b", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "untar": { "branch": "master", "git_sha": "cc1f997fab6d8fde5dc0e6e2a310814df5b53ce7", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] } } }, @@ -222,12 +162,10 @@ "bam_stats_samtools": { "branch": "master", "git_sha": "b4b7f89e7fd6d2293f0c176213f710e0bcdaf19e", - "installed_by": [ - "subworkflows" - ] + "installed_by": ["subworkflows"] } } } } } -} \ No newline at end of file +} From 371ce6d7f598ea6d27c41542ee45d4bc9c03600f Mon Sep 17 00:00:00 2001 From: nf-core-bot Date: Fri, 28 Apr 2023 14:24:01 +0000 Subject: [PATCH 22/77] Template update for nf-core/tools version 2.8 --- .editorconfig | 2 +- .github/ISSUE_TEMPLATE/bug_report.yml | 2 +- .github/PULL_REQUEST_TEMPLATE.md | 3 +- .github/workflows/awsfulltest.yml | 2 +- .github/workflows/awstest.yml | 2 +- .github/workflows/branch.yml | 2 +- .github/workflows/clean-up.yml | 24 ++++ .github/workflows/linting.yml | 2 +- .pre-commit-config.yaml | 5 + CHANGELOG.md | 2 +- README.md | 74 ++++++---- bin/check_samplesheet.py | 3 - conf/base.config | 2 +- conf/igenomes.config | 8 ++ conf/test_full.config | 2 + docs/usage.md | 130 +++++------------- lib/NfcoreSchema.groovy | 4 +- lib/WorkflowMain.groovy | 13 +- lib/WorkflowNanoseq.groovy | 12 +- main.nf | 1 - modules.json | 4 +- modules/local/samplesheet_check.nf | 2 +- .../custom/dumpsoftwareversions/main.nf | 6 +- .../custom/dumpsoftwareversions/meta.yml | 2 + modules/nf-core/multiqc/main.nf | 6 +- modules/nf-core/multiqc/meta.yml | 3 +- nextflow.config | 31 ++++- tower.yml | 5 + 28 files changed, 195 insertions(+), 159 deletions(-) create mode 100644 .github/workflows/clean-up.yml create mode 100644 .pre-commit-config.yaml create mode 100644 tower.yml diff --git a/.editorconfig b/.editorconfig index b78de6e6..b6b31907 100644 --- a/.editorconfig +++ b/.editorconfig @@ -8,7 +8,7 @@ trim_trailing_whitespace = true indent_size = 4 indent_style = space -[*.{md,yml,yaml,html,css,scss,js,cff}] +[*.{md,yml,yaml,html,css,scss,js}] indent_size = 2 # These files are edited and tested upstream in nf-core/modules diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index ec79522f..56c66b95 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -45,6 +45,6 @@ body: * Nextflow version _(eg. 22.10.1)_ * Hardware _(eg. HPC, Desktop, Cloud)_ * Executor _(eg. slurm, local, awsbatch)_ - * Container engine: _(e.g. Docker, Singularity, Conda, Podman, Shifter or Charliecloud)_ + * Container engine: _(e.g. Docker, Singularity, Conda, Podman, Shifter, Charliecloud, or Apptainer)_ * OS _(eg. CentOS Linux, macOS, Linux Mint)_ * Version of nf-core/nanoseq _(eg. 1.1, 1.5, 1.8.2)_ diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 329a6614..d7b39080 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -15,7 +15,8 @@ Learn more about contributing: [CONTRIBUTING.md](https://github.com/nf-core/nano - [ ] This comment contains a description of changes (with reason). - [ ] If you've fixed a bug or added code that should be tested, add tests! -- [ ] If you've added a new tool - have you followed the pipeline conventions in the [contribution docs](https://github.com/nf-core/nanoseq/tree/master/.github/CONTRIBUTING.md)- [ ] If necessary, also make a PR on the nf-core/nanoseq _branch_ on the [nf-core/test-datasets](https://github.com/nf-core/test-datasets) repository. +- [ ] If you've added a new tool - have you followed the pipeline conventions in the [contribution docs](https://github.com/nf-core/nanoseq/tree/master/.github/CONTRIBUTING.md) +- [ ] If necessary, also make a PR on the nf-core/nanoseq _branch_ on the [nf-core/test-datasets](https://github.com/nf-core/test-datasets) repository. - [ ] Make sure your code lints (`nf-core lint`). - [ ] Ensure the test suite passes (`nextflow run . -profile test,docker --outdir `). - [ ] Usage Documentation in `docs/usage.md` is updated. diff --git a/.github/workflows/awsfulltest.yml b/.github/workflows/awsfulltest.yml index 29ec7466..ab5c18b3 100644 --- a/.github/workflows/awsfulltest.yml +++ b/.github/workflows/awsfulltest.yml @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Launch workflow via tower - uses: nf-core/tower-action@v3 + uses: seqeralabs/action-tower-launch@v1 # TODO nf-core: You can customise AWS full pipeline tests as required # 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 diff --git a/.github/workflows/awstest.yml b/.github/workflows/awstest.yml index 84272f0e..32780dbd 100644 --- a/.github/workflows/awstest.yml +++ b/.github/workflows/awstest.yml @@ -12,7 +12,7 @@ jobs: steps: # Launch workflow using Tower CLI tool action - name: Launch workflow via tower - uses: nf-core/tower-action@v3 + uses: seqeralabs/action-tower-launch@v1 with: workspace_id: ${{ secrets.TOWER_WORKSPACE_ID }} access_token: ${{ secrets.TOWER_ACCESS_TOKEN }} diff --git a/.github/workflows/branch.yml b/.github/workflows/branch.yml index 80f9161a..e6d8c274 100644 --- a/.github/workflows/branch.yml +++ b/.github/workflows/branch.yml @@ -13,7 +13,7 @@ jobs: - name: Check PRs if: github.repository == 'nf-core/nanoseq' run: | - { [[ ${{github.event.pull_request.head.repo.full_name }} == nf-core/nanoseq ]] && [[ $GITHUB_HEAD_REF = "dev" ]]; } || [[ $GITHUB_HEAD_REF == "patch" ]] + { [[ ${{github.event.pull_request.head.repo.full_name }} == nf-core/nanoseq ]] && [[ $GITHUB_HEAD_REF == "dev" ]]; } || [[ $GITHUB_HEAD_REF == "patch" ]] # If the above check failed, post a comment on the PR explaining the failure # NOTE - this doesn't currently work if the PR is coming from a fork, due to limitations in GitHub actions secrets diff --git a/.github/workflows/clean-up.yml b/.github/workflows/clean-up.yml new file mode 100644 index 00000000..694e90ec --- /dev/null +++ b/.github/workflows/clean-up.yml @@ -0,0 +1,24 @@ +name: "Close user-tagged issues and PRs" +on: + schedule: + - cron: "0 0 * * 0" # Once a week + +jobs: + clean-up: + runs-on: ubuntu-latest + permissions: + issues: write + pull-requests: write + steps: + - uses: actions/stale@v7 + with: + stale-issue-message: "This issue has been tagged as awaiting-changes or awaiting-feedback by an nf-core contributor. Remove stale label or add a comment otherwise this issue will be closed in 20 days." + stale-pr-message: "This PR has been tagged as awaiting-changes or awaiting-feedback by an nf-core contributor. Remove stale label or add a comment if it is still useful." + close-issue-message: "This issue was closed because it has been tagged as awaiting-changes or awaiting-feedback by an nf-core contributor and then staled for 20 days with no activity." + days-before-stale: 30 + days-before-close: 20 + days-before-pr-close: -1 + any-of-labels: "awaiting-changes,awaiting-feedback" + exempt-issue-labels: "WIP" + exempt-pr-labels: "WIP" + repo-token: "${{ secrets.GITHUB_TOKEN }}" diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index 858d622e..888cb4bc 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -78,7 +78,7 @@ jobs: - uses: actions/setup-python@v4 with: - python-version: "3.7" + python-version: "3.8" architecture: "x64" - name: Install dependencies diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 00000000..0c31cdb9 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,5 @@ +repos: + - repo: https://github.com/pre-commit/mirrors-prettier + rev: "v2.7.1" + hooks: + - id: prettier diff --git a/CHANGELOG.md b/CHANGELOG.md index 9a649bfd..56b33712 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,7 @@ 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). -## v3.0.0 - [date] +## v3.1.0 - [date] Initial release of nf-core/nanoseq, created with the [nf-core](https://nf-co.re/) template. diff --git a/README.md b/README.md index a2333c95..3dbe4a74 100644 --- a/README.md +++ b/README.md @@ -8,57 +8,71 @@ [![run with singularity](https://img.shields.io/badge/run%20with-singularity-1d355c.svg?labelColor=000000)](https://sylabs.io/docs/) [![Launch on Nextflow Tower](https://img.shields.io/badge/Launch%20%F0%9F%9A%80-Nextflow%20Tower-%234256e7)](https://tower.nf/launch?pipeline=https://github.com/nf-core/nanoseq) -[![Get help on Slack](http://img.shields.io/badge/slack-nf--core%20%23nanoseq-4A154B?labelColor=000000&logo=slack)](https://nfcore.slack.com/channels/nanoseq)[![Follow on Twitter](http://img.shields.io/badge/twitter-%40nf__core-1DA1F2?labelColor=000000&logo=twitter)](https://twitter.com/nf_core)[![Watch on YouTube](http://img.shields.io/badge/youtube-nf--core-FF0000?labelColor=000000&logo=youtube)](https://www.youtube.com/c/nf-core) +[![Get help on Slack](http://img.shields.io/badge/slack-nf--core%20%23nanoseq-4A154B?labelColor=000000&logo=slack)](https://nfcore.slack.com/channels/nanoseq)[![Follow on Twitter](http://img.shields.io/badge/twitter-%40nf__core-1DA1F2?labelColor=000000&logo=twitter)](https://twitter.com/nf_core)[![Follow on Mastodon](https://img.shields.io/badge/mastodon-nf__core-6364ff?labelColor=FFFFFF&logo=mastodon)](https://mstdn.science/@nf_core)[![Watch on YouTube](http://img.shields.io/badge/youtube-nf--core-FF0000?labelColor=000000&logo=youtube)](https://www.youtube.com/c/nf-core) ## Introduction - +**nf-core/nanoseq** is a bioinformatics pipeline that ... -**nf-core/nanoseq** is a bioinformatics best-practice analysis pipeline for A pipeline to demultiplex, QC and map Nanopore data. - -The pipeline is built using [Nextflow](https://www.nextflow.io), a workflow tool to run tasks across multiple compute infrastructures in a very portable manner. It uses Docker/Singularity containers making installation trivial and results highly reproducible. The [Nextflow DSL2](https://www.nextflow.io/docs/latest/dsl2.html) implementation of this pipeline uses one container per process which makes it much easier to maintain and update software dependencies. Where possible, these processes have been submitted to and installed from [nf-core/modules](https://github.com/nf-core/modules) in order to make them available to all nf-core pipelines, and to everyone within the Nextflow community! - - - -On release, automated continuous integration tests run the pipeline on a full-sized dataset on the AWS cloud infrastructure. This ensures that the pipeline runs on AWS, has sensible resource allocation defaults set to run on real-world datasets, and permits the persistent storage of results to benchmark between pipeline releases and other analysis sources.The results obtained from the full-sized test can be viewed on the [nf-core website](https://nf-co.re/nanoseq/results). - -## Pipeline summary + + 1. Read QC ([`FastQC`](https://www.bioinformatics.babraham.ac.uk/projects/fastqc/)) 2. Present QC for raw reads ([`MultiQC`](http://multiqc.info/)) -## Quick Start +## Usage + +> **Note** +> If you are new to Nextflow and nf-core, please refer to [this page](https://nf-co.re/docs/usage/installation) on how +> to set-up Nextflow. Make sure to [test your setup](https://nf-co.re/docs/usage/introduction#how-to-run-a-pipeline) +> with `-profile test` before running the workflow on actual data. + + - Note that some form of configuration will be needed so that Nextflow knows how to fetch the required software. This is usually done in the form of a config profile (`YOURPROFILE` in the example command above). You can chain multiple config profiles in a comma-separated string. +Now, you can run the pipeline using: - > - The pipeline comes with config profiles called `docker`, `singularity`, `podman`, `shifter`, `charliecloud` and `conda` which instruct the pipeline to use the named tool for software management. For example, `-profile test,docker`. - > - Please check [nf-core/configs](https://github.com/nf-core/configs#documentation) to see if a custom config file to run nf-core pipelines already exists for your Institute. If so, you can simply use `-profile ` in your command. This will enable either `docker` or `singularity` and set the appropriate execution settings for your local compute environment. - > - If you are using `singularity`, please use the [`nf-core download`](https://nf-co.re/tools/#downloading-pipelines-for-offline-use) command to download images first, before running the pipeline. Setting the [`NXF_SINGULARITY_CACHEDIR` or `singularity.cacheDir`](https://www.nextflow.io/docs/latest/singularity.html?#singularity-docker-hub) Nextflow options enables you to store and re-use the images from a central location for future pipeline runs. - > - If you are using `conda`, it is highly recommended to use the [`NXF_CONDA_CACHEDIR` or `conda.cacheDir`](https://www.nextflow.io/docs/latest/conda.html) settings to store the environments in a central location for future pipeline runs. + -4. Start running your own analysis! +```bash +nextflow run nf-core/nanoseq \ + -profile \ + --input samplesheet.csv \ + --outdir +``` - +> **Warning:** +> Please provide pipeline parameters via the CLI or Nextflow `-params-file` option. Custom config files including those +> 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). - ```bash - nextflow run nf-core/nanoseq --input samplesheet.csv --outdir --genome GRCh37 -profile - ``` +For more details, please refer to the [usage documentation](https://nf-co.re/nanoseq/usage) and the [parameter documentation](https://nf-co.re/nanoseq/parameters). -## Documentation +## Pipeline output -The nf-core/nanoseq pipeline comes with documentation about the pipeline [usage](https://nf-co.re/nanoseq/usage), [parameters](https://nf-co.re/nanoseq/parameters) and [output](https://nf-co.re/nanoseq/output). +To see the the results of a test run with a full size dataset refer to the [results](https://nf-co.re/nanoseq/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/nanoseq/output). ## Credits diff --git a/bin/check_samplesheet.py b/bin/check_samplesheet.py index 11b15572..4a758fe0 100755 --- a/bin/check_samplesheet.py +++ b/bin/check_samplesheet.py @@ -158,9 +158,6 @@ def sniff_format(handle): peek = read_head(handle) handle.seek(0) sniffer = csv.Sniffer() - if not sniffer.has_header(peek): - logger.critical("The given sample sheet does not appear to contain a header.") - sys.exit(1) dialect = sniffer.sniff(peek) return dialect diff --git a/conf/base.config b/conf/base.config index 94e77639..abe77c6b 100644 --- a/conf/base.config +++ b/conf/base.config @@ -15,7 +15,7 @@ process { memory = { check_max( 6.GB * task.attempt, 'memory' ) } time = { check_max( 4.h * task.attempt, 'time' ) } - errorStrategy = { task.exitStatus in [143,137,104,134,139] ? 'retry' : 'finish' } + errorStrategy = { task.exitStatus in ((130..145) + 104) ? 'retry' : 'finish' } maxRetries = 1 maxErrors = '-1' diff --git a/conf/igenomes.config b/conf/igenomes.config index 7a1b3ac6..3f114377 100644 --- a/conf/igenomes.config +++ b/conf/igenomes.config @@ -36,6 +36,14 @@ params { macs_gsize = "2.7e9" blacklist = "${projectDir}/assets/blacklists/hg38-blacklist.bed" } + 'CHM13' { + fasta = "${params.igenomes_base}/Homo_sapiens/UCSC/CHM13/Sequence/WholeGenomeFasta/genome.fa" + bwa = "${params.igenomes_base}/Homo_sapiens/UCSC/CHM13/Sequence/BWAIndex/" + bwamem2 = "${params.igenomes_base}/Homo_sapiens/UCSC/CHM13/Sequence/BWAmem2Index/" + gtf = "${params.igenomes_base}/Homo_sapiens/NCBI/CHM13/Annotation/Genes/genes.gtf" + gff = "ftp://ftp.ncbi.nlm.nih.gov/genomes/all/GCF/009/914/755/GCF_009914755.1_T2T-CHM13v2.0/GCF_009914755.1_T2T-CHM13v2.0_genomic.gff.gz" + mito_name = "chrM" + } 'GRCm38' { fasta = "${params.igenomes_base}/Mus_musculus/Ensembl/GRCm38/Sequence/WholeGenomeFasta/genome.fa" bwa = "${params.igenomes_base}/Mus_musculus/Ensembl/GRCm38/Sequence/BWAIndex/version0.6.0/" diff --git a/conf/test_full.config b/conf/test_full.config index e3924dbf..0618db12 100644 --- a/conf/test_full.config +++ b/conf/test_full.config @@ -10,6 +10,8 @@ ---------------------------------------------------------------------------------------- */ +cleanup = true + params { config_profile_name = 'Full test profile' config_profile_description = 'Full test dataset to check pipeline function' diff --git a/docs/usage.md b/docs/usage.md index 7f82bc67..823d3bbc 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -71,6 +71,29 @@ work # Directory containing the nextflow working files # Other nextflow hidden files, eg. history of pipeline runs and old logs. ``` +If you wish to repeatedly use the same parameters for multiple runs, rather than specifying each flag in the command, you can specify these in a params file. + +Pipeline settings can be provided in a `yaml` or `json` file via `-params-file `. + +> ⚠️ Do not use `-c ` to specify parameters as this will result in errors. Custom config files specified with `-c` must only be used for [tuning process resource specifications](https://nf-co.re/docs/usage/configuration#tuning-workflow-resources), other infrastructural tweaks (such as output directories), or module arguments (args). +> The above pipeline run specified with a params file in yaml format: + +```bash +nextflow run nf-core/nanoseq -profile docker -params-file params.yaml +``` + +with `params.yaml` containing: + +```yaml +input: './samplesheet.csv' +outdir: './results/' +genome: 'GRCh37' +input: 'data' +<...> +``` + +You can also generate such `YAML`/`JSON` files via [nf-core/launch](https://nf-co.re/launch). + ### Updating the pipeline When you run the above command, Nextflow automatically pulls the pipeline code from GitHub and stores it as a cached version. When running the pipeline after this, it will always use the cached version if available - even if the pipeline has been updated since. To make sure that you're running the latest version of the pipeline, make sure that you regularly update the cached version of the pipeline: @@ -87,6 +110,10 @@ First, go to the [nf-core/nanoseq releases page](https://github.com/nf-core/nano This version number will be logged in reports when you run the pipeline, so that you'll know what you used when you look back in the future. For example, at the bottom of the MultiQC reports. +To further assist in reproducbility, you can use share and re-use [parameter files](#running-the-pipeline) to repeat pipeline runs with the same settings without having to write out a command with every single parameter. + +> 💡 If you wish to share such profile (such as upload as supplementary material for academic publications), make sure to NOT include cluster specific paths to files, nor institutional specific profiles. + ## Core Nextflow arguments > **NB:** These options are part of Nextflow and use a _single_ hyphen (pipeline parameters use a double-hyphen). @@ -95,7 +122,7 @@ This version number will be logged in reports when you run the pipeline, so that Use this parameter to choose a configuration profile. Profiles can give configuration presets for different compute environments. -Several generic profiles are bundled with the pipeline which instruct the pipeline to use software packaged using different methods (Docker, Singularity, Podman, Shifter, Charliecloud, Conda) - see below. +Several generic profiles are bundled with the pipeline which instruct the pipeline to use software packaged using different methods (Docker, Singularity, Podman, Shifter, Charliecloud, Apptainer, Conda) - see below. > We highly recommend the use of Docker or Singularity containers for full pipeline reproducibility, however when this is not possible, Conda is also supported. @@ -119,8 +146,10 @@ If `-profile` is not specified, the pipeline will run locally and expect all sof - A generic configuration profile to be used with [Shifter](https://nersc.gitlab.io/development/shifter/how-to-use/) - `charliecloud` - A generic configuration profile to be used with [Charliecloud](https://hpc.github.io/charliecloud/) +- `apptainer` + - A generic configuration profile to be used with [Apptainer](https://apptainer.org/) - `conda` - - A generic configuration profile to be used with [Conda](https://conda.io/docs/). Please only use Conda as a last resort i.e. when it's not possible to run the pipeline with Docker, Singularity, Podman, Shifter or Charliecloud. + - A generic configuration profile to be used with [Conda](https://conda.io/docs/). Please only use Conda as a last resort i.e. when it's not possible to run the pipeline with Docker, Singularity, Podman, Shifter, Charliecloud, or Apptainer. ### `-resume` @@ -138,102 +167,19 @@ Specify the path to a specific config file (this is a core Nextflow command). Se Whilst the default requirements set within the pipeline will hopefully work for most people and with most input data, you may find that you want to customise the compute resources that the pipeline requests. Each step in the pipeline has a default set of requirements for number of CPUs, memory and time. For most of the steps in the pipeline, if the job exits with any of the error codes specified [here](https://github.com/nf-core/rnaseq/blob/4c27ef5610c87db00c3c5a3eed10b1d161abf575/conf/base.config#L18) it will automatically be resubmitted with higher requests (2 x original, then 3 x original). If it still fails after the third attempt then the pipeline execution is stopped. -For example, if the nf-core/rnaseq pipeline is failing after multiple re-submissions of the `STAR_ALIGN` process due to an exit code of `137` this would indicate that there is an out of memory issue: - -```console -[62/149eb0] NOTE: Process `NFCORE_RNASEQ:RNASEQ:ALIGN_STAR:STAR_ALIGN (WT_REP1)` terminated with an error exit status (137) -- Execution is retried (1) -Error executing process > 'NFCORE_RNASEQ:RNASEQ:ALIGN_STAR:STAR_ALIGN (WT_REP1)' - -Caused by: - Process `NFCORE_RNASEQ:RNASEQ:ALIGN_STAR:STAR_ALIGN (WT_REP1)` terminated with an error exit status (137) - -Command executed: - STAR \ - --genomeDir star \ - --readFilesIn WT_REP1_trimmed.fq.gz \ - --runThreadN 2 \ - --outFileNamePrefix WT_REP1. \ - - -Command exit status: - 137 - -Command output: - (empty) - -Command error: - .command.sh: line 9: 30 Killed STAR --genomeDir star --readFilesIn WT_REP1_trimmed.fq.gz --runThreadN 2 --outFileNamePrefix WT_REP1. -Work dir: - /home/pipelinetest/work/9d/172ca5881234073e8d76f2a19c88fb - -Tip: you can replicate the issue by changing to the process work dir and entering the command `bash .command.run` -``` - -#### For beginners - -A first step to bypass this error, you could try to increase the amount of CPUs, memory, and time for the whole pipeline. Therefor you can try to increase the resource for the parameters `--max_cpus`, `--max_memory`, and `--max_time`. Based on the error above, you have to increase the amount of memory. Therefore you can go to the [parameter documentation of rnaseq](https://nf-co.re/rnaseq/3.9/parameters) and scroll down to the `show hidden parameter` button to get the default value for `--max_memory`. In this case 128GB, you than can try to run your pipeline again with `--max_memory 200GB -resume` to skip all process, that were already calculated. If you can not increase the resource of the complete pipeline, you can try to adapt the resource for a single process as mentioned below. - -#### Advanced option on process level - -To bypass this error you would need to find exactly which resources are set by the `STAR_ALIGN` process. The quickest way is to search for `process STAR_ALIGN` in the [nf-core/rnaseq Github repo](https://github.com/nf-core/rnaseq/search?q=process+STAR_ALIGN). -We have standardised the structure of Nextflow DSL2 pipelines such that all module files will be present in the `modules/` directory and so, based on the search results, the file we want is `modules/nf-core/star/align/main.nf`. -If you click on the link to that file you will notice that there is a `label` directive at the top of the module that is set to [`label process_high`](https://github.com/nf-core/rnaseq/blob/4c27ef5610c87db00c3c5a3eed10b1d161abf575/modules/nf-core/software/star/align/main.nf#L9). -The [Nextflow `label`](https://www.nextflow.io/docs/latest/process.html#label) directive allows us to organise workflow processes in separate groups which can be referenced in a configuration file to select and configure subset of processes having similar computing requirements. -The default values for the `process_high` label are set in the pipeline's [`base.config`](https://github.com/nf-core/rnaseq/blob/4c27ef5610c87db00c3c5a3eed10b1d161abf575/conf/base.config#L33-L37) which in this case is defined as 72GB. -Providing you haven't set any other standard nf-core parameters to **cap** the [maximum resources](https://nf-co.re/usage/configuration#max-resources) used by the pipeline then we can try and bypass the `STAR_ALIGN` process failure by creating a custom config file that sets at least 72GB of memory, in this case increased to 100GB. -The custom config below can then be provided to the pipeline via the [`-c`](#-c) parameter as highlighted in previous sections. - -```nextflow -process { - withName: 'NFCORE_RNASEQ:RNASEQ:ALIGN_STAR:STAR_ALIGN' { - memory = 100.GB - } -} -``` - -> **NB:** We specify the full process name i.e. `NFCORE_RNASEQ:RNASEQ:ALIGN_STAR:STAR_ALIGN` in the config file because this takes priority over the short name (`STAR_ALIGN`) and allows existing configuration using the full process name to be correctly overridden. -> -> If you get a warning suggesting that the process selector isn't recognised check that the process name has been specified correctly. - -### Updating containers (advanced users) - -The [Nextflow DSL2](https://www.nextflow.io/docs/latest/dsl2.html) implementation of this pipeline uses one container per process which makes it much easier to maintain and update software dependencies. If for some reason you need to use a different version of a particular tool with the pipeline then you just need to identify the `process` name and override the Nextflow `container` definition for that process using the `withName` declaration. For example, in the [nf-core/viralrecon](https://nf-co.re/viralrecon) pipeline a tool called [Pangolin](https://github.com/cov-lineages/pangolin) has been used during the COVID-19 pandemic to assign lineages to SARS-CoV-2 genome sequenced samples. Given that the lineage assignments change quite frequently it doesn't make sense to re-release the nf-core/viralrecon everytime a new version of Pangolin has been released. However, you can override the default container used by the pipeline by creating a custom config file and passing it as a command-line argument via `-c custom.config`. - -1. Check the default version used by the pipeline in the module file for [Pangolin](https://github.com/nf-core/viralrecon/blob/a85d5969f9025409e3618d6c280ef15ce417df65/modules/nf-core/software/pangolin/main.nf#L14-L19) -2. Find the latest version of the Biocontainer available on [Quay.io](https://quay.io/repository/biocontainers/pangolin?tag=latest&tab=tags) -3. Create the custom config accordingly: - - - For Docker: +To change the resource requests, please see the [max resources](https://nf-co.re/docs/usage/configuration#max-resources) and [tuning workflow resources](https://nf-co.re/docs/usage/configuration#tuning-workflow-resources) section of the nf-core website. - ```nextflow - process { - withName: PANGOLIN { - container = 'quay.io/biocontainers/pangolin:3.0.5--pyhdfd78af_0' - } - } - ``` +### Custom Containers - - For Singularity: +In some cases you may wish to change which container or conda environment a step of the pipeline uses for a particular tool. By default nf-core pipelines use containers and software from the [biocontainers](https://biocontainers.pro/) or [bioconda](https://bioconda.github.io/) projects. However in some cases the pipeline specified version maybe out of date. - ```nextflow - process { - withName: PANGOLIN { - container = 'https://depot.galaxyproject.org/singularity/pangolin:3.0.5--pyhdfd78af_0' - } - } - ``` +To use a different container from the default container or conda environment specified in a pipeline, please see the [updating tool versions](https://nf-co.re/docs/usage/configuration#updating-tool-versions) section of the nf-core website. - - For Conda: +### Custom Tool Arguments - ```nextflow - process { - withName: PANGOLIN { - conda = 'bioconda::pangolin=3.0.5' - } - } - ``` +A pipeline might not always support every possible argument or option of a particular tool used in pipeline. Fortunately, nf-core pipelines provide some freedom to users to insert additional parameters that the pipeline does not include by default. -> **NB:** If you wish to periodically update individual tool-specific results (e.g. Pangolin) generated by the pipeline then you must ensure to keep the `work/` directory otherwise the `-resume` ability of the pipeline will be compromised and it will restart from scratch. +To learn how to provide additional arguments to a particular tool of the pipeline, please see the [customising tool arguments](https://nf-co.re/docs/usage/configuration#customising-tool-arguments) section of the nf-core website. ### nf-core/configs diff --git a/lib/NfcoreSchema.groovy b/lib/NfcoreSchema.groovy index 33cd4f6e..9b34804d 100755 --- a/lib/NfcoreSchema.groovy +++ b/lib/NfcoreSchema.groovy @@ -2,6 +2,7 @@ // This file holds several functions used to perform JSON parameter validation, help and summary rendering for the nf-core pipeline template. // +import nextflow.Nextflow import org.everit.json.schema.Schema import org.everit.json.schema.loader.SchemaLoader import org.everit.json.schema.ValidationException @@ -83,6 +84,7 @@ class NfcoreSchema { 'stub-run', 'test', 'w', + 'with-apptainer', 'with-charliecloud', 'with-conda', 'with-dag', @@ -177,7 +179,7 @@ class NfcoreSchema { } if (has_error) { - System.exit(1) + Nextflow.error('Exiting!') } } diff --git a/lib/WorkflowMain.groovy b/lib/WorkflowMain.groovy index a239b3f6..08911312 100755 --- a/lib/WorkflowMain.groovy +++ b/lib/WorkflowMain.groovy @@ -2,6 +2,8 @@ // This file holds several functions specific to the main.nf workflow in the nf-core/nanoseq pipeline // +import nextflow.Nextflow + class WorkflowMain { // @@ -21,7 +23,7 @@ class WorkflowMain { // // Generate help string // - public static String help(workflow, params, log) { + public static String help(workflow, params) { def command = "nextflow run ${workflow.manifest.name} --input samplesheet.csv --genome GRCh37 -profile docker" def help_string = '' help_string += NfcoreTemplate.logo(workflow, params.monochrome_logs) @@ -34,7 +36,7 @@ class WorkflowMain { // // Generate parameter summary log string // - public static String paramsSummaryLog(workflow, params, log) { + public static String paramsSummaryLog(workflow, params) { def summary_log = '' summary_log += NfcoreTemplate.logo(workflow, params.monochrome_logs) summary_log += NfcoreSchema.paramsSummaryLog(workflow, params) @@ -49,7 +51,7 @@ class WorkflowMain { public static void initialise(workflow, params, log) { // Print help to screen if required if (params.help) { - log.info help(workflow, params, log) + log.info help(workflow, params) System.exit(0) } @@ -61,7 +63,7 @@ class WorkflowMain { } // Print parameter summary log to screen - log.info paramsSummaryLog(workflow, params, log) + log.info paramsSummaryLog(workflow, params) // Validate workflow parameters via the JSON schema if (params.validate_params) { @@ -81,8 +83,7 @@ class WorkflowMain { // Check input has been provided if (!params.input) { - log.error "Please provide an input samplesheet to the pipeline e.g. '--input samplesheet.csv'" - System.exit(1) + Nextflow.error("Please provide an input samplesheet to the pipeline e.g. '--input samplesheet.csv'") } } // diff --git a/lib/WorkflowNanoseq.groovy b/lib/WorkflowNanoseq.groovy index 1903c55d..53e6b17a 100755 --- a/lib/WorkflowNanoseq.groovy +++ b/lib/WorkflowNanoseq.groovy @@ -2,6 +2,7 @@ // This file holds several functions specific to the workflow/nanoseq.nf in the nf-core/nanoseq pipeline // +import nextflow.Nextflow import groovy.text.SimpleTemplateEngine class WorkflowNanoseq { @@ -14,8 +15,7 @@ class WorkflowNanoseq { if (!params.fasta) { - log.error "Genome fasta file not specified with e.g. '--fasta genome.fa' or via a detectable config file." - System.exit(1) + Nextflow.error "Genome fasta file not specified with e.g. '--fasta genome.fa' or via a detectable config file." } } @@ -61,17 +61,19 @@ class WorkflowNanoseq { def description_html = engine.createTemplate(methods_text).make(meta) return description_html - }// + } + + // // Exit pipeline if incorrect --genome key provided // private static void genomeExistsError(params, log) { if (params.genomes && params.genome && !params.genomes.containsKey(params.genome)) { - log.error "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" + + def error_string = "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" + " Genome '${params.genome}' not found in any config files provided to the pipeline.\n" + " Currently, the available genome keys are:\n" + " ${params.genomes.keySet().join(", ")}\n" + "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" - System.exit(1) + Nextflow.error(error_string) } } } diff --git a/main.nf b/main.nf index 3ba1e4f1..afc83081 100644 --- a/main.nf +++ b/main.nf @@ -4,7 +4,6 @@ nf-core/nanoseq ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Github : https://github.com/nf-core/nanoseq - Website: https://nf-co.re/nanoseq Slack : https://nfcore.slack.com/channels/nanoseq ---------------------------------------------------------------------------------------- diff --git a/modules.json b/modules.json index aa2690b0..4a80d5f6 100644 --- a/modules.json +++ b/modules.json @@ -7,7 +7,7 @@ "nf-core": { "custom/dumpsoftwareversions": { "branch": "master", - "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", + "git_sha": "76cc4938c1f6ea5c7d83fed1eeffc146787f9543", "installed_by": ["modules"] }, "fastqc": { @@ -17,7 +17,7 @@ }, "multiqc": { "branch": "master", - "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", + "git_sha": "f2d63bd5b68925f98f572eed70993d205cc694b7", "installed_by": ["modules"] } } diff --git a/modules/local/samplesheet_check.nf b/modules/local/samplesheet_check.nf index e479b5d5..df9349f9 100644 --- a/modules/local/samplesheet_check.nf +++ b/modules/local/samplesheet_check.nf @@ -5,7 +5,7 @@ process SAMPLESHEET_CHECK { conda "conda-forge::python=3.8.3" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/python:3.8.3' : - 'quay.io/biocontainers/python:3.8.3' }" + 'biocontainers/python:3.8.3' }" input: path samplesheet diff --git a/modules/nf-core/custom/dumpsoftwareversions/main.nf b/modules/nf-core/custom/dumpsoftwareversions/main.nf index 3df21765..800a6099 100644 --- a/modules/nf-core/custom/dumpsoftwareversions/main.nf +++ b/modules/nf-core/custom/dumpsoftwareversions/main.nf @@ -2,10 +2,10 @@ process CUSTOM_DUMPSOFTWAREVERSIONS { label 'process_single' // Requires `pyyaml` which does not have a dedicated container but is in the MultiQC container - conda "bioconda::multiqc=1.13" + conda "bioconda::multiqc=1.14" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/multiqc:1.13--pyhdfd78af_0' : - 'quay.io/biocontainers/multiqc:1.13--pyhdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/multiqc:1.14--pyhdfd78af_0' : + 'quay.io/biocontainers/multiqc:1.14--pyhdfd78af_0' }" input: path versions diff --git a/modules/nf-core/custom/dumpsoftwareversions/meta.yml b/modules/nf-core/custom/dumpsoftwareversions/meta.yml index 60b546a0..c32657de 100644 --- a/modules/nf-core/custom/dumpsoftwareversions/meta.yml +++ b/modules/nf-core/custom/dumpsoftwareversions/meta.yml @@ -1,7 +1,9 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/yaml-schema.json name: custom_dumpsoftwareversions description: Custom module used to dump software versions within the nf-core pipeline template keywords: - custom + - dump - version tools: - custom: diff --git a/modules/nf-core/multiqc/main.nf b/modules/nf-core/multiqc/main.nf index 68f66bea..4b604749 100644 --- a/modules/nf-core/multiqc/main.nf +++ b/modules/nf-core/multiqc/main.nf @@ -1,10 +1,10 @@ process MULTIQC { label 'process_single' - conda "bioconda::multiqc=1.13" + conda "bioconda::multiqc=1.14" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/multiqc:1.13--pyhdfd78af_0' : - 'quay.io/biocontainers/multiqc:1.13--pyhdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/multiqc:1.14--pyhdfd78af_0' : + 'quay.io/biocontainers/multiqc:1.14--pyhdfd78af_0' }" input: path multiqc_files, stageAs: "?/*" diff --git a/modules/nf-core/multiqc/meta.yml b/modules/nf-core/multiqc/meta.yml index ebc29b27..f93b5ee5 100644 --- a/modules/nf-core/multiqc/meta.yml +++ b/modules/nf-core/multiqc/meta.yml @@ -1,3 +1,4 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/yaml-schema.json name: MultiQC description: Aggregate results from bioinformatics analyses across many samples into a single report keywords: @@ -37,7 +38,7 @@ output: description: MultiQC report file pattern: "multiqc_report.html" - data: - type: dir + type: directory description: MultiQC data dir pattern: "multiqc_data" - plots: diff --git a/nextflow.config b/nextflow.config index 65a10e10..89cafa2b 100644 --- a/nextflow.config +++ b/nextflow.config @@ -78,7 +78,11 @@ try { profiles { - debug { process.beforeScript = 'echo $HOSTNAME' } + debug { + dumpHashes = true + process.beforeScript = 'echo $HOSTNAME' + cleanup = false + } conda { conda.enabled = true docker.enabled = false @@ -86,6 +90,7 @@ profiles { podman.enabled = false shifter.enabled = false charliecloud.enabled = false + apptainer.enabled = false } mamba { conda.enabled = true @@ -95,14 +100,18 @@ profiles { podman.enabled = false shifter.enabled = false charliecloud.enabled = false + apptainer.enabled = false } docker { docker.enabled = true + docker.registry = 'quay.io' docker.userEmulation = true + conda.enabled = false singularity.enabled = false podman.enabled = false shifter.enabled = false charliecloud.enabled = false + apptainer.enabled = false } arm { docker.runOptions = '-u $(id -u):$(id -g) --platform=linux/amd64' @@ -110,31 +119,49 @@ profiles { singularity { singularity.enabled = true singularity.autoMounts = true + conda.enabled = false docker.enabled = false podman.enabled = false shifter.enabled = false charliecloud.enabled = false + apptainer.enabled = false } podman { podman.enabled = true + podman.registry = 'quay.io' + conda.enabled = false docker.enabled = false singularity.enabled = false shifter.enabled = false charliecloud.enabled = false + apptainer.enabled = false } shifter { shifter.enabled = true + conda.enabled = false docker.enabled = false singularity.enabled = false podman.enabled = false charliecloud.enabled = false + apptainer.enabled = false } charliecloud { charliecloud.enabled = true + conda.enabled = false docker.enabled = false singularity.enabled = false podman.enabled = false shifter.enabled = false + apptainer.enabled = false + } + apptainer { + apptainer.enabled = true + conda.enabled = false + docker.enabled = false + singularity.enabled = false + podman.enabled = false + shifter.enabled = false + charliecloud.enabled = false } gitpod { executor.name = 'local' @@ -193,7 +220,7 @@ manifest { description = """A pipeline to demultiplex, QC and map Nanopore data""" mainScript = 'main.nf' nextflowVersion = '!>=22.10.1' - version = '3.0.0' + version = '3.1.0' doi = '' } diff --git a/tower.yml b/tower.yml new file mode 100644 index 00000000..787aedfe --- /dev/null +++ b/tower.yml @@ -0,0 +1,5 @@ +reports: + multiqc_report.html: + display: "MultiQC HTML report" + samplesheet.csv: + display: "Auto-created samplesheet with collated metadata and FASTQ paths" From 3075df602fa57c6af18db8a2f7da0a6635d68cef Mon Sep 17 00:00:00 2001 From: Matthew Stuart-Edwards Date: Tue, 9 May 2023 14:51:15 -0600 Subject: [PATCH 23/77] Updated m6anet to 2.0.2 With the updated biocontainer for m6anet being built, can update the singularity and docker container with the latest version. This version changed how m6anet is called. It has `m6anet` and the analysis as a parameter (`inference`, `dataprep`) instead of `m6anet-run_inference` and `m6anet-dataprep` commands. There are now two files for output from `m6anet inference`, but the existing output of '*' captures those. In the future, might be nice to specify these individually and emit them as separate outputs for downstream analysis. --- modules/local/m6anet_dataprep.nf | 8 +++++--- modules/local/m6anet_inference.nf | 8 +++++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/modules/local/m6anet_dataprep.nf b/modules/local/m6anet_dataprep.nf index 2f2dda5c..804da8a6 100644 --- a/modules/local/m6anet_dataprep.nf +++ b/modules/local/m6anet_dataprep.nf @@ -3,7 +3,9 @@ process M6ANET_DATAPREP { label 'process_medium' // conda (params.enable_conda ? "bioconda::nanopolish==0.13.2" : null) // need to get xpore onto conda - container "docker.io/yuukiiwa/m6anet:1.0" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/m6anet:2.0.2--pyhdfd78af_0' : + 'quay.io/biocontainers/m6anet:2.0.2--pyhdfd78af_0' }" input: tuple val(meta), path(genome), path(gtf), path(eventalign), path(nanopolish_summary) @@ -17,14 +19,14 @@ process M6ANET_DATAPREP { script: """ - m6anet-dataprep \\ + m6anet dataprep \\ --eventalign $eventalign \\ --out_dir $meta.id \\ --n_processes $task.cpus cat <<-END_VERSIONS > versions.yml "${task.process}": - m6anet: \$( echo 'm6anet 1.0' ) + m6anet: \$( echo 'm6anet 2.0.2' ) END_VERSIONS """ } diff --git a/modules/local/m6anet_inference.nf b/modules/local/m6anet_inference.nf index b8f13060..0f626031 100644 --- a/modules/local/m6anet_inference.nf +++ b/modules/local/m6anet_inference.nf @@ -4,7 +4,9 @@ process M6ANET_INFERENCE { label 'process_medium' // conda (params.enable_conda ? "bioconda::nanopolish==0.13.2" : null) // need to get xpore onto conda - container "docker.io/yuukiiwa/m6anet:1.0" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/m6anet:2.0.2--pyhdfd78af_0' : + 'quay.io/biocontainers/m6anet:2.0.2--pyhdfd78af_0' }" input: tuple val(meta), path(input_dir) @@ -19,11 +21,11 @@ process M6ANET_INFERENCE { script: def out_dir = meta.id+"_results" """ - m6anet-run_inference --input_dir $input_dir --out_dir $out_dir --batch_size 512 --n_processes $task.cpus --num_iterations 5 --device cpu + m6anet inference --input_dir $input_dir --out_dir $out_dir --batch_size 512 --n_processes $task.cpus --num_iterations 5 --device cpu cat <<-END_VERSIONS > versions.yml "${task.process}": - m6anet: \$( echo 'm6anet 1.0' ) + m6anet: \$( echo 'm6anet 2.0.2' ) END_VERSIONS """ } From ca4458f3a09a218587c9c16d9d413afd46fd21b3 Mon Sep 17 00:00:00 2001 From: Matthew Stuart-Edwards Date: Tue, 9 May 2023 15:08:07 -0600 Subject: [PATCH 24/77] Updated samplesheet error message when no fastq found I updated the samplesheet to output the filename that was attempted to be used when looking for the fastq file. When running the pipeline with multiple samples, I was unable to determine which sample was causing the samplesheet error until I added this code. --- bin/check_samplesheet.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/check_samplesheet.py b/bin/check_samplesheet.py index 94c0d9e0..276c5267 100755 --- a/bin/check_samplesheet.py +++ b/bin/check_samplesheet.py @@ -136,7 +136,7 @@ def check_samplesheet(file_in, updated_path, file_out): print_error('basecalled fastq input does not end with ".fastq.gz" or ".fq.gz"') else: print_error( - 'path does not end with ".fastq.gz", ".fq.gz", or ".bam" and is not an existing directory with correct fast5 and/or fastq inputs.' + f"{input_file} path does not end with \".fastq.gz\", \".fq.gz\", or \".bam\" and is not an existing directory with correct fast5 and/or fastq inputs." ) ## Create sample mapping dictionary = {group: {replicate : [ barcode, input_file, nanopolish_fast5 ]}} From 0849ea5fc197feaa27ff35221429b83ddcf8dc4e Mon Sep 17 00:00:00 2001 From: Yuk Kei Wan <41866052+yuukiiwa@users.noreply.github.com> Date: Wed, 10 May 2023 10:01:57 +0800 Subject: [PATCH 25/77] Update modules.json --- modules.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules.json b/modules.json index 333d9bf0..3301b135 100644 --- a/modules.json +++ b/modules.json @@ -137,7 +137,7 @@ }, "tabix/tabix": { "branch": "master", - "git_sha": "f2d63bd5b68925f98f572eed70993d205cc694b7", + "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", "installed_by": ["modules"] }, "ucsc/bedgraphtobigwig": { From 015c24c365bb5231b5b51817ffc8370a51974056 Mon Sep 17 00:00:00 2001 From: Yuk Kei Wan <41866052+yuukiiwa@users.noreply.github.com> Date: Wed, 10 May 2023 10:09:43 +0800 Subject: [PATCH 26/77] Update README.md --- README.md | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/README.md b/README.md index 95355be3..b8188fbc 100644 --- a/README.md +++ b/README.md @@ -72,24 +72,16 @@ CONTROL_REP1,AEG588A1_S1_L002_R1_001.fastq.gz,AEG588A1_S1_L002_R2_001.fastq.gz Each row represents a fastq file (single-end) or a pair of fastq files (paired end). -<<<<<<< HEAD ---> -======= ```console nextflow run nf-core/nanoseq -profile test,YOURPROFILE ``` ->>>>>>> origin/update_3_1_dev Now, you can run the pipeline using: -<<<<<<< HEAD - -======= > - The pipeline comes with config profiles called `docker`, `singularity`, `podman`, `shifter`, `charliecloud` and `conda` which instruct the pipeline to use the named tool for software management. For example, `-profile test,docker`. > - Please check [nf-core/configs](https://github.com/nf-core/configs#documentation) to see if a custom config file to run nf-core pipelines already exists for your Institute. If so, you can simply use `-profile ` in your command. This will enable either `docker` or `singularity` and set the appropriate execution settings for your local compute environment. > - If you are using `singularity` and are persistently observing issues downloading Singularity images directly due to timeout or network issues, then you can use the `--singularity_pull_docker_container` parameter to pull and convert the Docker image instead. Alternatively, you can use the [`nf-core download`](https://nf-co.re/tools/#downloading-pipelines-for-offline-use) command to download images first, before running the pipeline. Setting the [`NXF_SINGULARITY_CACHEDIR` or `singularity.cacheDir`](https://www.nextflow.io/docs/latest/singularity.html?#singularity-docker-hub) Nextflow options enables you to store and re-use the images from a central location for future pipeline runs. > - If you are using `conda`, it is highly recommended to use the [`NXF_CONDA_CACHEDIR` or `conda.cacheDir`](https://www.nextflow.io/docs/latest/conda.html) settings to store the environments in a central location for future pipeline runs. ->>>>>>> origin/update_3_1_dev ```bash nextflow run nf-core/nanoseq \ @@ -98,18 +90,7 @@ nextflow run nf-core/nanoseq \ --outdir ``` -<<<<<<< HEAD -> **Warning:** -> Please provide pipeline parameters via the CLI or Nextflow `-params-file` option. Custom config files including those -> 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/nanoseq/usage) and the [parameter documentation](https://nf-co.re/nanoseq/parameters). - -## Pipeline output -======= ## Documentation ->>>>>>> origin/update_3_1_dev To see the the results of a test run with a full size dataset refer to the [results](https://nf-co.re/nanoseq/results) tab on the nf-core website pipeline page. For more details about the output files and reports, please refer to the From 06cfafad7cbcb768f8baeabfe2495df96a9dcc29 Mon Sep 17 00:00:00 2001 From: Yuk Kei Wan <41866052+yuukiiwa@users.noreply.github.com> Date: Wed, 10 May 2023 14:01:22 +0800 Subject: [PATCH 27/77] Update nextflow.config --- nextflow.config | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nextflow.config b/nextflow.config index ed692321..510c358a 100644 --- a/nextflow.config +++ b/nextflow.config @@ -157,14 +157,14 @@ profiles { } docker { docker.enabled = true - docker.registry = 'quay.io' + //docker.registry = 'quay.io' docker.userEmulation = true - conda.enabled = false + //conda.enabled = false singularity.enabled = false podman.enabled = false shifter.enabled = false charliecloud.enabled = false - apptainer.enabled = false + //apptainer.enabled = false } arm { docker.runOptions = '-u $(id -u):$(id -g) --platform=linux/amd64' From 0fbf1e13f2a0869bc09f7c6cdc7011571b045b9d Mon Sep 17 00:00:00 2001 From: Yuk Kei Wan <41866052+yuukiiwa@users.noreply.github.com> Date: Wed, 10 May 2023 14:04:47 +0800 Subject: [PATCH 28/77] Update samplesheet_check.nf --- modules/local/samplesheet_check.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/local/samplesheet_check.nf b/modules/local/samplesheet_check.nf index 75989067..4eac940f 100644 --- a/modules/local/samplesheet_check.nf +++ b/modules/local/samplesheet_check.nf @@ -5,7 +5,7 @@ process SAMPLESHEET_CHECK { conda "conda-forge::python=3.8.3" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/python:3.8.3' : - 'biocontainers/python:3.8.3' }" + 'quay.io/biocontainers/python:3.8.3' }" input: path samplesheet From de8aaf8450f1e2be80478618a9aa486700c93b3f Mon Sep 17 00:00:00 2001 From: Yuk Kei Wan <41866052+yuukiiwa@users.noreply.github.com> Date: Wed, 10 May 2023 14:13:33 +0800 Subject: [PATCH 29/77] Update get_nanolyse_fasta.nf --- modules/local/get_nanolyse_fasta.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/local/get_nanolyse_fasta.nf b/modules/local/get_nanolyse_fasta.nf index 736ac64d..a10513cc 100644 --- a/modules/local/get_nanolyse_fasta.nf +++ b/modules/local/get_nanolyse_fasta.nf @@ -4,7 +4,7 @@ process GET_NANOLYSE_FASTA { conda "conda-forge::sed=4.7" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://containers.biocontainers.pro/s3/SingImgsRepo/biocontainers/v1.2.0_cv1/biocontainers_v1.2.0_cv1.img' : - 'biocontainers/biocontainers:v1.2.0_cv1' }" + 'https://containers.biocontainers.pro/s3/SingImgsRepo/biocontainers/v1.2.0_cv1/biocontainers_v1.2.0_cv1.img' }" output: path "*fasta.gz" , emit: ch_nanolyse_fasta From 63498d79a0b3c7b0e4d807e3bb6d762f4eee0b39 Mon Sep 17 00:00:00 2001 From: Yuk Kei Wan <41866052+yuukiiwa@users.noreply.github.com> Date: Wed, 10 May 2023 14:33:57 +0800 Subject: [PATCH 30/77] Update get_nanolyse_fasta.nf --- modules/local/get_nanolyse_fasta.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/local/get_nanolyse_fasta.nf b/modules/local/get_nanolyse_fasta.nf index a10513cc..d3f236c2 100644 --- a/modules/local/get_nanolyse_fasta.nf +++ b/modules/local/get_nanolyse_fasta.nf @@ -4,7 +4,7 @@ process GET_NANOLYSE_FASTA { conda "conda-forge::sed=4.7" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://containers.biocontainers.pro/s3/SingImgsRepo/biocontainers/v1.2.0_cv1/biocontainers_v1.2.0_cv1.img' : - 'https://containers.biocontainers.pro/s3/SingImgsRepo/biocontainers/v1.2.0_cv1/biocontainers_v1.2.0_cv1.img' }" + 'docker.io/biocontainers/biocontainers:v1.2.0_cv1' }" output: path "*fasta.gz" , emit: ch_nanolyse_fasta From c739ef6eaa489b95693ce8bd9379bb4918f33ab0 Mon Sep 17 00:00:00 2001 From: Yuk Kei Wan Date: Wed, 10 May 2023 14:48:27 +0800 Subject: [PATCH 31/77] python black linting fix --- bin/check_samplesheet.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/check_samplesheet.py b/bin/check_samplesheet.py index 276c5267..a5ab1143 100755 --- a/bin/check_samplesheet.py +++ b/bin/check_samplesheet.py @@ -136,7 +136,7 @@ def check_samplesheet(file_in, updated_path, file_out): print_error('basecalled fastq input does not end with ".fastq.gz" or ".fq.gz"') else: print_error( - f"{input_file} path does not end with \".fastq.gz\", \".fq.gz\", or \".bam\" and is not an existing directory with correct fast5 and/or fastq inputs." + f'{input_file} path does not end with ".fastq.gz", ".fq.gz", or ".bam" and is not an existing directory with correct fast5 and/or fastq inputs.' ) ## Create sample mapping dictionary = {group: {replicate : [ barcode, input_file, nanopolish_fast5 ]}} From 1ad7c5f089ee28d0553b2e95ef883eba1cc75079 Mon Sep 17 00:00:00 2001 From: Yuk Kei Wan Date: Wed, 10 May 2023 15:21:38 +0800 Subject: [PATCH 32/77] fix linting --- modules.json | 128 +++++++++++++----- .../custom/dumpsoftwareversions/main.nf | 2 +- 2 files changed, 96 insertions(+), 34 deletions(-) diff --git a/modules.json b/modules.json index 3301b135..799506bd 100644 --- a/modules.json +++ b/modules.json @@ -8,152 +8,212 @@ "bcftools/sort": { "branch": "master", "git_sha": "4a21e4cca35e72ec059abd67f790e0b192ce5d81", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "bedtools/bamtobed": { "branch": "master", "git_sha": "1d48427957205cb6acf1ffe330bd35b6bb8baa90", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "bedtools/genomecov": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "custom/dumpsoftwareversions": { "branch": "master", - "git_sha": "b6d4d476aee074311c89d82a69c1921bd70c8180", - "installed_by": ["modules"] + "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", + "installed_by": [ + "modules" + ] }, "custom/getchromsizes": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "cutesv": { "branch": "master", "git_sha": "37224e9ae3bbfb5e417030cd8bfeb451a1fe989b", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "deepvariant": { "branch": "master", "git_sha": "0f8a77ff00e65eaeebc509b8156eaa983192474b", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "fastqc": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "graphmap2/align": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "graphmap2/index": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "minimap2/align": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "minimap2/index": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "nanolyse": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "nanoplot": { "branch": "master", "git_sha": "3822e04e49b6d89b7092feb3480d744cb5d9986b", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "qcat": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "samtools/flagstat": { "branch": "master", "git_sha": "0f8a77ff00e65eaeebc509b8156eaa983192474b", - "installed_by": ["bam_stats_samtools"] + "installed_by": [ + "bam_stats_samtools" + ] }, "samtools/idxstats": { "branch": "master", "git_sha": "0f8a77ff00e65eaeebc509b8156eaa983192474b", - "installed_by": ["bam_stats_samtools"] + "installed_by": [ + "bam_stats_samtools" + ] }, "samtools/index": { "branch": "master", "git_sha": "0f8a77ff00e65eaeebc509b8156eaa983192474b", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "samtools/sort": { "branch": "master", "git_sha": "0f8a77ff00e65eaeebc509b8156eaa983192474b", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "samtools/stats": { "branch": "master", "git_sha": "0f8a77ff00e65eaeebc509b8156eaa983192474b", - "installed_by": ["bam_stats_samtools"] + "installed_by": [ + "bam_stats_samtools" + ] }, "samtools/view": { "branch": "master", "git_sha": "0f8a77ff00e65eaeebc509b8156eaa983192474b", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "sniffles": { "branch": "master", "git_sha": "9b8401b7eb47d81f607798481e044262eca1c718", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "stringtie/merge": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "stringtie/stringtie": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "subread/featurecounts": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "tabix/bgzip": { "branch": "master", "git_sha": "90294980a903ecebd99ac31d8b6c66af48fa8259", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "tabix/tabix": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "ucsc/bedgraphtobigwig": { "branch": "master", "git_sha": "0f8a77ff00e65eaeebc509b8156eaa983192474b", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "ucsc/bedtobigbed": { "branch": "master", "git_sha": "0f8a77ff00e65eaeebc509b8156eaa983192474b", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "untar": { "branch": "master", "git_sha": "cc1f997fab6d8fde5dc0e6e2a310814df5b53ce7", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] } } }, @@ -162,10 +222,12 @@ "bam_stats_samtools": { "branch": "master", "git_sha": "b4b7f89e7fd6d2293f0c176213f710e0bcdaf19e", - "installed_by": ["subworkflows"] + "installed_by": [ + "subworkflows" + ] } } } } } -} +} \ No newline at end of file diff --git a/modules/nf-core/custom/dumpsoftwareversions/main.nf b/modules/nf-core/custom/dumpsoftwareversions/main.nf index 800a6099..ebc87273 100644 --- a/modules/nf-core/custom/dumpsoftwareversions/main.nf +++ b/modules/nf-core/custom/dumpsoftwareversions/main.nf @@ -5,7 +5,7 @@ process CUSTOM_DUMPSOFTWAREVERSIONS { conda "bioconda::multiqc=1.14" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/multiqc:1.14--pyhdfd78af_0' : - 'quay.io/biocontainers/multiqc:1.14--pyhdfd78af_0' }" + 'biocontainers/multiqc:1.14--pyhdfd78af_0' }" input: path versions From fe682996ca8ce01f13f2d35456b9473f9a03b32c Mon Sep 17 00:00:00 2001 From: Yuk Kei Wan Date: Wed, 10 May 2023 07:55:36 +0000 Subject: [PATCH 33/77] fix linting --- modules.json | 126 ++++++++++++------------------------------------ nextflow.config | 6 +-- 2 files changed, 35 insertions(+), 97 deletions(-) diff --git a/modules.json b/modules.json index 799506bd..31c05136 100644 --- a/modules.json +++ b/modules.json @@ -8,212 +8,152 @@ "bcftools/sort": { "branch": "master", "git_sha": "4a21e4cca35e72ec059abd67f790e0b192ce5d81", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "bedtools/bamtobed": { "branch": "master", "git_sha": "1d48427957205cb6acf1ffe330bd35b6bb8baa90", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "bedtools/genomecov": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "custom/dumpsoftwareversions": { "branch": "master", "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "custom/getchromsizes": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "cutesv": { "branch": "master", "git_sha": "37224e9ae3bbfb5e417030cd8bfeb451a1fe989b", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "deepvariant": { "branch": "master", "git_sha": "0f8a77ff00e65eaeebc509b8156eaa983192474b", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "fastqc": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "graphmap2/align": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "graphmap2/index": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "minimap2/align": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "minimap2/index": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "nanolyse": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "nanoplot": { "branch": "master", "git_sha": "3822e04e49b6d89b7092feb3480d744cb5d9986b", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "qcat": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "samtools/flagstat": { "branch": "master", "git_sha": "0f8a77ff00e65eaeebc509b8156eaa983192474b", - "installed_by": [ - "bam_stats_samtools" - ] + "installed_by": ["bam_stats_samtools"] }, "samtools/idxstats": { "branch": "master", "git_sha": "0f8a77ff00e65eaeebc509b8156eaa983192474b", - "installed_by": [ - "bam_stats_samtools" - ] + "installed_by": ["bam_stats_samtools"] }, "samtools/index": { "branch": "master", "git_sha": "0f8a77ff00e65eaeebc509b8156eaa983192474b", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "samtools/sort": { "branch": "master", "git_sha": "0f8a77ff00e65eaeebc509b8156eaa983192474b", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "samtools/stats": { "branch": "master", "git_sha": "0f8a77ff00e65eaeebc509b8156eaa983192474b", - "installed_by": [ - "bam_stats_samtools" - ] + "installed_by": ["bam_stats_samtools"] }, "samtools/view": { "branch": "master", "git_sha": "0f8a77ff00e65eaeebc509b8156eaa983192474b", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "sniffles": { "branch": "master", "git_sha": "9b8401b7eb47d81f607798481e044262eca1c718", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "stringtie/merge": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "stringtie/stringtie": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "subread/featurecounts": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "tabix/bgzip": { "branch": "master", "git_sha": "90294980a903ecebd99ac31d8b6c66af48fa8259", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "tabix/tabix": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "ucsc/bedgraphtobigwig": { "branch": "master", "git_sha": "0f8a77ff00e65eaeebc509b8156eaa983192474b", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "ucsc/bedtobigbed": { "branch": "master", "git_sha": "0f8a77ff00e65eaeebc509b8156eaa983192474b", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "untar": { "branch": "master", "git_sha": "cc1f997fab6d8fde5dc0e6e2a310814df5b53ce7", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] } } }, @@ -222,12 +162,10 @@ "bam_stats_samtools": { "branch": "master", "git_sha": "b4b7f89e7fd6d2293f0c176213f710e0bcdaf19e", - "installed_by": [ - "subworkflows" - ] + "installed_by": ["subworkflows"] } } } } } -} \ No newline at end of file +} diff --git a/nextflow.config b/nextflow.config index 510c358a..ed692321 100644 --- a/nextflow.config +++ b/nextflow.config @@ -157,14 +157,14 @@ profiles { } docker { docker.enabled = true - //docker.registry = 'quay.io' + docker.registry = 'quay.io' docker.userEmulation = true - //conda.enabled = false + conda.enabled = false singularity.enabled = false podman.enabled = false shifter.enabled = false charliecloud.enabled = false - //apptainer.enabled = false + apptainer.enabled = false } arm { docker.runOptions = '-u $(id -u):$(id -g) --platform=linux/amd64' From f2af6e973477c9a0ac8033c72fb7d5e2aeb57d61 Mon Sep 17 00:00:00 2001 From: Yuk Kei Wan Date: Wed, 10 May 2023 16:22:24 +0800 Subject: [PATCH 34/77] update local modules --- modules/local/bam_rename.nf | 2 +- modules/local/bambu.nf | 2 +- modules/local/clair3.nf | 2 +- modules/local/deseq2.nf | 2 +- modules/local/m6anet_dataprep.nf | 2 +- modules/local/m6anet_inference.nf | 2 +- modules/local/multiqc.nf | 2 +- modules/local/nanopolish_index_eventalign.nf | 2 +- modules/local/samplesheet_check.nf | 2 +- modules/local/xpore_dataprep.nf | 2 +- modules/local/xpore_diffmod.nf | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/modules/local/bam_rename.nf b/modules/local/bam_rename.nf index 99258144..65af6d9e 100644 --- a/modules/local/bam_rename.nf +++ b/modules/local/bam_rename.nf @@ -5,7 +5,7 @@ process BAM_RENAME { conda "conda-forge::sed=4.7" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/sed:4.7.0' : - 'quay.io/biocontainers/sed:4.7.0' }" + 'biocontainers/sed:4.7.0' }" input: tuple val(meta), path(bam) diff --git a/modules/local/bambu.nf b/modules/local/bambu.nf index 777b0e11..90d4de71 100644 --- a/modules/local/bambu.nf +++ b/modules/local/bambu.nf @@ -4,7 +4,7 @@ process BAMBU { conda "conda-forge::r-base=4.0.3 bioconda::bioconductor-bambu=3.0.8 bioconda::bioconductor-bsgenome=1.66.0" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/bioconductor-bambu:3.0.8--r42hc247a5b_0' : - 'quay.io/biocontainers/bioconductor-bambu:3.0.8--r42hc247a5b_0' }" + 'biocontainers/bioconductor-bambu:3.0.8--r42hc247a5b_0' }" input: tuple path(fasta), path(gtf) diff --git a/modules/local/clair3.nf b/modules/local/clair3.nf index ac38fcc9..1583e277 100644 --- a/modules/local/clair3.nf +++ b/modules/local/clair3.nf @@ -5,7 +5,7 @@ process CLAIR3 { conda 'bioconda::clair3=0.1.10' container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/clair3:0.1.10--hdfd78af_0' : - 'quay.io/biocontainers/clair3:0.1.10--hdfd78af_0' }" + 'biocontainers/clair3:0.1.10--hdfd78af_0' }" input: tuple val(meta), path(bam), path(bai) diff --git a/modules/local/deseq2.nf b/modules/local/deseq2.nf index 3bc9f4b4..e2adba0f 100644 --- a/modules/local/deseq2.nf +++ b/modules/local/deseq2.nf @@ -4,7 +4,7 @@ process DESEQ2 { conda "conda-forge::r-base=4.0.3 bioconda::bioconductor-deseq2=1.28.0" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/mulled-v2-8849acf39a43cdd6c839a369a74c0adc823e2f91:ab110436faf952a33575c64dd74615a84011450b-0' : - 'quay.io/biocontainers/mulled-v2-8849acf39a43cdd6c839a369a74c0adc823e2f91:ab110436faf952a33575c64dd74615a84011450b-0' }" + 'biocontainers/mulled-v2-8849acf39a43cdd6c839a369a74c0adc823e2f91:ab110436faf952a33575c64dd74615a84011450b-0' }" input: path counts diff --git a/modules/local/m6anet_dataprep.nf b/modules/local/m6anet_dataprep.nf index 804da8a6..6fcaa6e9 100644 --- a/modules/local/m6anet_dataprep.nf +++ b/modules/local/m6anet_dataprep.nf @@ -5,7 +5,7 @@ process M6ANET_DATAPREP { // conda (params.enable_conda ? "bioconda::nanopolish==0.13.2" : null) // need to get xpore onto conda container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/m6anet:2.0.2--pyhdfd78af_0' : - 'quay.io/biocontainers/m6anet:2.0.2--pyhdfd78af_0' }" + 'biocontainers/m6anet:2.0.2--pyhdfd78af_0' }" input: tuple val(meta), path(genome), path(gtf), path(eventalign), path(nanopolish_summary) diff --git a/modules/local/m6anet_inference.nf b/modules/local/m6anet_inference.nf index 0f626031..6fc8381b 100644 --- a/modules/local/m6anet_inference.nf +++ b/modules/local/m6anet_inference.nf @@ -6,7 +6,7 @@ process M6ANET_INFERENCE { // conda (params.enable_conda ? "bioconda::nanopolish==0.13.2" : null) // need to get xpore onto conda container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/m6anet:2.0.2--pyhdfd78af_0' : - 'quay.io/biocontainers/m6anet:2.0.2--pyhdfd78af_0' }" + 'biocontainers/m6anet:2.0.2--pyhdfd78af_0' }" input: tuple val(meta), path(input_dir) diff --git a/modules/local/multiqc.nf b/modules/local/multiqc.nf index c3268191..d90ba2d1 100644 --- a/modules/local/multiqc.nf +++ b/modules/local/multiqc.nf @@ -4,7 +4,7 @@ process MULTIQC { conda "bioconda::multiqc=1.14" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/multiqc:1.14--pyhdfd78af_0' : - 'quay.io/biocontainers/multiqc:1.14--pyhdfd78af_0' }" + 'biocontainers/multiqc:1.14--pyhdfd78af_0' }" input: path ch_multiqc_config diff --git a/modules/local/nanopolish_index_eventalign.nf b/modules/local/nanopolish_index_eventalign.nf index 9058d8ec..d6e2791c 100644 --- a/modules/local/nanopolish_index_eventalign.nf +++ b/modules/local/nanopolish_index_eventalign.nf @@ -5,7 +5,7 @@ process NANOPOLISH_INDEX_EVENTALIGN { conda "bioconda::nanopolish==0.13.2" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/nanopolish:0.13.2--he3b7ca5_2' : - 'quay.io/biocontainers/nanopolish:0.13.2--he3b7ca5_2' }" + 'biocontainers/nanopolish:0.13.2--he3b7ca5_2' }" input: tuple val(meta), path(genome), path(gtf), path(fastq), path(bam), path(bai) diff --git a/modules/local/samplesheet_check.nf b/modules/local/samplesheet_check.nf index 4eac940f..75989067 100644 --- a/modules/local/samplesheet_check.nf +++ b/modules/local/samplesheet_check.nf @@ -5,7 +5,7 @@ process SAMPLESHEET_CHECK { conda "conda-forge::python=3.8.3" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/python:3.8.3' : - 'quay.io/biocontainers/python:3.8.3' }" + 'biocontainers/python:3.8.3' }" input: path samplesheet diff --git a/modules/local/xpore_dataprep.nf b/modules/local/xpore_dataprep.nf index 9c9f4747..d8509d66 100644 --- a/modules/local/xpore_dataprep.nf +++ b/modules/local/xpore_dataprep.nf @@ -5,7 +5,7 @@ process XPORE_DATAPREP { conda "bioconda::xpore=2.1.0" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/xpore:2.1--pyh5e36f6f_0' : - 'quay.io/biocontainers/xpore:2.1--pyh5e36f6f_0' }" + 'biocontainers/xpore:2.1--pyh5e36f6f_0' }" input: tuple val(meta), path(genome), path(gtf), path(eventalign), path(nanopolish_summary) diff --git a/modules/local/xpore_diffmod.nf b/modules/local/xpore_diffmod.nf index 2bd6edc2..333707ee 100644 --- a/modules/local/xpore_diffmod.nf +++ b/modules/local/xpore_diffmod.nf @@ -4,7 +4,7 @@ process XPORE_DIFFMOD { conda "bioconda::xpore=2.1.0" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/xpore:2.1--pyh5e36f6f_0' : - 'quay.io/biocontainers/xpore:2.1--pyh5e36f6f_0' }" + 'biocontainers/xpore:2.1--pyh5e36f6f_0' }" input: val dataprep_dirs From 391b7fd346d35b72a3dd12c34c5d7f5ed49657d7 Mon Sep 17 00:00:00 2001 From: Yuk Kei Wan Date: Wed, 10 May 2023 17:04:21 +0800 Subject: [PATCH 35/77] update nf-core modules --- modules.json | 258 ++++++------------ modules/local/bam_rename.nf | 2 +- modules/local/bambu.nf | 2 +- modules/local/bedtools_bamtobed.nf | 32 +++ modules/local/bedtools_genomecov.nf | 34 +++ modules/local/clair3.nf | 39 --- .../cutesv/main.nf => local/cutesv.nf} | 27 +- modules/local/deseq2.nf | 2 +- modules/local/get_chrom_sizes.nf | 30 ++ modules/local/get_jaffal_ref.nf | 4 +- modules/local/get_nanolyse_fasta.nf | 2 +- .../main.nf => local/graphmap2_align.nf} | 23 +- .../main.nf => local/graphmap2_index.nf} | 15 +- modules/local/gtf2bed.nf | 28 ++ modules/local/jaffal.nf | 4 +- modules/local/m6anet_dataprep.nf | 8 +- modules/local/m6anet_inference.nf | 8 +- modules/local/medaka_variant.nf | 43 +++ modules/local/minimap2_align.nf | 42 +++ modules/local/minimap2_index.nf | 40 +++ modules/local/multiqc.nf | 6 +- modules/local/nanopolish_index_eventalign.nf | 6 +- modules/local/pepper_margin_deepvariant.nf | 2 +- .../{nf-core/qcat/main.nf => local/qcat.nf} | 35 ++- modules/local/samplesheet_check.nf | 2 +- modules/local/samtools_sort_index.nf | 32 +++ modules/local/samtools_view_bam.nf | 29 ++ modules/local/sniffles.nf | 34 +++ modules/local/stringtie2.nf | 33 +++ modules/local/subread_featurecounts.nf | 57 ++++ modules/local/ucsc_bed12tobigbed.nf | 33 +++ modules/local/ucsc_bedgraphtobigwig.nf | 30 ++ modules/local/xpore_dataprep.nf | 2 +- modules/local/xpore_diffmod.nf | 2 +- modules/nf-core/bcftools/sort/main.nf | 6 +- modules/nf-core/bedtools/bamtobed/main.nf | 35 --- modules/nf-core/bedtools/bamtobed/meta.yml | 38 --- modules/nf-core/bedtools/genomecov/main.nf | 59 ---- modules/nf-core/bedtools/genomecov/meta.yml | 51 ---- .../custom/dumpsoftwareversions/main.nf | 6 +- .../custom/dumpsoftwareversions/meta.yml | 2 - modules/nf-core/custom/getchromsizes/main.nf | 44 --- modules/nf-core/cutesv/meta.yml | 55 ---- modules/nf-core/deepvariant/main.nf | 57 ---- modules/nf-core/deepvariant/meta.yml | 62 ----- modules/nf-core/fastqc/main.nf | 2 +- modules/nf-core/graphmap2/align/meta.yml | 51 ---- modules/nf-core/graphmap2/index/meta.yml | 30 -- modules/nf-core/minimap2/align/main.nf | 48 ---- modules/nf-core/minimap2/align/meta.yml | 65 ----- modules/nf-core/minimap2/index/main.nf | 34 --- modules/nf-core/minimap2/index/meta.yml | 40 --- modules/nf-core/multiqc/meta.yml | 56 ---- modules/nf-core/nanolyse/main.nf | 2 +- modules/nf-core/nanoplot/main.nf | 2 +- modules/nf-core/qcat/meta.yml | 40 --- modules/nf-core/samtools/faidx/main.nf | 44 +++ .../getchromsizes => samtools/faidx}/meta.yml | 28 +- modules/nf-core/samtools/flagstat/main.nf | 6 +- modules/nf-core/samtools/idxstats/main.nf | 6 +- modules/nf-core/samtools/index/main.nf | 6 +- modules/nf-core/samtools/sort/main.nf | 16 +- modules/nf-core/samtools/stats/main.nf | 6 +- modules/nf-core/samtools/view/main.nf | 66 ----- modules/nf-core/samtools/view/meta.yml | 79 ------ modules/nf-core/sniffles/main.nf | 40 --- modules/nf-core/sniffles/meta.yml | 59 ---- modules/nf-core/stringtie/merge/main.nf | 2 +- modules/nf-core/stringtie/stringtie/main.nf | 68 ----- modules/nf-core/stringtie/stringtie/meta.yml | 57 ---- modules/nf-core/subread/featurecounts/main.nf | 47 ---- .../nf-core/subread/featurecounts/meta.yml | 52 ---- modules/nf-core/tabix/bgzip/main.nf | 2 +- modules/nf-core/tabix/bgziptabix/main.nf | 45 +++ modules/nf-core/tabix/bgziptabix/meta.yml | 45 +++ modules/nf-core/tabix/tabix/main.nf | 2 +- modules/nf-core/ucsc/bedgraphtobigwig/main.nf | 37 --- .../nf-core/ucsc/bedgraphtobigwig/meta.yml | 44 --- modules/nf-core/ucsc/bedtobigbed/main.nf | 41 --- modules/nf-core/ucsc/bedtobigbed/meta.yml | 48 ---- modules/nf-core/untar/main.nf | 2 +- modules/nf-core/untar/meta.yml | 1 + 82 files changed, 846 insertions(+), 1734 deletions(-) create mode 100644 modules/local/bedtools_bamtobed.nf create mode 100644 modules/local/bedtools_genomecov.nf delete mode 100644 modules/local/clair3.nf rename modules/{nf-core/cutesv/main.nf => local/cutesv.nf} (57%) create mode 100644 modules/local/get_chrom_sizes.nf rename modules/{nf-core/graphmap2/align/main.nf => local/graphmap2_align.nf} (54%) rename modules/{nf-core/graphmap2/index/main.nf => local/graphmap2_index.nf} (52%) create mode 100644 modules/local/gtf2bed.nf create mode 100644 modules/local/medaka_variant.nf create mode 100644 modules/local/minimap2_align.nf create mode 100644 modules/local/minimap2_index.nf rename modules/{nf-core/qcat/main.nf => local/qcat.nf} (54%) create mode 100644 modules/local/samtools_sort_index.nf create mode 100644 modules/local/samtools_view_bam.nf create mode 100644 modules/local/sniffles.nf create mode 100644 modules/local/stringtie2.nf create mode 100644 modules/local/subread_featurecounts.nf create mode 100644 modules/local/ucsc_bed12tobigbed.nf create mode 100644 modules/local/ucsc_bedgraphtobigwig.nf delete mode 100644 modules/nf-core/bedtools/bamtobed/main.nf delete mode 100644 modules/nf-core/bedtools/bamtobed/meta.yml delete mode 100644 modules/nf-core/bedtools/genomecov/main.nf delete mode 100644 modules/nf-core/bedtools/genomecov/meta.yml delete mode 100644 modules/nf-core/custom/getchromsizes/main.nf delete mode 100644 modules/nf-core/cutesv/meta.yml delete mode 100644 modules/nf-core/deepvariant/main.nf delete mode 100644 modules/nf-core/deepvariant/meta.yml delete mode 100644 modules/nf-core/graphmap2/align/meta.yml delete mode 100644 modules/nf-core/graphmap2/index/meta.yml delete mode 100644 modules/nf-core/minimap2/align/main.nf delete mode 100644 modules/nf-core/minimap2/align/meta.yml delete mode 100644 modules/nf-core/minimap2/index/main.nf delete mode 100644 modules/nf-core/minimap2/index/meta.yml delete mode 100644 modules/nf-core/multiqc/meta.yml delete mode 100644 modules/nf-core/qcat/meta.yml create mode 100644 modules/nf-core/samtools/faidx/main.nf rename modules/nf-core/{custom/getchromsizes => samtools/faidx}/meta.yml (65%) delete mode 100644 modules/nf-core/samtools/view/main.nf delete mode 100644 modules/nf-core/samtools/view/meta.yml delete mode 100644 modules/nf-core/sniffles/main.nf delete mode 100644 modules/nf-core/sniffles/meta.yml delete mode 100644 modules/nf-core/stringtie/stringtie/main.nf delete mode 100644 modules/nf-core/stringtie/stringtie/meta.yml delete mode 100644 modules/nf-core/subread/featurecounts/main.nf delete mode 100644 modules/nf-core/subread/featurecounts/meta.yml create mode 100644 modules/nf-core/tabix/bgziptabix/main.nf create mode 100644 modules/nf-core/tabix/bgziptabix/meta.yml delete mode 100644 modules/nf-core/ucsc/bedgraphtobigwig/main.nf delete mode 100755 modules/nf-core/ucsc/bedgraphtobigwig/meta.yml delete mode 100644 modules/nf-core/ucsc/bedtobigbed/main.nf delete mode 100755 modules/nf-core/ucsc/bedtobigbed/meta.yml diff --git a/modules.json b/modules.json index 31c05136..8f442c09 100644 --- a/modules.json +++ b/modules.json @@ -1,171 +1,95 @@ { - "name": "nf-core/nanoseq", - "homePage": "https://github.com/nf-core/nanoseq", - "repos": { - "https://github.com/nf-core/modules.git": { - "modules": { - "nf-core": { - "bcftools/sort": { - "branch": "master", - "git_sha": "4a21e4cca35e72ec059abd67f790e0b192ce5d81", - "installed_by": ["modules"] - }, - "bedtools/bamtobed": { - "branch": "master", - "git_sha": "1d48427957205cb6acf1ffe330bd35b6bb8baa90", - "installed_by": ["modules"] - }, - "bedtools/genomecov": { - "branch": "master", - "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] - }, - "custom/dumpsoftwareversions": { - "branch": "master", - "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", - "installed_by": ["modules"] - }, - "custom/getchromsizes": { - "branch": "master", - "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] - }, - "cutesv": { - "branch": "master", - "git_sha": "37224e9ae3bbfb5e417030cd8bfeb451a1fe989b", - "installed_by": ["modules"] - }, - "deepvariant": { - "branch": "master", - "git_sha": "0f8a77ff00e65eaeebc509b8156eaa983192474b", - "installed_by": ["modules"] - }, - "fastqc": { - "branch": "master", - "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] - }, - "graphmap2/align": { - "branch": "master", - "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] - }, - "graphmap2/index": { - "branch": "master", - "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] - }, - "minimap2/align": { - "branch": "master", - "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] - }, - "minimap2/index": { - "branch": "master", - "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] - }, - "nanolyse": { - "branch": "master", - "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] - }, - "nanoplot": { - "branch": "master", - "git_sha": "3822e04e49b6d89b7092feb3480d744cb5d9986b", - "installed_by": ["modules"] - }, - "qcat": { - "branch": "master", - "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] - }, - "samtools/flagstat": { - "branch": "master", - "git_sha": "0f8a77ff00e65eaeebc509b8156eaa983192474b", - "installed_by": ["bam_stats_samtools"] - }, - "samtools/idxstats": { - "branch": "master", - "git_sha": "0f8a77ff00e65eaeebc509b8156eaa983192474b", - "installed_by": ["bam_stats_samtools"] - }, - "samtools/index": { - "branch": "master", - "git_sha": "0f8a77ff00e65eaeebc509b8156eaa983192474b", - "installed_by": ["modules"] - }, - "samtools/sort": { - "branch": "master", - "git_sha": "0f8a77ff00e65eaeebc509b8156eaa983192474b", - "installed_by": ["modules"] - }, - "samtools/stats": { - "branch": "master", - "git_sha": "0f8a77ff00e65eaeebc509b8156eaa983192474b", - "installed_by": ["bam_stats_samtools"] - }, - "samtools/view": { - "branch": "master", - "git_sha": "0f8a77ff00e65eaeebc509b8156eaa983192474b", - "installed_by": ["modules"] - }, - "sniffles": { - "branch": "master", - "git_sha": "9b8401b7eb47d81f607798481e044262eca1c718", - "installed_by": ["modules"] - }, - "stringtie/merge": { - "branch": "master", - "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] - }, - "stringtie/stringtie": { - "branch": "master", - "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] - }, - "subread/featurecounts": { - "branch": "master", - "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] - }, - "tabix/bgzip": { - "branch": "master", - "git_sha": "90294980a903ecebd99ac31d8b6c66af48fa8259", - "installed_by": ["modules"] - }, - "tabix/tabix": { - "branch": "master", - "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] - }, - "ucsc/bedgraphtobigwig": { - "branch": "master", - "git_sha": "0f8a77ff00e65eaeebc509b8156eaa983192474b", - "installed_by": ["modules"] - }, - "ucsc/bedtobigbed": { - "branch": "master", - "git_sha": "0f8a77ff00e65eaeebc509b8156eaa983192474b", - "installed_by": ["modules"] - }, - "untar": { - "branch": "master", - "git_sha": "cc1f997fab6d8fde5dc0e6e2a310814df5b53ce7", - "installed_by": ["modules"] - } - } - }, - "subworkflows": { - "nf-core": { - "bam_stats_samtools": { - "branch": "master", - "git_sha": "b4b7f89e7fd6d2293f0c176213f710e0bcdaf19e", - "installed_by": ["subworkflows"] - } - } - } + "name": "nf-core/nanoseq", + "homePage": "https://github.com/nf-core/nanoseq", + "repos": { + "https://github.com/nf-core/modules.git": { + "modules": { + "nf-core": { + "bcftools/sort": { + "branch": "master", + "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", + "installed_by": ["modules"] + }, + "custom/dumpsoftwareversions": { + "branch": "master", + "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", + "installed_by": ["modules"] + }, + "fastqc": { + "branch": "master", + "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", + "installed_by": ["modules"] + }, + "nanolyse": { + "branch": "master", + "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", + "installed_by": ["modules"] + }, + "nanoplot": { + "branch": "master", + "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", + "installed_by": ["modules"] + }, + "samtools/faidx": { + "branch": "master", + "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", + "installed_by": ["modules"] + }, + "samtools/flagstat": { + "branch": "master", + "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", + "installed_by": ["modules"] + }, + "samtools/idxstats": { + "branch": "master", + "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", + "installed_by": ["modules"] + }, + "samtools/index": { + "branch": "master", + "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", + "installed_by": ["modules"] + }, + "samtools/sort": { + "branch": "master", + "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", + "installed_by": ["modules"] + }, + "samtools/stats": { + "branch": "master", + "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", + "installed_by": ["modules"] + }, + "stringtie/merge": { + "branch": "master", + "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", + "installed_by": ["modules"] + }, + "tabix/bgzip": { + "branch": "master", + "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", + "installed_by": ["modules"] + }, + "tabix/bgziptabix": { + "branch": "master", + "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", + "installed_by": ["modules"] + }, + "tabix/tabix": { + "branch": "master", + "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", + "installed_by": ["modules"] + }, + "untar": { + "branch": "master", + "git_sha": "5c460c5a4736974abde2843294f35307ee2b0e5e", + "installed_by": ["modules"] + } } + }, + "subworkflows": { + "nf-core": {} + } } + } } diff --git a/modules/local/bam_rename.nf b/modules/local/bam_rename.nf index 65af6d9e..99258144 100644 --- a/modules/local/bam_rename.nf +++ b/modules/local/bam_rename.nf @@ -5,7 +5,7 @@ process BAM_RENAME { conda "conda-forge::sed=4.7" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/sed:4.7.0' : - 'biocontainers/sed:4.7.0' }" + 'quay.io/biocontainers/sed:4.7.0' }" input: tuple val(meta), path(bam) diff --git a/modules/local/bambu.nf b/modules/local/bambu.nf index 90d4de71..777b0e11 100644 --- a/modules/local/bambu.nf +++ b/modules/local/bambu.nf @@ -4,7 +4,7 @@ process BAMBU { conda "conda-forge::r-base=4.0.3 bioconda::bioconductor-bambu=3.0.8 bioconda::bioconductor-bsgenome=1.66.0" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/bioconductor-bambu:3.0.8--r42hc247a5b_0' : - 'biocontainers/bioconductor-bambu:3.0.8--r42hc247a5b_0' }" + 'quay.io/biocontainers/bioconductor-bambu:3.0.8--r42hc247a5b_0' }" input: tuple path(fasta), path(gtf) diff --git a/modules/local/bedtools_bamtobed.nf b/modules/local/bedtools_bamtobed.nf new file mode 100644 index 00000000..4eb3b8e6 --- /dev/null +++ b/modules/local/bedtools_bamtobed.nf @@ -0,0 +1,32 @@ +process BEDTOOLS_BAMBED { + label 'process_medium' + + conda "bioconda::bedtools=2.29.2" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/bedtools:2.29.2--hc088bd4_0' : + 'quay.io/biocontainers/bedtools:2.29.2--hc088bd4_0' }" + + input: + tuple val(meta), path(sizes), val(is_transcripts), path(bam), path(bai) + + output: + tuple val(meta), path(sizes), path("*.bed12"), emit: bed12 + path "versions.yml" , emit: versions + + when: + !params.skip_alignment && !params.skip_bigbed && (params.protocol == 'directRNA' || params.protocol == 'cDNA') + + script: + """ + bedtools \\ + bamtobed \\ + -bed12 \\ + -cigar \\ + -i ${bam[0]} \\ + | bedtools sort > ${meta.id}.bed12 + cat <<-END_VERSIONS > versions.yml + "${task.process}": + bedtools: \$(bedtools --version | sed -e "s/bedtools v//g") + END_VERSIONS + """ +} diff --git a/modules/local/bedtools_genomecov.nf b/modules/local/bedtools_genomecov.nf new file mode 100644 index 00000000..147d1b02 --- /dev/null +++ b/modules/local/bedtools_genomecov.nf @@ -0,0 +1,34 @@ +process BEDTOOLS_GENOMECOV { + tag "$meta.id" + label 'process_medium' + + conda "bioconda::bedtools=2.29.2" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/bedtools:2.29.2--hc088bd4_0' : + 'quay.io/biocontainers/bedtools:2.29.2--hc088bd4_0' }" + + input: + tuple val(meta), path(sizes), val(is_transcripts), path(bam), path(bai) + + output: + tuple val(meta), path(sizes), path("*.bedGraph"), emit: bedgraph + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + split = (params.protocol == 'DNA' || is_transcripts) ? "" : "-split" + """ + bedtools \\ + genomecov \\ + -split \\ + -ibam ${bam[0]} \\ + -bg \\ + | bedtools sort > ${meta.id}.bedGraph + cat <<-END_VERSIONS > versions.yml + "${task.process}": + bedtools: \$(bedtools --version | sed -e "s/bedtools v//g") + END_VERSIONS + """ +} diff --git a/modules/local/clair3.nf b/modules/local/clair3.nf deleted file mode 100644 index 1583e277..00000000 --- a/modules/local/clair3.nf +++ /dev/null @@ -1,39 +0,0 @@ -process CLAIR3 { - tag "$meta.id" - label 'process_high' - - conda 'bioconda::clair3=0.1.10' - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/clair3:0.1.10--hdfd78af_0' : - 'biocontainers/clair3:0.1.10--hdfd78af_0' }" - - input: - tuple val(meta), path(bam), path(bai) - path(fasta) - path(fai) - - output: - tuple val(meta), path("${meta.id}/*") , emit: vcf - path "versions.yml" , emit: versions - - when: - task.ext.when == null || task.ext.when - - script: - def args = task.ext.args ?: '' - """ - /usr/local/bin/run_clair3.sh \ - --bam_fn=$bam \ - --ref_fn=$fasta \ - --threads=$task.cpus \ - --platform=${params.platform} \ - --model_path="/usr/local/bin/models/${params.clair3_model}" \ - --output="${meta.id}" \ - $args - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - clair3: \$( /usr/local/bin/run_clair3.sh --version | sed 's/ /,/' ) - END_VERSIONS - """ -} diff --git a/modules/nf-core/cutesv/main.nf b/modules/local/cutesv.nf similarity index 57% rename from modules/nf-core/cutesv/main.nf rename to modules/local/cutesv.nf index 958fd75b..33cbbf8c 100644 --- a/modules/nf-core/cutesv/main.nf +++ b/modules/local/cutesv.nf @@ -2,36 +2,37 @@ process CUTESV { tag "$meta.id" label 'process_high' - conda "bioconda::cutesv=2.0.2" + conda "bioconda::cutesv=1.0.12" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/cutesv:1.0.12--pyhdfd78af_0' : - 'quay.io/biocontainers/cutesv:2.0.2--pyhdfd78af_0' }" + 'quay.io/biocontainers/cutesv:1.0.12--pyhdfd78af_0' }" input: - tuple val(meta), path(bam), path(bai) - tuple val(meta2), path(fasta) + tuple val(meta), path(sizes), val(is_transcripts), path(input), path(index) + path(fasta) output: - tuple val(meta), path("*.vcf"), emit: vcf + tuple val(meta), path("*_cuteSV.vcf"), emit: sv_calls // vcf files path "versions.yml" , emit: versions when: task.ext.when == null || task.ext.when script: - def args = task.ext.args ?: '' - def prefix = task.ext.prefix ?: "${meta.id}" """ cuteSV \ - ${bam} \\ - ${fasta} \\ - ${prefix}.vcf \\ - . \\ - --threads $task.cpus \\ - $args + ${input} \ + ${fasta} \ + ${meta.id}_cuteSV.vcf \ + . \ + --threads $task.cpus \ + --sample ${meta.id} \ + --genotype + cat <<-END_VERSIONS > versions.yml "${task.process}": cuteSV: \$( cuteSV --version 2>&1 | sed 's/cuteSV //g' ) END_VERSIONS """ } + diff --git a/modules/local/deseq2.nf b/modules/local/deseq2.nf index e2adba0f..3bc9f4b4 100644 --- a/modules/local/deseq2.nf +++ b/modules/local/deseq2.nf @@ -4,7 +4,7 @@ process DESEQ2 { conda "conda-forge::r-base=4.0.3 bioconda::bioconductor-deseq2=1.28.0" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/mulled-v2-8849acf39a43cdd6c839a369a74c0adc823e2f91:ab110436faf952a33575c64dd74615a84011450b-0' : - 'biocontainers/mulled-v2-8849acf39a43cdd6c839a369a74c0adc823e2f91:ab110436faf952a33575c64dd74615a84011450b-0' }" + 'quay.io/biocontainers/mulled-v2-8849acf39a43cdd6c839a369a74c0adc823e2f91:ab110436faf952a33575c64dd74615a84011450b-0' }" input: path counts diff --git a/modules/local/get_chrom_sizes.nf b/modules/local/get_chrom_sizes.nf new file mode 100644 index 00000000..53c8fd94 --- /dev/null +++ b/modules/local/get_chrom_sizes.nf @@ -0,0 +1,30 @@ +process GET_CHROM_SIZES { + tag "$fasta" + label 'process_medium' + + conda "bioconda::samtools=1.10" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/samtools:1.13--h8c37831_0' : + 'quay.io/biocontainers/samtools:1.13--h8c37831_0' }" + + input: + tuple path(fasta), val(name) + + output: + tuple path('*.sizes'), val(name), emit: sizes + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + """ + samtools faidx $fasta + cut -f 1,2 ${fasta}.fai > ${fasta}.sizes + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') + END_VERSIONS + """ +} diff --git a/modules/local/get_jaffal_ref.nf b/modules/local/get_jaffal_ref.nf index cf4815b5..c0b8985b 100644 --- a/modules/local/get_jaffal_ref.nf +++ b/modules/local/get_jaffal_ref.nf @@ -3,8 +3,8 @@ process GET_JAFFAL_REF { conda "conda-forge::sed=4.7" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://containers.biocontainers.pro/s3/SingImgsRepo/biocontainers/v1.2.0_cv1/biocontainers_v1.2.0_cv1.img' : - 'biocontainers/biocontainers:v1.2.0_cv1' }" + 'https://depot.galaxyproject.org/singularity/ubuntu:20.04' : + 'ubuntu:20.04' }" output: tuple val(null), path("for_jaffal.tar.gz"), emit: ch_jaffal_ref diff --git a/modules/local/get_nanolyse_fasta.nf b/modules/local/get_nanolyse_fasta.nf index d3f236c2..736ac64d 100644 --- a/modules/local/get_nanolyse_fasta.nf +++ b/modules/local/get_nanolyse_fasta.nf @@ -4,7 +4,7 @@ process GET_NANOLYSE_FASTA { conda "conda-forge::sed=4.7" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://containers.biocontainers.pro/s3/SingImgsRepo/biocontainers/v1.2.0_cv1/biocontainers_v1.2.0_cv1.img' : - 'docker.io/biocontainers/biocontainers:v1.2.0_cv1' }" + 'biocontainers/biocontainers:v1.2.0_cv1' }" output: path "*fasta.gz" , emit: ch_nanolyse_fasta diff --git a/modules/nf-core/graphmap2/align/main.nf b/modules/local/graphmap2_align.nf similarity index 54% rename from modules/nf-core/graphmap2/align/main.nf rename to modules/local/graphmap2_align.nf index becb65bf..41641320 100644 --- a/modules/nf-core/graphmap2/align/main.nf +++ b/modules/local/graphmap2_align.nf @@ -1,7 +1,6 @@ process GRAPHMAP2_ALIGN { tag "$meta.id" - label 'process_medium' - tag "$meta.id" + label 'process_high' conda "bioconda::graphmap=0.6.3" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? @@ -9,29 +8,29 @@ process GRAPHMAP2_ALIGN { 'quay.io/biocontainers/graphmap:0.6.3--he513fc3_0' }" input: - tuple val(meta), path(reads) - path fasta - path index + tuple val(meta), path(fastq), path(fasta), path(sizes), val(gtf), val(bed), val(is_transcripts), path(index) output: - tuple val(meta), path("*.sam"), emit: sam - path "versions.yml" , emit: versions + tuple val(meta), path(sizes), val(is_transcripts), path("*.sam"), emit: align_sam + path "versions.yml" , emit: versions when: task.ext.when == null || task.ext.when script: - def args = task.ext.args ?: '' - def prefix = task.ext.prefix ?: "${meta.id}" + def preset = (params.protocol == 'DNA' || is_transcripts) ? "" : "-x rnaseq" + def junctions = (params.protocol != 'DNA' && !is_transcripts && gtf) ? "--gtf $gtf" : "" """ graphmap2 \\ align \\ + $preset \\ + $junctions \\ -t $task.cpus \\ -r $fasta \\ -i $index \\ - -d $reads \\ - -o ${prefix}.sam \\ - $args + -d $fastq \\ + -o ${meta.id}.sam \\ + --extcigar cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/nf-core/graphmap2/index/main.nf b/modules/local/graphmap2_index.nf similarity index 52% rename from modules/nf-core/graphmap2/index/main.nf rename to modules/local/graphmap2_index.nf index f641d68e..b0971e1b 100644 --- a/modules/nf-core/graphmap2/index/main.nf +++ b/modules/local/graphmap2_index.nf @@ -1,5 +1,6 @@ process GRAPHMAP2_INDEX { - label 'process_medium' + tag "$fasta" + label 'process_high' conda "bioconda::graphmap=0.6.3" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? @@ -7,23 +8,25 @@ process GRAPHMAP2_INDEX { 'quay.io/biocontainers/graphmap:0.6.3--he513fc3_0' }" input: - path fasta + tuple path(fasta), path(sizes), val(gtf), val(bed), val(is_transcripts), val(annotation_str) output: - path "*.gmidx" , emit: index - path "versions.yml" , emit: versions + tuple path(fasta), path(sizes), path(gtf), val(bed), val(is_transcripts), path("*.gmidx"), val(annotation_str), emit: index + path "versions.yml" , emit: versions when: task.ext.when == null || task.ext.when script: - def args = task.ext.args ?: '' + def preset = (params.protocol == 'DNA' || is_transcripts) ? "" : "-x rnaseq" + def junctions = (params.protocol != 'DNA' && !is_transcripts && gtf) ? "--gtf $gtf" : "" """ graphmap2 \\ align \\ + $preset \\ + $junctions \\ -t $task.cpus \\ -I \\ - $args \\ -r $fasta cat <<-END_VERSIONS > versions.yml diff --git a/modules/local/gtf2bed.nf b/modules/local/gtf2bed.nf new file mode 100644 index 00000000..6ae37e61 --- /dev/null +++ b/modules/local/gtf2bed.nf @@ -0,0 +1,28 @@ +process GTF2BED { + label 'process_low' + + conda "conda-forge::perl=5.26.2" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/perl:5.26.2' : + 'quay.io/biocontainers/perl:5.26.2' }" + + input: + tuple path(gtf), val(name) + + output: + tuple path('*.bed'), val(name), emit: gtf_bed + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + """ + gtf2bed $gtf > ${gtf.baseName}.bed + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + perl: \$(echo \$(perl --version 2>&1) | sed 's/.*v\\(.*\\)) built.*/\\1/') + END_VERSIONS + """ +} diff --git a/modules/local/jaffal.nf b/modules/local/jaffal.nf index ea430265..a0668bcb 100644 --- a/modules/local/jaffal.nf +++ b/modules/local/jaffal.nf @@ -4,8 +4,8 @@ process JAFFAL { conda "bioconda::jaffa=2.3.0" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/jaffa:2.00--hdfd78af_1' : - 'docker.io/yuukiiwa/jaffa:2.0' }" + 'https://depot.galaxyproject.org/singularity/jaffa:2.3--hdfd78af_0' : + 'quay.io/biocontainers/jaffa:2.3--hdfd78af_0' }" input: tuple val(meta), path(fastq) diff --git a/modules/local/m6anet_dataprep.nf b/modules/local/m6anet_dataprep.nf index 6fcaa6e9..2f2dda5c 100644 --- a/modules/local/m6anet_dataprep.nf +++ b/modules/local/m6anet_dataprep.nf @@ -3,9 +3,7 @@ process M6ANET_DATAPREP { label 'process_medium' // conda (params.enable_conda ? "bioconda::nanopolish==0.13.2" : null) // need to get xpore onto conda - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/m6anet:2.0.2--pyhdfd78af_0' : - 'biocontainers/m6anet:2.0.2--pyhdfd78af_0' }" + container "docker.io/yuukiiwa/m6anet:1.0" input: tuple val(meta), path(genome), path(gtf), path(eventalign), path(nanopolish_summary) @@ -19,14 +17,14 @@ process M6ANET_DATAPREP { script: """ - m6anet dataprep \\ + m6anet-dataprep \\ --eventalign $eventalign \\ --out_dir $meta.id \\ --n_processes $task.cpus cat <<-END_VERSIONS > versions.yml "${task.process}": - m6anet: \$( echo 'm6anet 2.0.2' ) + m6anet: \$( echo 'm6anet 1.0' ) END_VERSIONS """ } diff --git a/modules/local/m6anet_inference.nf b/modules/local/m6anet_inference.nf index 6fc8381b..b8f13060 100644 --- a/modules/local/m6anet_inference.nf +++ b/modules/local/m6anet_inference.nf @@ -4,9 +4,7 @@ process M6ANET_INFERENCE { label 'process_medium' // conda (params.enable_conda ? "bioconda::nanopolish==0.13.2" : null) // need to get xpore onto conda - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/m6anet:2.0.2--pyhdfd78af_0' : - 'biocontainers/m6anet:2.0.2--pyhdfd78af_0' }" + container "docker.io/yuukiiwa/m6anet:1.0" input: tuple val(meta), path(input_dir) @@ -21,11 +19,11 @@ process M6ANET_INFERENCE { script: def out_dir = meta.id+"_results" """ - m6anet inference --input_dir $input_dir --out_dir $out_dir --batch_size 512 --n_processes $task.cpus --num_iterations 5 --device cpu + m6anet-run_inference --input_dir $input_dir --out_dir $out_dir --batch_size 512 --n_processes $task.cpus --num_iterations 5 --device cpu cat <<-END_VERSIONS > versions.yml "${task.process}": - m6anet: \$( echo 'm6anet 2.0.2' ) + m6anet: \$( echo 'm6anet 1.0' ) END_VERSIONS """ } diff --git a/modules/local/medaka_variant.nf b/modules/local/medaka_variant.nf new file mode 100644 index 00000000..0b2f9f59 --- /dev/null +++ b/modules/local/medaka_variant.nf @@ -0,0 +1,43 @@ +process MEDAKA_VARIANT { + tag "$meta.id" + label 'process_high' + + conda "bioconda::medaka=1.4.4" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/medaka:1.4.4--py38h130def0_0' : + 'quay.io/biocontainers/medaka:1.4.4--py38h130def0_0' }" + + input: + tuple val(meta), path(sizes), val(is_transcripts), path(input), path(index) + path(fasta) + + output: + tuple val(meta), path ("$output_vcf"), emit: vcf // vcf files + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def split_mnps = params.split_mnps ? "-l" : '' + def phase_vcf = params.phase_vcf ? "-p" : '' + + output_dir = "${meta.id}" + output_vcf = output_dir+"/round_1.vcf" + """ + + medaka_variant \\ + -d \\ + -f $fasta \\ + -i $input \\ + -o $output_dir \\ + -t $task.cpus \\ + $split_mnps \\ + $phase_vcf + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + medaka: \$( medaka --version 2>&1 | sed 's/medaka //g' ) + END_VERSIONS + """ +} diff --git a/modules/local/minimap2_align.nf b/modules/local/minimap2_align.nf new file mode 100644 index 00000000..96790e5d --- /dev/null +++ b/modules/local/minimap2_align.nf @@ -0,0 +1,42 @@ +process MINIMAP2_ALIGN { + tag "$meta.id" + label 'process_medium' + + conda "bioconda::minimap2=2.17" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/minimap2:2.17--hed695b0_3' : + 'quay.io/biocontainers/minimap2:2.17--hed695b0_3' }" + + input: + tuple val(meta), path(fastq), path(fasta), path(sizes), val(gtf), val(bed), val(is_transcripts), path(index) + + output: + tuple val(meta), path(sizes), val(is_transcripts), path("*.sam"), emit: align_sam + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def preset = (params.protocol == 'DNA' || is_transcripts) ? "-ax map-ont" : "-ax splice" + def kmer = (params.protocol == 'directRNA') ? "-k14" : "" + def stranded = (params.stranded || params.protocol == 'directRNA') ? "-uf" : "" + def junctions = (params.protocol != 'DNA' && bed) ? "--junc-bed ${file(bed)}" : "" + def md = (params.call_variants && params.protocol == 'DNA') ? "--MD" : "" + """ + minimap2 \\ + $preset \\ + $kmer \\ + $stranded \\ + $junctions \\ + $md \\ + -t $task.cpus \\ + $index \\ + $fastq > ${meta.id}.sam + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + minimap2: \$(minimap2 --version 2>&1) + END_VERSIONS + """ +} diff --git a/modules/local/minimap2_index.nf b/modules/local/minimap2_index.nf new file mode 100644 index 00000000..31b1877c --- /dev/null +++ b/modules/local/minimap2_index.nf @@ -0,0 +1,40 @@ +process MINIMAP2_INDEX { + tag "$fasta" + label 'process_high' + + conda "bioconda::minimap2=2.17" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/minimap2:2.17--hed695b0_3' : + 'quay.io/biocontainers/minimap2:2.17--hed695b0_3' }" + + input: + tuple path(fasta), path(sizes), val(gtf), val(bed), val(is_transcripts), val(annotation_str) + + output: + tuple path(fasta), path(sizes), val(gtf), val(bed), val(is_transcripts), path("*.mmi"), val(annotation_str), emit: index + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def preset = (params.protocol == 'DNA' || is_transcripts) ? "-ax map-ont" : "-ax splice" + def kmer = (params.protocol == 'directRNA') ? "-k14" : "" + def stranded = (params.stranded || params.protocol == 'directRNA') ? "-uf" : "" + def junctions = (params.protocol != 'DNA' && bed) ? "--junc-bed ${file(bed)}" : "" + """ + minimap2 \\ + $preset \\ + $kmer \\ + $stranded \\ + $junctions \\ + -t $task.cpus \\ + -d ${fasta}.mmi \\ + $fasta + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + minimap2: \$(minimap2 --version 2>&1) + END_VERSIONS + """ +} diff --git a/modules/local/multiqc.nf b/modules/local/multiqc.nf index d90ba2d1..c5ccad28 100644 --- a/modules/local/multiqc.nf +++ b/modules/local/multiqc.nf @@ -1,10 +1,10 @@ process MULTIQC { label 'process_medium' - conda "bioconda::multiqc=1.14" + conda "bioconda::multiqc=1.11" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/multiqc:1.14--pyhdfd78af_0' : - 'biocontainers/multiqc:1.14--pyhdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/multiqc:1.11--pyhdfd78af_0' : + 'quay.io/biocontainers/multiqc:1.11--pyhdfd78af_0' }" input: path ch_multiqc_config diff --git a/modules/local/nanopolish_index_eventalign.nf b/modules/local/nanopolish_index_eventalign.nf index d6e2791c..d5290c03 100644 --- a/modules/local/nanopolish_index_eventalign.nf +++ b/modules/local/nanopolish_index_eventalign.nf @@ -5,10 +5,10 @@ process NANOPOLISH_INDEX_EVENTALIGN { conda "bioconda::nanopolish==0.13.2" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/nanopolish:0.13.2--he3b7ca5_2' : - 'biocontainers/nanopolish:0.13.2--he3b7ca5_2' }" + 'quay.io/biocontainers/nanopolish:0.13.2--he3b7ca5_2' }" input: - tuple val(meta), path(genome), path(gtf), path(fastq), path(bam), path(bai) + tuple val(meta), path(genome), path(gtf), path(fast5), path(fastq), path(bam), path(bai) output: tuple val(meta), path(genome), path(gtf), path("*eventalign.txt"), path("*summary.txt"), emit: nanopolish_outputs @@ -21,7 +21,7 @@ process NANOPOLISH_INDEX_EVENTALIGN { sample_summary = "$meta.id" +"_summary.txt" sample_eventalign = "$meta.id" +"_eventalign.txt" """ - nanopolish index -d $meta.nanopolish_fast5 $fastq + nanopolish index -d $fast5 $fastq nanopolish eventalign --reads $fastq --bam $bam --genome $genome --scale-events --signal-index --summary $sample_summary --threads $task.cpus > $sample_eventalign cat <<-END_VERSIONS > versions.yml diff --git a/modules/local/pepper_margin_deepvariant.nf b/modules/local/pepper_margin_deepvariant.nf index 6b44d93c..11190c1f 100644 --- a/modules/local/pepper_margin_deepvariant.nf +++ b/modules/local/pepper_margin_deepvariant.nf @@ -9,7 +9,7 @@ process PEPPER_MARGIN_DEEPVARIANT { } input: - tuple val(meta), path(input), path(index), val(intervals) + tuple val(meta), path(sizes), val(is_transcripts), path(input), path(index) path(fasta) path(fai) diff --git a/modules/nf-core/qcat/main.nf b/modules/local/qcat.nf similarity index 54% rename from modules/nf-core/qcat/main.nf rename to modules/local/qcat.nf index 77d98e3d..d26e7136 100644 --- a/modules/nf-core/qcat/main.nf +++ b/modules/local/qcat.nf @@ -1,5 +1,5 @@ process QCAT { - tag "$meta.id" + tag "$input_path" label 'process_medium' conda "bioconda::qcat=1.1.0" @@ -8,35 +8,34 @@ process QCAT { 'quay.io/biocontainers/qcat:1.1.0--py_0' }" input: - tuple val(meta), path(reads) - val barcode_kit + path input_path output: - tuple val(meta), path("fastq/*.fastq.gz"), emit: reads - path "versions.yml" , emit: versions + path "fastq/*.fastq.gz", emit: fastq + path "versions.yml" , emit: versions when: task.ext.when == null || task.ext.when script: - def args = task.ext.args ?: '' - def prefix = task.ext.prefix ?: "${meta.id}" + def detect_middle = params.qcat_detect_middle ? "--detect-middle $params.qcat_detect_middle" : "" """ ## Unzip fastq file - ## qcat doesn't support zipped files yet - FILE=$reads + ## qcat doesnt support zipped files yet + FILE=$input_path if [[ \$FILE == *.gz ]] then - zcat $reads > unzipped.fastq - FILE=unzipped.fastq + zcat $input_path > unzipped.fastq + FILE=unzipped.fastq fi - - qcat \\ - -f \$FILE \\ - -b ./fastq \\ - --kit $barcode_kit - - ## Zip fastq files + qcat \\ + -f \$FILE \\ + -b ./fastq \\ + --kit $params.barcode_kit \\ + --min-score $params.qcat_min_score \\ + $detect_middle + + ## Zip fastq files (cannot find pigz command) gzip fastq/* cat <<-END_VERSIONS > versions.yml diff --git a/modules/local/samplesheet_check.nf b/modules/local/samplesheet_check.nf index 75989067..4eac940f 100644 --- a/modules/local/samplesheet_check.nf +++ b/modules/local/samplesheet_check.nf @@ -5,7 +5,7 @@ process SAMPLESHEET_CHECK { conda "conda-forge::python=3.8.3" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/python:3.8.3' : - 'biocontainers/python:3.8.3' }" + 'quay.io/biocontainers/python:3.8.3' }" input: path samplesheet diff --git a/modules/local/samtools_sort_index.nf b/modules/local/samtools_sort_index.nf new file mode 100644 index 00000000..a542ded8 --- /dev/null +++ b/modules/local/samtools_sort_index.nf @@ -0,0 +1,32 @@ +process SAMTOOLS_SORT_INDEX { + tag "$meta.id" + label 'process_low' + + conda "bioconda::samtools=1.14" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/samtools:1.15.1--h1170115_0' : + 'quay.io/biocontainers/samtools:1.15.1--h1170115_0' }" + + input: + tuple val(meta), path(bam) + + output: + tuple val(meta), path("*sorted.bam"), path("*.bai"), optional:true, emit: bam_bai + tuple val(meta), path("*sorted.bam"), path("*.csi"), optional:true, emit: bam_csi + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + """ + samtools sort -@ $task.cpus -o ${meta.id}.sorted.bam -T $meta.id $bam + + samtools index ${meta.id}.sorted.bam + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') + END_VERSIONS + """ +} diff --git a/modules/local/samtools_view_bam.nf b/modules/local/samtools_view_bam.nf new file mode 100644 index 00000000..4a5eb46e --- /dev/null +++ b/modules/local/samtools_view_bam.nf @@ -0,0 +1,29 @@ +process SAMTOOLS_VIEW_BAM { + tag "$meta.id" + label 'process_medium' + + conda "bioconda::samtools=1.10" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/samtools:1.15.1--h1170115_0' : + 'quay.io/biocontainers/samtools:1.15.1--h1170115_0' }" + + input: + tuple val(meta), path(sizes), val(is_transcripts), path(sam) + + output: + tuple val(meta), path("*.bam"), emit: bam + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + """ + samtools view -b -h -O BAM -@ $task.cpus -o ${meta.id}.bam $sam + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') + END_VERSIONS + """ +} diff --git a/modules/local/sniffles.nf b/modules/local/sniffles.nf new file mode 100644 index 00000000..1336392a --- /dev/null +++ b/modules/local/sniffles.nf @@ -0,0 +1,34 @@ +process SNIFFLES { + tag "$meta.id" + label 'process_high' + + conda "bioconda::sniffles=1.0.12" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/sniffles:1.0.12--h8b12597_1' : + 'quay.io/biocontainers/sniffles:1.0.12--h8b12597_1' }" + + input: + tuple val(meta), path(sizes), val(is_transcripts), path(input), path(index) + + + output: + tuple val(meta), path("*_sniffles.vcf"), emit: sv_calls + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + """ + sniffles \ + -m $input \ + -v ${meta.id}_sniffles.vcf \ + -t $task.cpus + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + sniffles: \$(sniffles --help 2>&1 | grep Version |sed 's/^.*Version: //') + END_VERSIONS + """ +} + diff --git a/modules/local/stringtie2.nf b/modules/local/stringtie2.nf new file mode 100644 index 00000000..a64a7e82 --- /dev/null +++ b/modules/local/stringtie2.nf @@ -0,0 +1,33 @@ +process STRINGTIE2 { + tag "$meta.id" + label 'process_medium' + + // Note: 2.7X indices incompatible with AWS iGenomes. + conda "bioconda::stringtie=2.1.4" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/stringtie:2.1.4--h7e0af3c_0' : + 'quay.io/biocontainers/stringtie:2.1.4--h7e0af3c_0' }" + + input: + tuple val(meta), path(fasta), path(gtf), path(bam) + + output: + path "*.stringtie.gtf", emit: stringtie_gtf + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + """ + stringtie \\ + -L \\ + -G $gtf \\ + -o ${meta.id}.stringtie.gtf $bam + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + stringtie2: \$(stringtie --version 2>&1) + END_VERSIONS + """ +} diff --git a/modules/local/subread_featurecounts.nf b/modules/local/subread_featurecounts.nf new file mode 100644 index 00000000..5da69be6 --- /dev/null +++ b/modules/local/subread_featurecounts.nf @@ -0,0 +1,57 @@ +process SUBREAD_FEATURECOUNTS { + label 'process_medium' + + // Note: 2.7X indices incompatible with AWS iGenomes. + conda "bioconda::subread=2.0.1" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/subread:2.0.1--hed695b0_0' : + 'quay.io/biocontainers/subread:2.0.1--hed695b0_0' }" + + input: + path gtf + path bams + + output: + path "counts_gene.txt" , emit: gene_counts + path "counts_transcript.txt" , emit: transcript_counts + path "counts_gene.txt.summary" , emit: featurecounts_gene_multiqc + path "counts_transcript.txt.summary", emit: featurecounts_transcript_multiqc + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + """ + featureCounts \\ + -L \\ + -O \\ + -f \\ + -g gene_id \\ + -t exon \\ + -T $task.cpus \\ + -a $gtf \\ + -o counts_gene.txt \\ + $bams + + featureCounts \\ + -L \\ + -O \\ + -f \\ + --primary \\ + --fraction \\ + -F GTF \\ + -g transcript_id \\ + -t transcript \\ + --extraAttributes gene_id \\ + -T $task.cpus \\ + -a $gtf \\ + -o counts_transcript.txt \\ + $bams + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + featureCounts: \$( echo \$(featureCounts -v 2>&1) | sed -e "s/featureCounts v//g") + END_VERSIONS + """ +} diff --git a/modules/local/ucsc_bed12tobigbed.nf b/modules/local/ucsc_bed12tobigbed.nf new file mode 100644 index 00000000..296ceb19 --- /dev/null +++ b/modules/local/ucsc_bed12tobigbed.nf @@ -0,0 +1,33 @@ +process UCSC_BED12TOBIGBED { + tag "$meta.id" + label 'process_medium' + + conda "bioconda::ucsc-bedtobigbed=377" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/ucsc-bedtobigbed:377--h446ed27_1' : + 'quay.io/biocontainers/ucsc-bedtobigbed:377--h446ed27_1' }" + + input: + tuple val(meta), path(sizes), path(bed12) + + output: + tuple val(meta), path(sizes), path("*.bigBed"), emit: bigbed + path "versions.yml" , emit: versions + + when: + !params.skip_alignment && !params.skip_bigbed && (params.protocol == 'directRNA' || params.protocol == 'cDNA') + + script: + def VERSION = '377' + """ + bedToBigBed \\ + $bed12 \\ + $sizes \\ + ${meta.id}.bigBed + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + ucsc_bed12tobigbed: \$(echo $VERSION) + END_VERSIONS + """ +} diff --git a/modules/local/ucsc_bedgraphtobigwig.nf b/modules/local/ucsc_bedgraphtobigwig.nf new file mode 100644 index 00000000..d3b8d1c7 --- /dev/null +++ b/modules/local/ucsc_bedgraphtobigwig.nf @@ -0,0 +1,30 @@ +process UCSC_BEDGRAPHTOBIGWIG { + tag "$meta.id" + label 'process_medium' + + conda "bioconda::ucsc-bedgraphtobigwig=377" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/ucsc-bedgraphtobigwig:377--h446ed27_1' : + 'quay.io/biocontainers/ucsc-bedgraphtobigwig:377--h446ed27_1' }" + + input: + tuple val(meta), path(sizes), path(bedgraph) + + output: + tuple val(meta), path(sizes), path("*.bigWig"), emit: bigwig + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def VERSION = '377' + """ + bedGraphToBigWig $bedgraph $sizes ${meta.id}.bigWig + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + ucsc_bedgraphtobigwig: \$(echo $VERSION) + END_VERSIONS + """ +} diff --git a/modules/local/xpore_dataprep.nf b/modules/local/xpore_dataprep.nf index d8509d66..9c9f4747 100644 --- a/modules/local/xpore_dataprep.nf +++ b/modules/local/xpore_dataprep.nf @@ -5,7 +5,7 @@ process XPORE_DATAPREP { conda "bioconda::xpore=2.1.0" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/xpore:2.1--pyh5e36f6f_0' : - 'biocontainers/xpore:2.1--pyh5e36f6f_0' }" + 'quay.io/biocontainers/xpore:2.1--pyh5e36f6f_0' }" input: tuple val(meta), path(genome), path(gtf), path(eventalign), path(nanopolish_summary) diff --git a/modules/local/xpore_diffmod.nf b/modules/local/xpore_diffmod.nf index 333707ee..2bd6edc2 100644 --- a/modules/local/xpore_diffmod.nf +++ b/modules/local/xpore_diffmod.nf @@ -4,7 +4,7 @@ process XPORE_DIFFMOD { conda "bioconda::xpore=2.1.0" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/xpore:2.1--pyh5e36f6f_0' : - 'biocontainers/xpore:2.1--pyh5e36f6f_0' }" + 'quay.io/biocontainers/xpore:2.1--pyh5e36f6f_0' }" input: val dataprep_dirs diff --git a/modules/nf-core/bcftools/sort/main.nf b/modules/nf-core/bcftools/sort/main.nf index 9ae3253b..ef41fd25 100644 --- a/modules/nf-core/bcftools/sort/main.nf +++ b/modules/nf-core/bcftools/sort/main.nf @@ -2,10 +2,10 @@ process BCFTOOLS_SORT { tag "$meta.id" label 'process_medium' - conda "bioconda::bcftools=1.16" + conda "bioconda::bcftools=1.17" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/bcftools:1.16--hfe4b78e_1': - 'quay.io/biocontainers/bcftools:1.16--hfe4b78e_1' }" + 'https://depot.galaxyproject.org/singularity/bcftools:1.17--haef29d1_0': + 'biocontainers/bcftools:1.17--haef29d1_0' }" input: tuple val(meta), path(vcf) diff --git a/modules/nf-core/bedtools/bamtobed/main.nf b/modules/nf-core/bedtools/bamtobed/main.nf deleted file mode 100644 index e9673571..00000000 --- a/modules/nf-core/bedtools/bamtobed/main.nf +++ /dev/null @@ -1,35 +0,0 @@ -process BEDTOOLS_BAMTOBED { - tag "$meta.id" - label 'process_medium' - - conda "bioconda::bedtools=2.30.0" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/bedtools:2.30.0--hc088bd4_0' : - 'quay.io/biocontainers/bedtools:2.30.0--hc088bd4_0' }" - - input: - tuple val(meta), path(bam) - - output: - tuple val(meta), path("*.bed"), emit: bed - path "versions.yml" , emit: versions - - when: - task.ext.when == null || task.ext.when - - script: - def args = task.ext.args ?: '' - def prefix = task.ext.prefix ?: "${meta.id}" - """ - bedtools \\ - bamtobed \\ - $args \\ - -i $bam \\ - > ${prefix}.bed - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - bedtools: \$(bedtools --version | sed -e "s/bedtools v//g") - END_VERSIONS - """ -} diff --git a/modules/nf-core/bedtools/bamtobed/meta.yml b/modules/nf-core/bedtools/bamtobed/meta.yml deleted file mode 100644 index 5a4ff73a..00000000 --- a/modules/nf-core/bedtools/bamtobed/meta.yml +++ /dev/null @@ -1,38 +0,0 @@ -name: bedtools_bamtobed -description: Converts a bam file to a bed12 file. -keywords: - - bam - - bed -tools: - - bedtools: - description: | - A set of tools for genomic analysis tasks, specifically enabling genome arithmetic (merge, count, complement) on various file types. - documentation: https://bedtools.readthedocs.io/en/latest/content/tools/complement.html - licence: ["MIT"] -input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - bam: - type: file - description: Input BAM file - pattern: "*.{bam}" -output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - bed: - type: file - description: Bed file containing genomic intervals. - pattern: "*.{bed}" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" -authors: - - "@yuukiiwa" - - "@drpatelh" diff --git a/modules/nf-core/bedtools/genomecov/main.nf b/modules/nf-core/bedtools/genomecov/main.nf deleted file mode 100644 index 17e38a8b..00000000 --- a/modules/nf-core/bedtools/genomecov/main.nf +++ /dev/null @@ -1,59 +0,0 @@ -process BEDTOOLS_GENOMECOV { - tag "$meta.id" - label 'process_single' - - conda "bioconda::bedtools=2.30.0" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/bedtools:2.30.0--hc088bd4_0' : - 'quay.io/biocontainers/bedtools:2.30.0--hc088bd4_0' }" - - input: - tuple val(meta), path(intervals), val(scale) - path sizes - val extension - - output: - tuple val(meta), path("*.${extension}"), emit: genomecov - path "versions.yml" , emit: versions - - when: - task.ext.when == null || task.ext.when - - script: - def args = task.ext.args ?: '' - def args_list = args.tokenize() - args += (scale > 0 && scale != 1) ? " -scale $scale" : "" - if (!args_list.contains('-bg') && (scale > 0 && scale != 1)) { - args += " -bg" - } - - def prefix = task.ext.prefix ?: "${meta.id}" - if (intervals.name =~ /\.bam/) { - """ - bedtools \\ - genomecov \\ - -ibam $intervals \\ - $args \\ - > ${prefix}.${extension} - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - bedtools: \$(bedtools --version | sed -e "s/bedtools v//g") - END_VERSIONS - """ - } else { - """ - bedtools \\ - genomecov \\ - -i $intervals \\ - -g $sizes \\ - $args \\ - > ${prefix}.${extension} - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - bedtools: \$(bedtools --version | sed -e "s/bedtools v//g") - END_VERSIONS - """ - } -} diff --git a/modules/nf-core/bedtools/genomecov/meta.yml b/modules/nf-core/bedtools/genomecov/meta.yml deleted file mode 100644 index 83bfab98..00000000 --- a/modules/nf-core/bedtools/genomecov/meta.yml +++ /dev/null @@ -1,51 +0,0 @@ -name: bedtools_genomecov -description: Computes histograms (default), per-base reports (-d) and BEDGRAPH (-bg) summaries of feature coverage (e.g., aligned sequences) for a given genome. -keywords: - - bed - - bam - - genomecov -tools: - - bedtools: - description: | - A set of tools for genomic analysis tasks, specifically enabling genome arithmetic (merge, count, complement) on various file types. - documentation: https://bedtools.readthedocs.io/en/latest/content/tools/genomecov.html - licence: ["MIT"] -input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - intervals: - type: file - description: BAM/BED/GFF/VCF - pattern: "*.{bam|bed|gff|vcf}" - - scale: - type: value - description: Number containing the scale factor for the output. Set to 1 to disable. Setting to a value other than 1 will also get the -bg bedgraph output format as this is required for this command switch - - sizes: - type: file - description: Tab-delimited table of chromosome names in the first column and chromosome sizes in the second column - - extension: - type: string - description: Extension of the output file (e. g., ".bg", ".bedgraph", ".txt", ".tab", etc.) It is set arbitrarily by the user and corresponds to the file format which depends on arguments. -output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - genomecov: - type: file - description: Computed genome coverage file - pattern: "*.${extension}" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" -authors: - - "@Emiller88" - - "@sruthipsuresh" - - "@drpatelh" - - "@sidorov-si" - - "@chris-cheshire" diff --git a/modules/nf-core/custom/dumpsoftwareversions/main.nf b/modules/nf-core/custom/dumpsoftwareversions/main.nf index ebc87273..3df21765 100644 --- a/modules/nf-core/custom/dumpsoftwareversions/main.nf +++ b/modules/nf-core/custom/dumpsoftwareversions/main.nf @@ -2,10 +2,10 @@ process CUSTOM_DUMPSOFTWAREVERSIONS { label 'process_single' // Requires `pyyaml` which does not have a dedicated container but is in the MultiQC container - conda "bioconda::multiqc=1.14" + conda "bioconda::multiqc=1.13" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/multiqc:1.14--pyhdfd78af_0' : - 'biocontainers/multiqc:1.14--pyhdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/multiqc:1.13--pyhdfd78af_0' : + 'quay.io/biocontainers/multiqc:1.13--pyhdfd78af_0' }" input: path versions diff --git a/modules/nf-core/custom/dumpsoftwareversions/meta.yml b/modules/nf-core/custom/dumpsoftwareversions/meta.yml index c32657de..60b546a0 100644 --- a/modules/nf-core/custom/dumpsoftwareversions/meta.yml +++ b/modules/nf-core/custom/dumpsoftwareversions/meta.yml @@ -1,9 +1,7 @@ -# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/yaml-schema.json name: custom_dumpsoftwareversions description: Custom module used to dump software versions within the nf-core pipeline template keywords: - custom - - dump - version tools: - custom: diff --git a/modules/nf-core/custom/getchromsizes/main.nf b/modules/nf-core/custom/getchromsizes/main.nf deleted file mode 100644 index 580f87fe..00000000 --- a/modules/nf-core/custom/getchromsizes/main.nf +++ /dev/null @@ -1,44 +0,0 @@ -process CUSTOM_GETCHROMSIZES { - tag "$fasta" - label 'process_single' - - conda "bioconda::samtools=1.16.1" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/samtools:1.16.1--h6899075_1' : - 'quay.io/biocontainers/samtools:1.16.1--h6899075_1' }" - - input: - tuple val(meta), path(fasta) - - output: - tuple val(meta), path ("*.sizes"), emit: sizes - tuple val(meta), path ("*.fai") , emit: fai - tuple val(meta), path ("*.gzi") , emit: gzi, optional: true - path "versions.yml" , emit: versions - - when: - task.ext.when == null || task.ext.when - - script: - def args = task.ext.args ?: '' - """ - samtools faidx $fasta - cut -f 1,2 ${fasta}.fai > ${fasta}.sizes - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - getchromsizes: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') - END_VERSIONS - """ - - stub: - """ - touch ${fasta}.fai - touch ${fasta}.sizes - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - getchromsizes: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') - END_VERSIONS - """ -} diff --git a/modules/nf-core/cutesv/meta.yml b/modules/nf-core/cutesv/meta.yml deleted file mode 100644 index 10f3edb6..00000000 --- a/modules/nf-core/cutesv/meta.yml +++ /dev/null @@ -1,55 +0,0 @@ -name: cutesv -description: structural-variant calling with cutesv -keywords: - - cutesv - - structural-variant calling -tools: - - cutesv: - description: a clustering-and-refinement method to analyze the signatures to implement sensitive SV detection. - homepage: https://github.com/tjiangHIT/cuteSV - documentation: https://github.com/tjiangHIT/cuteSV#readme - tool_dev_url: https://github.com/tjiangHIT/cuteSV - licence: ["MIT"] - -input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test' ] - - bam: - type: file - description: BAM file - pattern: "*.bam" - - bai: - type: file - description: Index of BAM file - pattern: "*.bai" - - meta2: - type: map - description: | - Groovy Map containing reference information - e.g. [ id:'fasta' ] - - fasta: - type: file - description: | - Reference database in FASTA format - -output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test' ] - - vcf: - type: file - description: VCF file containing called variants from CuteSV - pattern: "*.vcf" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" - -authors: - - "@christopher-hakkaart" - - "@yuukiiwa" diff --git a/modules/nf-core/deepvariant/main.nf b/modules/nf-core/deepvariant/main.nf deleted file mode 100644 index 7e11b766..00000000 --- a/modules/nf-core/deepvariant/main.nf +++ /dev/null @@ -1,57 +0,0 @@ -process DEEPVARIANT { - tag "$meta.id" - label 'process_medium' - - container "google/deepvariant:1.4.0" - - // Exit if running this module with -profile conda / -profile mamba - if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { - exit 1, "DEEPVARIANT module does not support Conda. Please use Docker / Singularity / Podman instead." - } - - input: - tuple val(meta), path(input), path(index), path(intervals) - path(fasta) - path(fai) - - output: - tuple val(meta), path("${prefix}.vcf.gz") , emit: vcf - tuple val(meta), path("${prefix}.g.vcf.gz"), emit: gvcf - path "versions.yml" , emit: versions - - when: - task.ext.when == null || task.ext.when - - script: - def args = task.ext.args ?: '' - prefix = task.ext.prefix ?: "${meta.id}" - def regions = intervals ? "--regions ${intervals}" : "" - - """ - /opt/deepvariant/bin/run_deepvariant \\ - --ref=${fasta} \\ - --reads=${input} \\ - --output_vcf=${prefix}.vcf.gz \\ - --output_gvcf=${prefix}.g.vcf.gz \\ - ${args} \\ - ${regions} \\ - --num_shards=${task.cpus} - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - deepvariant: \$(echo \$(/opt/deepvariant/bin/run_deepvariant --version) | sed 's/^.*version //; s/ .*\$//' ) - END_VERSIONS - """ - - stub: - prefix = task.ext.prefix ?: "${meta.id}" - """ - touch ${prefix}.vcf.gz - touch ${prefix}.g.vcf.gz - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - deepvariant: \$(echo \$(/opt/deepvariant/bin/run_deepvariant --version) | sed 's/^.*version //; s/ .*\$//' ) - END_VERSIONS - """ -} diff --git a/modules/nf-core/deepvariant/meta.yml b/modules/nf-core/deepvariant/meta.yml deleted file mode 100644 index 7ecb40f2..00000000 --- a/modules/nf-core/deepvariant/meta.yml +++ /dev/null @@ -1,62 +0,0 @@ -name: deepvariant -description: DeepVariant is an analysis pipeline that uses a deep neural network to call genetic variants from next-generation DNA sequencing data -keywords: - - variant calling - - machine learning -tools: - - deepvariant: - description: DeepVariant is an analysis pipeline that uses a deep neural network to call genetic variants from next-generation DNA sequencing data - homepage: https://github.com/google/deepvariant - documentation: https://github.com/google/deepvariant - tool_dev_url: https://github.com/google/deepvariant - doi: "10.1038/nbt.4235" - licence: ["BSD-3-clause"] - -input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - input: - type: file - description: BAM/CRAM file - pattern: "*.bam/cram" - - index: - type: file - description: Index of BAM/CRAM file - pattern: "*.bai/crai" - - interval: - type: file - description: Interval file for targeted regions - pattern: "*.bed" - - fasta: - type: file - description: The reference fasta file - pattern: "*.fasta" - - fai: - type: file - description: Index of reference fasta file - pattern: "*.fai" - -output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - vcf: - type: file - description: Compressed VCF file - pattern: "*.vcf.gz" - - gvcf: - type: file - description: Compressed GVCF file - pattern: "*.g.vcf.gz" - - version: - type: file - description: File containing software version - pattern: "*.{version.txt}" - -authors: - - "@abhi18av" diff --git a/modules/nf-core/fastqc/main.nf b/modules/nf-core/fastqc/main.nf index 9ae58381..07d5e433 100644 --- a/modules/nf-core/fastqc/main.nf +++ b/modules/nf-core/fastqc/main.nf @@ -5,7 +5,7 @@ process FASTQC { conda "bioconda::fastqc=0.11.9" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/fastqc:0.11.9--0' : - 'quay.io/biocontainers/fastqc:0.11.9--0' }" + 'biocontainers/fastqc:0.11.9--0' }" input: tuple val(meta), path(reads) diff --git a/modules/nf-core/graphmap2/align/meta.yml b/modules/nf-core/graphmap2/align/meta.yml deleted file mode 100644 index d498069b..00000000 --- a/modules/nf-core/graphmap2/align/meta.yml +++ /dev/null @@ -1,51 +0,0 @@ -name: graphmap2_align -description: A versatile pairwise aligner for genomic and spliced nucleotide sequences -keywords: - - align - - fasta - - fastq - - genome - - reference -tools: - - graphmap2: - description: | - A versatile pairwise aligner for genomic and spliced nucleotide sequences. - homepage: https://github.com/lbcb-sci/graphmap2 - documentation: https://github.com/lbcb-sci/graphmap2#graphmap2---a-highly-sensitive-and-accurate-mapper-for-long-error-prone-reads - licence: ["MIT"] -input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - fastq: - type: file - description: | - List of input FASTQ files - and paired-end data, respectively. - - fasta: - type: file - description: | - Reference database in FASTA format. - - index: - type: file - description: | - FASTA index in gmidx. -output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - sam: - type: file - description: Alignment in SAM format - pattern: "*.sam" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" -authors: - - "@yuukiiwa" - - "@drpatelh" diff --git a/modules/nf-core/graphmap2/index/meta.yml b/modules/nf-core/graphmap2/index/meta.yml deleted file mode 100644 index 8e9d2c1c..00000000 --- a/modules/nf-core/graphmap2/index/meta.yml +++ /dev/null @@ -1,30 +0,0 @@ -name: graphmap2_index -description: A versatile pairwise aligner for genomic and spliced nucleotide sequences -keywords: - - index - - fasta - - reference -tools: - - graphmap2: - description: | - A versatile pairwise aligner for genomic and spliced nucleotide sequences. - homepage: https://github.com/lbcb-sci/graphmap2 - documentation: https://github.com/lbcb-sci/graphmap2#graphmap2---a-highly-sensitive-and-accurate-mapper-for-long-error-prone-reads - licence: ["MIT"] -input: - - fasta: - type: file - description: | - Reference database in FASTA format. -output: - - gmidx: - type: file - description: Graphmap2 fasta index in gmidx format - pattern: "*.gmidx" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" -authors: - - "@yuukiiwa" - - "@drpatelh" diff --git a/modules/nf-core/minimap2/align/main.nf b/modules/nf-core/minimap2/align/main.nf deleted file mode 100644 index 430dbab9..00000000 --- a/modules/nf-core/minimap2/align/main.nf +++ /dev/null @@ -1,48 +0,0 @@ -process MINIMAP2_ALIGN { - tag "$meta.id" - label 'process_medium' - - // Note: the versions here need to match the versions used in the mulled container below and minimap2/index - conda "bioconda::minimap2=2.24 bioconda::samtools=1.14" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/mulled-v2-66534bcbb7031a148b13e2ad42583020b9cd25c4:1679e915ddb9d6b4abda91880c4b48857d471bd8-0' : - 'quay.io/biocontainers/mulled-v2-66534bcbb7031a148b13e2ad42583020b9cd25c4:1679e915ddb9d6b4abda91880c4b48857d471bd8-0' }" - - input: - tuple val(meta), path(reads) - path reference - val bam_format - val cigar_paf_format - val cigar_bam - - output: - tuple val(meta), path("*.paf"), optional: true, emit: paf - tuple val(meta), path("*.bam"), optional: true, emit: bam - path "versions.yml" , emit: versions - - when: - task.ext.when == null || task.ext.when - - script: - def args = task.ext.args ?: '' - def prefix = task.ext.prefix ?: "${meta.id}" - def bam_output = bam_format ? "-a | samtools sort | samtools view -@ ${task.cpus} -b -h -o ${prefix}.bam" : "-o ${prefix}.paf" - def cigar_paf = cigar_paf_format && !bam_format ? "-c" : '' - def set_cigar_bam = cigar_bam && bam_format ? "-L" : '' - """ - minimap2 \\ - $args \\ - -t $task.cpus \\ - "${reference ?: reads}" \\ - "$reads" \\ - $cigar_paf \\ - $set_cigar_bam \\ - $bam_output - - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - minimap2: \$(minimap2 --version 2>&1) - END_VERSIONS - """ -} diff --git a/modules/nf-core/minimap2/align/meta.yml b/modules/nf-core/minimap2/align/meta.yml deleted file mode 100644 index 991b39a0..00000000 --- a/modules/nf-core/minimap2/align/meta.yml +++ /dev/null @@ -1,65 +0,0 @@ -name: minimap2_align -description: A versatile pairwise aligner for genomic and spliced nucleotide sequences -keywords: - - align - - fasta - - fastq - - genome - - paf - - reference -tools: - - minimap2: - description: | - A versatile pairwise aligner for genomic and spliced nucleotide sequences. - homepage: https://github.com/lh3/minimap2 - documentation: https://github.com/lh3/minimap2#uguide - licence: ["MIT"] -input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - reads: - type: file - description: | - List of input FASTA or FASTQ files of size 1 and 2 for single-end - and paired-end data, respectively. - - reference: - type: file - description: | - Reference database in FASTA format. - - bam_format: - type: boolean - description: Specify that output should be in BAM format - - cigar_paf_format: - type: boolean - description: Specify that output CIGAR should be in PAF format - - cigar_bam: - type: boolean - description: | - Write CIGAR with >65535 ops at the CG tag. This is recommended when - doing XYZ (https://github.com/lh3/minimap2#working-with-65535-cigar-operations) -output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - paf: - type: file - description: Alignment in PAF format - pattern: "*.paf" - - bam: - type: file - description: Alignment in BAM format - pattern: "*.bam" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" -authors: - - "@heuermh" - - "@sofstam" - - "@sateeshperi" - - "@jfy133" diff --git a/modules/nf-core/minimap2/index/main.nf b/modules/nf-core/minimap2/index/main.nf deleted file mode 100644 index 73dd4eef..00000000 --- a/modules/nf-core/minimap2/index/main.nf +++ /dev/null @@ -1,34 +0,0 @@ -process MINIMAP2_INDEX { - label 'process_medium' - - // Note: the versions here need to match the versions used in minimap2/align - conda "bioconda::minimap2=2.24" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/minimap2:2.24--h7132678_1' : - 'quay.io/biocontainers/minimap2:2.24--h7132678_1' }" - - input: - tuple val(meta), path(fasta) - - output: - tuple val(meta), path("*.mmi"), emit: index - path "versions.yml" , emit: versions - - when: - task.ext.when == null || task.ext.when - - script: - def args = task.ext.args ?: '' - """ - minimap2 \\ - -t $task.cpus \\ - -d ${fasta.baseName}.mmi \\ - $args \\ - $fasta - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - minimap2: \$(minimap2 --version 2>&1) - END_VERSIONS - """ -} diff --git a/modules/nf-core/minimap2/index/meta.yml b/modules/nf-core/minimap2/index/meta.yml deleted file mode 100644 index b58f35c6..00000000 --- a/modules/nf-core/minimap2/index/meta.yml +++ /dev/null @@ -1,40 +0,0 @@ -name: minimap2_index -description: Provides fasta index required by minimap2 alignment. -keywords: - - index - - fasta - - reference -tools: - - minimap2: - description: | - A versatile pairwise aligner for genomic and spliced nucleotide sequences. - homepage: https://github.com/lh3/minimap2 - documentation: https://github.com/lh3/minimap2#uguide - licence: ["MIT"] -input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - fasta: - type: file - description: | - Reference database in FASTA format. -output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - index: - type: file - description: Minimap2 fasta index. - pattern: "*.mmi" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" -authors: - - "@yuukiiwa" - - "@drpatelh" diff --git a/modules/nf-core/multiqc/meta.yml b/modules/nf-core/multiqc/meta.yml deleted file mode 100644 index f93b5ee5..00000000 --- a/modules/nf-core/multiqc/meta.yml +++ /dev/null @@ -1,56 +0,0 @@ -# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/yaml-schema.json -name: MultiQC -description: Aggregate results from bioinformatics analyses across many samples into a single report -keywords: - - QC - - bioinformatics tools - - Beautiful stand-alone HTML report -tools: - - multiqc: - description: | - MultiQC searches a given directory for analysis logs and compiles a HTML report. - It's a general use tool, perfect for summarising the output from numerous bioinformatics tools. - homepage: https://multiqc.info/ - documentation: https://multiqc.info/docs/ - licence: ["GPL-3.0-or-later"] - -input: - - multiqc_files: - type: file - description: | - List of reports / files recognised by MultiQC, for example the html and zip output of FastQC - - multiqc_config: - type: file - description: Optional config yml for MultiQC - pattern: "*.{yml,yaml}" - - extra_multiqc_config: - type: file - description: Second optional config yml for MultiQC. Will override common sections in multiqc_config. - pattern: "*.{yml,yaml}" - - multiqc_logo: - type: file - description: Optional logo file for MultiQC - pattern: "*.{png}" - -output: - - report: - type: file - description: MultiQC report file - pattern: "multiqc_report.html" - - data: - type: directory - description: MultiQC data dir - pattern: "multiqc_data" - - plots: - type: file - description: Plots created by MultiQC - pattern: "*_data" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" -authors: - - "@abhi18av" - - "@bunop" - - "@drpatelh" - - "@jfy133" diff --git a/modules/nf-core/nanolyse/main.nf b/modules/nf-core/nanolyse/main.nf index 52dc86b3..f5e5b44d 100644 --- a/modules/nf-core/nanolyse/main.nf +++ b/modules/nf-core/nanolyse/main.nf @@ -5,7 +5,7 @@ process NANOLYSE { conda "bioconda::nanolyse=1.2.0" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/nanolyse:1.2.0--py_0' : - 'quay.io/biocontainers/nanolyse:1.2.0--py_0' }" + 'biocontainers/nanolyse:1.2.0--py_0' }" input: tuple val(meta), path(fastq) diff --git a/modules/nf-core/nanoplot/main.nf b/modules/nf-core/nanoplot/main.nf index ca0d8454..9706bb87 100644 --- a/modules/nf-core/nanoplot/main.nf +++ b/modules/nf-core/nanoplot/main.nf @@ -5,7 +5,7 @@ process NANOPLOT { conda "bioconda::nanoplot=1.41.0" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/nanoplot:1.41.0--pyhdfd78af_0' : - 'quay.io/biocontainers/nanoplot:1.41.0--pyhdfd78af_0' }" + 'biocontainers/nanoplot:1.41.0--pyhdfd78af_0' }" input: tuple val(meta), path(ontfile) diff --git a/modules/nf-core/qcat/meta.yml b/modules/nf-core/qcat/meta.yml deleted file mode 100644 index 97b9b884..00000000 --- a/modules/nf-core/qcat/meta.yml +++ /dev/null @@ -1,40 +0,0 @@ -name: qcat -description: Demultiplexer for Nanopore samples -keywords: - - demultiplex - -tools: - - qcat: - description: | - A demultiplexer for Nanopore samples - homepage: https://github.com/nanoporetech/qcat - documentation: https://github.com/nanoporetech/qcat#qcat - licence: ["MPL-2.0"] -input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - reads: - type: file - description: | - Non-demultiplexed fastq files - -output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - reads: - type: file - description: Demultiplexed fastq samples - pattern: "*.fastq.gz" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" -authors: - - "@yuukiiwa" - - "@drpatelh" diff --git a/modules/nf-core/samtools/faidx/main.nf b/modules/nf-core/samtools/faidx/main.nf new file mode 100644 index 00000000..4dd0e5b0 --- /dev/null +++ b/modules/nf-core/samtools/faidx/main.nf @@ -0,0 +1,44 @@ +process SAMTOOLS_FAIDX { + tag "$fasta" + label 'process_single' + + conda "bioconda::samtools=1.17" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/samtools:1.17--h00cdaf9_0' : + 'biocontainers/samtools:1.17--h00cdaf9_0' }" + + input: + tuple val(meta), path(fasta) + + output: + tuple val(meta), path ("*.fai"), emit: fai + tuple val(meta), path ("*.gzi"), emit: gzi, optional: true + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + """ + samtools \\ + faidx \\ + $args \\ + $fasta + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') + END_VERSIONS + """ + + stub: + """ + touch ${fasta}.fai + cat <<-END_VERSIONS > versions.yml + + "${task.process}": + samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') + END_VERSIONS + """ +} diff --git a/modules/nf-core/custom/getchromsizes/meta.yml b/modules/nf-core/samtools/faidx/meta.yml similarity index 65% rename from modules/nf-core/custom/getchromsizes/meta.yml rename to modules/nf-core/samtools/faidx/meta.yml index 219ca1d8..fe2fe9a1 100644 --- a/modules/nf-core/custom/getchromsizes/meta.yml +++ b/modules/nf-core/samtools/faidx/meta.yml @@ -1,18 +1,18 @@ -name: custom_getchromsizes -description: Generates a FASTA file of chromosome sizes and a fasta index file +name: samtools_faidx +description: Index FASTA file keywords: + - index - fasta - - chromosome - - indexing tools: - samtools: - description: Tools for dealing with SAM, BAM and CRAM files + description: | + SAMtools is a set of utilities for interacting with and post-processing + short DNA sequence read alignments in the SAM, BAM and CRAM formats, written by Heng Li. + These files are generated as output by short read aligners like BWA. homepage: http://www.htslib.org/ documentation: http://www.htslib.org/doc/samtools.html - tool_dev_url: https://github.com/samtools/samtools doi: 10.1093/bioinformatics/btp352 licence: ["MIT"] - input: - meta: type: map @@ -22,18 +22,13 @@ input: - fasta: type: file description: FASTA file - pattern: "*.{fa,fasta,fna,fas}" - + pattern: "*.{fa,fasta}" output: - meta: type: map description: | Groovy Map containing sample information e.g. [ id:'test', single_end:false ] - - sizes: - type: file - description: File containing chromosome lengths - pattern: "*.{sizes}" - fai: type: file description: FASTA index file @@ -46,8 +41,7 @@ output: type: file description: File containing software versions pattern: "versions.yml" - authors: - - "@tamara-hodgetts" - - "@chris-cheshire" - - "@muffato" + - "@drpatelh" + - "@ewels" + - "@phue" diff --git a/modules/nf-core/samtools/flagstat/main.nf b/modules/nf-core/samtools/flagstat/main.nf index 2120cd7d..eb7e72fc 100644 --- a/modules/nf-core/samtools/flagstat/main.nf +++ b/modules/nf-core/samtools/flagstat/main.nf @@ -2,10 +2,10 @@ process SAMTOOLS_FLAGSTAT { tag "$meta.id" label 'process_single' - conda "bioconda::samtools=1.16.1" + conda "bioconda::samtools=1.17" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/samtools:1.16.1--h6899075_1' : - 'quay.io/biocontainers/samtools:1.16.1--h6899075_1' }" + 'https://depot.galaxyproject.org/singularity/samtools:1.17--h00cdaf9_0' : + 'biocontainers/samtools:1.17--h00cdaf9_0' }" input: tuple val(meta), path(bam), path(bai) diff --git a/modules/nf-core/samtools/idxstats/main.nf b/modules/nf-core/samtools/idxstats/main.nf index a7b87d8b..a257d700 100644 --- a/modules/nf-core/samtools/idxstats/main.nf +++ b/modules/nf-core/samtools/idxstats/main.nf @@ -2,10 +2,10 @@ process SAMTOOLS_IDXSTATS { tag "$meta.id" label 'process_single' - conda "bioconda::samtools=1.16.1" + conda "bioconda::samtools=1.17" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/samtools:1.16.1--h6899075_1' : - 'quay.io/biocontainers/samtools:1.16.1--h6899075_1' }" + 'https://depot.galaxyproject.org/singularity/samtools:1.17--h00cdaf9_0' : + 'biocontainers/samtools:1.17--h00cdaf9_0' }" input: tuple val(meta), path(bam), path(bai) diff --git a/modules/nf-core/samtools/index/main.nf b/modules/nf-core/samtools/index/main.nf index 8b95687a..0b20aa4b 100644 --- a/modules/nf-core/samtools/index/main.nf +++ b/modules/nf-core/samtools/index/main.nf @@ -2,10 +2,10 @@ process SAMTOOLS_INDEX { tag "$meta.id" label 'process_low' - conda "bioconda::samtools=1.16.1" + conda "bioconda::samtools=1.17" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/samtools:1.16.1--h6899075_1' : - 'quay.io/biocontainers/samtools:1.16.1--h6899075_1' }" + 'https://depot.galaxyproject.org/singularity/samtools:1.17--h00cdaf9_0' : + 'biocontainers/samtools:1.17--h00cdaf9_0' }" input: tuple val(meta), path(input) diff --git a/modules/nf-core/samtools/sort/main.nf b/modules/nf-core/samtools/sort/main.nf index 84c167cd..1e5181d4 100644 --- a/modules/nf-core/samtools/sort/main.nf +++ b/modules/nf-core/samtools/sort/main.nf @@ -2,10 +2,10 @@ process SAMTOOLS_SORT { tag "$meta.id" label 'process_medium' - conda "bioconda::samtools=1.16.1" + conda "bioconda::samtools=1.17" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/samtools:1.16.1--h6899075_1' : - 'quay.io/biocontainers/samtools:1.16.1--h6899075_1' }" + 'https://depot.galaxyproject.org/singularity/samtools:1.17--h00cdaf9_0' : + 'biocontainers/samtools:1.17--h00cdaf9_0' }" input: tuple val(meta), path(bam) @@ -21,9 +21,17 @@ process SAMTOOLS_SORT { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" + def sort_memory = (task.memory.mega/task.cpus).intValue() if ("$bam" == "${prefix}.bam") error "Input and output names are the same, use \"task.ext.prefix\" to disambiguate!" """ - samtools sort $args -@ $task.cpus -o ${prefix}.bam -T $prefix $bam + samtools sort \\ + $args \\ + -@ $task.cpus \\ + -m ${sort_memory}M \\ + -o ${prefix}.bam \\ + -T $prefix \\ + $bam + cat <<-END_VERSIONS > versions.yml "${task.process}": samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') diff --git a/modules/nf-core/samtools/stats/main.nf b/modules/nf-core/samtools/stats/main.nf index 0a2a3640..eb7f098b 100644 --- a/modules/nf-core/samtools/stats/main.nf +++ b/modules/nf-core/samtools/stats/main.nf @@ -2,10 +2,10 @@ process SAMTOOLS_STATS { tag "$meta.id" label 'process_single' - conda "bioconda::samtools=1.16.1" + conda "bioconda::samtools=1.17" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/samtools:1.16.1--h6899075_1' : - 'quay.io/biocontainers/samtools:1.16.1--h6899075_1' }" + 'https://depot.galaxyproject.org/singularity/samtools:1.17--h00cdaf9_0' : + 'biocontainers/samtools:1.17--h00cdaf9_0' }" input: tuple val(meta), path(input), path(input_index) diff --git a/modules/nf-core/samtools/view/main.nf b/modules/nf-core/samtools/view/main.nf deleted file mode 100644 index 729c85e5..00000000 --- a/modules/nf-core/samtools/view/main.nf +++ /dev/null @@ -1,66 +0,0 @@ -process SAMTOOLS_VIEW { - tag "$meta.id" - label 'process_low' - - conda "bioconda::samtools=1.16.1" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/samtools:1.16.1--h6899075_1' : - 'quay.io/biocontainers/samtools:1.16.1--h6899075_1' }" - - input: - tuple val(meta), path(input), path(index) - path fasta - path qname - - output: - tuple val(meta), path("*.bam"), emit: bam, optional: true - tuple val(meta), path("*.cram"), emit: cram, optional: true - tuple val(meta), path("*.sam"), emit: sam, optional: true - tuple val(meta), path("*.bai"), emit: bai, optional: true - tuple val(meta), path("*.csi"), emit: csi, optional: true - tuple val(meta), path("*.crai"), emit: crai, optional: true - path "versions.yml", emit: versions - - when: - task.ext.when == null || task.ext.when - - script: - def args = task.ext.args ?: '' - def args2 = task.ext.args2 ?: '' - def prefix = task.ext.prefix ?: "${meta.id}" - def reference = fasta ? "--reference ${fasta}" : "" - def readnames = qname ? "--qname-file ${qname}": "" - def file_type = args.contains("--output-fmt sam") ? "sam" : - args.contains("--output-fmt bam") ? "bam" : - args.contains("--output-fmt cram") ? "cram" : - input.getExtension() - if ("$input" == "${prefix}.${file_type}") error "Input and output names are the same, use \"task.ext.prefix\" to disambiguate!" - """ - samtools \\ - view \\ - --threads ${task.cpus-1} \\ - ${reference} \\ - ${readnames} \\ - $args \\ - -o ${prefix}.${file_type} \\ - $input \\ - $args2 - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') - END_VERSIONS - """ - - stub: - def prefix = task.ext.prefix ?: "${meta.id}" - """ - touch ${prefix}.bam - touch ${prefix}.cram - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') - END_VERSIONS - """ -} diff --git a/modules/nf-core/samtools/view/meta.yml b/modules/nf-core/samtools/view/meta.yml deleted file mode 100644 index 2e597d34..00000000 --- a/modules/nf-core/samtools/view/meta.yml +++ /dev/null @@ -1,79 +0,0 @@ -name: samtools_view -description: filter/convert SAM/BAM/CRAM file -keywords: - - view - - bam - - sam - - cram -tools: - - samtools: - description: | - SAMtools is a set of utilities for interacting with and post-processing - short DNA sequence read alignments in the SAM, BAM and CRAM formats, written by Heng Li. - These files are generated as output by short read aligners like BWA. - homepage: http://www.htslib.org/ - documentation: http://www.htslib.org/doc/samtools.html - doi: 10.1093/bioinformatics/btp352 - licence: ["MIT"] -input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - input: - type: file - description: BAM/CRAM/SAM file - pattern: "*.{bam,cram,sam}" - - index: - type: optional file - description: BAM.BAI/CRAM.CRAI file - pattern: "*.{.bai,.crai}" - - fasta: - type: optional file - description: Reference file the CRAM was created with - pattern: "*.{fasta,fa}" - - qname: - type: file - description: Optional file with read names to output only select alignments - pattern: "*.{txt,list}" -output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - bam: - type: file - description: optional filtered/converted BAM file - pattern: "*.{bam}" - - cram: - type: file - description: optional filtered/converted CRAM file - pattern: "*.{cram}" - - sam: - type: file - description: optional filtered/converted SAM file - pattern: "*.{sam}" - # bai, csi, and crai are created with `--write-index` - - bai: - type: file - description: optional BAM file index - pattern: "*.{bai}" - - csi: - type: file - description: optional tabix BAM file index - pattern: "*.{csi}" - - crai: - type: file - description: optional CRAM file index - pattern: "*.{crai}" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" -authors: - - "@drpatelh" - - "@joseespinosa" - - "@FriederikeHanssen" - - "@priyanka-surana" diff --git a/modules/nf-core/sniffles/main.nf b/modules/nf-core/sniffles/main.nf deleted file mode 100644 index 305e9b0b..00000000 --- a/modules/nf-core/sniffles/main.nf +++ /dev/null @@ -1,40 +0,0 @@ -process SNIFFLES { - tag "$meta.id" - label 'process_high' - - conda "bioconda::sniffles=2.0.7" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/sniffles:2.0.7--pyhdfd78af_0' : - 'quay.io/biocontainers/sniffles:2.0.7--pyhdfd78af_0' }" - - input: - tuple val(meta), path(bam), path(bai) - tuple val(meta2), path(fasta) - - - output: - tuple val(meta), path("*.vcf"), emit: vcf - tuple val(meta), path("*.snf"), emit: snf - path "versions.yml" , emit: versions - - when: - task.ext.when == null || task.ext.when - - script: - def args = task.ext.args ?: '' - def prefix = task.ext.prefix ?: "${meta.id}" - """ - sniffles \\ - --input $bam \\ - --vcf ${prefix}.vcf \\ - --snf ${prefix}.snf \\ - --reference $fasta \\ - -t $task.cpus \\ - $args - cat <<-END_VERSIONS > versions.yml - "${task.process}": - sniffles: \$(sniffles --help 2>&1 | grep Version |sed 's/^.*Version //') - END_VERSIONS - """ -} - diff --git a/modules/nf-core/sniffles/meta.yml b/modules/nf-core/sniffles/meta.yml deleted file mode 100644 index 35643016..00000000 --- a/modules/nf-core/sniffles/meta.yml +++ /dev/null @@ -1,59 +0,0 @@ -name: sniffles -description: structural-variant calling with sniffles -keywords: - - sniffles - - structural-variant calling -tools: - - sniffles: - description: a fast structural variant caller for long-read sequencing - homepage: https://github.com/fritzsedlazeck/Sniffles - documentation: https://github.com/fritzsedlazeck/Sniffles#readme - tool_dev_url: https://github.com/fritzsedlazeck/Sniffles - licence: ["MIT"] - -input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test' ] - - bam: - type: file - description: BAM file - pattern: "*.bam" - - bai: - type: file - description: Index of BAM file - pattern: "*.bai" - - meta2: - type: map - description: | - Groovy Map containing reference information - e.g. [ id:'fasta' ] - - fasta: - type: file - description: | - Reference database in FASTA format - -output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test' ] - - vcf: - type: file - description: Compressed VCF file - pattern: "*.vcf.gz" - - snf: - type: file - description: Compressed SNF file - pattern: "*.snf.gz" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" - -authors: - - "@christopher-hakkaart" - - "@yuukiiwa" diff --git a/modules/nf-core/stringtie/merge/main.nf b/modules/nf-core/stringtie/merge/main.nf index f1635afc..12224f78 100644 --- a/modules/nf-core/stringtie/merge/main.nf +++ b/modules/nf-core/stringtie/merge/main.nf @@ -5,7 +5,7 @@ process STRINGTIE_MERGE { conda "bioconda::stringtie=2.2.1" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/stringtie:2.2.1--hecb563c_2' : - 'quay.io/biocontainers/stringtie:2.2.1--hecb563c_2' }" + 'biocontainers/stringtie:2.2.1--hecb563c_2' }" input: path stringtie_gtf diff --git a/modules/nf-core/stringtie/stringtie/main.nf b/modules/nf-core/stringtie/stringtie/main.nf deleted file mode 100644 index 2d5b035f..00000000 --- a/modules/nf-core/stringtie/stringtie/main.nf +++ /dev/null @@ -1,68 +0,0 @@ -process STRINGTIE_STRINGTIE { - tag "$meta.id" - label 'process_medium' - - conda "bioconda::stringtie=2.2.1" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/stringtie:2.2.1--hecb563c_2' : - 'quay.io/biocontainers/stringtie:2.2.1--hecb563c_2' }" - - input: - tuple val(meta), path(bam) - path annotation_gtf - - output: - tuple val(meta), path("*.transcripts.gtf"), emit: transcript_gtf - tuple val(meta), path("*.abundance.txt") , emit: abundance - tuple val(meta), path("*.coverage.gtf") , optional: true, emit: coverage_gtf - tuple val(meta), path("*.ballgown") , optional: true, emit: ballgown - path "versions.yml" , emit: versions - - when: - task.ext.when == null || task.ext.when - - script: - def args = task.ext.args ?: '' - def prefix = task.ext.prefix ?: "${meta.id}" - def reference = annotation_gtf ? "-G $annotation_gtf" : "" - def ballgown = annotation_gtf ? "-b ${prefix}.ballgown" : "" - def coverage = annotation_gtf ? "-C ${prefix}.coverage.gtf" : "" - - def strandedness = '' - if (meta.strandedness == 'forward') { - strandedness = '--fr' - } else if (meta.strandedness == 'reverse') { - strandedness = '--rf' - } - """ - stringtie \\ - $bam \\ - $strandedness \\ - $reference \\ - -o ${prefix}.transcripts.gtf \\ - -A ${prefix}.gene.abundance.txt \\ - $coverage \\ - $ballgown \\ - -p $task.cpus \\ - $args - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - stringtie: \$(stringtie --version 2>&1) - END_VERSIONS - """ - - stub: - def prefix = task.ext.prefix ?: "${meta.id}" - """ - touch ${prefix}.transcripts.gtf - touch ${prefix}.gene.abundance.txt - touch ${prefix}.coverage.gtf - touch ${prefix}.ballgown - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - stringtie: \$(stringtie --version 2>&1) - END_VERSIONS - """ -} diff --git a/modules/nf-core/stringtie/stringtie/meta.yml b/modules/nf-core/stringtie/stringtie/meta.yml deleted file mode 100644 index 75518470..00000000 --- a/modules/nf-core/stringtie/stringtie/meta.yml +++ /dev/null @@ -1,57 +0,0 @@ -name: stringtie_stringtie -description: Transcript assembly and quantification for RNA-Se -keywords: - - transcript - - assembly - - quantification - - gtf - -tools: - - stringtie2: - description: | - Transcript assembly and quantification for RNA-Seq - homepage: https://ccb.jhu.edu/software/stringtie/index.shtml - documentation: https://ccb.jhu.edu/software/stringtie/index.shtml?t=manual - licence: ["MIT"] -input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - bam: - type: file - description: | - Stringtie transcript gtf output(s). - - annotation_gtf: - type: file - description: | - Annotation gtf file (optional). -output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - transcript_gtf: - type: file - description: transcript gtf - pattern: "*.{transcripts.gtf}" - - coverage_gtf: - type: file - description: coverage gtf - pattern: "*.{coverage.gtf}" - - abudance: - type: file - description: abudance - pattern: "*.{abudance.txt}" - - ballgown: - type: file - description: for running ballgown - pattern: "*.{ballgown}" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" -authors: - - "@drpatelh" diff --git a/modules/nf-core/subread/featurecounts/main.nf b/modules/nf-core/subread/featurecounts/main.nf deleted file mode 100644 index cbc833fe..00000000 --- a/modules/nf-core/subread/featurecounts/main.nf +++ /dev/null @@ -1,47 +0,0 @@ -process SUBREAD_FEATURECOUNTS { - tag "$meta.id" - label 'process_medium' - - conda "bioconda::subread=2.0.1" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/subread:2.0.1--hed695b0_0' : - 'quay.io/biocontainers/subread:2.0.1--hed695b0_0' }" - - input: - tuple val(meta), path(bams), path(annotation) - - output: - tuple val(meta), path("*featureCounts.txt") , emit: counts - tuple val(meta), path("*featureCounts.txt.summary"), emit: summary - path "versions.yml" , emit: versions - - when: - task.ext.when == null || task.ext.when - - script: - def args = task.ext.args ?: '' - def prefix = task.ext.prefix ?: "${meta.id}" - def paired_end = meta.single_end ? '' : '-p' - - def strandedness = 0 - if (meta.strandedness == 'forward') { - strandedness = 1 - } else if (meta.strandedness == 'reverse') { - strandedness = 2 - } - """ - featureCounts \\ - $args \\ - $paired_end \\ - -T $task.cpus \\ - -a $annotation \\ - -s $strandedness \\ - -o ${prefix}.featureCounts.txt \\ - ${bams.join(' ')} - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - subread: \$( echo \$(featureCounts -v 2>&1) | sed -e "s/featureCounts v//g") - END_VERSIONS - """ -} diff --git a/modules/nf-core/subread/featurecounts/meta.yml b/modules/nf-core/subread/featurecounts/meta.yml deleted file mode 100644 index cf02f1ea..00000000 --- a/modules/nf-core/subread/featurecounts/meta.yml +++ /dev/null @@ -1,52 +0,0 @@ -name: subread_featurecounts -description: Count reads that map to genomic features -keywords: - - counts - - fasta - - genome - - reference - -tools: - - featurecounts: - description: featureCounts is a highly efficient general-purpose read summarization program that counts mapped reads for genomic features such as genes, exons, promoter, gene bodies, genomic bins and chromosomal locations. It can be used to count both RNA-seq and genomic DNA-seq reads. - homepage: http://bioinf.wehi.edu.au/featureCounts/ - documentation: http://bioinf.wehi.edu.au/subread-package/SubreadUsersGuide.pdf - doi: "10.1093/bioinformatics/btt656" - licence: ["GPL v3"] - -input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - bam: - type: file - description: BAM/SAM file containing read alignments - pattern: "*.{bam}" - - annotation: - type: file - description: Genomic features annotation in GTF or SAF - pattern: "*.{gtf,saf}" - -output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - counts: - type: file - description: Counts of reads mapping to features - pattern: "*featureCounts.txt" - - summary: - type: file - description: Summary log file - pattern: "*.featureCounts.txt.summary" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" - -authors: - - "@ntoda03" diff --git a/modules/nf-core/tabix/bgzip/main.nf b/modules/nf-core/tabix/bgzip/main.nf index 6dd4e202..8c47d9e2 100644 --- a/modules/nf-core/tabix/bgzip/main.nf +++ b/modules/nf-core/tabix/bgzip/main.nf @@ -5,7 +5,7 @@ process TABIX_BGZIP { conda "bioconda::tabix=1.11" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/tabix:1.11--hdfd78af_0' : - 'quay.io/biocontainers/tabix:1.11--hdfd78af_0' }" + 'biocontainers/tabix:1.11--hdfd78af_0' }" input: tuple val(meta), path(input) diff --git a/modules/nf-core/tabix/bgziptabix/main.nf b/modules/nf-core/tabix/bgziptabix/main.nf new file mode 100644 index 00000000..fe8160ba --- /dev/null +++ b/modules/nf-core/tabix/bgziptabix/main.nf @@ -0,0 +1,45 @@ +process TABIX_BGZIPTABIX { + tag "$meta.id" + label 'process_single' + + conda "bioconda::tabix=1.11" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/tabix:1.11--hdfd78af_0' : + 'biocontainers/tabix:1.11--hdfd78af_0' }" + + input: + tuple val(meta), path(input) + + output: + tuple val(meta), path("*.gz"), path("*.tbi"), emit: gz_tbi + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def args2 = task.ext.args2 ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + """ + bgzip --threads ${task.cpus} -c $args $input > ${prefix}.${input.getExtension()}.gz + tabix $args2 ${prefix}.${input.getExtension()}.gz + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + tabix: \$(echo \$(tabix -h 2>&1) | sed 's/^.*Version: //; s/ .*\$//') + END_VERSIONS + """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}.${input.getExtension()}.gz + touch ${prefix}.${input.getExtension()}.gz.tbi + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + tabix: \$(echo \$(tabix -h 2>&1) | sed 's/^.*Version: //; s/ .*\$//') + END_VERSIONS + """ +} diff --git a/modules/nf-core/tabix/bgziptabix/meta.yml b/modules/nf-core/tabix/bgziptabix/meta.yml new file mode 100644 index 00000000..49c03289 --- /dev/null +++ b/modules/nf-core/tabix/bgziptabix/meta.yml @@ -0,0 +1,45 @@ +name: tabix_bgziptabix +description: bgzip a sorted tab-delimited genome file and then create tabix index +keywords: + - bgzip + - compress + - index + - tabix + - vcf +tools: + - tabix: + description: Generic indexer for TAB-delimited genome position files. + homepage: https://www.htslib.org/doc/tabix.html + documentation: https://www.htslib.org/doc/tabix.1.html + doi: 10.1093/bioinformatics/btq671 + licence: ["MIT"] +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - tab: + type: file + description: TAB-delimited genome position file + pattern: "*.{bed,gff,sam,vcf}" +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - gz: + type: file + description: Output compressed file + pattern: "*.{gz}" + - tbi: + type: file + description: tabix index file + pattern: "*.{gz.tbi}" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" +authors: + - "@maxulysse" diff --git a/modules/nf-core/tabix/tabix/main.nf b/modules/nf-core/tabix/tabix/main.nf index 9a404db9..5bf332ef 100644 --- a/modules/nf-core/tabix/tabix/main.nf +++ b/modules/nf-core/tabix/tabix/main.nf @@ -5,7 +5,7 @@ process TABIX_TABIX { conda "bioconda::tabix=1.11" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/tabix:1.11--hdfd78af_0' : - 'quay.io/biocontainers/tabix:1.11--hdfd78af_0' }" + 'biocontainers/tabix:1.11--hdfd78af_0' }" input: tuple val(meta), path(tab) diff --git a/modules/nf-core/ucsc/bedgraphtobigwig/main.nf b/modules/nf-core/ucsc/bedgraphtobigwig/main.nf deleted file mode 100644 index defda3ef..00000000 --- a/modules/nf-core/ucsc/bedgraphtobigwig/main.nf +++ /dev/null @@ -1,37 +0,0 @@ -process UCSC_BEDGRAPHTOBIGWIG { - tag "$meta.id" - label 'process_single' - - // WARN: Version information not provided by tool on CLI. Please update version string below when bumping container versions. - conda "bioconda::ucsc-bedgraphtobigwig=377" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/ucsc-bedgraphtobigwig:377--h446ed27_1' : - 'quay.io/biocontainers/ucsc-bedgraphtobigwig:377--h446ed27_1' }" - - input: - tuple val(meta), path(bedgraph) - path sizes - - output: - tuple val(meta), path("*.bigWig"), emit: bigwig - path "versions.yml" , emit: versions - - when: - task.ext.when == null || task.ext.when - - script: - def args = task.ext.args ?: '' - def prefix = task.ext.prefix ?: "${meta.id}" - def VERSION = '377' // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions. - """ - bedGraphToBigWig \\ - $bedgraph \\ - $sizes \\ - ${prefix}.bigWig - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - ucsc: $VERSION - END_VERSIONS - """ -} diff --git a/modules/nf-core/ucsc/bedgraphtobigwig/meta.yml b/modules/nf-core/ucsc/bedgraphtobigwig/meta.yml deleted file mode 100755 index ba8915be..00000000 --- a/modules/nf-core/ucsc/bedgraphtobigwig/meta.yml +++ /dev/null @@ -1,44 +0,0 @@ -name: ucsc_bedgraphtobigwig -description: Convert a bedGraph file to bigWig format. -keywords: - - bedgraph - - bigwig -tools: - - ucsc: - description: Convert a bedGraph file to bigWig format. - homepage: http://hgdownload.cse.ucsc.edu/admin/exe/ - documentation: https://genome.ucsc.edu/goldenPath/help/bigWig.html - licence: ["varies; see http://genome.ucsc.edu/license"] - -input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - bedgraph: - type: file - description: bedGraph file - pattern: "*.{bedGraph}" - - sizes: - type: file - description: chromosome sizes file - pattern: "*.{sizes}" - -output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" - - bigwig: - type: file - description: bigWig file - pattern: "*.{bigWig}" - -authors: - - "@drpatelh" diff --git a/modules/nf-core/ucsc/bedtobigbed/main.nf b/modules/nf-core/ucsc/bedtobigbed/main.nf deleted file mode 100644 index efa62f9a..00000000 --- a/modules/nf-core/ucsc/bedtobigbed/main.nf +++ /dev/null @@ -1,41 +0,0 @@ -process UCSC_BEDTOBIGBED { - tag "$meta.id" - label 'process_single' - - // WARN: Version information not provided by tool on CLI. Please update version string below when bumping container versions. - conda "bioconda::ucsc-bedtobigbed=377" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/ucsc-bedtobigbed:377--ha8a8165_3' : - 'quay.io/biocontainers/ucsc-bedtobigbed:377--ha8a8165_3' }" - - input: - tuple val(meta), path(bed) - path sizes - path autosql - - output: - tuple val(meta), path("*.bigBed"), emit: bigbed - path "versions.yml" , emit: versions - - when: - task.ext.when == null || task.ext.when - - script: - def args = task.ext.args ?: '' - def prefix = task.ext.prefix ?: "${meta.id}" - def as_option = autosql ? "-as=${autosql}" : "" - def VERSION = '377' // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions. - """ - bedToBigBed \\ - $bed \\ - $sizes \\ - $as_option \\ - $args \\ - ${prefix}.bigBed - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - ucsc: $VERSION - END_VERSIONS - """ -} diff --git a/modules/nf-core/ucsc/bedtobigbed/meta.yml b/modules/nf-core/ucsc/bedtobigbed/meta.yml deleted file mode 100755 index babb220d..00000000 --- a/modules/nf-core/ucsc/bedtobigbed/meta.yml +++ /dev/null @@ -1,48 +0,0 @@ -name: ucsc_bedtobigbed -description: Convert file from bed to bigBed format -keywords: - - bed - - bigbed -tools: - - ucsc: - description: Convert file from bed to bigBed format - homepage: http://hgdownload.cse.ucsc.edu/admin/exe/ - documentation: https://genome.ucsc.edu/goldenPath/help/bigBed.html - licence: ["varies; see http://genome.ucsc.edu/license"] - -input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - bed: - type: file - description: bed file - pattern: "*.{bed}" - - sizes: - type: file - description: chromosome sizes file - pattern: "*.{sizes}" - - autosql: - type: file - description: autoSql file to describe the columns of the BED file - pattern: "*.{as}" - -output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" - - bigbed: - type: file - description: bigBed file - pattern: "*.{bigBed}" - -authors: - - "@drpatelh" diff --git a/modules/nf-core/untar/main.nf b/modules/nf-core/untar/main.nf index 3384847a..8cd1856c 100644 --- a/modules/nf-core/untar/main.nf +++ b/modules/nf-core/untar/main.nf @@ -5,7 +5,7 @@ process UNTAR { conda "conda-forge::sed=4.7 bioconda::grep=3.4 conda-forge::tar=1.34" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/ubuntu:20.04' : - 'ubuntu:20.04' }" + 'nf-core/ubuntu:20.04' }" input: tuple val(meta), path(archive) diff --git a/modules/nf-core/untar/meta.yml b/modules/nf-core/untar/meta.yml index ea7a3f38..db241a6e 100644 --- a/modules/nf-core/untar/meta.yml +++ b/modules/nf-core/untar/meta.yml @@ -3,6 +3,7 @@ description: Extract files. keywords: - untar - uncompress + - extract tools: - untar: description: | From a03d1e380e4d7f0c14776fb78e64eb134db5e002 Mon Sep 17 00:00:00 2001 From: Yuk Kei Wan Date: Wed, 10 May 2023 17:07:42 +0800 Subject: [PATCH 36/77] add clair3 back in --- modules/local/clair3.nf | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 modules/local/clair3.nf diff --git a/modules/local/clair3.nf b/modules/local/clair3.nf new file mode 100644 index 00000000..1583e277 --- /dev/null +++ b/modules/local/clair3.nf @@ -0,0 +1,39 @@ +process CLAIR3 { + tag "$meta.id" + label 'process_high' + + conda 'bioconda::clair3=0.1.10' + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/clair3:0.1.10--hdfd78af_0' : + 'biocontainers/clair3:0.1.10--hdfd78af_0' }" + + input: + tuple val(meta), path(bam), path(bai) + path(fasta) + path(fai) + + output: + tuple val(meta), path("${meta.id}/*") , emit: vcf + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + """ + /usr/local/bin/run_clair3.sh \ + --bam_fn=$bam \ + --ref_fn=$fasta \ + --threads=$task.cpus \ + --platform=${params.platform} \ + --model_path="/usr/local/bin/models/${params.clair3_model}" \ + --output="${meta.id}" \ + $args + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + clair3: \$( /usr/local/bin/run_clair3.sh --version | sed 's/ /,/' ) + END_VERSIONS + """ +} From 2f46ec24d18dd424be104df94addd1a6b9774eaf Mon Sep 17 00:00:00 2001 From: Yuk Kei Wan Date: Wed, 10 May 2023 17:19:15 +0800 Subject: [PATCH 37/77] add the missing nf-core modules --- modules.json | 328 +++++++++++++----- modules/nf-core/bedtools/bamtobed/main.nf | 35 ++ modules/nf-core/bedtools/bamtobed/meta.yml | 38 ++ modules/nf-core/bedtools/genomecov/main.nf | 59 ++++ modules/nf-core/bedtools/genomecov/meta.yml | 51 +++ modules/nf-core/custom/getchromsizes/main.nf | 44 +++ modules/nf-core/custom/getchromsizes/meta.yml | 53 +++ modules/nf-core/cutesv/main.nf | 37 ++ modules/nf-core/deepvariant/main.nf | 58 ++++ modules/nf-core/deepvariant/meta.yml | 67 ++++ modules/nf-core/graphmap2/align/main.nf | 41 +++ modules/nf-core/graphmap2/align/meta.yml | 51 +++ modules/nf-core/graphmap2/index/main.nf | 34 ++ modules/nf-core/graphmap2/index/meta.yml | 30 ++ modules/nf-core/minimap2/align/main.nf | 48 +++ modules/nf-core/minimap2/align/meta.yml | 65 ++++ modules/nf-core/multiqc/main.nf | 53 +++ modules/nf-core/multiqc/meta.yml | 56 +++ modules/nf-core/qcat/main.nf | 47 +++ modules/nf-core/qcat/meta.yml | 40 +++ modules/nf-core/samtools/view/main.nf | 66 ++++ modules/nf-core/samtools/view/meta.yml | 79 +++++ modules/nf-core/sniffles/main.nf | 40 +++ modules/nf-core/stringtie/stringtie/main.nf | 68 ++++ modules/nf-core/stringtie/stringtie/meta.yml | 57 +++ modules/nf-core/subread/featurecounts/main.nf | 47 +++ .../nf-core/subread/featurecounts/meta.yml | 52 +++ modules/nf-core/ucsc/bedgraphtobigwig/main.nf | 37 ++ .../nf-core/ucsc/bedgraphtobigwig/meta.yml | 44 +++ modules/nf-core/ucsc/bedtobigbed/main.nf | 41 +++ modules/nf-core/ucsc/bedtobigbed/meta.yml | 48 +++ 31 files changed, 1722 insertions(+), 92 deletions(-) create mode 100644 modules/nf-core/bedtools/bamtobed/main.nf create mode 100644 modules/nf-core/bedtools/bamtobed/meta.yml create mode 100644 modules/nf-core/bedtools/genomecov/main.nf create mode 100644 modules/nf-core/bedtools/genomecov/meta.yml create mode 100644 modules/nf-core/custom/getchromsizes/main.nf create mode 100644 modules/nf-core/custom/getchromsizes/meta.yml create mode 100644 modules/nf-core/cutesv/main.nf create mode 100644 modules/nf-core/deepvariant/main.nf create mode 100644 modules/nf-core/deepvariant/meta.yml create mode 100644 modules/nf-core/graphmap2/align/main.nf create mode 100644 modules/nf-core/graphmap2/align/meta.yml create mode 100644 modules/nf-core/graphmap2/index/main.nf create mode 100644 modules/nf-core/graphmap2/index/meta.yml create mode 100644 modules/nf-core/minimap2/align/main.nf create mode 100644 modules/nf-core/minimap2/align/meta.yml create mode 100644 modules/nf-core/multiqc/main.nf create mode 100644 modules/nf-core/multiqc/meta.yml create mode 100644 modules/nf-core/qcat/main.nf create mode 100644 modules/nf-core/qcat/meta.yml create mode 100644 modules/nf-core/samtools/view/main.nf create mode 100644 modules/nf-core/samtools/view/meta.yml create mode 100644 modules/nf-core/sniffles/main.nf create mode 100644 modules/nf-core/stringtie/stringtie/main.nf create mode 100644 modules/nf-core/stringtie/stringtie/meta.yml create mode 100644 modules/nf-core/subread/featurecounts/main.nf create mode 100644 modules/nf-core/subread/featurecounts/meta.yml create mode 100644 modules/nf-core/ucsc/bedgraphtobigwig/main.nf create mode 100755 modules/nf-core/ucsc/bedgraphtobigwig/meta.yml create mode 100644 modules/nf-core/ucsc/bedtobigbed/main.nf create mode 100755 modules/nf-core/ucsc/bedtobigbed/meta.yml diff --git a/modules.json b/modules.json index 8f442c09..04b8136f 100644 --- a/modules.json +++ b/modules.json @@ -1,95 +1,239 @@ { - "name": "nf-core/nanoseq", - "homePage": "https://github.com/nf-core/nanoseq", - "repos": { - "https://github.com/nf-core/modules.git": { - "modules": { - "nf-core": { - "bcftools/sort": { - "branch": "master", - "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", - "installed_by": ["modules"] - }, - "custom/dumpsoftwareversions": { - "branch": "master", - "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] - }, - "fastqc": { - "branch": "master", - "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", - "installed_by": ["modules"] - }, - "nanolyse": { - "branch": "master", - "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", - "installed_by": ["modules"] - }, - "nanoplot": { - "branch": "master", - "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", - "installed_by": ["modules"] - }, - "samtools/faidx": { - "branch": "master", - "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", - "installed_by": ["modules"] - }, - "samtools/flagstat": { - "branch": "master", - "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", - "installed_by": ["modules"] - }, - "samtools/idxstats": { - "branch": "master", - "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", - "installed_by": ["modules"] - }, - "samtools/index": { - "branch": "master", - "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", - "installed_by": ["modules"] - }, - "samtools/sort": { - "branch": "master", - "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", - "installed_by": ["modules"] - }, - "samtools/stats": { - "branch": "master", - "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", - "installed_by": ["modules"] - }, - "stringtie/merge": { - "branch": "master", - "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", - "installed_by": ["modules"] - }, - "tabix/bgzip": { - "branch": "master", - "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", - "installed_by": ["modules"] - }, - "tabix/bgziptabix": { - "branch": "master", - "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", - "installed_by": ["modules"] - }, - "tabix/tabix": { - "branch": "master", - "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", - "installed_by": ["modules"] - }, - "untar": { - "branch": "master", - "git_sha": "5c460c5a4736974abde2843294f35307ee2b0e5e", - "installed_by": ["modules"] - } + "name": "nf-core/nanoseq", + "homePage": "https://github.com/nf-core/nanoseq", + "repos": { + "https://github.com/nf-core/modules.git": { + "modules": { + "nf-core": { + "bcftools/sort": { + "branch": "master", + "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", + "installed_by": [ + "modules" + ] + }, + "bedtools/bamtobed": { + "branch": "master", + "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", + "installed_by": [ + "modules" + ] + }, + "bedtools/genomecov": { + "branch": "master", + "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", + "installed_by": [ + "modules" + ] + }, + "custom/dumpsoftwareversions": { + "branch": "master", + "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", + "installed_by": [ + "modules" + ] + }, + "custom/getchromsizes": { + "branch": "master", + "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", + "installed_by": [ + "modules" + ] + }, + "cutesv": { + "branch": "master", + "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", + "installed_by": [ + "modules" + ] + }, + "deepvariant": { + "branch": "master", + "git_sha": "b9829e1064382745d8dff7f1d74d2138d2864f71", + "installed_by": [ + "modules" + ] + }, + "fastqc": { + "branch": "master", + "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", + "installed_by": [ + "modules" + ] + }, + "graphmap2/align": { + "branch": "master", + "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", + "installed_by": [ + "modules" + ] + }, + "graphmap2/index": { + "branch": "master", + "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", + "installed_by": [ + "modules" + ] + }, + "minimap2/align": { + "branch": "master", + "git_sha": "603ecbd9f45300c9788f197d2a15a005685b4220", + "installed_by": [ + "modules" + ] + }, + "multiqc": { + "branch": "master", + "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", + "installed_by": [ + "modules" + ] + }, + "nanolyse": { + "branch": "master", + "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", + "installed_by": [ + "modules" + ] + }, + "nanoplot": { + "branch": "master", + "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", + "installed_by": [ + "modules" + ] + }, + "qcat": { + "branch": "master", + "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", + "installed_by": [ + "modules" + ] + }, + "samtools/faidx": { + "branch": "master", + "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", + "installed_by": [ + "modules" + ] + }, + "samtools/flagstat": { + "branch": "master", + "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", + "installed_by": [ + "modules" + ] + }, + "samtools/idxstats": { + "branch": "master", + "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", + "installed_by": [ + "modules" + ] + }, + "samtools/index": { + "branch": "master", + "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", + "installed_by": [ + "modules" + ] + }, + "samtools/sort": { + "branch": "master", + "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", + "installed_by": [ + "modules" + ] + }, + "samtools/stats": { + "branch": "master", + "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", + "installed_by": [ + "modules" + ] + }, + "samtools/view": { + "branch": "master", + "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", + "installed_by": [ + "modules" + ] + }, + "sniffles": { + "branch": "master", + "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", + "installed_by": [ + "modules" + ] + }, + "stringtie/merge": { + "branch": "master", + "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", + "installed_by": [ + "modules" + ] + }, + "stringtie/stringtie": { + "branch": "master", + "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", + "installed_by": [ + "modules" + ] + }, + "subread/featurecounts": { + "branch": "master", + "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", + "installed_by": [ + "modules" + ] + }, + "tabix/bgzip": { + "branch": "master", + "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", + "installed_by": [ + "modules" + ] + }, + "tabix/bgziptabix": { + "branch": "master", + "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", + "installed_by": [ + "modules" + ] + }, + "tabix/tabix": { + "branch": "master", + "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", + "installed_by": [ + "modules" + ] + }, + "ucsc/bedgraphtobigwig": { + "branch": "master", + "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", + "installed_by": [ + "modules" + ] + }, + "ucsc/bedtobigbed": { + "branch": "master", + "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", + "installed_by": [ + "modules" + ] + }, + "untar": { + "branch": "master", + "git_sha": "5c460c5a4736974abde2843294f35307ee2b0e5e", + "installed_by": [ + "modules" + ] + } + } + }, + "subworkflows": { + "nf-core": {} + } } - }, - "subworkflows": { - "nf-core": {} - } } - } -} +} \ No newline at end of file diff --git a/modules/nf-core/bedtools/bamtobed/main.nf b/modules/nf-core/bedtools/bamtobed/main.nf new file mode 100644 index 00000000..29f5a62f --- /dev/null +++ b/modules/nf-core/bedtools/bamtobed/main.nf @@ -0,0 +1,35 @@ +process BEDTOOLS_BAMTOBED { + tag "$meta.id" + label 'process_medium' + + conda "bioconda::bedtools=2.30.0" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/bedtools:2.30.0--hc088bd4_0' : + 'biocontainers/bedtools:2.30.0--hc088bd4_0' }" + + input: + tuple val(meta), path(bam) + + output: + tuple val(meta), path("*.bed"), emit: bed + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + """ + bedtools \\ + bamtobed \\ + $args \\ + -i $bam \\ + > ${prefix}.bed + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + bedtools: \$(bedtools --version | sed -e "s/bedtools v//g") + END_VERSIONS + """ +} diff --git a/modules/nf-core/bedtools/bamtobed/meta.yml b/modules/nf-core/bedtools/bamtobed/meta.yml new file mode 100644 index 00000000..5a4ff73a --- /dev/null +++ b/modules/nf-core/bedtools/bamtobed/meta.yml @@ -0,0 +1,38 @@ +name: bedtools_bamtobed +description: Converts a bam file to a bed12 file. +keywords: + - bam + - bed +tools: + - bedtools: + description: | + A set of tools for genomic analysis tasks, specifically enabling genome arithmetic (merge, count, complement) on various file types. + documentation: https://bedtools.readthedocs.io/en/latest/content/tools/complement.html + licence: ["MIT"] +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bam: + type: file + description: Input BAM file + pattern: "*.{bam}" +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bed: + type: file + description: Bed file containing genomic intervals. + pattern: "*.{bed}" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" +authors: + - "@yuukiiwa" + - "@drpatelh" diff --git a/modules/nf-core/bedtools/genomecov/main.nf b/modules/nf-core/bedtools/genomecov/main.nf new file mode 100644 index 00000000..c29e468b --- /dev/null +++ b/modules/nf-core/bedtools/genomecov/main.nf @@ -0,0 +1,59 @@ +process BEDTOOLS_GENOMECOV { + tag "$meta.id" + label 'process_single' + + conda "bioconda::bedtools=2.30.0" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/bedtools:2.30.0--hc088bd4_0' : + 'biocontainers/bedtools:2.30.0--hc088bd4_0' }" + + input: + tuple val(meta), path(intervals), val(scale) + path sizes + val extension + + output: + tuple val(meta), path("*.${extension}"), emit: genomecov + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def args_list = args.tokenize() + args += (scale > 0 && scale != 1) ? " -scale $scale" : "" + if (!args_list.contains('-bg') && (scale > 0 && scale != 1)) { + args += " -bg" + } + + def prefix = task.ext.prefix ?: "${meta.id}" + if (intervals.name =~ /\.bam/) { + """ + bedtools \\ + genomecov \\ + -ibam $intervals \\ + $args \\ + > ${prefix}.${extension} + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + bedtools: \$(bedtools --version | sed -e "s/bedtools v//g") + END_VERSIONS + """ + } else { + """ + bedtools \\ + genomecov \\ + -i $intervals \\ + -g $sizes \\ + $args \\ + > ${prefix}.${extension} + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + bedtools: \$(bedtools --version | sed -e "s/bedtools v//g") + END_VERSIONS + """ + } +} diff --git a/modules/nf-core/bedtools/genomecov/meta.yml b/modules/nf-core/bedtools/genomecov/meta.yml new file mode 100644 index 00000000..83bfab98 --- /dev/null +++ b/modules/nf-core/bedtools/genomecov/meta.yml @@ -0,0 +1,51 @@ +name: bedtools_genomecov +description: Computes histograms (default), per-base reports (-d) and BEDGRAPH (-bg) summaries of feature coverage (e.g., aligned sequences) for a given genome. +keywords: + - bed + - bam + - genomecov +tools: + - bedtools: + description: | + A set of tools for genomic analysis tasks, specifically enabling genome arithmetic (merge, count, complement) on various file types. + documentation: https://bedtools.readthedocs.io/en/latest/content/tools/genomecov.html + licence: ["MIT"] +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - intervals: + type: file + description: BAM/BED/GFF/VCF + pattern: "*.{bam|bed|gff|vcf}" + - scale: + type: value + description: Number containing the scale factor for the output. Set to 1 to disable. Setting to a value other than 1 will also get the -bg bedgraph output format as this is required for this command switch + - sizes: + type: file + description: Tab-delimited table of chromosome names in the first column and chromosome sizes in the second column + - extension: + type: string + description: Extension of the output file (e. g., ".bg", ".bedgraph", ".txt", ".tab", etc.) It is set arbitrarily by the user and corresponds to the file format which depends on arguments. +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - genomecov: + type: file + description: Computed genome coverage file + pattern: "*.${extension}" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" +authors: + - "@Emiller88" + - "@sruthipsuresh" + - "@drpatelh" + - "@sidorov-si" + - "@chris-cheshire" diff --git a/modules/nf-core/custom/getchromsizes/main.nf b/modules/nf-core/custom/getchromsizes/main.nf new file mode 100644 index 00000000..060a2e88 --- /dev/null +++ b/modules/nf-core/custom/getchromsizes/main.nf @@ -0,0 +1,44 @@ +process CUSTOM_GETCHROMSIZES { + tag "$fasta" + label 'process_single' + + conda "bioconda::samtools=1.16.1" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/samtools:1.16.1--h6899075_1' : + 'biocontainers/samtools:1.16.1--h6899075_1' }" + + input: + tuple val(meta), path(fasta) + + output: + tuple val(meta), path ("*.sizes"), emit: sizes + tuple val(meta), path ("*.fai") , emit: fai + tuple val(meta), path ("*.gzi") , emit: gzi, optional: true + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + """ + samtools faidx $fasta + cut -f 1,2 ${fasta}.fai > ${fasta}.sizes + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + getchromsizes: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') + END_VERSIONS + """ + + stub: + """ + touch ${fasta}.fai + touch ${fasta}.sizes + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + getchromsizes: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') + END_VERSIONS + """ +} diff --git a/modules/nf-core/custom/getchromsizes/meta.yml b/modules/nf-core/custom/getchromsizes/meta.yml new file mode 100644 index 00000000..219ca1d8 --- /dev/null +++ b/modules/nf-core/custom/getchromsizes/meta.yml @@ -0,0 +1,53 @@ +name: custom_getchromsizes +description: Generates a FASTA file of chromosome sizes and a fasta index file +keywords: + - fasta + - chromosome + - indexing +tools: + - samtools: + description: Tools for dealing with SAM, BAM and CRAM files + homepage: http://www.htslib.org/ + documentation: http://www.htslib.org/doc/samtools.html + tool_dev_url: https://github.com/samtools/samtools + doi: 10.1093/bioinformatics/btp352 + licence: ["MIT"] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - fasta: + type: file + description: FASTA file + pattern: "*.{fa,fasta,fna,fas}" + +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - sizes: + type: file + description: File containing chromosome lengths + pattern: "*.{sizes}" + - fai: + type: file + description: FASTA index file + pattern: "*.{fai}" + - gzi: + type: file + description: Optional gzip index file for compressed inputs + pattern: "*.gzi" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + +authors: + - "@tamara-hodgetts" + - "@chris-cheshire" + - "@muffato" diff --git a/modules/nf-core/cutesv/main.nf b/modules/nf-core/cutesv/main.nf new file mode 100644 index 00000000..20e16f0f --- /dev/null +++ b/modules/nf-core/cutesv/main.nf @@ -0,0 +1,37 @@ +process CUTESV { + tag "$meta.id" + label 'process_high' + + conda "bioconda::cutesv=2.0.2" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/cutesv:1.0.12--pyhdfd78af_0' : + 'biocontainers/cutesv:2.0.2--pyhdfd78af_0' }" + + input: + tuple val(meta), path(bam), path(bai) + tuple val(meta2), path(fasta) + + output: + tuple val(meta), path("*.vcf"), emit: vcf + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + """ + cuteSV \ + ${bam} \\ + ${fasta} \\ + ${prefix}.vcf \\ + . \\ + --threads $task.cpus \\ + $args + cat <<-END_VERSIONS > versions.yml + "${task.process}": + cuteSV: \$( cuteSV --version 2>&1 | sed 's/cuteSV //g' ) + END_VERSIONS + """ +} diff --git a/modules/nf-core/deepvariant/main.nf b/modules/nf-core/deepvariant/main.nf new file mode 100644 index 00000000..afc5e444 --- /dev/null +++ b/modules/nf-core/deepvariant/main.nf @@ -0,0 +1,58 @@ +process DEEPVARIANT { + tag "$meta.id" + label 'process_medium' + + container "docker.io/google/deepvariant:1.4.0" + + // Exit if running this module with -profile conda / -profile mamba + if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { + exit 1, "DEEPVARIANT module does not support Conda. Please use Docker / Singularity / Podman instead." + } + + input: + tuple val(meta), path(input), path(index), path(intervals) + path(fasta) + path(fai) + path(gzi) + + output: + tuple val(meta), path("${prefix}.vcf.gz") , emit: vcf + tuple val(meta), path("${prefix}.g.vcf.gz"), emit: gvcf + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + prefix = task.ext.prefix ?: "${meta.id}" + def regions = intervals ? "--regions ${intervals}" : "" + + """ + /opt/deepvariant/bin/run_deepvariant \\ + --ref=${fasta} \\ + --reads=${input} \\ + --output_vcf=${prefix}.vcf.gz \\ + --output_gvcf=${prefix}.g.vcf.gz \\ + ${args} \\ + ${regions} \\ + --num_shards=${task.cpus} + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + deepvariant: \$(echo \$(/opt/deepvariant/bin/run_deepvariant --version) | sed 's/^.*version //; s/ .*\$//' ) + END_VERSIONS + """ + + stub: + prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}.vcf.gz + touch ${prefix}.g.vcf.gz + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + deepvariant: \$(echo \$(/opt/deepvariant/bin/run_deepvariant --version) | sed 's/^.*version //; s/ .*\$//' ) + END_VERSIONS + """ +} diff --git a/modules/nf-core/deepvariant/meta.yml b/modules/nf-core/deepvariant/meta.yml new file mode 100644 index 00000000..97f068ec --- /dev/null +++ b/modules/nf-core/deepvariant/meta.yml @@ -0,0 +1,67 @@ +name: deepvariant +description: DeepVariant is an analysis pipeline that uses a deep neural network to call genetic variants from next-generation DNA sequencing data +keywords: + - variant calling + - machine learning + - neural network +tools: + - deepvariant: + description: DeepVariant is an analysis pipeline that uses a deep neural network to call genetic variants from next-generation DNA sequencing data + homepage: https://github.com/google/deepvariant + documentation: https://github.com/google/deepvariant + tool_dev_url: https://github.com/google/deepvariant + doi: "10.1038/nbt.4235" + licence: ["BSD-3-clause"] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - input: + type: file + description: BAM/CRAM file + pattern: "*.bam/cram" + - index: + type: file + description: Index of BAM/CRAM file + pattern: "*.bai/crai" + - interval: + type: file + description: Interval file for targeted regions + pattern: "*.bed" + - fasta: + type: file + description: The reference fasta file + pattern: "*.fasta" + - fai: + type: file + description: Index of reference fasta file + pattern: "*.fai" + - gzi: + type: file + description: GZI index of reference fasta file + pattern: "*.gzi" + +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - vcf: + type: file + description: Compressed VCF file + pattern: "*.vcf.gz" + - gvcf: + type: file + description: Compressed GVCF file + pattern: "*.g.vcf.gz" + - version: + type: file + description: File containing software version + pattern: "*.{version.txt}" + +authors: + - "@abhi18av" diff --git a/modules/nf-core/graphmap2/align/main.nf b/modules/nf-core/graphmap2/align/main.nf new file mode 100644 index 00000000..d517ff51 --- /dev/null +++ b/modules/nf-core/graphmap2/align/main.nf @@ -0,0 +1,41 @@ +process GRAPHMAP2_ALIGN { + tag "$meta.id" + label 'process_medium' + tag "$meta.id" + + conda "bioconda::graphmap=0.6.3" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/graphmap:0.6.3--he513fc3_0' : + 'biocontainers/graphmap:0.6.3--he513fc3_0' }" + + input: + tuple val(meta), path(reads) + path fasta + path index + + output: + tuple val(meta), path("*.sam"), emit: sam + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + """ + graphmap2 \\ + align \\ + -t $task.cpus \\ + -r $fasta \\ + -i $index \\ + -d $reads \\ + -o ${prefix}.sam \\ + $args + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + graphmap2: \$(echo \$(graphmap2 align 2>&1) | sed 's/^.*Version: v//; s/ .*\$//') + END_VERSIONS + """ +} diff --git a/modules/nf-core/graphmap2/align/meta.yml b/modules/nf-core/graphmap2/align/meta.yml new file mode 100644 index 00000000..d498069b --- /dev/null +++ b/modules/nf-core/graphmap2/align/meta.yml @@ -0,0 +1,51 @@ +name: graphmap2_align +description: A versatile pairwise aligner for genomic and spliced nucleotide sequences +keywords: + - align + - fasta + - fastq + - genome + - reference +tools: + - graphmap2: + description: | + A versatile pairwise aligner for genomic and spliced nucleotide sequences. + homepage: https://github.com/lbcb-sci/graphmap2 + documentation: https://github.com/lbcb-sci/graphmap2#graphmap2---a-highly-sensitive-and-accurate-mapper-for-long-error-prone-reads + licence: ["MIT"] +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - fastq: + type: file + description: | + List of input FASTQ files + and paired-end data, respectively. + - fasta: + type: file + description: | + Reference database in FASTA format. + - index: + type: file + description: | + FASTA index in gmidx. +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - sam: + type: file + description: Alignment in SAM format + pattern: "*.sam" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" +authors: + - "@yuukiiwa" + - "@drpatelh" diff --git a/modules/nf-core/graphmap2/index/main.nf b/modules/nf-core/graphmap2/index/main.nf new file mode 100644 index 00000000..c0b19e69 --- /dev/null +++ b/modules/nf-core/graphmap2/index/main.nf @@ -0,0 +1,34 @@ +process GRAPHMAP2_INDEX { + label 'process_medium' + + conda "bioconda::graphmap=0.6.3" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/graphmap:0.6.3--he513fc3_0' : + 'biocontainers/graphmap:0.6.3--he513fc3_0' }" + + input: + path fasta + + output: + path "*.gmidx" , emit: index + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + """ + graphmap2 \\ + align \\ + -t $task.cpus \\ + -I \\ + $args \\ + -r $fasta + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + graphmap2: \$(echo \$(graphmap2 align 2>&1) | sed 's/^.*Version: v//; s/ .*\$//') + END_VERSIONS + """ +} diff --git a/modules/nf-core/graphmap2/index/meta.yml b/modules/nf-core/graphmap2/index/meta.yml new file mode 100644 index 00000000..8e9d2c1c --- /dev/null +++ b/modules/nf-core/graphmap2/index/meta.yml @@ -0,0 +1,30 @@ +name: graphmap2_index +description: A versatile pairwise aligner for genomic and spliced nucleotide sequences +keywords: + - index + - fasta + - reference +tools: + - graphmap2: + description: | + A versatile pairwise aligner for genomic and spliced nucleotide sequences. + homepage: https://github.com/lbcb-sci/graphmap2 + documentation: https://github.com/lbcb-sci/graphmap2#graphmap2---a-highly-sensitive-and-accurate-mapper-for-long-error-prone-reads + licence: ["MIT"] +input: + - fasta: + type: file + description: | + Reference database in FASTA format. +output: + - gmidx: + type: file + description: Graphmap2 fasta index in gmidx format + pattern: "*.gmidx" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" +authors: + - "@yuukiiwa" + - "@drpatelh" diff --git a/modules/nf-core/minimap2/align/main.nf b/modules/nf-core/minimap2/align/main.nf new file mode 100644 index 00000000..4da47c18 --- /dev/null +++ b/modules/nf-core/minimap2/align/main.nf @@ -0,0 +1,48 @@ +process MINIMAP2_ALIGN { + tag "$meta.id" + label 'process_medium' + + // Note: the versions here need to match the versions used in the mulled container below and minimap2/index + conda "bioconda::minimap2=2.24 bioconda::samtools=1.14" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/mulled-v2-66534bcbb7031a148b13e2ad42583020b9cd25c4:1679e915ddb9d6b4abda91880c4b48857d471bd8-0' : + 'biocontainers/mulled-v2-66534bcbb7031a148b13e2ad42583020b9cd25c4:1679e915ddb9d6b4abda91880c4b48857d471bd8-0' }" + + input: + tuple val(meta), path(reads) + path reference + val bam_format + val cigar_paf_format + val cigar_bam + + output: + tuple val(meta), path("*.paf"), optional: true, emit: paf + tuple val(meta), path("*.bam"), optional: true, emit: bam + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + def bam_output = bam_format ? "-a | samtools sort | samtools view -@ ${task.cpus} -b -h -o ${prefix}.bam" : "-o ${prefix}.paf" + def cigar_paf = cigar_paf_format && !bam_format ? "-c" : '' + def set_cigar_bam = cigar_bam && bam_format ? "-L" : '' + """ + minimap2 \\ + $args \\ + -t $task.cpus \\ + "${reference ?: reads}" \\ + "$reads" \\ + $cigar_paf \\ + $set_cigar_bam \\ + $bam_output + + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + minimap2: \$(minimap2 --version 2>&1) + END_VERSIONS + """ +} diff --git a/modules/nf-core/minimap2/align/meta.yml b/modules/nf-core/minimap2/align/meta.yml new file mode 100644 index 00000000..991b39a0 --- /dev/null +++ b/modules/nf-core/minimap2/align/meta.yml @@ -0,0 +1,65 @@ +name: minimap2_align +description: A versatile pairwise aligner for genomic and spliced nucleotide sequences +keywords: + - align + - fasta + - fastq + - genome + - paf + - reference +tools: + - minimap2: + description: | + A versatile pairwise aligner for genomic and spliced nucleotide sequences. + homepage: https://github.com/lh3/minimap2 + documentation: https://github.com/lh3/minimap2#uguide + licence: ["MIT"] +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - reads: + type: file + description: | + List of input FASTA or FASTQ files of size 1 and 2 for single-end + and paired-end data, respectively. + - reference: + type: file + description: | + Reference database in FASTA format. + - bam_format: + type: boolean + description: Specify that output should be in BAM format + - cigar_paf_format: + type: boolean + description: Specify that output CIGAR should be in PAF format + - cigar_bam: + type: boolean + description: | + Write CIGAR with >65535 ops at the CG tag. This is recommended when + doing XYZ (https://github.com/lh3/minimap2#working-with-65535-cigar-operations) +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - paf: + type: file + description: Alignment in PAF format + pattern: "*.paf" + - bam: + type: file + description: Alignment in BAM format + pattern: "*.bam" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" +authors: + - "@heuermh" + - "@sofstam" + - "@sateeshperi" + - "@jfy133" diff --git a/modules/nf-core/multiqc/main.nf b/modules/nf-core/multiqc/main.nf new file mode 100644 index 00000000..1fc387be --- /dev/null +++ b/modules/nf-core/multiqc/main.nf @@ -0,0 +1,53 @@ +process MULTIQC { + label 'process_single' + + conda "bioconda::multiqc=1.14" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/multiqc:1.14--pyhdfd78af_0' : + 'biocontainers/multiqc:1.14--pyhdfd78af_0' }" + + input: + path multiqc_files, stageAs: "?/*" + path(multiqc_config) + path(extra_multiqc_config) + path(multiqc_logo) + + output: + path "*multiqc_report.html", emit: report + path "*_data" , emit: data + path "*_plots" , optional:true, emit: plots + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def config = multiqc_config ? "--config $multiqc_config" : '' + def extra_config = extra_multiqc_config ? "--config $extra_multiqc_config" : '' + """ + multiqc \\ + --force \\ + $args \\ + $config \\ + $extra_config \\ + . + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + multiqc: \$( multiqc --version | sed -e "s/multiqc, version //g" ) + END_VERSIONS + """ + + stub: + """ + touch multiqc_data + touch multiqc_plots + touch multiqc_report.html + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + multiqc: \$( multiqc --version | sed -e "s/multiqc, version //g" ) + END_VERSIONS + """ +} diff --git a/modules/nf-core/multiqc/meta.yml b/modules/nf-core/multiqc/meta.yml new file mode 100644 index 00000000..f93b5ee5 --- /dev/null +++ b/modules/nf-core/multiqc/meta.yml @@ -0,0 +1,56 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/yaml-schema.json +name: MultiQC +description: Aggregate results from bioinformatics analyses across many samples into a single report +keywords: + - QC + - bioinformatics tools + - Beautiful stand-alone HTML report +tools: + - multiqc: + description: | + MultiQC searches a given directory for analysis logs and compiles a HTML report. + It's a general use tool, perfect for summarising the output from numerous bioinformatics tools. + homepage: https://multiqc.info/ + documentation: https://multiqc.info/docs/ + licence: ["GPL-3.0-or-later"] + +input: + - multiqc_files: + type: file + description: | + List of reports / files recognised by MultiQC, for example the html and zip output of FastQC + - multiqc_config: + type: file + description: Optional config yml for MultiQC + pattern: "*.{yml,yaml}" + - extra_multiqc_config: + type: file + description: Second optional config yml for MultiQC. Will override common sections in multiqc_config. + pattern: "*.{yml,yaml}" + - multiqc_logo: + type: file + description: Optional logo file for MultiQC + pattern: "*.{png}" + +output: + - report: + type: file + description: MultiQC report file + pattern: "multiqc_report.html" + - data: + type: directory + description: MultiQC data dir + pattern: "multiqc_data" + - plots: + type: file + description: Plots created by MultiQC + pattern: "*_data" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" +authors: + - "@abhi18av" + - "@bunop" + - "@drpatelh" + - "@jfy133" diff --git a/modules/nf-core/qcat/main.nf b/modules/nf-core/qcat/main.nf new file mode 100644 index 00000000..0fdcf7b4 --- /dev/null +++ b/modules/nf-core/qcat/main.nf @@ -0,0 +1,47 @@ +process QCAT { + tag "$meta.id" + label 'process_medium' + + conda "bioconda::qcat=1.1.0" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/qcat:1.1.0--py_0' : + 'biocontainers/qcat:1.1.0--py_0' }" + + input: + tuple val(meta), path(reads) + val barcode_kit + + output: + tuple val(meta), path("fastq/*.fastq.gz"), emit: reads + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + """ + ## Unzip fastq file + ## qcat doesn't support zipped files yet + FILE=$reads + if [[ \$FILE == *.gz ]] + then + zcat $reads > unzipped.fastq + FILE=unzipped.fastq + fi + + qcat \\ + -f \$FILE \\ + -b ./fastq \\ + --kit $barcode_kit + + ## Zip fastq files + gzip fastq/* + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + qcat: \$(qcat --version 2>&1 | sed 's/^.*qcat //; s/ .*\$//') + END_VERSIONS + """ +} diff --git a/modules/nf-core/qcat/meta.yml b/modules/nf-core/qcat/meta.yml new file mode 100644 index 00000000..97b9b884 --- /dev/null +++ b/modules/nf-core/qcat/meta.yml @@ -0,0 +1,40 @@ +name: qcat +description: Demultiplexer for Nanopore samples +keywords: + - demultiplex + +tools: + - qcat: + description: | + A demultiplexer for Nanopore samples + homepage: https://github.com/nanoporetech/qcat + documentation: https://github.com/nanoporetech/qcat#qcat + licence: ["MPL-2.0"] +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - reads: + type: file + description: | + Non-demultiplexed fastq files + +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - reads: + type: file + description: Demultiplexed fastq samples + pattern: "*.fastq.gz" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" +authors: + - "@yuukiiwa" + - "@drpatelh" diff --git a/modules/nf-core/samtools/view/main.nf b/modules/nf-core/samtools/view/main.nf new file mode 100644 index 00000000..b87369e5 --- /dev/null +++ b/modules/nf-core/samtools/view/main.nf @@ -0,0 +1,66 @@ +process SAMTOOLS_VIEW { + tag "$meta.id" + label 'process_low' + + conda "bioconda::samtools=1.17" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/samtools:1.17--h00cdaf9_0' : + 'biocontainers/samtools:1.17--h00cdaf9_0' }" + + input: + tuple val(meta), path(input), path(index) + path fasta + path qname + + output: + tuple val(meta), path("*.bam"), emit: bam, optional: true + tuple val(meta), path("*.cram"), emit: cram, optional: true + tuple val(meta), path("*.sam"), emit: sam, optional: true + tuple val(meta), path("*.bai"), emit: bai, optional: true + tuple val(meta), path("*.csi"), emit: csi, optional: true + tuple val(meta), path("*.crai"), emit: crai, optional: true + path "versions.yml", emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def args2 = task.ext.args2 ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + def reference = fasta ? "--reference ${fasta}" : "" + def readnames = qname ? "--qname-file ${qname}": "" + def file_type = args.contains("--output-fmt sam") ? "sam" : + args.contains("--output-fmt bam") ? "bam" : + args.contains("--output-fmt cram") ? "cram" : + input.getExtension() + if ("$input" == "${prefix}.${file_type}") error "Input and output names are the same, use \"task.ext.prefix\" to disambiguate!" + """ + samtools \\ + view \\ + --threads ${task.cpus-1} \\ + ${reference} \\ + ${readnames} \\ + $args \\ + -o ${prefix}.${file_type} \\ + $input \\ + $args2 + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') + END_VERSIONS + """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}.bam + touch ${prefix}.cram + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') + END_VERSIONS + """ +} diff --git a/modules/nf-core/samtools/view/meta.yml b/modules/nf-core/samtools/view/meta.yml new file mode 100644 index 00000000..76916033 --- /dev/null +++ b/modules/nf-core/samtools/view/meta.yml @@ -0,0 +1,79 @@ +name: samtools_view +description: filter/convert SAM/BAM/CRAM file +keywords: + - view + - bam + - sam + - cram +tools: + - samtools: + description: | + SAMtools is a set of utilities for interacting with and post-processing + short DNA sequence read alignments in the SAM, BAM and CRAM formats, written by Heng Li. + These files are generated as output by short read aligners like BWA. + homepage: http://www.htslib.org/ + documentation: http://www.htslib.org/doc/samtools.html + doi: 10.1093/bioinformatics/btp352 + licence: ["MIT"] +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - input: + type: file + description: BAM/CRAM/SAM file + pattern: "*.{bam,cram,sam}" + - index: + type: optional file + description: BAM.BAI/BAM.CSI/CRAM.CRAI file + pattern: "*.{.bai,.csi,.crai}" + - fasta: + type: optional file + description: Reference file the CRAM was created with + pattern: "*.{fasta,fa}" + - qname: + type: file + description: Optional file with read names to output only select alignments + pattern: "*.{txt,list}" +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bam: + type: file + description: optional filtered/converted BAM file + pattern: "*.{bam}" + - cram: + type: file + description: optional filtered/converted CRAM file + pattern: "*.{cram}" + - sam: + type: file + description: optional filtered/converted SAM file + pattern: "*.{sam}" + # bai, csi, and crai are created with `--write-index` + - bai: + type: file + description: optional BAM file index + pattern: "*.{bai}" + - csi: + type: file + description: optional tabix BAM file index + pattern: "*.{csi}" + - crai: + type: file + description: optional CRAM file index + pattern: "*.{crai}" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" +authors: + - "@drpatelh" + - "@joseespinosa" + - "@FriederikeHanssen" + - "@priyanka-surana" diff --git a/modules/nf-core/sniffles/main.nf b/modules/nf-core/sniffles/main.nf new file mode 100644 index 00000000..46ef39cf --- /dev/null +++ b/modules/nf-core/sniffles/main.nf @@ -0,0 +1,40 @@ +process SNIFFLES { + tag "$meta.id" + label 'process_high' + + conda "bioconda::sniffles=2.0.7" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/sniffles:2.0.7--pyhdfd78af_0' : + 'biocontainers/sniffles:2.0.7--pyhdfd78af_0' }" + + input: + tuple val(meta), path(bam), path(bai) + tuple val(meta2), path(fasta) + + + output: + tuple val(meta), path("*.vcf"), emit: vcf + tuple val(meta), path("*.snf"), emit: snf + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + """ + sniffles \\ + --input $bam \\ + --vcf ${prefix}.vcf \\ + --snf ${prefix}.snf \\ + --reference $fasta \\ + -t $task.cpus \\ + $args + cat <<-END_VERSIONS > versions.yml + "${task.process}": + sniffles: \$(sniffles --help 2>&1 | grep Version |sed 's/^.*Version //') + END_VERSIONS + """ +} + diff --git a/modules/nf-core/stringtie/stringtie/main.nf b/modules/nf-core/stringtie/stringtie/main.nf new file mode 100644 index 00000000..d0f8b563 --- /dev/null +++ b/modules/nf-core/stringtie/stringtie/main.nf @@ -0,0 +1,68 @@ +process STRINGTIE_STRINGTIE { + tag "$meta.id" + label 'process_medium' + + conda "bioconda::stringtie=2.2.1" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/stringtie:2.2.1--hecb563c_2' : + 'biocontainers/stringtie:2.2.1--hecb563c_2' }" + + input: + tuple val(meta), path(bam) + path annotation_gtf + + output: + tuple val(meta), path("*.transcripts.gtf"), emit: transcript_gtf + tuple val(meta), path("*.abundance.txt") , emit: abundance + tuple val(meta), path("*.coverage.gtf") , optional: true, emit: coverage_gtf + tuple val(meta), path("*.ballgown") , optional: true, emit: ballgown + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + def reference = annotation_gtf ? "-G $annotation_gtf" : "" + def ballgown = annotation_gtf ? "-b ${prefix}.ballgown" : "" + def coverage = annotation_gtf ? "-C ${prefix}.coverage.gtf" : "" + + def strandedness = '' + if (meta.strandedness == 'forward') { + strandedness = '--fr' + } else if (meta.strandedness == 'reverse') { + strandedness = '--rf' + } + """ + stringtie \\ + $bam \\ + $strandedness \\ + $reference \\ + -o ${prefix}.transcripts.gtf \\ + -A ${prefix}.gene.abundance.txt \\ + $coverage \\ + $ballgown \\ + -p $task.cpus \\ + $args + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + stringtie: \$(stringtie --version 2>&1) + END_VERSIONS + """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}.transcripts.gtf + touch ${prefix}.gene.abundance.txt + touch ${prefix}.coverage.gtf + touch ${prefix}.ballgown + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + stringtie: \$(stringtie --version 2>&1) + END_VERSIONS + """ +} diff --git a/modules/nf-core/stringtie/stringtie/meta.yml b/modules/nf-core/stringtie/stringtie/meta.yml new file mode 100644 index 00000000..75518470 --- /dev/null +++ b/modules/nf-core/stringtie/stringtie/meta.yml @@ -0,0 +1,57 @@ +name: stringtie_stringtie +description: Transcript assembly and quantification for RNA-Se +keywords: + - transcript + - assembly + - quantification + - gtf + +tools: + - stringtie2: + description: | + Transcript assembly and quantification for RNA-Seq + homepage: https://ccb.jhu.edu/software/stringtie/index.shtml + documentation: https://ccb.jhu.edu/software/stringtie/index.shtml?t=manual + licence: ["MIT"] +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bam: + type: file + description: | + Stringtie transcript gtf output(s). + - annotation_gtf: + type: file + description: | + Annotation gtf file (optional). +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - transcript_gtf: + type: file + description: transcript gtf + pattern: "*.{transcripts.gtf}" + - coverage_gtf: + type: file + description: coverage gtf + pattern: "*.{coverage.gtf}" + - abudance: + type: file + description: abudance + pattern: "*.{abudance.txt}" + - ballgown: + type: file + description: for running ballgown + pattern: "*.{ballgown}" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" +authors: + - "@drpatelh" diff --git a/modules/nf-core/subread/featurecounts/main.nf b/modules/nf-core/subread/featurecounts/main.nf new file mode 100644 index 00000000..a524b92f --- /dev/null +++ b/modules/nf-core/subread/featurecounts/main.nf @@ -0,0 +1,47 @@ +process SUBREAD_FEATURECOUNTS { + tag "$meta.id" + label 'process_medium' + + conda "bioconda::subread=2.0.1" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/subread:2.0.1--hed695b0_0' : + 'biocontainers/subread:2.0.1--hed695b0_0' }" + + input: + tuple val(meta), path(bams), path(annotation) + + output: + tuple val(meta), path("*featureCounts.txt") , emit: counts + tuple val(meta), path("*featureCounts.txt.summary"), emit: summary + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + def paired_end = meta.single_end ? '' : '-p' + + def strandedness = 0 + if (meta.strandedness == 'forward') { + strandedness = 1 + } else if (meta.strandedness == 'reverse') { + strandedness = 2 + } + """ + featureCounts \\ + $args \\ + $paired_end \\ + -T $task.cpus \\ + -a $annotation \\ + -s $strandedness \\ + -o ${prefix}.featureCounts.txt \\ + ${bams.join(' ')} + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + subread: \$( echo \$(featureCounts -v 2>&1) | sed -e "s/featureCounts v//g") + END_VERSIONS + """ +} diff --git a/modules/nf-core/subread/featurecounts/meta.yml b/modules/nf-core/subread/featurecounts/meta.yml new file mode 100644 index 00000000..cf02f1ea --- /dev/null +++ b/modules/nf-core/subread/featurecounts/meta.yml @@ -0,0 +1,52 @@ +name: subread_featurecounts +description: Count reads that map to genomic features +keywords: + - counts + - fasta + - genome + - reference + +tools: + - featurecounts: + description: featureCounts is a highly efficient general-purpose read summarization program that counts mapped reads for genomic features such as genes, exons, promoter, gene bodies, genomic bins and chromosomal locations. It can be used to count both RNA-seq and genomic DNA-seq reads. + homepage: http://bioinf.wehi.edu.au/featureCounts/ + documentation: http://bioinf.wehi.edu.au/subread-package/SubreadUsersGuide.pdf + doi: "10.1093/bioinformatics/btt656" + licence: ["GPL v3"] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bam: + type: file + description: BAM/SAM file containing read alignments + pattern: "*.{bam}" + - annotation: + type: file + description: Genomic features annotation in GTF or SAF + pattern: "*.{gtf,saf}" + +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - counts: + type: file + description: Counts of reads mapping to features + pattern: "*featureCounts.txt" + - summary: + type: file + description: Summary log file + pattern: "*.featureCounts.txt.summary" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + +authors: + - "@ntoda03" diff --git a/modules/nf-core/ucsc/bedgraphtobigwig/main.nf b/modules/nf-core/ucsc/bedgraphtobigwig/main.nf new file mode 100644 index 00000000..054924e7 --- /dev/null +++ b/modules/nf-core/ucsc/bedgraphtobigwig/main.nf @@ -0,0 +1,37 @@ +process UCSC_BEDGRAPHTOBIGWIG { + tag "$meta.id" + label 'process_single' + + // WARN: Version information not provided by tool on CLI. Please update version string below when bumping container versions. + conda "bioconda::ucsc-bedgraphtobigwig=377" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/ucsc-bedgraphtobigwig:377--h446ed27_1' : + 'biocontainers/ucsc-bedgraphtobigwig:377--h446ed27_1' }" + + input: + tuple val(meta), path(bedgraph) + path sizes + + output: + tuple val(meta), path("*.bigWig"), emit: bigwig + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + def VERSION = '377' // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions. + """ + bedGraphToBigWig \\ + $bedgraph \\ + $sizes \\ + ${prefix}.bigWig + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + ucsc: $VERSION + END_VERSIONS + """ +} diff --git a/modules/nf-core/ucsc/bedgraphtobigwig/meta.yml b/modules/nf-core/ucsc/bedgraphtobigwig/meta.yml new file mode 100755 index 00000000..ba8915be --- /dev/null +++ b/modules/nf-core/ucsc/bedgraphtobigwig/meta.yml @@ -0,0 +1,44 @@ +name: ucsc_bedgraphtobigwig +description: Convert a bedGraph file to bigWig format. +keywords: + - bedgraph + - bigwig +tools: + - ucsc: + description: Convert a bedGraph file to bigWig format. + homepage: http://hgdownload.cse.ucsc.edu/admin/exe/ + documentation: https://genome.ucsc.edu/goldenPath/help/bigWig.html + licence: ["varies; see http://genome.ucsc.edu/license"] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bedgraph: + type: file + description: bedGraph file + pattern: "*.{bedGraph}" + - sizes: + type: file + description: chromosome sizes file + pattern: "*.{sizes}" + +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + - bigwig: + type: file + description: bigWig file + pattern: "*.{bigWig}" + +authors: + - "@drpatelh" diff --git a/modules/nf-core/ucsc/bedtobigbed/main.nf b/modules/nf-core/ucsc/bedtobigbed/main.nf new file mode 100644 index 00000000..bab62e75 --- /dev/null +++ b/modules/nf-core/ucsc/bedtobigbed/main.nf @@ -0,0 +1,41 @@ +process UCSC_BEDTOBIGBED { + tag "$meta.id" + label 'process_single' + + // WARN: Version information not provided by tool on CLI. Please update version string below when bumping container versions. + conda "bioconda::ucsc-bedtobigbed=377" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/ucsc-bedtobigbed:377--ha8a8165_3' : + 'biocontainers/ucsc-bedtobigbed:377--ha8a8165_3' }" + + input: + tuple val(meta), path(bed) + path sizes + path autosql + + output: + tuple val(meta), path("*.bigBed"), emit: bigbed + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + def as_option = autosql ? "-as=${autosql}" : "" + def VERSION = '377' // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions. + """ + bedToBigBed \\ + $bed \\ + $sizes \\ + $as_option \\ + $args \\ + ${prefix}.bigBed + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + ucsc: $VERSION + END_VERSIONS + """ +} diff --git a/modules/nf-core/ucsc/bedtobigbed/meta.yml b/modules/nf-core/ucsc/bedtobigbed/meta.yml new file mode 100755 index 00000000..babb220d --- /dev/null +++ b/modules/nf-core/ucsc/bedtobigbed/meta.yml @@ -0,0 +1,48 @@ +name: ucsc_bedtobigbed +description: Convert file from bed to bigBed format +keywords: + - bed + - bigbed +tools: + - ucsc: + description: Convert file from bed to bigBed format + homepage: http://hgdownload.cse.ucsc.edu/admin/exe/ + documentation: https://genome.ucsc.edu/goldenPath/help/bigBed.html + licence: ["varies; see http://genome.ucsc.edu/license"] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bed: + type: file + description: bed file + pattern: "*.{bed}" + - sizes: + type: file + description: chromosome sizes file + pattern: "*.{sizes}" + - autosql: + type: file + description: autoSql file to describe the columns of the BED file + pattern: "*.{as}" + +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + - bigbed: + type: file + description: bigBed file + pattern: "*.{bigBed}" + +authors: + - "@drpatelh" From a179ba2e8d5ad8771adefc8a19168e2c73bbe969 Mon Sep 17 00:00:00 2001 From: Yuk Kei Wan Date: Wed, 10 May 2023 17:21:24 +0800 Subject: [PATCH 38/77] add the missing nf-core modules --- modules.json | 7 +++++ modules/nf-core/minimap2/index/main.nf | 34 +++++++++++++++++++++ modules/nf-core/minimap2/index/meta.yml | 40 +++++++++++++++++++++++++ 3 files changed, 81 insertions(+) create mode 100644 modules/nf-core/minimap2/index/main.nf create mode 100644 modules/nf-core/minimap2/index/meta.yml diff --git a/modules.json b/modules.json index 04b8136f..5bd7340b 100644 --- a/modules.json +++ b/modules.json @@ -82,6 +82,13 @@ "modules" ] }, + "minimap2/index": { + "branch": "master", + "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", + "installed_by": [ + "modules" + ] + }, "multiqc": { "branch": "master", "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", diff --git a/modules/nf-core/minimap2/index/main.nf b/modules/nf-core/minimap2/index/main.nf new file mode 100644 index 00000000..7a1bb227 --- /dev/null +++ b/modules/nf-core/minimap2/index/main.nf @@ -0,0 +1,34 @@ +process MINIMAP2_INDEX { + label 'process_medium' + + // Note: the versions here need to match the versions used in minimap2/align + conda "bioconda::minimap2=2.24" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/minimap2:2.24--h7132678_1' : + 'biocontainers/minimap2:2.24--h7132678_1' }" + + input: + tuple val(meta), path(fasta) + + output: + tuple val(meta), path("*.mmi"), emit: index + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + """ + minimap2 \\ + -t $task.cpus \\ + -d ${fasta.baseName}.mmi \\ + $args \\ + $fasta + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + minimap2: \$(minimap2 --version 2>&1) + END_VERSIONS + """ +} diff --git a/modules/nf-core/minimap2/index/meta.yml b/modules/nf-core/minimap2/index/meta.yml new file mode 100644 index 00000000..b58f35c6 --- /dev/null +++ b/modules/nf-core/minimap2/index/meta.yml @@ -0,0 +1,40 @@ +name: minimap2_index +description: Provides fasta index required by minimap2 alignment. +keywords: + - index + - fasta + - reference +tools: + - minimap2: + description: | + A versatile pairwise aligner for genomic and spliced nucleotide sequences. + homepage: https://github.com/lh3/minimap2 + documentation: https://github.com/lh3/minimap2#uguide + licence: ["MIT"] +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - fasta: + type: file + description: | + Reference database in FASTA format. +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - index: + type: file + description: Minimap2 fasta index. + pattern: "*.mmi" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" +authors: + - "@yuukiiwa" + - "@drpatelh" From b572c144d2450dba3a1890bc9d4b8a2cafc15de9 Mon Sep 17 00:00:00 2001 From: Yuk Kei Wan Date: Wed, 10 May 2023 17:23:27 +0800 Subject: [PATCH 39/77] fix bug --- modules/local/get_nanolyse_fasta.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/local/get_nanolyse_fasta.nf b/modules/local/get_nanolyse_fasta.nf index 736ac64d..d3f236c2 100644 --- a/modules/local/get_nanolyse_fasta.nf +++ b/modules/local/get_nanolyse_fasta.nf @@ -4,7 +4,7 @@ process GET_NANOLYSE_FASTA { conda "conda-forge::sed=4.7" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://containers.biocontainers.pro/s3/SingImgsRepo/biocontainers/v1.2.0_cv1/biocontainers_v1.2.0_cv1.img' : - 'biocontainers/biocontainers:v1.2.0_cv1' }" + 'docker.io/biocontainers/biocontainers:v1.2.0_cv1' }" output: path "*fasta.gz" , emit: ch_nanolyse_fasta From 48384ce89c48cf57b79c147bd5d2cdccd372f464 Mon Sep 17 00:00:00 2001 From: Yuk Kei Wan Date: Wed, 10 May 2023 17:35:13 +0800 Subject: [PATCH 40/77] fix bug --- modules/local/nanopolish_index_eventalign.nf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/local/nanopolish_index_eventalign.nf b/modules/local/nanopolish_index_eventalign.nf index d5290c03..0057ffb2 100644 --- a/modules/local/nanopolish_index_eventalign.nf +++ b/modules/local/nanopolish_index_eventalign.nf @@ -8,7 +8,7 @@ process NANOPOLISH_INDEX_EVENTALIGN { 'quay.io/biocontainers/nanopolish:0.13.2--he3b7ca5_2' }" input: - tuple val(meta), path(genome), path(gtf), path(fast5), path(fastq), path(bam), path(bai) + tuple val(meta), path(genome), path(gtf), path(fastq), path(bam), path(bai) output: tuple val(meta), path(genome), path(gtf), path("*eventalign.txt"), path("*summary.txt"), emit: nanopolish_outputs @@ -20,6 +20,7 @@ process NANOPOLISH_INDEX_EVENTALIGN { script: sample_summary = "$meta.id" +"_summary.txt" sample_eventalign = "$meta.id" +"_eventalign.txt" + fast5 = "$meta.nanopolish_fast5" """ nanopolish index -d $fast5 $fastq nanopolish eventalign --reads $fastq --bam $bam --genome $genome --scale-events --signal-index --summary $sample_summary --threads $task.cpus > $sample_eventalign From 748cba5183f4346684a71a65fa8f88778a40b185 Mon Sep 17 00:00:00 2001 From: Yuk Kei Wan Date: Wed, 10 May 2023 09:42:35 +0000 Subject: [PATCH 41/77] PRETTY! --- modules.json | 134 +++++++++++++-------------------------------------- 1 file changed, 34 insertions(+), 100 deletions(-) diff --git a/modules.json b/modules.json index 5bd7340b..15f60815 100644 --- a/modules.json +++ b/modules.json @@ -8,233 +8,167 @@ "bcftools/sort": { "branch": "master", "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "bedtools/bamtobed": { "branch": "master", "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "bedtools/genomecov": { "branch": "master", "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "custom/dumpsoftwareversions": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "custom/getchromsizes": { "branch": "master", "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "cutesv": { "branch": "master", "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "deepvariant": { "branch": "master", "git_sha": "b9829e1064382745d8dff7f1d74d2138d2864f71", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "fastqc": { "branch": "master", "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "graphmap2/align": { "branch": "master", "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "graphmap2/index": { "branch": "master", "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "minimap2/align": { "branch": "master", "git_sha": "603ecbd9f45300c9788f197d2a15a005685b4220", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "minimap2/index": { "branch": "master", "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "multiqc": { "branch": "master", "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "nanolyse": { "branch": "master", "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "nanoplot": { "branch": "master", "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "qcat": { "branch": "master", "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "samtools/faidx": { "branch": "master", "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "samtools/flagstat": { "branch": "master", "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "samtools/idxstats": { "branch": "master", "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "samtools/index": { "branch": "master", "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "samtools/sort": { "branch": "master", "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "samtools/stats": { "branch": "master", "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "samtools/view": { "branch": "master", "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "sniffles": { "branch": "master", "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "stringtie/merge": { "branch": "master", "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "stringtie/stringtie": { "branch": "master", "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "subread/featurecounts": { "branch": "master", "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "tabix/bgzip": { "branch": "master", "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "tabix/bgziptabix": { "branch": "master", "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "tabix/tabix": { "branch": "master", "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "ucsc/bedgraphtobigwig": { "branch": "master", "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "ucsc/bedtobigbed": { "branch": "master", "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "untar": { "branch": "master", "git_sha": "5c460c5a4736974abde2843294f35307ee2b0e5e", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] } } }, @@ -243,4 +177,4 @@ } } } -} \ No newline at end of file +} From 585cf237cebb08267c66abe971242b389d69b3b2 Mon Sep 17 00:00:00 2001 From: Yuk Kei Wan <41866052+yuukiiwa@users.noreply.github.com> Date: Fri, 19 May 2023 10:38:46 +0800 Subject: [PATCH 42/77] Update nextflow_schema.json Co-authored-by: Christopher Hakkaart --- nextflow_schema.json | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/nextflow_schema.json b/nextflow_schema.json index 5086a4f6..b2e5dbe6 100644 --- a/nextflow_schema.json +++ b/nextflow_schema.json @@ -317,7 +317,13 @@ "properties": { "fasta": { "type": "string", - "default": null + "default": null, + "format": "file-path", + "mimetype": "text/plain", + "pattern": "^\\S+\\.fn?a(sta)?(\\.gz)?$", + "fa_icon": "fas fa-font", + "description": "Path to FASTA genome file.", + "help_text": "This parameter is *mandatory* if `--genome` is not specified." }, "gtf": { "type": "string", From 2ddff0cf11646e38d8aacafbc6fa7bd7fef938a3 Mon Sep 17 00:00:00 2001 From: Yuk Kei Wan <41866052+yuukiiwa@users.noreply.github.com> Date: Fri, 19 May 2023 10:38:58 +0800 Subject: [PATCH 43/77] Update nextflow_schema.json Co-authored-by: Christopher Hakkaart --- nextflow_schema.json | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/nextflow_schema.json b/nextflow_schema.json index b2e5dbe6..17569f63 100644 --- a/nextflow_schema.json +++ b/nextflow_schema.json @@ -327,7 +327,13 @@ }, "gtf": { "type": "string", - "default": null + "default": null, + "format": "file-path", + "mimetype": "text/plain", + "pattern": "^\\S+\\.gtf(\\.gz)?$", + "description": "Path to GTF annotation file.", + "fa_icon": "fas fa-code-branch", + "help_text": "This parameter is *mandatory* if `--genome` is not specified." }, "genome": { "type": "string", From 91db26447b1b848e0b67896740e0098960705231 Mon Sep 17 00:00:00 2001 From: Yuk Kei Wan <41866052+yuukiiwa@users.noreply.github.com> Date: Fri, 19 May 2023 10:39:07 +0800 Subject: [PATCH 44/77] Update nextflow_schema.json Co-authored-by: Christopher Hakkaart --- nextflow_schema.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nextflow_schema.json b/nextflow_schema.json index 17569f63..2e148949 100644 --- a/nextflow_schema.json +++ b/nextflow_schema.json @@ -338,7 +338,8 @@ "genome": { "type": "string", "description": "Name of iGenomes reference.", - "default": "null" + "fa_icon": "fas fa-book", + "help_text": "If using a reference genome configured in the pipeline using iGenomes, use this parameter to give the ID for the reference. This is then used to build the full paths for all required reference genome files e.g. `--genome GRCh38`. \n\nSee the [nf-core website docs](https://nf-co.re/usage/reference_genomes) for more details." }, "igenomes_base": { "type": "string", From 8364c10363254abfbfb0a36fb272719bd88320a3 Mon Sep 17 00:00:00 2001 From: Yuk Kei Wan <41866052+yuukiiwa@users.noreply.github.com> Date: Fri, 19 May 2023 10:39:14 +0800 Subject: [PATCH 45/77] Update bin/check_samplesheet.py Co-authored-by: Christopher Hakkaart --- bin/check_samplesheet.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/check_samplesheet.py b/bin/check_samplesheet.py index a5ab1143..93b6b2d0 100755 --- a/bin/check_samplesheet.py +++ b/bin/check_samplesheet.py @@ -136,7 +136,7 @@ def check_samplesheet(file_in, updated_path, file_out): print_error('basecalled fastq input does not end with ".fastq.gz" or ".fq.gz"') else: print_error( - f'{input_file} path does not end with ".fastq.gz", ".fq.gz", or ".bam" and is not an existing directory with correct fast5 and/or fastq inputs.' + '{input_file} path does not end with ".fastq.gz", ".fq.gz", or ".bam" and is not an existing directory with correct fast5 and/or fastq inputs.' ) ## Create sample mapping dictionary = {group: {replicate : [ barcode, input_file, nanopolish_fast5 ]}} From d14ce4e19789169bbe3b45f91bb507c770d7804f Mon Sep 17 00:00:00 2001 From: Yuk Kei Wan Date: Fri, 19 May 2023 11:27:13 +0800 Subject: [PATCH 46/77] address suggestions from Chris --- conf/base.config | 15 --------------- conf/modules.config | 5 +++++ conf/test.config | 6 +++--- conf/test_nodx_noaln.config | 2 +- conf/test_nodx_stringtie.config | 6 +++--- conf/test_nodx_vc.config | 2 +- 6 files changed, 13 insertions(+), 23 deletions(-) diff --git a/conf/base.config b/conf/base.config index b43b92ad..5312a301 100644 --- a/conf/base.config +++ b/conf/base.config @@ -63,21 +63,6 @@ process { errorStrategy = 'retry' maxRetries = 2 } - withName:MINIMAP2_ALIGN_VARIANT{ - ext.args = { "--MD -ax map-ont --eqx" } - } - withName:SAMTOOLS_VIEW { - ext.args = '--output-fmt bam' - } - withName:BEDTOOLS_GENOMECOV { - ext.args = '-bg' - } - withName:SUBREAD_FEATURECOUNTS_GENE { - ext.args = '-g gene_id -t exon -o counts_gene.txt' - } - withName:SUBREAD_FEATURECOUNTS_TRANSCRIPT{ - ext.args = '--primary --fraction -F GTF -g transcript_id -t transcript --extraAttributes gene_id -o counts_transcript.txt' - } withName:CUSTOM_DUMPSOFTWAREVERSIONS { cache = false } diff --git a/conf/modules.config b/conf/modules.config index 53b1bb9c..a2042e0a 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -159,6 +159,7 @@ if (!params.skip_alignment) { enabled: false, saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] + ext.args = { "--MD -ax map-ont --eqx" } } withName: MINIMAP2_ALIGN_OTHER { publishDir = [ @@ -178,6 +179,7 @@ if (!params.skip_alignment) { enabled: false, saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] + ext.args = '--output-fmt bam' } withName: SAMTOOLS_SORT { ext.prefix = { "${meta.id}.sorted" } @@ -255,6 +257,7 @@ if (!params.skip_alignment) { pattern: "*bedGraph", saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] + ext.args = '-bg' } } process { @@ -467,6 +470,7 @@ if (!params.skip_quantification) { mode: 'copy', enabled: true, saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + ext.args = '-g gene_id -t exon -o counts_gene.txt' ] } withName: SUBREAD_FEATURECOUNTS_TRANSCRIPT { @@ -476,6 +480,7 @@ if (!params.skip_quantification) { enabled: true, saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] + ext.args = '--primary --fraction -F GTF -g transcript_id -t transcript --extraAttributes gene_id -o counts_transcript.txt' } } if (!params.skip_differential_analysis) { diff --git a/conf/test.config b/conf/test.config index 0392c999..02970123 100644 --- a/conf/test.config +++ b/conf/test.config @@ -17,9 +17,9 @@ params { max_time = 12.h // Input data to perform demultipexing - input = 'https://raw.githubusercontent.com/yuukiiwa/test-datasets/nanoseq/3.0/samplesheet/samplesheet_nobc_dx.csv' - fasta = 'https://raw.githubusercontent.com/yuukiiwa/test-datasets/nanoseq/reference/chr22_23800000-23980000.fa' - gtf = 'https://raw.githubusercontent.com/yuukiiwa/test-datasets/nanoseq/reference/chr22_23800000-23980000.gtf' + input = 'https://raw.githubusercontent.com/nf-core/test-datasets/nanoseq/3.0/samplesheet/samplesheet_nobc_dx.csv' + fasta = 'https://raw.githubusercontent.com/nf-core/test-datasets/nanoseq/reference/chr22_23800000-23980000.fa' + gtf = 'https://raw.githubusercontent.com/nf-core/test-datasets/nanoseq/reference/chr22_23800000-23980000.gtf' run_nanolyse = true protocol = 'DNA' barcode_kit = 'NBD103/NBD104' diff --git a/conf/test_nodx_noaln.config b/conf/test_nodx_noaln.config index d8e8805b..87c33d47 100644 --- a/conf/test_nodx_noaln.config +++ b/conf/test_nodx_noaln.config @@ -17,7 +17,7 @@ params { max_time = 12.h // Input data to skip demultiplexing and alignment - input = 'https://raw.githubusercontent.com/yuukiiwa/test-datasets/nanoseq/3.0/samplesheet/samplesheet_nobc_nodx_noaln.csv' + input = 'https://raw.githubusercontent.com/nf-core/test-datasets/nanoseq/3.0/samplesheet/samplesheet_nobc_nodx_noaln.csv' fasta = 'https://raw.githubusercontent.com/nf-core/test-datasets/nanoseq/reference/chr22_1-17550000.fa' gtf = 'https://raw.githubusercontent.com/nf-core/test-datasets/nanoseq/reference/chr22_1-17500000.gtf' protocol = 'directRNA' diff --git a/conf/test_nodx_stringtie.config b/conf/test_nodx_stringtie.config index 3015d6b4..cfb81dc5 100644 --- a/conf/test_nodx_stringtie.config +++ b/conf/test_nodx_stringtie.config @@ -17,9 +17,9 @@ params { max_time = 12.h // Input data to skip demultiplexing and stringtie - input = 'https://raw.githubusercontent.com/yuukiiwa/test-datasets/nanoseq/3.0/samplesheet/samplesheet_nobc_nodx_stringtie.csv' - fasta = 'https://raw.githubusercontent.com/yuukiiwa/test-datasets/nanoseq/reference/chr22_23800000-23980000.fa' - gtf = 'https://raw.githubusercontent.com/yuukiiwa/test-datasets/nanoseq/reference/chr22_23800000-23980000.gtf' + input = 'https://raw.githubusercontent.com/nf-core/test-datasets/nanoseq/3.0/samplesheet/samplesheet_nobc_nodx_stringtie.csv' + fasta = 'https://raw.githubusercontent.com/nf-core/test-datasets/nanoseq/reference/chr22_23800000-23980000.fa' + gtf = 'https://raw.githubusercontent.com/nf-core/test-datasets/nanoseq/reference/chr22_23800000-23980000.gtf' protocol = 'directRNA' skip_demultiplexing = true skip_fusion_analysis= true diff --git a/conf/test_nodx_vc.config b/conf/test_nodx_vc.config index 1937e331..4c35ae48 100644 --- a/conf/test_nodx_vc.config +++ b/conf/test_nodx_vc.config @@ -17,7 +17,7 @@ params { max_time = 12.h // Input data to skip demultiplexing and variant call - input = 'https://raw.githubusercontent.com/yuukiiwa/test-datasets/nanoseq/3.0/samplesheet/samplesheet_nobc_nodx_vc.csv' + input = 'https://raw.githubusercontent.com/nf-core/test-datasets/nanoseq/3.0/samplesheet/samplesheet_nobc_nodx_vc.csv' fasta = 'https://raw.githubusercontent.com/nf-core/test-datasets/nanoseq/reference/hg19_KCMF1.fa' protocol = 'DNA' skip_quantification = true From 32a2afbb1d87e405b922af29071d6008bbd88061 Mon Sep 17 00:00:00 2001 From: Yuk Kei Wan Date: Fri, 19 May 2023 11:38:16 +0800 Subject: [PATCH 47/77] fix typo --- conf/modules.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/modules.config b/conf/modules.config index a2042e0a..85894cf1 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -470,8 +470,8 @@ if (!params.skip_quantification) { mode: 'copy', enabled: true, saveAs: { filename -> filename.equals('versions.yml') ? null : filename } - ext.args = '-g gene_id -t exon -o counts_gene.txt' ] + ext.args = '-g gene_id -t exon -o counts_gene.txt' } withName: SUBREAD_FEATURECOUNTS_TRANSCRIPT { publishDir = [ From 9b2d287f32ab25cc3ba98a8be4f5314fb343a859 Mon Sep 17 00:00:00 2001 From: Yuk Kei Wan <41866052+yuukiiwa@users.noreply.github.com> Date: Fri, 19 May 2023 14:40:47 +0800 Subject: [PATCH 48/77] Update nextflow_schema.json --- nextflow_schema.json | 1 - 1 file changed, 1 deletion(-) diff --git a/nextflow_schema.json b/nextflow_schema.json index 2e148949..2908ed6a 100644 --- a/nextflow_schema.json +++ b/nextflow_schema.json @@ -317,7 +317,6 @@ "properties": { "fasta": { "type": "string", - "default": null, "format": "file-path", "mimetype": "text/plain", "pattern": "^\\S+\\.fn?a(sta)?(\\.gz)?$", From 2130938d16ae1354546328bdf482b65e36dd67bb Mon Sep 17 00:00:00 2001 From: Yuk Kei Wan <41866052+yuukiiwa@users.noreply.github.com> Date: Fri, 19 May 2023 14:44:19 +0800 Subject: [PATCH 49/77] Update nextflow_schema.json --- nextflow_schema.json | 1 - 1 file changed, 1 deletion(-) diff --git a/nextflow_schema.json b/nextflow_schema.json index 2908ed6a..0511335a 100644 --- a/nextflow_schema.json +++ b/nextflow_schema.json @@ -326,7 +326,6 @@ }, "gtf": { "type": "string", - "default": null, "format": "file-path", "mimetype": "text/plain", "pattern": "^\\S+\\.gtf(\\.gz)?$", From 96e51e2f1966c4f08f5b8e1bd9c3b96d59f08ba8 Mon Sep 17 00:00:00 2001 From: Yuk Kei Wan Date: Mon, 22 May 2023 10:12:03 +0800 Subject: [PATCH 50/77] update m6anet biocontainer --- modules/local/m6anet_dataprep.nf | 8 +++++--- modules/local/m6anet_inference.nf | 8 +++++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/modules/local/m6anet_dataprep.nf b/modules/local/m6anet_dataprep.nf index 2f2dda5c..804da8a6 100644 --- a/modules/local/m6anet_dataprep.nf +++ b/modules/local/m6anet_dataprep.nf @@ -3,7 +3,9 @@ process M6ANET_DATAPREP { label 'process_medium' // conda (params.enable_conda ? "bioconda::nanopolish==0.13.2" : null) // need to get xpore onto conda - container "docker.io/yuukiiwa/m6anet:1.0" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/m6anet:2.0.2--pyhdfd78af_0' : + 'quay.io/biocontainers/m6anet:2.0.2--pyhdfd78af_0' }" input: tuple val(meta), path(genome), path(gtf), path(eventalign), path(nanopolish_summary) @@ -17,14 +19,14 @@ process M6ANET_DATAPREP { script: """ - m6anet-dataprep \\ + m6anet dataprep \\ --eventalign $eventalign \\ --out_dir $meta.id \\ --n_processes $task.cpus cat <<-END_VERSIONS > versions.yml "${task.process}": - m6anet: \$( echo 'm6anet 1.0' ) + m6anet: \$( echo 'm6anet 2.0.2' ) END_VERSIONS """ } diff --git a/modules/local/m6anet_inference.nf b/modules/local/m6anet_inference.nf index b8f13060..0f626031 100644 --- a/modules/local/m6anet_inference.nf +++ b/modules/local/m6anet_inference.nf @@ -4,7 +4,9 @@ process M6ANET_INFERENCE { label 'process_medium' // conda (params.enable_conda ? "bioconda::nanopolish==0.13.2" : null) // need to get xpore onto conda - container "docker.io/yuukiiwa/m6anet:1.0" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/m6anet:2.0.2--pyhdfd78af_0' : + 'quay.io/biocontainers/m6anet:2.0.2--pyhdfd78af_0' }" input: tuple val(meta), path(input_dir) @@ -19,11 +21,11 @@ process M6ANET_INFERENCE { script: def out_dir = meta.id+"_results" """ - m6anet-run_inference --input_dir $input_dir --out_dir $out_dir --batch_size 512 --n_processes $task.cpus --num_iterations 5 --device cpu + m6anet inference --input_dir $input_dir --out_dir $out_dir --batch_size 512 --n_processes $task.cpus --num_iterations 5 --device cpu cat <<-END_VERSIONS > versions.yml "${task.process}": - m6anet: \$( echo 'm6anet 1.0' ) + m6anet: \$( echo 'm6anet 2.0.2' ) END_VERSIONS """ } From 93d391a743eb3f3c98cb29d19bd5d723a9d0c777 Mon Sep 17 00:00:00 2001 From: Yuk Kei Wan Date: Mon, 22 May 2023 16:21:34 +0800 Subject: [PATCH 51/77] update test-dataset paths --- conf/test.config | 2 +- conf/test_full.config | 2 +- conf/test_nodx_noaln.config | 2 +- conf/test_nodx_rnamod.config | 2 +- conf/test_nodx_stringtie.config | 2 +- conf/test_nodx_vc.config | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/conf/test.config b/conf/test.config index 02970123..cdbedb49 100644 --- a/conf/test.config +++ b/conf/test.config @@ -17,7 +17,7 @@ params { max_time = 12.h // Input data to perform demultipexing - input = 'https://raw.githubusercontent.com/nf-core/test-datasets/nanoseq/3.0/samplesheet/samplesheet_nobc_dx.csv' + input = 'https://raw.githubusercontent.com/nf-core/test-datasets/nanoseq/3.2/samplesheet/samplesheet_nobc_dx.csv' fasta = 'https://raw.githubusercontent.com/nf-core/test-datasets/nanoseq/reference/chr22_23800000-23980000.fa' gtf = 'https://raw.githubusercontent.com/nf-core/test-datasets/nanoseq/reference/chr22_23800000-23980000.gtf' run_nanolyse = true diff --git a/conf/test_full.config b/conf/test_full.config index 4cbe46d6..0aaf7200 100644 --- a/conf/test_full.config +++ b/conf/test_full.config @@ -17,7 +17,7 @@ params { config_profile_description = 'Full test dataset to check pipeline function' // Input data for full size test - input = 'https://raw.githubusercontent.com/nf-core/test-datasets/nanoseq/3.0/samplesheet/samplesheet_full.csv' + input = 'https://raw.githubusercontent.com/nf-core/test-datasets/nanoseq/3.2/samplesheet/samplesheet_full.csv' protocol = 'cDNA' skip_demultiplexing = true skip_fusion_analysis= true diff --git a/conf/test_nodx_noaln.config b/conf/test_nodx_noaln.config index 87c33d47..4d757357 100644 --- a/conf/test_nodx_noaln.config +++ b/conf/test_nodx_noaln.config @@ -17,7 +17,7 @@ params { max_time = 12.h // Input data to skip demultiplexing and alignment - input = 'https://raw.githubusercontent.com/nf-core/test-datasets/nanoseq/3.0/samplesheet/samplesheet_nobc_nodx_noaln.csv' + input = 'https://raw.githubusercontent.com/nf-core/test-datasets/nanoseq/3.2/samplesheet/samplesheet_nobc_nodx_noaln.csv' fasta = 'https://raw.githubusercontent.com/nf-core/test-datasets/nanoseq/reference/chr22_1-17550000.fa' gtf = 'https://raw.githubusercontent.com/nf-core/test-datasets/nanoseq/reference/chr22_1-17500000.gtf' protocol = 'directRNA' diff --git a/conf/test_nodx_rnamod.config b/conf/test_nodx_rnamod.config index 0debc37d..8f3e51e4 100644 --- a/conf/test_nodx_rnamod.config +++ b/conf/test_nodx_rnamod.config @@ -17,7 +17,7 @@ params { max_time = 12.h // Input data to skip demultiplexing and rna modification analysis - input = 'https://raw.githubusercontent.com/nf-core/test-datasets/nanoseq/3.0/samplesheet/samplesheet_nobc_nodx_rnamod.csv' + input = 'https://raw.githubusercontent.com/nf-core/test-datasets/nanoseq/3.2/samplesheet/samplesheet_nobc_nodx_rnamod.csv' fasta = 'https://raw.githubusercontent.com/nf-core/test-datasets/nanoseq/reference/modification_transcriptome_subset.fa' gtf = 'https://raw.githubusercontent.com/nf-core/test-datasets/nanoseq/reference/modification_transcriptome_subset.gtf' protocol = 'directRNA' diff --git a/conf/test_nodx_stringtie.config b/conf/test_nodx_stringtie.config index cfb81dc5..0c6aa263 100644 --- a/conf/test_nodx_stringtie.config +++ b/conf/test_nodx_stringtie.config @@ -17,7 +17,7 @@ params { max_time = 12.h // Input data to skip demultiplexing and stringtie - input = 'https://raw.githubusercontent.com/nf-core/test-datasets/nanoseq/3.0/samplesheet/samplesheet_nobc_nodx_stringtie.csv' + input = 'https://raw.githubusercontent.com/nf-core/test-datasets/nanoseq/3.2/samplesheet/samplesheet_nobc_nodx_stringtie.csv' fasta = 'https://raw.githubusercontent.com/nf-core/test-datasets/nanoseq/reference/chr22_23800000-23980000.fa' gtf = 'https://raw.githubusercontent.com/nf-core/test-datasets/nanoseq/reference/chr22_23800000-23980000.gtf' protocol = 'directRNA' diff --git a/conf/test_nodx_vc.config b/conf/test_nodx_vc.config index 4c35ae48..f347c293 100644 --- a/conf/test_nodx_vc.config +++ b/conf/test_nodx_vc.config @@ -17,7 +17,7 @@ params { max_time = 12.h // Input data to skip demultiplexing and variant call - input = 'https://raw.githubusercontent.com/nf-core/test-datasets/nanoseq/3.0/samplesheet/samplesheet_nobc_nodx_vc.csv' + input = 'https://raw.githubusercontent.com/nf-core/test-datasets/nanoseq/3.2/samplesheet/samplesheet_nobc_nodx_vc.csv' fasta = 'https://raw.githubusercontent.com/nf-core/test-datasets/nanoseq/reference/hg19_KCMF1.fa' protocol = 'DNA' skip_quantification = true From c59485c080690d591fc5c861300634063e523c81 Mon Sep 17 00:00:00 2001 From: Yuk Kei Wan <41866052+yuukiiwa@users.noreply.github.com> Date: Tue, 23 May 2023 11:22:38 +0800 Subject: [PATCH 52/77] Update test_full.config --- conf/test_full.config | 1 + 1 file changed, 1 insertion(+) diff --git a/conf/test_full.config b/conf/test_full.config index 0aaf7200..f80be3e0 100644 --- a/conf/test_full.config +++ b/conf/test_full.config @@ -18,6 +18,7 @@ params { // Input data for full size test input = 'https://raw.githubusercontent.com/nf-core/test-datasets/nanoseq/3.2/samplesheet/samplesheet_full.csv' + genome = 'GRCh37' protocol = 'cDNA' skip_demultiplexing = true skip_fusion_analysis= true From 0a2fb82679ed0edda7c2ee98a27d9a2c3140b1de Mon Sep 17 00:00:00 2001 From: Yuk Kei Wan Date: Tue, 23 May 2023 14:56:17 +0800 Subject: [PATCH 53/77] igenome --- workflows/nanoseq.nf | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/workflows/nanoseq.nf b/workflows/nanoseq.nf index 7ab4dc50..a06e1217 100644 --- a/workflows/nanoseq.nf +++ b/workflows/nanoseq.nf @@ -29,6 +29,11 @@ if (params.gtf){ ch_gtf = file(params.gtf) } +if (params.genome){ + ch_fasta = file(params.genomes[params.genome].fasta, checkIfExists: true) + ch_gtf = file(params.genomes[params.genome].gtf, checkIfExists: true) +} + // Function to check if running offline def isOffline() { try { From 855ce8b4c5095c449f015699246d5bea83b3098f Mon Sep 17 00:00:00 2001 From: Yuk Kei Wan Date: Tue, 23 May 2023 15:35:35 +0800 Subject: [PATCH 54/77] igenome --- workflows/nanoseq.nf | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/workflows/nanoseq.nf b/workflows/nanoseq.nf index a06e1217..1a843dbf 100644 --- a/workflows/nanoseq.nf +++ b/workflows/nanoseq.nf @@ -23,15 +23,20 @@ if (params.input) { if (params.fasta){ ch_fasta = file(params.fasta) +} else { + if (params.genome) { + ch_fasta = file(params.genomes[params.genome].fasta, checkIfExists: true) + } else { + exit 1, 'reference fasta not specified!' + } } if (params.gtf){ ch_gtf = file(params.gtf) -} - -if (params.genome){ - ch_fasta = file(params.genomes[params.genome].fasta, checkIfExists: true) - ch_gtf = file(params.genomes[params.genome].gtf, checkIfExists: true) +} else { + if (params.genome) { + ch_gtf = file(params.genomes[params.genome].gtf, checkIfExists: true) + } } // Function to check if running offline From 398ab245ce3a488852fe9a560770d50baaaef1c5 Mon Sep 17 00:00:00 2001 From: Yuk Kei Wan Date: Tue, 23 May 2023 16:17:50 +0800 Subject: [PATCH 55/77] clean up --- modules/local/bedtools_bamtobed.nf | 32 --------------- modules/local/bedtools_genomecov.nf | 34 --------------- modules/local/cutesv.nf | 38 ----------------- modules/local/deepvariant.nf | 44 -------------------- modules/local/graphmap2_align.nf | 40 ------------------ modules/local/graphmap2_index.nf | 37 ----------------- modules/local/minimap2_align.nf | 42 ------------------- modules/local/minimap2_index.nf | 40 ------------------ modules/local/qcat.nf | 46 --------------------- modules/local/samtools_sort_index.nf | 32 --------------- modules/local/samtools_view_bam.nf | 29 ------------- modules/local/sniffles.nf | 34 --------------- modules/local/stringtie2.nf | 33 --------------- modules/local/subread_featurecounts.nf | 57 -------------------------- modules/local/ucsc_bed12tobigbed.nf | 33 --------------- modules/local/ucsc_bedgraphtobigwig.nf | 30 -------------- 16 files changed, 601 deletions(-) delete mode 100644 modules/local/bedtools_bamtobed.nf delete mode 100644 modules/local/bedtools_genomecov.nf delete mode 100644 modules/local/cutesv.nf delete mode 100644 modules/local/deepvariant.nf delete mode 100644 modules/local/graphmap2_align.nf delete mode 100644 modules/local/graphmap2_index.nf delete mode 100644 modules/local/minimap2_align.nf delete mode 100644 modules/local/minimap2_index.nf delete mode 100644 modules/local/qcat.nf delete mode 100644 modules/local/samtools_sort_index.nf delete mode 100644 modules/local/samtools_view_bam.nf delete mode 100644 modules/local/sniffles.nf delete mode 100644 modules/local/stringtie2.nf delete mode 100644 modules/local/subread_featurecounts.nf delete mode 100644 modules/local/ucsc_bed12tobigbed.nf delete mode 100644 modules/local/ucsc_bedgraphtobigwig.nf diff --git a/modules/local/bedtools_bamtobed.nf b/modules/local/bedtools_bamtobed.nf deleted file mode 100644 index 4eb3b8e6..00000000 --- a/modules/local/bedtools_bamtobed.nf +++ /dev/null @@ -1,32 +0,0 @@ -process BEDTOOLS_BAMBED { - label 'process_medium' - - conda "bioconda::bedtools=2.29.2" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/bedtools:2.29.2--hc088bd4_0' : - 'quay.io/biocontainers/bedtools:2.29.2--hc088bd4_0' }" - - input: - tuple val(meta), path(sizes), val(is_transcripts), path(bam), path(bai) - - output: - tuple val(meta), path(sizes), path("*.bed12"), emit: bed12 - path "versions.yml" , emit: versions - - when: - !params.skip_alignment && !params.skip_bigbed && (params.protocol == 'directRNA' || params.protocol == 'cDNA') - - script: - """ - bedtools \\ - bamtobed \\ - -bed12 \\ - -cigar \\ - -i ${bam[0]} \\ - | bedtools sort > ${meta.id}.bed12 - cat <<-END_VERSIONS > versions.yml - "${task.process}": - bedtools: \$(bedtools --version | sed -e "s/bedtools v//g") - END_VERSIONS - """ -} diff --git a/modules/local/bedtools_genomecov.nf b/modules/local/bedtools_genomecov.nf deleted file mode 100644 index 147d1b02..00000000 --- a/modules/local/bedtools_genomecov.nf +++ /dev/null @@ -1,34 +0,0 @@ -process BEDTOOLS_GENOMECOV { - tag "$meta.id" - label 'process_medium' - - conda "bioconda::bedtools=2.29.2" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/bedtools:2.29.2--hc088bd4_0' : - 'quay.io/biocontainers/bedtools:2.29.2--hc088bd4_0' }" - - input: - tuple val(meta), path(sizes), val(is_transcripts), path(bam), path(bai) - - output: - tuple val(meta), path(sizes), path("*.bedGraph"), emit: bedgraph - path "versions.yml" , emit: versions - - when: - task.ext.when == null || task.ext.when - - script: - split = (params.protocol == 'DNA' || is_transcripts) ? "" : "-split" - """ - bedtools \\ - genomecov \\ - -split \\ - -ibam ${bam[0]} \\ - -bg \\ - | bedtools sort > ${meta.id}.bedGraph - cat <<-END_VERSIONS > versions.yml - "${task.process}": - bedtools: \$(bedtools --version | sed -e "s/bedtools v//g") - END_VERSIONS - """ -} diff --git a/modules/local/cutesv.nf b/modules/local/cutesv.nf deleted file mode 100644 index 33cbbf8c..00000000 --- a/modules/local/cutesv.nf +++ /dev/null @@ -1,38 +0,0 @@ -process CUTESV { - tag "$meta.id" - label 'process_high' - - conda "bioconda::cutesv=1.0.12" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/cutesv:1.0.12--pyhdfd78af_0' : - 'quay.io/biocontainers/cutesv:1.0.12--pyhdfd78af_0' }" - - input: - tuple val(meta), path(sizes), val(is_transcripts), path(input), path(index) - path(fasta) - - output: - tuple val(meta), path("*_cuteSV.vcf"), emit: sv_calls // vcf files - path "versions.yml" , emit: versions - - when: - task.ext.when == null || task.ext.when - - script: - """ - cuteSV \ - ${input} \ - ${fasta} \ - ${meta.id}_cuteSV.vcf \ - . \ - --threads $task.cpus \ - --sample ${meta.id} \ - --genotype - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - cuteSV: \$( cuteSV --version 2>&1 | sed 's/cuteSV //g' ) - END_VERSIONS - """ -} - diff --git a/modules/local/deepvariant.nf b/modules/local/deepvariant.nf deleted file mode 100644 index 3c66c740..00000000 --- a/modules/local/deepvariant.nf +++ /dev/null @@ -1,44 +0,0 @@ -process DEEPVARIANT { - tag "$meta.id" - label 'process_medium' - - container "google/deepvariant:1.4.0" - - // Exit if running this module with -profile conda / -profile mamba - if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { - exit 1, "DEEPVARIANT module does not support Conda. Please use Docker / Singularity / Podman instead." - } - - input: - tuple val(meta), path(sizes), val(is_transcripts), path(input), path(index) - path(fasta) - path(fai) - - output: - tuple val(meta), path("${prefix}.vcf.gz") , emit: vcf - tuple val(meta), path("${prefix}.g.vcf.gz"), emit: gvcf - path "versions.yml" , emit: versions - - when: - task.ext.when == null || task.ext.when - - script: - def args = task.ext.args ?: '' - prefix = task.ext.prefix ?: "${meta.id}" - //def regions = intervals ? "--regions ${intervals}" : "" - - """ - /opt/deepvariant/bin/run_deepvariant \\ - --ref=${fasta} \\ - --reads=${input} \\ - --output_vcf=${prefix}.vcf.gz \\ - --output_gvcf=${prefix}.g.vcf.gz \\ - ${args} \\ - --num_shards=${task.cpus} - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - deepvariant: \$(echo \$(/opt/deepvariant/bin/run_deepvariant --version) | sed 's/^.*version //; s/ .*\$//' ) - END_VERSIONS - """ -} diff --git a/modules/local/graphmap2_align.nf b/modules/local/graphmap2_align.nf deleted file mode 100644 index 41641320..00000000 --- a/modules/local/graphmap2_align.nf +++ /dev/null @@ -1,40 +0,0 @@ -process GRAPHMAP2_ALIGN { - tag "$meta.id" - label 'process_high' - - conda "bioconda::graphmap=0.6.3" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/graphmap:0.6.3--he513fc3_0' : - 'quay.io/biocontainers/graphmap:0.6.3--he513fc3_0' }" - - input: - tuple val(meta), path(fastq), path(fasta), path(sizes), val(gtf), val(bed), val(is_transcripts), path(index) - - output: - tuple val(meta), path(sizes), val(is_transcripts), path("*.sam"), emit: align_sam - path "versions.yml" , emit: versions - - when: - task.ext.when == null || task.ext.when - - script: - def preset = (params.protocol == 'DNA' || is_transcripts) ? "" : "-x rnaseq" - def junctions = (params.protocol != 'DNA' && !is_transcripts && gtf) ? "--gtf $gtf" : "" - """ - graphmap2 \\ - align \\ - $preset \\ - $junctions \\ - -t $task.cpus \\ - -r $fasta \\ - -i $index \\ - -d $fastq \\ - -o ${meta.id}.sam \\ - --extcigar - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - graphmap2: \$(echo \$(graphmap2 align 2>&1) | sed 's/^.*Version: v//; s/ .*\$//') - END_VERSIONS - """ -} diff --git a/modules/local/graphmap2_index.nf b/modules/local/graphmap2_index.nf deleted file mode 100644 index b0971e1b..00000000 --- a/modules/local/graphmap2_index.nf +++ /dev/null @@ -1,37 +0,0 @@ -process GRAPHMAP2_INDEX { - tag "$fasta" - label 'process_high' - - conda "bioconda::graphmap=0.6.3" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/graphmap:0.6.3--he513fc3_0' : - 'quay.io/biocontainers/graphmap:0.6.3--he513fc3_0' }" - - input: - tuple path(fasta), path(sizes), val(gtf), val(bed), val(is_transcripts), val(annotation_str) - - output: - tuple path(fasta), path(sizes), path(gtf), val(bed), val(is_transcripts), path("*.gmidx"), val(annotation_str), emit: index - path "versions.yml" , emit: versions - - when: - task.ext.when == null || task.ext.when - - script: - def preset = (params.protocol == 'DNA' || is_transcripts) ? "" : "-x rnaseq" - def junctions = (params.protocol != 'DNA' && !is_transcripts && gtf) ? "--gtf $gtf" : "" - """ - graphmap2 \\ - align \\ - $preset \\ - $junctions \\ - -t $task.cpus \\ - -I \\ - -r $fasta - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - graphmap2: \$(echo \$(graphmap2 align 2>&1) | sed 's/^.*Version: v//; s/ .*\$//') - END_VERSIONS - """ -} diff --git a/modules/local/minimap2_align.nf b/modules/local/minimap2_align.nf deleted file mode 100644 index 96790e5d..00000000 --- a/modules/local/minimap2_align.nf +++ /dev/null @@ -1,42 +0,0 @@ -process MINIMAP2_ALIGN { - tag "$meta.id" - label 'process_medium' - - conda "bioconda::minimap2=2.17" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/minimap2:2.17--hed695b0_3' : - 'quay.io/biocontainers/minimap2:2.17--hed695b0_3' }" - - input: - tuple val(meta), path(fastq), path(fasta), path(sizes), val(gtf), val(bed), val(is_transcripts), path(index) - - output: - tuple val(meta), path(sizes), val(is_transcripts), path("*.sam"), emit: align_sam - path "versions.yml" , emit: versions - - when: - task.ext.when == null || task.ext.when - - script: - def preset = (params.protocol == 'DNA' || is_transcripts) ? "-ax map-ont" : "-ax splice" - def kmer = (params.protocol == 'directRNA') ? "-k14" : "" - def stranded = (params.stranded || params.protocol == 'directRNA') ? "-uf" : "" - def junctions = (params.protocol != 'DNA' && bed) ? "--junc-bed ${file(bed)}" : "" - def md = (params.call_variants && params.protocol == 'DNA') ? "--MD" : "" - """ - minimap2 \\ - $preset \\ - $kmer \\ - $stranded \\ - $junctions \\ - $md \\ - -t $task.cpus \\ - $index \\ - $fastq > ${meta.id}.sam - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - minimap2: \$(minimap2 --version 2>&1) - END_VERSIONS - """ -} diff --git a/modules/local/minimap2_index.nf b/modules/local/minimap2_index.nf deleted file mode 100644 index 31b1877c..00000000 --- a/modules/local/minimap2_index.nf +++ /dev/null @@ -1,40 +0,0 @@ -process MINIMAP2_INDEX { - tag "$fasta" - label 'process_high' - - conda "bioconda::minimap2=2.17" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/minimap2:2.17--hed695b0_3' : - 'quay.io/biocontainers/minimap2:2.17--hed695b0_3' }" - - input: - tuple path(fasta), path(sizes), val(gtf), val(bed), val(is_transcripts), val(annotation_str) - - output: - tuple path(fasta), path(sizes), val(gtf), val(bed), val(is_transcripts), path("*.mmi"), val(annotation_str), emit: index - path "versions.yml" , emit: versions - - when: - task.ext.when == null || task.ext.when - - script: - def preset = (params.protocol == 'DNA' || is_transcripts) ? "-ax map-ont" : "-ax splice" - def kmer = (params.protocol == 'directRNA') ? "-k14" : "" - def stranded = (params.stranded || params.protocol == 'directRNA') ? "-uf" : "" - def junctions = (params.protocol != 'DNA' && bed) ? "--junc-bed ${file(bed)}" : "" - """ - minimap2 \\ - $preset \\ - $kmer \\ - $stranded \\ - $junctions \\ - -t $task.cpus \\ - -d ${fasta}.mmi \\ - $fasta - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - minimap2: \$(minimap2 --version 2>&1) - END_VERSIONS - """ -} diff --git a/modules/local/qcat.nf b/modules/local/qcat.nf deleted file mode 100644 index d26e7136..00000000 --- a/modules/local/qcat.nf +++ /dev/null @@ -1,46 +0,0 @@ -process QCAT { - tag "$input_path" - label 'process_medium' - - conda "bioconda::qcat=1.1.0" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/qcat:1.1.0--py_0' : - 'quay.io/biocontainers/qcat:1.1.0--py_0' }" - - input: - path input_path - - output: - path "fastq/*.fastq.gz", emit: fastq - path "versions.yml" , emit: versions - - when: - task.ext.when == null || task.ext.when - - script: - def detect_middle = params.qcat_detect_middle ? "--detect-middle $params.qcat_detect_middle" : "" - """ - ## Unzip fastq file - ## qcat doesnt support zipped files yet - FILE=$input_path - if [[ \$FILE == *.gz ]] - then - zcat $input_path > unzipped.fastq - FILE=unzipped.fastq - fi - qcat \\ - -f \$FILE \\ - -b ./fastq \\ - --kit $params.barcode_kit \\ - --min-score $params.qcat_min_score \\ - $detect_middle - - ## Zip fastq files (cannot find pigz command) - gzip fastq/* - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - qcat: \$(qcat --version 2>&1 | sed 's/^.*qcat //; s/ .*\$//') - END_VERSIONS - """ -} diff --git a/modules/local/samtools_sort_index.nf b/modules/local/samtools_sort_index.nf deleted file mode 100644 index a542ded8..00000000 --- a/modules/local/samtools_sort_index.nf +++ /dev/null @@ -1,32 +0,0 @@ -process SAMTOOLS_SORT_INDEX { - tag "$meta.id" - label 'process_low' - - conda "bioconda::samtools=1.14" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/samtools:1.15.1--h1170115_0' : - 'quay.io/biocontainers/samtools:1.15.1--h1170115_0' }" - - input: - tuple val(meta), path(bam) - - output: - tuple val(meta), path("*sorted.bam"), path("*.bai"), optional:true, emit: bam_bai - tuple val(meta), path("*sorted.bam"), path("*.csi"), optional:true, emit: bam_csi - path "versions.yml" , emit: versions - - when: - task.ext.when == null || task.ext.when - - script: - """ - samtools sort -@ $task.cpus -o ${meta.id}.sorted.bam -T $meta.id $bam - - samtools index ${meta.id}.sorted.bam - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') - END_VERSIONS - """ -} diff --git a/modules/local/samtools_view_bam.nf b/modules/local/samtools_view_bam.nf deleted file mode 100644 index 4a5eb46e..00000000 --- a/modules/local/samtools_view_bam.nf +++ /dev/null @@ -1,29 +0,0 @@ -process SAMTOOLS_VIEW_BAM { - tag "$meta.id" - label 'process_medium' - - conda "bioconda::samtools=1.10" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/samtools:1.15.1--h1170115_0' : - 'quay.io/biocontainers/samtools:1.15.1--h1170115_0' }" - - input: - tuple val(meta), path(sizes), val(is_transcripts), path(sam) - - output: - tuple val(meta), path("*.bam"), emit: bam - path "versions.yml" , emit: versions - - when: - task.ext.when == null || task.ext.when - - script: - """ - samtools view -b -h -O BAM -@ $task.cpus -o ${meta.id}.bam $sam - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') - END_VERSIONS - """ -} diff --git a/modules/local/sniffles.nf b/modules/local/sniffles.nf deleted file mode 100644 index 1336392a..00000000 --- a/modules/local/sniffles.nf +++ /dev/null @@ -1,34 +0,0 @@ -process SNIFFLES { - tag "$meta.id" - label 'process_high' - - conda "bioconda::sniffles=1.0.12" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/sniffles:1.0.12--h8b12597_1' : - 'quay.io/biocontainers/sniffles:1.0.12--h8b12597_1' }" - - input: - tuple val(meta), path(sizes), val(is_transcripts), path(input), path(index) - - - output: - tuple val(meta), path("*_sniffles.vcf"), emit: sv_calls - path "versions.yml" , emit: versions - - when: - task.ext.when == null || task.ext.when - - script: - """ - sniffles \ - -m $input \ - -v ${meta.id}_sniffles.vcf \ - -t $task.cpus - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - sniffles: \$(sniffles --help 2>&1 | grep Version |sed 's/^.*Version: //') - END_VERSIONS - """ -} - diff --git a/modules/local/stringtie2.nf b/modules/local/stringtie2.nf deleted file mode 100644 index a64a7e82..00000000 --- a/modules/local/stringtie2.nf +++ /dev/null @@ -1,33 +0,0 @@ -process STRINGTIE2 { - tag "$meta.id" - label 'process_medium' - - // Note: 2.7X indices incompatible with AWS iGenomes. - conda "bioconda::stringtie=2.1.4" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/stringtie:2.1.4--h7e0af3c_0' : - 'quay.io/biocontainers/stringtie:2.1.4--h7e0af3c_0' }" - - input: - tuple val(meta), path(fasta), path(gtf), path(bam) - - output: - path "*.stringtie.gtf", emit: stringtie_gtf - path "versions.yml" , emit: versions - - when: - task.ext.when == null || task.ext.when - - script: - """ - stringtie \\ - -L \\ - -G $gtf \\ - -o ${meta.id}.stringtie.gtf $bam - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - stringtie2: \$(stringtie --version 2>&1) - END_VERSIONS - """ -} diff --git a/modules/local/subread_featurecounts.nf b/modules/local/subread_featurecounts.nf deleted file mode 100644 index 5da69be6..00000000 --- a/modules/local/subread_featurecounts.nf +++ /dev/null @@ -1,57 +0,0 @@ -process SUBREAD_FEATURECOUNTS { - label 'process_medium' - - // Note: 2.7X indices incompatible with AWS iGenomes. - conda "bioconda::subread=2.0.1" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/subread:2.0.1--hed695b0_0' : - 'quay.io/biocontainers/subread:2.0.1--hed695b0_0' }" - - input: - path gtf - path bams - - output: - path "counts_gene.txt" , emit: gene_counts - path "counts_transcript.txt" , emit: transcript_counts - path "counts_gene.txt.summary" , emit: featurecounts_gene_multiqc - path "counts_transcript.txt.summary", emit: featurecounts_transcript_multiqc - path "versions.yml" , emit: versions - - when: - task.ext.when == null || task.ext.when - - script: - """ - featureCounts \\ - -L \\ - -O \\ - -f \\ - -g gene_id \\ - -t exon \\ - -T $task.cpus \\ - -a $gtf \\ - -o counts_gene.txt \\ - $bams - - featureCounts \\ - -L \\ - -O \\ - -f \\ - --primary \\ - --fraction \\ - -F GTF \\ - -g transcript_id \\ - -t transcript \\ - --extraAttributes gene_id \\ - -T $task.cpus \\ - -a $gtf \\ - -o counts_transcript.txt \\ - $bams - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - featureCounts: \$( echo \$(featureCounts -v 2>&1) | sed -e "s/featureCounts v//g") - END_VERSIONS - """ -} diff --git a/modules/local/ucsc_bed12tobigbed.nf b/modules/local/ucsc_bed12tobigbed.nf deleted file mode 100644 index 296ceb19..00000000 --- a/modules/local/ucsc_bed12tobigbed.nf +++ /dev/null @@ -1,33 +0,0 @@ -process UCSC_BED12TOBIGBED { - tag "$meta.id" - label 'process_medium' - - conda "bioconda::ucsc-bedtobigbed=377" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/ucsc-bedtobigbed:377--h446ed27_1' : - 'quay.io/biocontainers/ucsc-bedtobigbed:377--h446ed27_1' }" - - input: - tuple val(meta), path(sizes), path(bed12) - - output: - tuple val(meta), path(sizes), path("*.bigBed"), emit: bigbed - path "versions.yml" , emit: versions - - when: - !params.skip_alignment && !params.skip_bigbed && (params.protocol == 'directRNA' || params.protocol == 'cDNA') - - script: - def VERSION = '377' - """ - bedToBigBed \\ - $bed12 \\ - $sizes \\ - ${meta.id}.bigBed - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - ucsc_bed12tobigbed: \$(echo $VERSION) - END_VERSIONS - """ -} diff --git a/modules/local/ucsc_bedgraphtobigwig.nf b/modules/local/ucsc_bedgraphtobigwig.nf deleted file mode 100644 index d3b8d1c7..00000000 --- a/modules/local/ucsc_bedgraphtobigwig.nf +++ /dev/null @@ -1,30 +0,0 @@ -process UCSC_BEDGRAPHTOBIGWIG { - tag "$meta.id" - label 'process_medium' - - conda "bioconda::ucsc-bedgraphtobigwig=377" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/ucsc-bedgraphtobigwig:377--h446ed27_1' : - 'quay.io/biocontainers/ucsc-bedgraphtobigwig:377--h446ed27_1' }" - - input: - tuple val(meta), path(sizes), path(bedgraph) - - output: - tuple val(meta), path(sizes), path("*.bigWig"), emit: bigwig - path "versions.yml" , emit: versions - - when: - task.ext.when == null || task.ext.when - - script: - def VERSION = '377' - """ - bedGraphToBigWig $bedgraph $sizes ${meta.id}.bigWig - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - ucsc_bedgraphtobigwig: \$(echo $VERSION) - END_VERSIONS - """ -} From 9ae4d1a896d4acceacf4658d031ba1c620db5b56 Mon Sep 17 00:00:00 2001 From: Yuk Kei Wan Date: Tue, 23 May 2023 16:45:11 +0800 Subject: [PATCH 56/77] tmp: aws access denied --- conf/test.config | 5 +++-- workflows/nanoseq.nf | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/conf/test.config b/conf/test.config index cdbedb49..9deb89b4 100644 --- a/conf/test.config +++ b/conf/test.config @@ -18,8 +18,9 @@ params { // Input data to perform demultipexing input = 'https://raw.githubusercontent.com/nf-core/test-datasets/nanoseq/3.2/samplesheet/samplesheet_nobc_dx.csv' - fasta = 'https://raw.githubusercontent.com/nf-core/test-datasets/nanoseq/reference/chr22_23800000-23980000.fa' - gtf = 'https://raw.githubusercontent.com/nf-core/test-datasets/nanoseq/reference/chr22_23800000-23980000.gtf' + genome='GRCh37' + //fasta = 'https://raw.githubusercontent.com/nf-core/test-datasets/nanoseq/reference/chr22_23800000-23980000.fa' + //gtf = 'https://raw.githubusercontent.com/nf-core/test-datasets/nanoseq/reference/chr22_23800000-23980000.gtf' run_nanolyse = true protocol = 'DNA' barcode_kit = 'NBD103/NBD104' diff --git a/workflows/nanoseq.nf b/workflows/nanoseq.nf index 1a843dbf..410dc033 100644 --- a/workflows/nanoseq.nf +++ b/workflows/nanoseq.nf @@ -26,6 +26,7 @@ if (params.fasta){ } else { if (params.genome) { ch_fasta = file(params.genomes[params.genome].fasta, checkIfExists: true) + ch_fasta.view() } else { exit 1, 'reference fasta not specified!' } From 95ac0ec5d4b9c2f3b3dbd73f15350a7b83792a9c Mon Sep 17 00:00:00 2001 From: Yuk Kei Wan Date: Tue, 23 May 2023 17:01:25 +0800 Subject: [PATCH 57/77] tmp: aws access denied --- workflows/nanoseq.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/workflows/nanoseq.nf b/workflows/nanoseq.nf index 410dc033..5c608e14 100644 --- a/workflows/nanoseq.nf +++ b/workflows/nanoseq.nf @@ -25,7 +25,7 @@ if (params.fasta){ ch_fasta = file(params.fasta) } else { if (params.genome) { - ch_fasta = file(params.genomes[params.genome].fasta, checkIfExists: true) + ch_fasta = Channel.of(file(params.genomes[params.genome].fasta, checkIfExists: true)) ch_fasta.view() } else { exit 1, 'reference fasta not specified!' From 7fcdb46030ba1afc9445bcbb5bc48834fd62bb95 Mon Sep 17 00:00:00 2001 From: Yuk Kei Wan Date: Tue, 23 May 2023 17:36:00 +0800 Subject: [PATCH 58/77] tmp: aws access denied --- workflows/nanoseq.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/workflows/nanoseq.nf b/workflows/nanoseq.nf index 5c608e14..2f589ed0 100644 --- a/workflows/nanoseq.nf +++ b/workflows/nanoseq.nf @@ -25,7 +25,7 @@ if (params.fasta){ ch_fasta = file(params.fasta) } else { if (params.genome) { - ch_fasta = Channel.of(file(params.genomes[params.genome].fasta, checkIfExists: true)) + ch_fasta = Channel.of(path(params.genomes[params.genome].fasta, checkIfExists: true)) ch_fasta.view() } else { exit 1, 'reference fasta not specified!' From 2fa1fc5afe505fd64657300e4828c24b8a09ac68 Mon Sep 17 00:00:00 2001 From: Yuk Kei Wan Date: Tue, 23 May 2023 17:43:12 +0800 Subject: [PATCH 59/77] tmp: aws access denied --- workflows/nanoseq.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/workflows/nanoseq.nf b/workflows/nanoseq.nf index 2f589ed0..ec123dd2 100644 --- a/workflows/nanoseq.nf +++ b/workflows/nanoseq.nf @@ -25,7 +25,7 @@ if (params.fasta){ ch_fasta = file(params.fasta) } else { if (params.genome) { - ch_fasta = Channel.of(path(params.genomes[params.genome].fasta, checkIfExists: true)) + ch_fasta = Channel.of(val(params.genomes[params.genome].fasta, checkIfExists: true)) ch_fasta.view() } else { exit 1, 'reference fasta not specified!' From 6cb98e2d27c7ccf781492ec19775bb39de65df9c Mon Sep 17 00:00:00 2001 From: Yuk Kei Wan Date: Tue, 23 May 2023 17:45:23 +0800 Subject: [PATCH 60/77] tmp: aws access denied --- workflows/nanoseq.nf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/workflows/nanoseq.nf b/workflows/nanoseq.nf index ec123dd2..69df8935 100644 --- a/workflows/nanoseq.nf +++ b/workflows/nanoseq.nf @@ -25,7 +25,7 @@ if (params.fasta){ ch_fasta = file(params.fasta) } else { if (params.genome) { - ch_fasta = Channel.of(val(params.genomes[params.genome].fasta, checkIfExists: true)) + ch_fasta = params.genomes[params.genome].fasta ch_fasta.view() } else { exit 1, 'reference fasta not specified!' @@ -36,7 +36,7 @@ if (params.gtf){ ch_gtf = file(params.gtf) } else { if (params.genome) { - ch_gtf = file(params.genomes[params.genome].gtf, checkIfExists: true) + ch_gtf = params.genomes[params.genome].gtf } } From d86f3d26d9bf641ea3086fce51a2d1ae5aadd435 Mon Sep 17 00:00:00 2001 From: Yuk Kei Wan Date: Tue, 23 May 2023 17:47:16 +0800 Subject: [PATCH 61/77] tmp: aws access denied --- workflows/nanoseq.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/workflows/nanoseq.nf b/workflows/nanoseq.nf index 69df8935..9747477b 100644 --- a/workflows/nanoseq.nf +++ b/workflows/nanoseq.nf @@ -25,7 +25,7 @@ if (params.fasta){ ch_fasta = file(params.fasta) } else { if (params.genome) { - ch_fasta = params.genomes[params.genome].fasta + ch_fasta = Channel.of(params.genomes[params.genome].fasta) ch_fasta.view() } else { exit 1, 'reference fasta not specified!' From 9358a7cf8e16dc21f264b707be3fc1689b903212 Mon Sep 17 00:00:00 2001 From: Yuk Kei Wan Date: Wed, 24 May 2023 09:45:03 +0800 Subject: [PATCH 62/77] tmp: aws access denied --- workflows/nanoseq.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/workflows/nanoseq.nf b/workflows/nanoseq.nf index 9747477b..b422f3c3 100644 --- a/workflows/nanoseq.nf +++ b/workflows/nanoseq.nf @@ -25,7 +25,7 @@ if (params.fasta){ ch_fasta = file(params.fasta) } else { if (params.genome) { - ch_fasta = Channel.of(params.genomes[params.genome].fasta) + ch_fasta = Channel.fromPath(params.genomes[params.genome].fasta) ch_fasta.view() } else { exit 1, 'reference fasta not specified!' From 8ba80ba07335c25970f2ed23dec4c639ae8cc8a8 Mon Sep 17 00:00:00 2001 From: Yuk Kei Wan Date: Wed, 24 May 2023 09:56:10 +0800 Subject: [PATCH 63/77] tmp: aws access denied --- workflows/nanoseq.nf | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/workflows/nanoseq.nf b/workflows/nanoseq.nf index b422f3c3..c65c85b3 100644 --- a/workflows/nanoseq.nf +++ b/workflows/nanoseq.nf @@ -26,7 +26,6 @@ if (params.fasta){ } else { if (params.genome) { ch_fasta = Channel.fromPath(params.genomes[params.genome].fasta) - ch_fasta.view() } else { exit 1, 'reference fasta not specified!' } @@ -36,7 +35,7 @@ if (params.gtf){ ch_gtf = file(params.gtf) } else { if (params.genome) { - ch_gtf = params.genomes[params.genome].gtf + ch_gtf = Channel.fromPath(params.genomes[params.genome].gtf) } } From 5322c904ffc1e0c5673347307c856b9f06a12d3e Mon Sep 17 00:00:00 2001 From: Yuk Kei Wan <41866052+yuukiiwa@users.noreply.github.com> Date: Thu, 25 May 2023 15:08:48 +0800 Subject: [PATCH 64/77] tmp: aws access denied --- nextflow.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nextflow.config b/nextflow.config index ed692321..2ad0cf8e 100644 --- a/nextflow.config +++ b/nextflow.config @@ -87,7 +87,7 @@ params { // Options: Other help = false outdir = './results' - igenomes_base = 's3://ngi-igenomes/igenomes/' //note + igenomes_base = 's3://ngi-igenomes/igenomes' //note igenomes_ignore = false //note max_multiqc_email_size = '25.MB' //note multiqc_title = null //note From 210d774a20240687ed3d1b7864e65c657e22c8f7 Mon Sep 17 00:00:00 2001 From: Yuk Kei Wan <41866052+yuukiiwa@users.noreply.github.com> Date: Thu, 25 May 2023 15:13:58 +0800 Subject: [PATCH 65/77] tmp: aws access denied --- workflows/nanoseq.nf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/workflows/nanoseq.nf b/workflows/nanoseq.nf index c65c85b3..9f47b690 100644 --- a/workflows/nanoseq.nf +++ b/workflows/nanoseq.nf @@ -25,7 +25,7 @@ if (params.fasta){ ch_fasta = file(params.fasta) } else { if (params.genome) { - ch_fasta = Channel.fromPath(params.genomes[params.genome].fasta) + ch_fasta = file(genomes[params.genome].fasta, checkIfExists: true) } else { exit 1, 'reference fasta not specified!' } @@ -35,7 +35,7 @@ if (params.gtf){ ch_gtf = file(params.gtf) } else { if (params.genome) { - ch_gtf = Channel.fromPath(params.genomes[params.genome].gtf) + ch_gtf = file(genomes[params.genome].gtf, checkIfExists: true) } } From 4a75758fae6addecf5bd278810695fd74679d4a0 Mon Sep 17 00:00:00 2001 From: Yuk Kei Wan <41866052+yuukiiwa@users.noreply.github.com> Date: Thu, 25 May 2023 15:16:35 +0800 Subject: [PATCH 66/77] tmp: aws access denied --- workflows/nanoseq.nf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/workflows/nanoseq.nf b/workflows/nanoseq.nf index 9f47b690..1a843dbf 100644 --- a/workflows/nanoseq.nf +++ b/workflows/nanoseq.nf @@ -25,7 +25,7 @@ if (params.fasta){ ch_fasta = file(params.fasta) } else { if (params.genome) { - ch_fasta = file(genomes[params.genome].fasta, checkIfExists: true) + ch_fasta = file(params.genomes[params.genome].fasta, checkIfExists: true) } else { exit 1, 'reference fasta not specified!' } @@ -35,7 +35,7 @@ if (params.gtf){ ch_gtf = file(params.gtf) } else { if (params.genome) { - ch_gtf = file(genomes[params.genome].gtf, checkIfExists: true) + ch_gtf = file(params.genomes[params.genome].gtf, checkIfExists: true) } } From 357ec0472c45fc26e209fa753a301ef57b56b655 Mon Sep 17 00:00:00 2001 From: Yuk Kei Wan <41866052+yuukiiwa@users.noreply.github.com> Date: Thu, 25 May 2023 15:27:42 +0800 Subject: [PATCH 67/77] tmp: aws access denied --- workflows/nanoseq.nf | 1 + 1 file changed, 1 insertion(+) diff --git a/workflows/nanoseq.nf b/workflows/nanoseq.nf index 1a843dbf..2cc9fb24 100644 --- a/workflows/nanoseq.nf +++ b/workflows/nanoseq.nf @@ -26,6 +26,7 @@ if (params.fasta){ } else { if (params.genome) { ch_fasta = file(params.genomes[params.genome].fasta, checkIfExists: true) + print ch_fasta } else { exit 1, 'reference fasta not specified!' } From ecdf0274aebf2d41845895267daa03c1792c6ced Mon Sep 17 00:00:00 2001 From: Yuk Kei Wan <41866052+yuukiiwa@users.noreply.github.com> Date: Thu, 25 May 2023 15:44:49 +0800 Subject: [PATCH 68/77] tmp: aws access denied --- workflows/nanoseq.nf | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/workflows/nanoseq.nf b/workflows/nanoseq.nf index 2cc9fb24..6303f6f7 100644 --- a/workflows/nanoseq.nf +++ b/workflows/nanoseq.nf @@ -22,21 +22,20 @@ if (params.input) { } if (params.fasta){ - ch_fasta = file(params.fasta) + fasta = file(params.fasta) } else { if (params.genome) { - ch_fasta = file(params.genomes[params.genome].fasta, checkIfExists: true) - print ch_fasta + fasta = file(params.genomes[params.genome].fasta, checkIfExists: true) } else { exit 1, 'reference fasta not specified!' } } if (params.gtf){ - ch_gtf = file(params.gtf) + gtf = file(params.gtf) } else { if (params.genome) { - ch_gtf = file(params.genomes[params.genome].gtf, checkIfExists: true) + gtf = file(params.genomes[params.genome].gtf, checkIfExists: true) } } @@ -273,7 +272,7 @@ workflow NANOSEQ{ ch_samtools_multiqc = Channel.empty() if (!params.skip_alignment) { - ch_fasta = Channel.from( [id:'reference'], params.fasta ).collect() + ch_fasta = Channel.from( [id:'reference'], fasta ).collect() /* * SUBWORKFLOW: Make chromosome size file and covert GTF to BED12 @@ -414,8 +413,8 @@ workflow NANOSEQ{ * SUBWORKFLOW: RNA modification detection with xPore and m6anet */ ch_sorted_bam - .combine([params.fasta]) - .combine([params.gtf]) + .combine([fasta]) + .combine([gtf]) .join(ch_sorted_bai,by:0) .join(ch_sample,by:0) .map { it -> [ it[0], it[2], it[3], it[5], it[1], it[4] ] } From 47c7d850b7207864e87b4909699bd926c50626e1 Mon Sep 17 00:00:00 2001 From: Yuk Kei Wan <41866052+yuukiiwa@users.noreply.github.com> Date: Thu, 25 May 2023 16:22:14 +0800 Subject: [PATCH 69/77] Update test.config --- conf/test.config | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/conf/test.config b/conf/test.config index 9deb89b4..cdbedb49 100644 --- a/conf/test.config +++ b/conf/test.config @@ -18,9 +18,8 @@ params { // Input data to perform demultipexing input = 'https://raw.githubusercontent.com/nf-core/test-datasets/nanoseq/3.2/samplesheet/samplesheet_nobc_dx.csv' - genome='GRCh37' - //fasta = 'https://raw.githubusercontent.com/nf-core/test-datasets/nanoseq/reference/chr22_23800000-23980000.fa' - //gtf = 'https://raw.githubusercontent.com/nf-core/test-datasets/nanoseq/reference/chr22_23800000-23980000.gtf' + fasta = 'https://raw.githubusercontent.com/nf-core/test-datasets/nanoseq/reference/chr22_23800000-23980000.fa' + gtf = 'https://raw.githubusercontent.com/nf-core/test-datasets/nanoseq/reference/chr22_23800000-23980000.gtf' run_nanolyse = true protocol = 'DNA' barcode_kit = 'NBD103/NBD104' From 5ae8db57f649cd0e9f4fa9d45227f114779fee0c Mon Sep 17 00:00:00 2001 From: Yuk Kei Wan <41866052+yuukiiwa@users.noreply.github.com> Date: Thu, 25 May 2023 17:06:34 +0800 Subject: [PATCH 70/77] test --- subworkflows/local/input_check.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subworkflows/local/input_check.nf b/subworkflows/local/input_check.nf index c774888a..16560c5f 100644 --- a/subworkflows/local/input_check.nf +++ b/subworkflows/local/input_check.nf @@ -29,7 +29,7 @@ def get_sample_info(LinkedHashMap row) { meta.id = row.sample meta.barcode = row.barcode meta.nanopolish_fast5 = row.nanopolish_fast5 - input_file = row.reads ? file(row.reads, checkIfExists: true) : null + input_file = row.reads //? file(row.reads, checkIfExists: true) : null fastq_meta = [ meta, input_file ] From 65990ab710f61bc0dbc2ea3e65c0f38c5363ade0 Mon Sep 17 00:00:00 2001 From: Yuk Kei Wan Date: Mon, 9 Oct 2023 07:08:10 +0000 Subject: [PATCH 71/77] nf-core modules update (All modules) --- modules.json | 34 ++++++++-------- modules/nf-core/bcftools/sort/main.nf | 1 + modules/nf-core/bedtools/bamtobed/main.nf | 17 ++++++-- modules/nf-core/bedtools/bamtobed/meta.yml | 3 ++ modules/nf-core/bedtools/genomecov/main.nf | 17 ++++++-- modules/nf-core/bedtools/genomecov/meta.yml | 4 +- .../custom/dumpsoftwareversions/main.nf | 6 +-- .../custom/dumpsoftwareversions/meta.yml | 2 + modules/nf-core/deepvariant/main.nf | 36 ++++++++++------- modules/nf-core/deepvariant/meta.yml | 16 ++++++++ modules/nf-core/fastqc/main.nf | 6 ++- modules/nf-core/fastqc/tests/main.nf.test | 40 +++++++++++++++++++ .../nf-core/fastqc/tests/main.nf.test.snap | 10 +++++ modules/nf-core/multiqc/main.nf | 6 +-- modules/nf-core/samtools/faidx/main.nf | 16 +++++--- modules/nf-core/samtools/faidx/meta.yml | 14 ++++++- modules/nf-core/samtools/flagstat/main.nf | 11 +++++ modules/nf-core/samtools/idxstats/main.nf | 12 ++++++ modules/nf-core/samtools/sort/main.nf | 2 - modules/nf-core/samtools/stats/main.nf | 2 +- modules/nf-core/samtools/stats/meta.yml | 10 ++++- modules/nf-core/samtools/view/main.nf | 2 +- modules/nf-core/samtools/view/meta.yml | 13 ++++-- modules/nf-core/tabix/bgziptabix/main.nf | 4 +- modules/nf-core/tabix/bgziptabix/meta.yml | 5 +++ modules/nf-core/ucsc/bedgraphtobigwig/main.nf | 20 ++++++++-- .../nf-core/ucsc/bedgraphtobigwig/meta.yml | 3 ++ modules/nf-core/ucsc/bedtobigbed/main.nf | 20 ++++++++-- modules/nf-core/ucsc/bedtobigbed/meta.yml | 3 ++ modules/nf-core/untar/main.nf | 2 +- 30 files changed, 265 insertions(+), 72 deletions(-) create mode 100644 modules/nf-core/fastqc/tests/main.nf.test create mode 100644 modules/nf-core/fastqc/tests/main.nf.test.snap diff --git a/modules.json b/modules.json index 15f60815..feec77e1 100644 --- a/modules.json +++ b/modules.json @@ -7,22 +7,22 @@ "nf-core": { "bcftools/sort": { "branch": "master", - "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", + "git_sha": "d6d112a1af2ee8c97fc1932df008183341e7d8fe", "installed_by": ["modules"] }, "bedtools/bamtobed": { "branch": "master", - "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", + "git_sha": "9e51255c4f8ec69fb6ccf68593392835f14fecb8", "installed_by": ["modules"] }, "bedtools/genomecov": { "branch": "master", - "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", + "git_sha": "9e51255c4f8ec69fb6ccf68593392835f14fecb8", "installed_by": ["modules"] }, "custom/dumpsoftwareversions": { "branch": "master", - "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", + "git_sha": "05c280924b6c768d484c7c443dad5e605c4ff4b4", "installed_by": ["modules"] }, "custom/getchromsizes": { @@ -37,12 +37,12 @@ }, "deepvariant": { "branch": "master", - "git_sha": "b9829e1064382745d8dff7f1d74d2138d2864f71", + "git_sha": "ed67f2fadd6d2a155b296f728e6b1f8c92ddc1a6", "installed_by": ["modules"] }, "fastqc": { "branch": "master", - "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", + "git_sha": "a33464f205fa15305bfe268546f6607b6f4d4753", "installed_by": ["modules"] }, "graphmap2/align": { @@ -67,7 +67,7 @@ }, "multiqc": { "branch": "master", - "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", + "git_sha": "a6e11ac655e744f7ebc724be669dd568ffdc0e80", "installed_by": ["modules"] }, "nanolyse": { @@ -87,17 +87,17 @@ }, "samtools/faidx": { "branch": "master", - "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", + "git_sha": "fd742419940e01ba1c5ecb172c3e32ec840662fe", "installed_by": ["modules"] }, "samtools/flagstat": { "branch": "master", - "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", + "git_sha": "570ec5bcfe19c49e16c9ca35a7a116563af6cc1c", "installed_by": ["modules"] }, "samtools/idxstats": { "branch": "master", - "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", + "git_sha": "e662ab16e0c11f1e62983e21de9871f59371a639", "installed_by": ["modules"] }, "samtools/index": { @@ -107,17 +107,17 @@ }, "samtools/sort": { "branch": "master", - "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", + "git_sha": "a0f7be95788366c1923171e358da7d049eb440f9", "installed_by": ["modules"] }, "samtools/stats": { "branch": "master", - "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", + "git_sha": "735e1e04e7e01751d2d6e97055bbdb6f70683cc1", "installed_by": ["modules"] }, "samtools/view": { "branch": "master", - "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", + "git_sha": "3ffae3598260a99e8db3207dead9f73f87f90d1f", "installed_by": ["modules"] }, "sniffles": { @@ -147,7 +147,7 @@ }, "tabix/bgziptabix": { "branch": "master", - "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", + "git_sha": "591b71642820933dcb3c954c934b397bd00d8e5e", "installed_by": ["modules"] }, "tabix/tabix": { @@ -157,17 +157,17 @@ }, "ucsc/bedgraphtobigwig": { "branch": "master", - "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", + "git_sha": "66290981ab6038ea86177ade40b9449bc790b0ce", "installed_by": ["modules"] }, "ucsc/bedtobigbed": { "branch": "master", - "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", + "git_sha": "66290981ab6038ea86177ade40b9449bc790b0ce", "installed_by": ["modules"] }, "untar": { "branch": "master", - "git_sha": "5c460c5a4736974abde2843294f35307ee2b0e5e", + "git_sha": "d0b4fc03af52a1cc8c6fb4493b921b57352b1dd8", "installed_by": ["modules"] } } diff --git a/modules/nf-core/bcftools/sort/main.nf b/modules/nf-core/bcftools/sort/main.nf index ef41fd25..702d510f 100644 --- a/modules/nf-core/bcftools/sort/main.nf +++ b/modules/nf-core/bcftools/sort/main.nf @@ -30,6 +30,7 @@ process BCFTOOLS_SORT { bcftools \\ sort \\ --output ${prefix}.${extension} \\ + --temp-dir . \\ $args \\ $vcf diff --git a/modules/nf-core/bedtools/bamtobed/main.nf b/modules/nf-core/bedtools/bamtobed/main.nf index 29f5a62f..ab8a6ffb 100644 --- a/modules/nf-core/bedtools/bamtobed/main.nf +++ b/modules/nf-core/bedtools/bamtobed/main.nf @@ -2,10 +2,10 @@ process BEDTOOLS_BAMTOBED { tag "$meta.id" label 'process_medium' - conda "bioconda::bedtools=2.30.0" + conda "bioconda::bedtools=2.31.0" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/bedtools:2.30.0--hc088bd4_0' : - 'biocontainers/bedtools:2.30.0--hc088bd4_0' }" + 'https://depot.galaxyproject.org/singularity/bedtools:2.31.0--hf5e1c6e_2' : + 'biocontainers/bedtools:2.31.0--hf5e1c6e_2' }" input: tuple val(meta), path(bam) @@ -32,4 +32,15 @@ process BEDTOOLS_BAMTOBED { bedtools: \$(bedtools --version | sed -e "s/bedtools v//g") END_VERSIONS """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}.bed + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + bedtools: \$(bedtools --version | sed -e "s/bedtools v//g") + END_VERSIONS + """ } diff --git a/modules/nf-core/bedtools/bamtobed/meta.yml b/modules/nf-core/bedtools/bamtobed/meta.yml index 5a4ff73a..49cc83d9 100644 --- a/modules/nf-core/bedtools/bamtobed/meta.yml +++ b/modules/nf-core/bedtools/bamtobed/meta.yml @@ -3,6 +3,9 @@ description: Converts a bam file to a bed12 file. keywords: - bam - bed + - bedtools + - bamtobed + - converter tools: - bedtools: description: | diff --git a/modules/nf-core/bedtools/genomecov/main.nf b/modules/nf-core/bedtools/genomecov/main.nf index c29e468b..d2a2f206 100644 --- a/modules/nf-core/bedtools/genomecov/main.nf +++ b/modules/nf-core/bedtools/genomecov/main.nf @@ -2,10 +2,10 @@ process BEDTOOLS_GENOMECOV { tag "$meta.id" label 'process_single' - conda "bioconda::bedtools=2.30.0" + conda "bioconda::bedtools=2.31.0" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/bedtools:2.30.0--hc088bd4_0' : - 'biocontainers/bedtools:2.30.0--hc088bd4_0' }" + 'https://depot.galaxyproject.org/singularity/bedtools:2.31.0--hf5e1c6e_2' : + 'biocontainers/bedtools:2.31.0--hf5e1c6e_2' }" input: tuple val(meta), path(intervals), val(scale) @@ -56,4 +56,15 @@ process BEDTOOLS_GENOMECOV { END_VERSIONS """ } + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}.${extension} + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + bedtools: \$(bedtools --version | sed -e "s/bedtools v//g") + END_VERSIONS + """ } diff --git a/modules/nf-core/bedtools/genomecov/meta.yml b/modules/nf-core/bedtools/genomecov/meta.yml index 83bfab98..efd6e129 100644 --- a/modules/nf-core/bedtools/genomecov/meta.yml +++ b/modules/nf-core/bedtools/genomecov/meta.yml @@ -4,6 +4,8 @@ keywords: - bed - bam - genomecov + - bedtools + - histogram tools: - bedtools: description: | @@ -21,7 +23,7 @@ input: description: BAM/BED/GFF/VCF pattern: "*.{bam|bed|gff|vcf}" - scale: - type: value + type: integer description: Number containing the scale factor for the output. Set to 1 to disable. Setting to a value other than 1 will also get the -bg bedgraph output format as this is required for this command switch - sizes: type: file diff --git a/modules/nf-core/custom/dumpsoftwareversions/main.nf b/modules/nf-core/custom/dumpsoftwareversions/main.nf index 3df21765..c9d014b1 100644 --- a/modules/nf-core/custom/dumpsoftwareversions/main.nf +++ b/modules/nf-core/custom/dumpsoftwareversions/main.nf @@ -2,10 +2,10 @@ process CUSTOM_DUMPSOFTWAREVERSIONS { label 'process_single' // Requires `pyyaml` which does not have a dedicated container but is in the MultiQC container - conda "bioconda::multiqc=1.13" + conda "bioconda::multiqc=1.15" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/multiqc:1.13--pyhdfd78af_0' : - 'quay.io/biocontainers/multiqc:1.13--pyhdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/multiqc:1.15--pyhdfd78af_0' : + 'biocontainers/multiqc:1.15--pyhdfd78af_0' }" input: path versions diff --git a/modules/nf-core/custom/dumpsoftwareversions/meta.yml b/modules/nf-core/custom/dumpsoftwareversions/meta.yml index 60b546a0..c32657de 100644 --- a/modules/nf-core/custom/dumpsoftwareversions/meta.yml +++ b/modules/nf-core/custom/dumpsoftwareversions/meta.yml @@ -1,7 +1,9 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/yaml-schema.json name: custom_dumpsoftwareversions description: Custom module used to dump software versions within the nf-core pipeline template keywords: - custom + - dump - version tools: - custom: diff --git a/modules/nf-core/deepvariant/main.nf b/modules/nf-core/deepvariant/main.nf index afc5e444..2d5c480c 100644 --- a/modules/nf-core/deepvariant/main.nf +++ b/modules/nf-core/deepvariant/main.nf @@ -1,32 +1,33 @@ process DEEPVARIANT { tag "$meta.id" - label 'process_medium' + label 'process_high' - container "docker.io/google/deepvariant:1.4.0" - - // Exit if running this module with -profile conda / -profile mamba - if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { - exit 1, "DEEPVARIANT module does not support Conda. Please use Docker / Singularity / Podman instead." - } + container "nf-core/deepvariant:1.5.0" input: tuple val(meta), path(input), path(index), path(intervals) - path(fasta) - path(fai) - path(gzi) + tuple val(meta2), path(fasta) + tuple val(meta3), path(fai) + tuple val(meta4), path(gzi) output: - tuple val(meta), path("${prefix}.vcf.gz") , emit: vcf - tuple val(meta), path("${prefix}.g.vcf.gz"), emit: gvcf - path "versions.yml" , emit: versions + tuple val(meta), path("${prefix}.vcf.gz") , emit: vcf + tuple val(meta), path("${prefix}.vcf.gz.tbi") , emit: vcf_tbi + tuple val(meta), path("${prefix}.g.vcf.gz") , emit: gvcf + tuple val(meta), path("${prefix}.g.vcf.gz.tbi"), emit: gvcf_tbi + path "versions.yml" , emit: versions when: task.ext.when == null || task.ext.when script: + // Exit if running this module with -profile conda / -profile mamba + if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { + error "DEEPVARIANT module does not support Conda. Please use Docker / Singularity / Podman instead." + } def args = task.ext.args ?: '' prefix = task.ext.prefix ?: "${meta.id}" - def regions = intervals ? "--regions ${intervals}" : "" + def regions = intervals ? "--regions=${intervals}" : "" """ /opt/deepvariant/bin/run_deepvariant \\ @@ -36,6 +37,7 @@ process DEEPVARIANT { --output_gvcf=${prefix}.g.vcf.gz \\ ${args} \\ ${regions} \\ + --intermediate_results_dir=. \\ --num_shards=${task.cpus} cat <<-END_VERSIONS > versions.yml @@ -45,10 +47,16 @@ process DEEPVARIANT { """ stub: + // Exit if running this module with -profile conda / -profile mamba + if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { + error "DEEPVARIANT module does not support Conda. Please use Docker / Singularity / Podman instead." + } prefix = task.ext.prefix ?: "${meta.id}" """ touch ${prefix}.vcf.gz + touch ${prefix}.vcf.gz.tbi touch ${prefix}.g.vcf.gz + touch ${prefix}.g.vcf.gz.tbi cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/nf-core/deepvariant/meta.yml b/modules/nf-core/deepvariant/meta.yml index 97f068ec..c7d11ae3 100644 --- a/modules/nf-core/deepvariant/meta.yml +++ b/modules/nf-core/deepvariant/meta.yml @@ -31,14 +31,29 @@ input: type: file description: Interval file for targeted regions pattern: "*.bed" + - meta2: + type: map + description: | + Groovy Map containing reference information + e.g. [ id:'genome' ] - fasta: type: file description: The reference fasta file pattern: "*.fasta" + - meta3: + type: map + description: | + Groovy Map containing reference information + e.g. [ id:'genome' ] - fai: type: file description: Index of reference fasta file pattern: "*.fai" + - meta4: + type: map + description: | + Groovy Map containing reference information + e.g. [ id:'genome' ] - gzi: type: file description: GZI index of reference fasta file @@ -65,3 +80,4 @@ output: authors: - "@abhi18av" + - "@ramprasadn" diff --git a/modules/nf-core/fastqc/main.nf b/modules/nf-core/fastqc/main.nf index 07d5e433..249f9064 100644 --- a/modules/nf-core/fastqc/main.nf +++ b/modules/nf-core/fastqc/main.nf @@ -29,7 +29,11 @@ process FASTQC { printf "%s %s\\n" $rename_to | while read old_name new_name; do [ -f "\${new_name}" ] || ln -s \$old_name \$new_name done - fastqc $args --threads $task.cpus $renamed_files + + fastqc \\ + $args \\ + --threads $task.cpus \\ + $renamed_files cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/nf-core/fastqc/tests/main.nf.test b/modules/nf-core/fastqc/tests/main.nf.test new file mode 100644 index 00000000..badb6716 --- /dev/null +++ b/modules/nf-core/fastqc/tests/main.nf.test @@ -0,0 +1,40 @@ +nextflow_process { + + name "Test Process FASTQC" + script "modules/nf-core/fastqc/main.nf" + process "FASTQC" + tag "fastqc" + tag "modules_nfcore" + + test("Single-Read") { + + when { + params { + outdir = "$outputDir" + } + process { + """ + input[0] = [ + [ id: 'test', single_end:true ], + [ + file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true) + ] + ] + """ + } + } + + then { + assertAll ( + { assert process.success }, + // NOTE The report contains the date inside it, which means that the md5sum is stable per day, but not longer than that. So you can't md5sum it. + // looks like this:
Mon 2 Oct 2023
test.gz
+ // https://github.com/nf-core/modules/pull/3903#issuecomment-1743620039 + { assert process.out.html.get(0).get(1) ==~ ".*/test_fastqc.html" }, + { assert path(process.out.html.get(0).get(1)).getText().contains("File typeConventional base calls") }, + { assert snapshot(process.out.versions).match("versions") }, + { assert process.out.zip.get(0).get(1) ==~ ".*/test_fastqc.zip" } + ) + } + } +} diff --git a/modules/nf-core/fastqc/tests/main.nf.test.snap b/modules/nf-core/fastqc/tests/main.nf.test.snap new file mode 100644 index 00000000..9e5e3379 --- /dev/null +++ b/modules/nf-core/fastqc/tests/main.nf.test.snap @@ -0,0 +1,10 @@ +{ + "versions": { + "content": [ + [ + "versions.yml:md5,fe97b802cfb90f1f335e8a77f6258e30" + ] + ], + "timestamp": "2023-10-02T15:26:43+0000" + } +} \ No newline at end of file diff --git a/modules/nf-core/multiqc/main.nf b/modules/nf-core/multiqc/main.nf index 1fc387be..65d7dd0d 100644 --- a/modules/nf-core/multiqc/main.nf +++ b/modules/nf-core/multiqc/main.nf @@ -1,10 +1,10 @@ process MULTIQC { label 'process_single' - conda "bioconda::multiqc=1.14" + conda "bioconda::multiqc=1.15" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/multiqc:1.14--pyhdfd78af_0' : - 'biocontainers/multiqc:1.14--pyhdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/multiqc:1.15--pyhdfd78af_0' : + 'biocontainers/multiqc:1.15--pyhdfd78af_0' }" input: path multiqc_files, stageAs: "?/*" diff --git a/modules/nf-core/samtools/faidx/main.nf b/modules/nf-core/samtools/faidx/main.nf index 4dd0e5b0..59ed3088 100644 --- a/modules/nf-core/samtools/faidx/main.nf +++ b/modules/nf-core/samtools/faidx/main.nf @@ -9,11 +9,13 @@ process SAMTOOLS_FAIDX { input: tuple val(meta), path(fasta) + tuple val(meta2), path(fai) output: - tuple val(meta), path ("*.fai"), emit: fai - tuple val(meta), path ("*.gzi"), emit: gzi, optional: true - path "versions.yml" , emit: versions + tuple val(meta), path ("*.{fa,fasta}") , emit: fa , optional: true + tuple val(meta), path ("*.fai") , emit: fai, optional: true + tuple val(meta), path ("*.gzi") , emit: gzi, optional: true + path "versions.yml" , emit: versions when: task.ext.when == null || task.ext.when @@ -23,8 +25,8 @@ process SAMTOOLS_FAIDX { """ samtools \\ faidx \\ - $args \\ - $fasta + $fasta \\ + $args cat <<-END_VERSIONS > versions.yml "${task.process}": @@ -33,8 +35,12 @@ process SAMTOOLS_FAIDX { """ stub: + def match = (task.ext.args =~ /-o(?:utput)?\s(.*)\s?/).findAll() + def fastacmd = match[0] ? "touch ${match[0][1]}" : '' """ + ${fastacmd} touch ${fasta}.fai + cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/nf-core/samtools/faidx/meta.yml b/modules/nf-core/samtools/faidx/meta.yml index fe2fe9a1..957b25e5 100644 --- a/modules/nf-core/samtools/faidx/meta.yml +++ b/modules/nf-core/samtools/faidx/meta.yml @@ -3,6 +3,7 @@ description: Index FASTA file keywords: - index - fasta + - faidx tools: - samtools: description: | @@ -17,12 +18,21 @@ input: - meta: type: map description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] + Groovy Map containing reference information + e.g. [ id:'test' ] - fasta: type: file description: FASTA file pattern: "*.{fa,fasta}" + - meta2: + type: map + description: | + Groovy Map containing reference information + e.g. [ id:'test' ] + - fai: + type: file + description: FASTA index file + pattern: "*.{fai}" output: - meta: type: map diff --git a/modules/nf-core/samtools/flagstat/main.nf b/modules/nf-core/samtools/flagstat/main.nf index eb7e72fc..b75707ec 100644 --- a/modules/nf-core/samtools/flagstat/main.nf +++ b/modules/nf-core/samtools/flagstat/main.nf @@ -32,4 +32,15 @@ process SAMTOOLS_FLAGSTAT { samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') END_VERSIONS """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}.flagstat + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') + END_VERSIONS + """ } diff --git a/modules/nf-core/samtools/idxstats/main.nf b/modules/nf-core/samtools/idxstats/main.nf index a257d700..83c7c34b 100644 --- a/modules/nf-core/samtools/idxstats/main.nf +++ b/modules/nf-core/samtools/idxstats/main.nf @@ -33,4 +33,16 @@ process SAMTOOLS_IDXSTATS { samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') END_VERSIONS """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + + """ + touch ${prefix}.idxstats + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') + END_VERSIONS + """ } diff --git a/modules/nf-core/samtools/sort/main.nf b/modules/nf-core/samtools/sort/main.nf index 1e5181d4..2b7753fd 100644 --- a/modules/nf-core/samtools/sort/main.nf +++ b/modules/nf-core/samtools/sort/main.nf @@ -21,13 +21,11 @@ process SAMTOOLS_SORT { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" - def sort_memory = (task.memory.mega/task.cpus).intValue() if ("$bam" == "${prefix}.bam") error "Input and output names are the same, use \"task.ext.prefix\" to disambiguate!" """ samtools sort \\ $args \\ -@ $task.cpus \\ - -m ${sort_memory}M \\ -o ${prefix}.bam \\ -T $prefix \\ $bam diff --git a/modules/nf-core/samtools/stats/main.nf b/modules/nf-core/samtools/stats/main.nf index eb7f098b..4a2607de 100644 --- a/modules/nf-core/samtools/stats/main.nf +++ b/modules/nf-core/samtools/stats/main.nf @@ -9,7 +9,7 @@ process SAMTOOLS_STATS { input: tuple val(meta), path(input), path(input_index) - path fasta + tuple val(meta2), path(fasta) output: tuple val(meta), path("*.stats"), emit: stats diff --git a/modules/nf-core/samtools/stats/meta.yml b/modules/nf-core/samtools/stats/meta.yml index 1d68a5d8..90e6345f 100644 --- a/modules/nf-core/samtools/stats/meta.yml +++ b/modules/nf-core/samtools/stats/meta.yml @@ -30,9 +30,14 @@ input: type: file description: BAI/CRAI file from alignment pattern: "*.{bai,crai}" + - meta2: + type: map + description: | + Groovy Map containing reference information + e.g. [ id:'genome' ] - fasta: - type: optional file - description: Reference file the CRAM was created with + type: file + description: Reference file the CRAM was created with (optional) pattern: "*.{fasta,fa}" output: - meta: @@ -51,3 +56,4 @@ output: authors: - "@drpatelh" - "@FriederikeHanssen" + - "@ramprasadn" diff --git a/modules/nf-core/samtools/view/main.nf b/modules/nf-core/samtools/view/main.nf index b87369e5..cb91facf 100644 --- a/modules/nf-core/samtools/view/main.nf +++ b/modules/nf-core/samtools/view/main.nf @@ -9,7 +9,7 @@ process SAMTOOLS_VIEW { input: tuple val(meta), path(input), path(index) - path fasta + tuple val(meta2), path(fasta) path qname output: diff --git a/modules/nf-core/samtools/view/meta.yml b/modules/nf-core/samtools/view/meta.yml index 76916033..3b05450b 100644 --- a/modules/nf-core/samtools/view/meta.yml +++ b/modules/nf-core/samtools/view/meta.yml @@ -26,12 +26,17 @@ input: description: BAM/CRAM/SAM file pattern: "*.{bam,cram,sam}" - index: - type: optional file - description: BAM.BAI/BAM.CSI/CRAM.CRAI file + type: file + description: BAM.BAI/BAM.CSI/CRAM.CRAI file (optional) pattern: "*.{.bai,.csi,.crai}" + - meta2: + type: map + description: | + Groovy Map containing reference information + e.g. [ id:'test' ] - fasta: - type: optional file - description: Reference file the CRAM was created with + type: file + description: Reference file the CRAM was created with (optional) pattern: "*.{fasta,fa}" - qname: type: file diff --git a/modules/nf-core/tabix/bgziptabix/main.nf b/modules/nf-core/tabix/bgziptabix/main.nf index fe8160ba..d6c5a760 100644 --- a/modules/nf-core/tabix/bgziptabix/main.nf +++ b/modules/nf-core/tabix/bgziptabix/main.nf @@ -11,7 +11,8 @@ process TABIX_BGZIPTABIX { tuple val(meta), path(input) output: - tuple val(meta), path("*.gz"), path("*.tbi"), emit: gz_tbi + tuple val(meta), path("*.gz"), path("*.tbi"), optional: true, emit: gz_tbi + tuple val(meta), path("*.gz"), path("*.csi"), optional: true, emit: gz_csi path "versions.yml" , emit: versions when: @@ -36,6 +37,7 @@ process TABIX_BGZIPTABIX { """ touch ${prefix}.${input.getExtension()}.gz touch ${prefix}.${input.getExtension()}.gz.tbi + touch ${prefix}.${input.getExtension()}.gz.csi cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/nf-core/tabix/bgziptabix/meta.yml b/modules/nf-core/tabix/bgziptabix/meta.yml index 49c03289..2761e271 100644 --- a/modules/nf-core/tabix/bgziptabix/meta.yml +++ b/modules/nf-core/tabix/bgziptabix/meta.yml @@ -37,9 +37,14 @@ output: type: file description: tabix index file pattern: "*.{gz.tbi}" + - csi: + type: file + description: tabix alternate index file + pattern: "*.{gz.csi}" - versions: type: file description: File containing software versions pattern: "versions.yml" authors: - "@maxulysse" + - "@DLBPointon" diff --git a/modules/nf-core/ucsc/bedgraphtobigwig/main.nf b/modules/nf-core/ucsc/bedgraphtobigwig/main.nf index 054924e7..06bb4709 100644 --- a/modules/nf-core/ucsc/bedgraphtobigwig/main.nf +++ b/modules/nf-core/ucsc/bedgraphtobigwig/main.nf @@ -3,10 +3,10 @@ process UCSC_BEDGRAPHTOBIGWIG { label 'process_single' // WARN: Version information not provided by tool on CLI. Please update version string below when bumping container versions. - conda "bioconda::ucsc-bedgraphtobigwig=377" + conda "bioconda::ucsc-bedgraphtobigwig=445" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/ucsc-bedgraphtobigwig:377--h446ed27_1' : - 'biocontainers/ucsc-bedgraphtobigwig:377--h446ed27_1' }" + 'https://depot.galaxyproject.org/singularity/ucsc-bedgraphtobigwig:445--h954228d_0' : + 'biocontainers/ucsc-bedgraphtobigwig:445--h954228d_0' }" input: tuple val(meta), path(bedgraph) @@ -22,7 +22,7 @@ process UCSC_BEDGRAPHTOBIGWIG { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" - def VERSION = '377' // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions. + def VERSION = '445' // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions. """ bedGraphToBigWig \\ $bedgraph \\ @@ -34,4 +34,16 @@ process UCSC_BEDGRAPHTOBIGWIG { ucsc: $VERSION END_VERSIONS """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + def VERSION = '445' // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions. + """ + touch ${prefix}.bigWig + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + ucsc: $VERSION + END_VERSIONS + """ } diff --git a/modules/nf-core/ucsc/bedgraphtobigwig/meta.yml b/modules/nf-core/ucsc/bedgraphtobigwig/meta.yml index ba8915be..416c91e0 100755 --- a/modules/nf-core/ucsc/bedgraphtobigwig/meta.yml +++ b/modules/nf-core/ucsc/bedgraphtobigwig/meta.yml @@ -3,6 +3,9 @@ description: Convert a bedGraph file to bigWig format. keywords: - bedgraph - bigwig + - ucsc + - bedgraphtobigwig + - converter tools: - ucsc: description: Convert a bedGraph file to bigWig format. diff --git a/modules/nf-core/ucsc/bedtobigbed/main.nf b/modules/nf-core/ucsc/bedtobigbed/main.nf index bab62e75..4644ea36 100644 --- a/modules/nf-core/ucsc/bedtobigbed/main.nf +++ b/modules/nf-core/ucsc/bedtobigbed/main.nf @@ -3,10 +3,10 @@ process UCSC_BEDTOBIGBED { label 'process_single' // WARN: Version information not provided by tool on CLI. Please update version string below when bumping container versions. - conda "bioconda::ucsc-bedtobigbed=377" + conda "bioconda::ucsc-bedtobigbed=447" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/ucsc-bedtobigbed:377--ha8a8165_3' : - 'biocontainers/ucsc-bedtobigbed:377--ha8a8165_3' }" + 'https://depot.galaxyproject.org/singularity/ucsc-bedtobigbed:447--h954228d_0' : + 'biocontainers/ucsc-bedtobigbed:447--h954228d_0' }" input: tuple val(meta), path(bed) @@ -24,7 +24,7 @@ process UCSC_BEDTOBIGBED { def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" def as_option = autosql ? "-as=${autosql}" : "" - def VERSION = '377' // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions. + def VERSION = '447' // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions. """ bedToBigBed \\ $bed \\ @@ -38,4 +38,16 @@ process UCSC_BEDTOBIGBED { ucsc: $VERSION END_VERSIONS """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + def VERSION = '447' // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions. + """ + touch ${prefix}.bigBed + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + ucsc: $VERSION + END_VERSIONS + """ } diff --git a/modules/nf-core/ucsc/bedtobigbed/meta.yml b/modules/nf-core/ucsc/bedtobigbed/meta.yml index babb220d..8e9e5291 100755 --- a/modules/nf-core/ucsc/bedtobigbed/meta.yml +++ b/modules/nf-core/ucsc/bedtobigbed/meta.yml @@ -3,6 +3,9 @@ description: Convert file from bed to bigBed format keywords: - bed - bigbed + - ucsc + - bedtobigbed + - converter tools: - ucsc: description: Convert file from bed to bigBed format diff --git a/modules/nf-core/untar/main.nf b/modules/nf-core/untar/main.nf index 8cd1856c..61461c39 100644 --- a/modules/nf-core/untar/main.nf +++ b/modules/nf-core/untar/main.nf @@ -2,7 +2,7 @@ process UNTAR { tag "$archive" label 'process_single' - conda "conda-forge::sed=4.7 bioconda::grep=3.4 conda-forge::tar=1.34" + conda "conda-forge::sed=4.7 conda-forge::grep=3.11 conda-forge::tar=1.34" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/ubuntu:20.04' : 'nf-core/ubuntu:20.04' }" From 791f9dd8fe17a1064c0c3bd6a3319089a9c2d89c Mon Sep 17 00:00:00 2001 From: Yuk Kei Wan Date: Mon, 9 Oct 2023 07:37:06 +0000 Subject: [PATCH 72/77] fix samtools stats path --- subworkflows/local/align_graphmap2.nf | 6 +++--- subworkflows/local/align_minimap2.nf | 3 --- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/subworkflows/local/align_graphmap2.nf b/subworkflows/local/align_graphmap2.nf index 92f594d6..551431be 100644 --- a/subworkflows/local/align_graphmap2.nf +++ b/subworkflows/local/align_graphmap2.nf @@ -20,8 +20,8 @@ workflow ALIGN_GRAPHMAP2 { */ ch_fasta .map { it -> it[1] } - .set { ch_fasta } - GRAPHMAP2_INDEX ( ch_fasta ) + .set { ch_fasta_graphmapindex } + GRAPHMAP2_INDEX ( ch_fasta_graphmapindex ) ch_graphmap_index = GRAPHMAP2_INDEX.out.index graphmap2_version = GRAPHMAP2_INDEX.out.versions @@ -32,7 +32,7 @@ workflow ALIGN_GRAPHMAP2 { .map { it -> [ it[0], it[1] ] } .set { ch_alignment_input } ch_alignment_input - .combine (ch_fasta) + .combine (ch_fasta_graphmapindex) .map { it -> it[2] } .set { ch_reference } ch_alignment_input diff --git a/subworkflows/local/align_minimap2.nf b/subworkflows/local/align_minimap2.nf index 7f5d9209..fb8693e3 100644 --- a/subworkflows/local/align_minimap2.nf +++ b/subworkflows/local/align_minimap2.nf @@ -20,9 +20,6 @@ workflow ALIGN_MINIMAP2 { MINIMAP2_INDEX ( ch_fasta ) ch_minimap_index = MINIMAP2_INDEX.out.index minimap2_version = MINIMAP2_INDEX.out.versions - ch_fasta - .map { it -> it[1] } - .set { ch_fasta } /* * Map reads with MINIMAP2 From e994f277ed0acfd038d7d6776e60ec68352f7a92 Mon Sep 17 00:00:00 2001 From: Yuk Kei Wan Date: Mon, 9 Oct 2023 08:16:06 +0000 Subject: [PATCH 73/77] update --- subworkflows/local/align_graphmap2.nf | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/subworkflows/local/align_graphmap2.nf b/subworkflows/local/align_graphmap2.nf index 551431be..27bae966 100644 --- a/subworkflows/local/align_graphmap2.nf +++ b/subworkflows/local/align_graphmap2.nf @@ -42,15 +42,12 @@ workflow ALIGN_GRAPHMAP2 { GRAPHMAP2_ALIGN ( ch_alignment_input, ch_reference, ch_reference_index ) GRAPHMAP2_ALIGN.out.sam - .map { it -> [ it[0], it[1], [] ] } + .map { it -> [ it[0], it[1], it[1] ] } .set { ch_samtools_input } - ch_samtools_input - .map { it -> it[2] } - .set { ch_notneeded_fasta } ch_samtools_input .map { it -> it[2] } .set { ch_notneeded_qname } - SAMTOOLS_VIEW ( ch_samtools_input, ch_notneeded_fasta, ch_notneeded_qname ) + SAMTOOLS_VIEW ( ch_samtools_input, ch_fasta, ch_notneeded_qname ) SAMTOOLS_SORT ( SAMTOOLS_VIEW.out.bam ) ch_sorted_bam = SAMTOOLS_SORT.out.bam SAMTOOLS_INDEX ( ch_sorted_bam ) From 3aa5ed6f10c9a36002c5fdad2113af575b520f60 Mon Sep 17 00:00:00 2001 From: Yuk Kei Wan Date: Mon, 9 Oct 2023 09:23:38 +0000 Subject: [PATCH 74/77] fix graphmap --- conf/test.config | 1 + subworkflows/local/align_graphmap2.nf | 16 +++++++++++++--- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/conf/test.config b/conf/test.config index cdbedb49..8aa0238e 100644 --- a/conf/test.config +++ b/conf/test.config @@ -29,4 +29,5 @@ params { skip_quantification = true skip_fusion_analysis= true skip_modification_analysis=true + aligner = 'graphmap2' } diff --git a/subworkflows/local/align_graphmap2.nf b/subworkflows/local/align_graphmap2.nf index 27bae966..3e475532 100644 --- a/subworkflows/local/align_graphmap2.nf +++ b/subworkflows/local/align_graphmap2.nf @@ -41,12 +41,22 @@ workflow ALIGN_GRAPHMAP2 { .set { ch_reference_index } GRAPHMAP2_ALIGN ( ch_alignment_input, ch_reference, ch_reference_index ) + ch_alignment_input + .map { it -> it[1] } + .set { ch_just_fastq } GRAPHMAP2_ALIGN.out.sam - .map { it -> [ it[0], it[1], it[1] ] } - .set { ch_samtools_input } - ch_samtools_input + .combine (ch_graphmap_index) + .combine (ch_just_fastq) + .map { it -> [ it[0], it[1], it[2], it[3] ] } + .set { ch_merged_input } + ch_merged_input .map { it -> it[2] } .set { ch_notneeded_qname } + ch_merged_input + .map { it -> [ it[0], it[1], it[3] ]} + .set { ch_samtools_input } + ch_samtools_input.view() + ch_notneeded_qname.view() SAMTOOLS_VIEW ( ch_samtools_input, ch_fasta, ch_notneeded_qname ) SAMTOOLS_SORT ( SAMTOOLS_VIEW.out.bam ) ch_sorted_bam = SAMTOOLS_SORT.out.bam From 381270613a59ba142b7c5bd08df2a5b28313b0a2 Mon Sep 17 00:00:00 2001 From: Yuk Kei Wan Date: Mon, 9 Oct 2023 09:56:33 +0000 Subject: [PATCH 75/77] linting fix --- .github/CONTRIBUTING.md | 5 +- .github/ISSUE_TEMPLATE/bug_report.yml | 2 +- .github/workflows/linting.yml | 2 +- CODE_OF_CONDUCT.md | 133 ++++++++++++++++++++------ assets/multiqc_config.yml | 6 +- assets/nf-core-nanoseq_logo_light.png | Bin 11262 -> 75499 bytes lib/NfcoreTemplate.groovy | 18 +++- nextflow.config | 4 +- nextflow_schema.json | 2 +- 9 files changed, 131 insertions(+), 41 deletions(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 30e08528..e2c32b56 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -9,7 +9,9 @@ Please use the pre-filled template to save time. However, don't be put off by this template - other more general issues and suggestions are welcome! Contributions to the code are even more welcome ;) -> If you need help using or modifying nf-core/nanoseq then the best place to ask is on the nf-core Slack [#nanoseq](https://nfcore.slack.com/channels/nanoseq) channel ([join our Slack here](https://nf-co.re/join/slack)). +:::info +If you need help using or modifying nf-core/nanoseq then the best place to ask is on the nf-core Slack [#nanoseq](https://nfcore.slack.com/channels/nanoseq) channel ([join our Slack here](https://nf-co.re/join/slack)). +::: ## Contribution workflow @@ -116,4 +118,3 @@ To get started: Devcontainer specs: - [DevContainer config](.devcontainer/devcontainer.json) -- [Dockerfile](.devcontainer/Dockerfile) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 56c66b95..9533d061 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -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)_ diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index 888cb4bc..b8bdd214 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -78,7 +78,7 @@ jobs: - uses: actions/setup-python@v4 with: - python-version: "3.8" + python-version: "3.11" architecture: "x64" - name: Install dependencies diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index f4fd052f..c089ec78 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -1,18 +1,20 @@ -# Code of Conduct at nf-core (v1.0) +# Code of Conduct at nf-core (v1.4) ## Our Pledge -In the interest of fostering an open, collaborative, and welcoming environment, we as contributors and maintainers of nf-core, pledge to making participation in our projects and community a harassment-free experience for everyone, regardless of: +In the interest of fostering an open, collaborative, and welcoming environment, we as contributors and maintainers of nf-core pledge to making participation in our projects and community a harassment-free experience for everyone, regardless of: - Age +- Ability - Body size +- Caste - Familial status - Gender identity and expression - Geographical location - Level of experience - Nationality and national origins - Native language -- Physical and neurological ability +- Neurodiversity - Race or ethnicity - Religion - Sexual identity and orientation @@ -22,80 +24,133 @@ Please note that the list above is alphabetised and is therefore not ranked in a ## Preamble -> Note: This Code of Conduct (CoC) has been drafted by the nf-core Safety Officer and been edited after input from members of the nf-core team and others. "We", in this document, refers to the Safety Officer and members of the nf-core core team, both of whom are deemed to be members of the nf-core community and are therefore required to abide by this Code of Conduct. This document will amended periodically to keep it up-to-date, and in case of any dispute, the most current version will apply. +:::note +This Code of Conduct (CoC) has been drafted by Renuka Kudva, Cris Tuñí, and Michael Heuer, with input from the nf-core Core Team and Susanna Marquez from the nf-core community. "We", in this document, refers to the Safety Officers and members of the nf-core Core Team, both of whom are deemed to be members of the nf-core community and are therefore required to abide by this Code of Conduct. This document will be amended periodically to keep it up-to-date. In case of any dispute, the most current version will apply. +::: -An up-to-date list of members of the nf-core core team can be found [here](https://nf-co.re/about). Our current safety officer is Renuka Kudva. +An up-to-date list of members of the nf-core core team can be found [here](https://nf-co.re/about). + +Our Safety Officers are Saba Nafees, Cris Tuñí, and Michael Heuer. nf-core is a young and growing community that welcomes contributions from anyone with a shared vision for [Open Science Policies](https://www.fosteropenscience.eu/taxonomy/term/8). Open science policies encompass inclusive behaviours and we strive to build and maintain a safe and inclusive environment for all individuals. -We have therefore adopted this code of conduct (CoC), which we require all members of our community and attendees in nf-core events to adhere to in all our workspaces at all times. Workspaces include but are not limited to Slack, meetings on Zoom, Jitsi, YouTube live etc. +We have therefore adopted this CoC, which we require all members of our community and attendees of nf-core events to adhere to in all our workspaces at all times. Workspaces include, but are not limited to, Slack, meetings on Zoom, gather.town, YouTube live etc. -Our CoC will be strictly enforced and the nf-core team reserve the right to exclude participants who do not comply with our guidelines from our workspaces and future nf-core activities. +Our CoC will be strictly enforced and the nf-core team reserves the right to exclude participants who do not comply with our guidelines from our workspaces and future nf-core activities. -We ask all members of our community to help maintain a supportive and productive workspace and to avoid behaviours that can make individuals feel unsafe or unwelcome. Please help us maintain and uphold this CoC. +We ask all members of our community to help maintain supportive and productive workspaces and to avoid behaviours that can make individuals feel unsafe or unwelcome. Please help us maintain and uphold this CoC. -Questions, concerns or ideas on what we can include? Contact safety [at] nf-co [dot] re +Questions, concerns, or ideas on what we can include? Contact members of the Safety Team on Slack or email safety [at] nf-co [dot] re. ## Our Responsibilities -The safety officer is responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behaviour. +Members of the Safety Team (the Safety Officers) are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behaviour. -The safety officer in consultation with the nf-core core team have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. +The Safety Team, in consultation with the nf-core core team, have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this CoC, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. -Members of the core team or the safety officer who violate the CoC will be required to recuse themselves pending investigation. They will not have access to any reports of the violations and be subject to the same actions as others in violation of the CoC. +Members of the core team or the Safety Team who violate the CoC will be required to recuse themselves pending investigation. They will not have access to any reports of the violations and will be subject to the same actions as others in violation of the CoC. -## When are where does this Code of Conduct apply? +## When and where does this Code of Conduct apply? -Participation in the nf-core community is contingent on following these guidelines in all our workspaces and events. This includes but is not limited to the following listed alphabetically and therefore in no order of preference: +Participation in the nf-core community is contingent on following these guidelines in all our workspaces and events, such as hackathons, workshops, bytesize, and collaborative workspaces on gather.town. These guidelines include, but are not limited to, the following (listed alphabetically and therefore in no order of preference): - Communicating with an official project email address. - Communicating with community members within the nf-core Slack channel. - Participating in hackathons organised by nf-core (both online and in-person events). -- Participating in collaborative work on GitHub, Google Suite, community calls, mentorship meetings, email correspondence. -- Participating in workshops, training, and seminar series organised by nf-core (both online and in-person events). This applies to events hosted on web-based platforms such as Zoom, Jitsi, YouTube live etc. +- Participating in collaborative work on GitHub, Google Suite, community calls, mentorship meetings, email correspondence, and on the nf-core gather.town workspace. +- Participating in workshops, training, and seminar series organised by nf-core (both online and in-person events). This applies to events hosted on web-based platforms such as Zoom, gather.town, Jitsi, YouTube live etc. - Representing nf-core on social media. This includes both official and personal accounts. ## nf-core cares 😊 -nf-core's CoC and expectations of respectful behaviours for all participants (including organisers and the nf-core team) include but are not limited to the following (listed in alphabetical order): +nf-core's CoC and expectations of respectful behaviours for all participants (including organisers and the nf-core team) include, but are not limited to, the following (listed in alphabetical order): - Ask for consent before sharing another community member’s personal information (including photographs) on social media. - Be respectful of differing viewpoints and experiences. We are all here to learn from one another and a difference in opinion can present a good learning opportunity. -- Celebrate your accomplishments at events! (Get creative with your use of emojis 🎉 🥳 💯 🙌 !) +- Celebrate your accomplishments! (Get creative with your use of emojis 🎉 🥳 💯 🙌 !) - Demonstrate empathy towards other community members. (We don’t all have the same amount of time to dedicate to nf-core. If tasks are pending, don’t hesitate to gently remind members of your team. If you are leading a task, ask for help if you feel overwhelmed.) - Engage with and enquire after others. (This is especially important given the geographically remote nature of the nf-core community, so let’s do this the best we can) - Focus on what is best for the team and the community. (When in doubt, ask) -- Graciously accept constructive criticism, yet be unafraid to question, deliberate, and learn. +- Accept feedback, yet be unafraid to question, deliberate, and learn. - Introduce yourself to members of the community. (We’ve all been outsiders and we know that talking to strangers can be hard for some, but remember we’re interested in getting to know you and your visions for open science!) -- Show appreciation and **provide clear feedback**. (This is especially important because we don’t see each other in person and it can be harder to interpret subtleties. Also remember that not everyone understands a certain language to the same extent as you do, so **be clear in your communications to be kind.**) +- Show appreciation and **provide clear feedback**. (This is especially important because we don’t see each other in person and it can be harder to interpret subtleties. Also remember that not everyone understands a certain language to the same extent as you do, so **be clear in your communication to be kind.**) - Take breaks when you feel like you need them. -- Using welcoming and inclusive language. (Participants are encouraged to display their chosen pronouns on Zoom or in communication on Slack.) +- Use welcoming and inclusive language. (Participants are encouraged to display their chosen pronouns on Zoom or in communication on Slack) ## nf-core frowns on 😕 -The following behaviours from any participants within the nf-core community (including the organisers) will be considered unacceptable under this code of conduct. Engaging or advocating for any of the following could result in expulsion from nf-core workspaces. +The following behaviours from any participants within the nf-core community (including the organisers) will be considered unacceptable under this CoC. Engaging or advocating for any of the following could result in expulsion from nf-core workspaces: - Deliberate intimidation, stalking or following and sustained disruption of communication among participants of the community. This includes hijacking shared screens through actions such as using the annotate tool in conferencing software such as Zoom. - “Doxing” i.e. posting (or threatening to post) another person’s personal identifying information online. - Spamming or trolling of individuals on social media. -- Use of sexual or discriminatory imagery, comments, or jokes and unwelcome sexual attention. -- Verbal and text comments that reinforce social structures of domination related to gender, gender identity and expression, sexual orientation, ability, physical appearance, body size, race, age, religion or work experience. +- Use of sexual or discriminatory imagery, comments, jokes, or unwelcome sexual attention. +- Verbal and text comments that reinforce social structures of domination related to gender, gender identity and expression, sexual orientation, ability, physical appearance, body size, race, age, religion, or work experience. ### Online Trolling -The majority of nf-core interactions and events are held online. Unfortunately, holding events online comes with the added issue of online trolling. This is unacceptable, reports of such behaviour will be taken very seriously, and perpetrators will be excluded from activities immediately. +The majority of nf-core interactions and events are held online. Unfortunately, holding events online comes with the risk of online trolling. This is unacceptable — reports of such behaviour will be taken very seriously and perpetrators will be excluded from activities immediately. -All community members are required to ask members of the group they are working within for explicit consent prior to taking screenshots of individuals during video calls. +All community members are **required** to ask members of the group they are working with for explicit consent prior to taking screenshots of individuals during video calls. -## Procedures for Reporting CoC violations +## Procedures for reporting CoC violations If someone makes you feel uncomfortable through their behaviours or actions, report it as soon as possible. -You can reach out to members of the [nf-core core team](https://nf-co.re/about) and they will forward your concerns to the safety officer(s). +You can reach out to members of the Safety Team (Saba Nafees, Cris Tuñí, and Michael Heuer) on Slack. Alternatively, contact a member of the nf-core core team [nf-core core team](https://nf-co.re/about), and they will forward your concerns to the Safety Team. + +Issues directly concerning members of the Core Team or the Safety Team will be dealt with by other members of the core team and the safety manager — possible conflicts of interest will be taken into account. nf-core is also in discussions about having an ombudsperson and details will be shared in due course. + +All reports will be handled with the utmost discretion and confidentiality. + +You can also report any CoC violations to safety [at] nf-co [dot] re. In your email report, please do your best to include: + +- Your contact information. +- Identifying information (e.g. names, nicknames, pseudonyms) of the participant who has violated the Code of Conduct. +- The behaviour that was in violation and the circumstances surrounding the incident. +- The approximate time of the behaviour (if different than the time the report was made). +- Other people involved in the incident, if applicable. +- If you believe the incident is ongoing. +- If there is a publicly available record (e.g. mailing list record, a screenshot). +- Any additional information. + +After you file a report, one or more members of our Safety Team will contact you to follow up on your report. + +## Who will read and handle reports + +All reports will be read and handled by the members of the Safety Team at nf-core. + +If members of the Safety Team are deemed to have a conflict of interest with a report, they will be required to recuse themselves as per our Code of Conduct and will not have access to any follow-ups. + +To keep this first report confidential from any of the Safety Team members, please submit your first report by direct messaging on Slack/direct email to any of the nf-core members you are comfortable disclosing the information to, and be explicit about which member(s) you do not consent to sharing the information with. + +## Reviewing reports + +After receiving the report, members of the Safety Team will review the incident report to determine whether immediate action is required, for example, whether there is immediate threat to participants’ safety. + +The Safety Team, in consultation with members of the nf-core core team, will assess the information to determine whether the report constitutes a Code of Conduct violation, for them to decide on a course of action. + +In the case of insufficient information, one or more members of the Safety Team may contact the reporter, the reportee, or any other attendees to obtain more information. -Issues directly concerning members of the core team will be dealt with by other members of the core team and the safety manager, and possible conflicts of interest will be taken into account. nf-core is also in discussions about having an ombudsperson, and details will be shared in due course. +Once additional information is gathered, the Safety Team will collectively review and decide on the best course of action to take, if any. The Safety Team reserves the right to not act on a report. -All reports will be handled with utmost discretion and confidentially. +## Confidentiality + +All reports, and any additional information included, are only shared with the team of safety officers (and possibly members of the core team, in case the safety officer is in violation of the CoC). We will respect confidentiality requests for the purpose of protecting victims of abuse. + +We will not name harassment victims, beyond discussions between the safety officer and members of the nf-core team, without the explicit consent of the individuals involved. + +## Enforcement + +Actions taken by the nf-core’s Safety Team may include, but are not limited to: + +- Asking anyone to stop a behaviour. +- Asking anyone to leave the event and online spaces either temporarily, for the remainder of the event, or permanently. +- Removing access to the gather.town and Slack, either temporarily or permanently. +- Communicating to all participants to reinforce our expectations for conduct and remind what is unacceptable behaviour; this may be public for practical reasons. +- Communicating to all participants that an incident has taken place and how we will act or have acted — this may be for the purpose of letting event participants know we are aware of and dealing with the incident. +- Banning anyone from participating in nf-core-managed spaces, future events, and activities, either temporarily or permanently. +- No action. ## Attribution and Acknowledgements @@ -106,6 +161,22 @@ All reports will be handled with utmost discretion and confidentially. ## Changelog -### v1.0 - March 12th, 2021 +### v1.4 - February 8th, 2022 + +- Included a new member of the Safety Team. Corrected a typographical error in the text. + +### v1.3 - December 10th, 2021 + +- Added a statement that the CoC applies to nf-core gather.town workspaces. Corrected typographical errors in the text. + +### v1.2 - November 12th, 2021 + +- Removed information specific to reporting CoC violations at the Hackathon in October 2021. + +### v1.1 - October 14th, 2021 + +- Updated with names of new Safety Officers and specific information for the hackathon in October 2021. + +### v1.0 - March 15th, 2021 - Complete rewrite from original [Contributor Covenant](http://contributor-covenant.org/) CoC. diff --git a/assets/multiqc_config.yml b/assets/multiqc_config.yml index 6433de0e..cec134f5 100644 --- a/assets/multiqc_config.yml +++ b/assets/multiqc_config.yml @@ -1,7 +1,9 @@ report_comment: > - This report has been generated by the nf-core/nanoseq + + This report has been generated by the nf-core/nanoseq analysis pipeline. For information about how to interpret these results, please see the - documentation. + documentation. + report_section_order: "nf-core-nanoseq-methods-description": order: -1000 diff --git a/assets/nf-core-nanoseq_logo_light.png b/assets/nf-core-nanoseq_logo_light.png index 313219c02d7587b9c038c117657fd994c571051d..f6ec1d3a7b5d96c6c0e8720a50d28dad1edb12ef 100644 GIT binary patch literal 75499 zcmeEt`9IX_`~RRQS?ZKSWhn*~p=96c5GGq9OZHNfecuPCQz(&w!1jG0qM))u18{N;szxKLnntC7*Z0~7*=;B1!jv^4p5Gb_^hQ29NgTYTSd@O|5 zS3HI44fR<@BwC_WweNAg^K`t?ay|Ua^`zuS;o*5X;p5j0nLR_3TdTw-*C$<<{Vk$; z9`%au>-b1%=CCl=x~!Jp!Br{RFpzjKp!3X+Tb;*QRKss@Kb){h^c+@seV?p-3zMBT zv9)Zlu({<`v3Pc z_~QTk@G~L)&kz6ShyTBGp!b^mFYH1%8g&}PE+NMRdy{Rgwkaa9QvrRQY2HJz)6`6H z9;J$!8p?T$p0J;N*Ye!J#ykH8M)iUCxVX5E!@pK|Rzc1t45Gxe-2E^GvsRWhY(8G+ zqQw!LH!;zIl^)J$8$X^IcCItbD!;xEnF(K*M&+X@JSfW~(%%?AjAD}I{FvT)!b;+< zT`3RVvHyDV#tr{F?pFSzX|tN{P8k1QHN6RI-9sVD@-lUEm%l0Eg`Uqb{CpIznVgoC zqUmmd=@Irb{U+;BnnF@S4JpEd=f8=bxA|}L4A?vsm9JMY?xEj%PSrz{(B9T6zCrD{ z5aNCa{cB^cli-wq*o{Dpv7Lu_ua|VKlQa68K&C3~Q72#9XybNMzba}b4=Acza~8q2n+%iDoFDn0jDk39X?^7A)!^mJ;E z5ekGVYdquWg)k>J@LX5^<&$Ub>jptvS20#izP!}h(}bdq;~{4o<`Z~-?Z6?eBv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Kbw+sS8r diff --git a/lib/NfcoreTemplate.groovy b/lib/NfcoreTemplate.groovy index 25a0a74a..01b8653d 100755 --- a/lib/NfcoreTemplate.groovy +++ b/lib/NfcoreTemplate.groovy @@ -3,6 +3,7 @@ // import org.yaml.snakeyaml.Yaml +import groovy.json.JsonOutput class NfcoreTemplate { @@ -128,7 +129,7 @@ class NfcoreTemplate { def email_html = html_template.toString() // Render the sendmail template - def max_multiqc_email_size = params.max_multiqc_email_size as nextflow.util.MemoryUnit + def max_multiqc_email_size = (params.containsKey('max_multiqc_email_size') ? params.max_multiqc_email_size : 0) as nextflow.util.MemoryUnit def smail_fields = [ email: email_address, subject: subject, email_txt: email_txt, email_html: email_html, projectDir: "$projectDir", mqcFile: mqc_report, mqcMaxSize: max_multiqc_email_size.toBytes() ] def sf = new File("$projectDir/assets/sendmail_template.txt") def sendmail_template = engine.createTemplate(sf).make(smail_fields) @@ -222,6 +223,21 @@ class NfcoreTemplate { } } + // + // Dump pipeline parameters in a json file + // + public static void dump_parameters(workflow, params) { + def output_d = new File("${params.outdir}/pipeline_info/") + if (!output_d.exists()) { + output_d.mkdirs() + } + + def timestamp = new java.util.Date().format( 'yyyy-MM-dd_HH-mm-ss') + def output_pf = new File(output_d, "params_${timestamp}.json") + def jsonStr = JsonOutput.toJson(params) + output_pf.text = JsonOutput.prettyPrint(jsonStr) + } + // // Print pipeline summary on completion // diff --git a/nextflow.config b/nextflow.config index 2ad0cf8e..03a6ce94 100644 --- a/nextflow.config +++ b/nextflow.config @@ -100,8 +100,8 @@ params { help = false version = false validate_params = true - show_hidden_params = false - schema_ignore_params = 'genomes' + validationShowHiddenParams = false + validationSchemaIgnoreParams = 'genomes' // Config options diff --git a/nextflow_schema.json b/nextflow_schema.json index 0511335a..aa9e1bb2 100644 --- a/nextflow_schema.json +++ b/nextflow_schema.json @@ -513,7 +513,7 @@ "fa_icon": "fas fa-check-square", "hidden": true }, - "show_hidden_params": { + "validationShowHiddenParams": { "type": "boolean", "fa_icon": "far fa-eye-slash", "description": "Show all params when using `--help`", From bf4cd0adb34e4e031e7bcc951a6422187c1d6295 Mon Sep 17 00:00:00 2001 From: Yuk Kei Wan Date: Mon, 9 Oct 2023 18:12:08 +0800 Subject: [PATCH 76/77] fix --- lib/NfcoreSchema.groovy | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/NfcoreSchema.groovy b/lib/NfcoreSchema.groovy index 9b34804d..cd35a57d 100755 --- a/lib/NfcoreSchema.groovy +++ b/lib/NfcoreSchema.groovy @@ -123,7 +123,7 @@ class NfcoreSchema { has_error = true } // unexpected params - def params_ignore = params.schema_ignore_params.split(',') + 'schema_ignore_params' + def params_ignore = params.validationSchemaIgnoreParams.split(',') + 'schema_ignore_params' def expectedParamsLowerCase = expectedParams.collect{ it.replace("-", "").toLowerCase() } def specifiedParamLowerCase = specifiedParam.replace("-", "").toLowerCase() def isCamelCaseBug = (specifiedParam.contains("-") && !expectedParams.contains(specifiedParam) && expectedParamsLowerCase.contains(specifiedParamLowerCase)) @@ -386,7 +386,7 @@ class NfcoreSchema { // private static JSONObject removeIgnoredParams(raw_schema, params) { // Remove anything that's in params.schema_ignore_params - params.schema_ignore_params.split(',').each{ ignore_param -> + params.validationSchemaIgnoreParams.split(',').each{ ignore_param -> if(raw_schema.keySet().contains('definitions')){ raw_schema.definitions.each { definition -> for (key in definition.keySet()){ From 52471228b4b90ce896ce61eea5f66be94cdae1cb Mon Sep 17 00:00:00 2001 From: Yuk Kei Wan Date: Mon, 9 Oct 2023 14:37:24 +0000 Subject: [PATCH 77/77] PRETTY! --- assets/multiqc_config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/multiqc_config.yml b/assets/multiqc_config.yml index cec134f5..74438d49 100644 --- a/assets/multiqc_config.yml +++ b/assets/multiqc_config.yml @@ -1,9 +1,9 @@ report_comment: > - + This report has been generated by the nf-core/nanoseq analysis pipeline. For information about how to interpret these results, please see the documentation. - + report_section_order: "nf-core-nanoseq-methods-description": order: -1000