From e1558633f8be4ea65193e734f9276e75ccdbbe4b Mon Sep 17 00:00:00 2001 From: Jonathan Manning Date: Wed, 7 Feb 2024 18:43:14 +0000 Subject: [PATCH 01/10] Add tximport module --- .../nf-core/tximeta/tximport/environment.yml | 9 + modules/nf-core/tximeta/tximport/main.nf | 49 ++ modules/nf-core/tximeta/tximport/meta.yml | 57 +++ .../tximeta/tximport/templates/tximport.r | 227 +++++++++ .../tximeta/tximport/tests/main.nf.test | 198 ++++++++ .../tximeta/tximport/tests/main.nf.test.snap | 434 ++++++++++++++++++ .../nf-core/tximeta/tximport/tests/tags.yml | 2 + tests/config/test_data.config | 5 +- 8 files changed, 979 insertions(+), 2 deletions(-) create mode 100644 modules/nf-core/tximeta/tximport/environment.yml create mode 100644 modules/nf-core/tximeta/tximport/main.nf create mode 100644 modules/nf-core/tximeta/tximport/meta.yml create mode 100755 modules/nf-core/tximeta/tximport/templates/tximport.r create mode 100644 modules/nf-core/tximeta/tximport/tests/main.nf.test create mode 100644 modules/nf-core/tximeta/tximport/tests/main.nf.test.snap create mode 100644 modules/nf-core/tximeta/tximport/tests/tags.yml diff --git a/modules/nf-core/tximeta/tximport/environment.yml b/modules/nf-core/tximeta/tximport/environment.yml new file mode 100644 index 00000000000..475d5e007bf --- /dev/null +++ b/modules/nf-core/tximeta/tximport/environment.yml @@ -0,0 +1,9 @@ +--- +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json +name: "tximport" +channels: + - conda-forge + - bioconda + - defaults +dependencies: + - "bioconda::bioconductor-tximport=1.30.0" diff --git a/modules/nf-core/tximeta/tximport/main.nf b/modules/nf-core/tximeta/tximport/main.nf new file mode 100644 index 00000000000..e2ebf4df50d --- /dev/null +++ b/modules/nf-core/tximeta/tximport/main.nf @@ -0,0 +1,49 @@ + +process TXIMETA_TXIMPORT { + label "process_medium" + + conda "bioconda::bioconductor-tximeta=1.20.1" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/bioconductor-tximeta:1.20.1--r41hdfd78af_0' : + 'quay.io/biocontainers/bioconductor-tximeta:1.20.1--r43hdfd78af_0' }" + + input: + tuple val(meta), path("quants/*") + tuple val(meta2), path(tx2gene) + tuple val(meta3), path(coldata) + val quant_type + + output: + path "*gene_tpm.tsv" , emit: tpm_gene + path "*gene_counts.tsv" , emit: counts_gene + path "*gene_counts_length_scaled.tsv", emit: counts_gene_length_scaled + path "*gene_counts_scaled.tsv" , emit: counts_gene_scaled + path "*gene_lengths.tsv" , emit: lengths_gene + path "*transcript_tpm.tsv" , emit: tpm_transcript + path "*transcript_counts.tsv" , emit: counts_transcript + path "*transcript_lengths.tsv" , emit: lengths_transcript + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + template 'tximport.r' + + stub: + """ + touch ${meta.id}.gene_tpm.tsv + touch ${meta.id}.gene_counts.tsv + touch ${meta.id}.gene_counts_length_scaled.tsv + touch ${meta.id}.gene_counts_scaled.tsv + touch ${meta.id}.gene_lengths.tsv + touch ${meta.id}.transcript_tpm.tsv + touch ${meta.id}.transcript_counts.tsv + touch ${meta.id}.transcript_lengths.tsv + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + r: \$( R --version | sed '1!d; s/.*version //; s/ .*//' ) + END_VERSIONS + """ +} diff --git a/modules/nf-core/tximeta/tximport/meta.yml b/modules/nf-core/tximeta/tximport/meta.yml new file mode 100644 index 00000000000..89f08bd51cf --- /dev/null +++ b/modules/nf-core/tximeta/tximport/meta.yml @@ -0,0 +1,57 @@ +--- +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/meta-schema.json +name: "tximport" +## TODO nf-core: Add a description of the module and list keywords +description: write your description here +keywords: + - sort + - example + - genomics +tools: + - "tximport": + ## TODO nf-core: Add a description and other details for the software below + description: "Import and summarize transcript-level estimates for transcript- and gene-level analysis" + homepage: "None" + documentation: "None" + tool_dev_url: "None" + doi: "" + licence: ['LGPL >=2'] + +## TODO nf-core: Add a description of all of the variables used as input +input: + # Only when we have meta + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. `[ id:'sample1', single_end:false ]` + + ## TODO nf-core: Delete / customise this example input + - bam: + type: file + description: Sorted BAM/CRAM/SAM file + pattern: "*.{bam,cram,sam}" + +## TODO nf-core: Add a description of all of the variables used as output +output: + #Only when we have meta + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. `[ id:'sample1', single_end:false ]` + + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + ## TODO nf-core: Delete / customise this example output + - bam: + type: file + description: Sorted BAM/CRAM/SAM file + pattern: "*.{bam,cram,sam}" + +authors: + - "@pinin4fjords" +maintainers: + - "@pinin4fjords" diff --git a/modules/nf-core/tximeta/tximport/templates/tximport.r b/modules/nf-core/tximeta/tximport/templates/tximport.r new file mode 100755 index 00000000000..8130d58479a --- /dev/null +++ b/modules/nf-core/tximeta/tximport/templates/tximport.r @@ -0,0 +1,227 @@ +#!/usr/bin/env Rscript + +# Script for importing and processing transcript-level quantifications. +# Written by Lorena Pantano, later modified by Jonathan Manning, and released +# under the MIT license. + +# Loading required libraries +library(SummarizedExperiment) +library(tximport) + +################################################ +################################################ +## Functions ## +################################################ +################################################ + +#' Build a table from a SummarizedExperiment object +#' +#' This function takes a SummarizedExperiment object and a specific slot name to extract +#' assay data. It then combines the first two columns of the rowData with the specified +#' assay data slot into a new data table. +#' +#' @param se.obj A SummarizedExperiment object from which to build the table. +#' @param slot The name of the slot in the assays list from which to extract data. +#' +#' @return A data frame combining the first two columns of the rowData with the assay data from the specified slot. + +build_table <- function(se.obj, slot) { + cbind(rowData(se.obj)[,1:2], assays(se.obj)[[slot]]) +} + +#' Write a table to a file from a SummarizedExperiment object with given parameters +#' +#' This function generates a table from a SummarizedExperiment object using specified parameters +#' and writes the resulting table to a file. The file name is constructed using a prefix and a +#' suffix from the parameters, and the table is written with tab separation, without quoting text, +#' and without row names. +#' +#' @param params A list containing the parameters needed for file generation and table writing. +#' The list should include: +#' - `obj`: A SummarizedExperiment object from which to build the table. +#' - `slot`: The name of the slot in the assays list from which to extract data. +#' - `suffix`: Suffix to use for generating the file name. +#' +#' @return NULL The function is called for its side effect of writing a file and does not return anything. + +write_se_table <- function(params, prefix) { + file_name <- paste0(prefix, ".", params\$suffix) + write.table(build_table(params\$obj, params\$slot), file_name, + sep="\t", quote=FALSE, row.names = FALSE) +} + +#' Read Transcript Metadata from a Given Path +#' +#' This function reads transcript metadata from a specified file path. The file is expected to +#' be a tab-separated values file without headers, containing transcript information. The function +#' checks if the file is empty and stops execution with an error message if so. It reads the file +#' into a data frame, expecting columns for transcript IDs, gene IDs, and gene names. Additional +#' processing is done to ensure compatibility with a predefined data structure (e.g., `txi[[1]]`), +#' including adding missing entries and reordering based on the transcript IDs found in `txi[[1]]`. +#' +#' @param tinfo_path The file path to the transcript information file. +#' +#' @return A list containing three elements: +#' - `transcript`: A data frame with transcript IDs, gene IDs, and gene names, indexed by transcript IDs. +#' - `gene`: A data frame with unique gene IDs and gene names. +#' - `tx2gene`: A data frame mapping transcript IDs to gene IDs. + +read_transcript_info <- function(tinfo_path){ + info <- file.info(tinfo_path) + if (info\$size == 0) { + stop("tx2gene file is empty") + } + + transcript_info <- read.csv(tinfo_path, sep="\t", header = FALSE, + col.names = c("tx", "gene_id", "gene_name")) + + extra <- setdiff(rownames(txi[[1]]), as.character(transcript_info[["tx"]])) + transcript_info <- rbind(transcript_info, data.frame(tx=extra, gene_id=extra, gene_name=extra)) + transcript_info <- transcript_info[match(rownames(txi[[1]]), transcript_info[["tx"]]), ] + rownames(transcript_info) <- transcript_info[["tx"]] + + list(transcript = transcript_info, + gene = unique(transcript_info[,2:3]), + tx2gene = transcript_info[,1:2]) +} + +#' Create a SummarizedExperiment Object +#' +#' Constructs a SummarizedExperiment object using provided matrices for counts, abundance, and length, +#' along with metadata for columns and rows. This function facilitates the organization of experimental +#' data (e.g., RNA-seq or other high-throughput data) in a structured format that is convenient for +#' further analyses and visualization. +#' +#' @param counts A matrix or DataFrame containing counts data, with rows as features (e.g., genes) and +#' columns as samples. +#' @param abundance A matrix or DataFrame containing abundance data (e.g., TPM or FPKM) with the same +#' dimensions and row/column names as the counts data. +#' @param length A matrix or DataFrame containing feature lengths, matching the dimensions and row/column +#' names of the counts data. +#' @param col_data A DataFrame containing sample-level metadata, with rows corresponding to columns in the +#' counts, abundance, and length matrices. +#' @param row_data A DataFrame containing feature-level metadata, with rows corresponding to features in +#' the counts, abundance, and length matrices. +#' +#' @return A SummarizedExperiment object containing the supplied data and metadata. + +create_summarized_experiment <- function(counts, abundance, length, col_data, row_data) { + SummarizedExperiment(assays = list(counts = counts, abundance = abundance, length = length), + colData = col_data, + rowData = row_data) +} + +################################################ +################################################ +## Main script starts here ## +################################################ +################################################ + +# Define pattern for file names based on quantification type +pattern <- ifelse('$quant_type' == "kallisto", "abundance.tsv", "quant.sf") +fns <- list.files('quants', pattern = pattern, recursive = T, full.names = T) +names <- basename(dirname(fns)) +names(fns) <- names +dropInfReps <- '$quant_type' == "kallisto" + +# Import transcript-level quantifications +txi <- tximport(fns, type = '$quant_type', txOut = TRUE, dropInfReps = dropInfReps) + +# Read transcript and sample data +transcript_info <- read_transcript_info('$tx2gene') + +if (file.exists('$coldata')) { + coldata <- read.csv('$coldata', sep="\t") + coldata <- coldata[match(names, coldata[,1]),] + coldata <- cbind(files = fns, coldata) +} else { + message("ColData not available: ", '$coldata') + coldata <- data.frame(files = fns, names = names) +} +rownames(coldata) <- coldata[["names"]] + +# Create initial SummarizedExperiment object +se <- create_summarized_experiment(txi[["counts"]], txi[["abundance"]], txi[["length"]], + DataFrame(coldata), transcript_info\$transcript) + +# Setting parameters for writing tables +params <- list( + list(obj = se, slot = "abundance", suffix = "transcript_tpm.tsv"), + list(obj = se, slot = "counts", suffix = "transcript_counts.tsv"), + list(obj = se, slot = "length", suffix = "transcript_lengths.tsv") +) + +# Process gene-level data if tx2gene mapping is available +if ("tx2gene" %in% names(transcript_info) && !is.null(transcript_info\$tx2gene)) { + tx2gene <- transcript_info\$tx2gene + gi <- summarizeToGene(txi, tx2gene = tx2gene) + gi.ls <- summarizeToGene(txi, tx2gene = tx2gene, countsFromAbundance = "lengthScaledTPM") + gi.s <- summarizeToGene(txi, tx2gene = tx2gene, countsFromAbundance = "scaledTPM") + + gene_info <- transcript_info\$gene[match(rownames(gi[[1]]), transcript_info\$gene[["gene_id"]]),] + rownames(gene_info) <- gene_info[["tx"]] + + col_data_frame <- DataFrame(coldata) + + # Create gene-level SummarizedExperiment objects + gse <- create_summarized_experiment(gi[["counts"]], gi[["abundance"]], gi[["length"]], + col_data_frame, gene_info) + gse.ls <- create_summarized_experiment(gi.ls[["counts"]], gi.ls[["abundance"]], gi.ls[["length"]], + col_data_frame, gene_info) + gse.s <- create_summarized_experiment(gi.s[["counts"]], gi.s[["abundance"]], gi.s[["length"]], + col_data_frame, gene_info) + + params <- c(params, list( + list(obj = gse, slot = "length", suffix = "gene_lengths.tsv"), + list(obj = gse, slot = "abundance", suffix = "gene_tpm.tsv"), + list(obj = gse, slot = "counts", suffix = "gene_counts.tsv"), + list(obj = gse.ls, slot = "abundance", suffix = "gene_tpm_length_scaled.tsv"), + list(obj = gse.ls, slot = "counts", suffix = "gene_counts_length_scaled.tsv"), + list(obj = gse.s, slot = "abundance", suffix = "gene_tpm_scaled.tsv"), + list(obj = gse.s, slot = "counts", suffix = "gene_counts_scaled.tsv") + )) +} + +# Writing tables for each set of parameters + +prefix <- '' +if ('$task.ext.prefix' != 'null'){ + prefix = '$task.ext.prefix' +} else if ('$meta.id' != 'null'){ + prefix = '$meta.id' +} + +done <- lapply(params, write_se_table, prefix) + +################################################ +################################################ +## R SESSION INFO ## +################################################ +################################################ + +sink(paste(prefix, "R_sessionInfo.log", sep = '.')) +citation("tximeta") +print(sessionInfo()) +sink() + +################################################ +################################################ +## VERSIONS FILE ## +################################################ +################################################ + +r.version <- strsplit(version[['version.string']], ' ')[[1]][3] +tximeta.version <- as.character(packageVersion('tximeta')) + +writeLines( + c( + '"${task.process}":', + paste(' r-base:', r.version), + paste(' bioconductor-tximeta:', tximeta.version) + ), +'versions.yml') + +################################################ +################################################ +################################################ +################################################ diff --git a/modules/nf-core/tximeta/tximport/tests/main.nf.test b/modules/nf-core/tximeta/tximport/tests/main.nf.test new file mode 100644 index 00000000000..62de407da9b --- /dev/null +++ b/modules/nf-core/tximeta/tximport/tests/main.nf.test @@ -0,0 +1,198 @@ +nextflow_process { + + name "Test Process TXIMETA_TXIMPORT" + script "../main.nf" + process "TXIMETA_TXIMPORT" + + tag "modules" + tag "modules_nfcore" + tag "tximeta" + tag "tximeta/tximport" + tag "untar" + + test("saccharomyces_cerevisiae - kallisto - gtf") { + + setup { + + run("UNTAR") { + script "../../../untar/main.nf" + process { + """ + input[0] = [ + [ id:'test'], // meta map + file(params.test_data['saccharomyces_cerevisiae']['genome']['kallisto_results'], checkIfExists: true) + ] + """ + } + } + run("CUSTOM_TX2GENE") { + script "../../../custom/tx2gene/main.nf" + process { + """ + input[0] = [ + [ id:'test'], // meta map + file(params.test_data['saccharomyces_cerevisiae']['genome']['genome_gfp_gtf'], checkIfExists: true) + ] + input[1] = UNTAR.out.untar.map { meta, dir -> [ meta, dir.listFiles().collect() ] } + input[2] = 'kallisto' + input[3] = 'gene_id' + input[4] = 'gene_name' + """ + } + } + } + + when { + process { + """ + input[0] = UNTAR.out.untar.map { meta, dir -> [ meta, dir.listFiles().collect() ] } + input[1] = CUSTOM_TX2GENE.out.tx2gene + input[2] = Channel.of([ [], [] ]) + input[3] = 'kallisto' + """ + } + } + + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out.tpm_gene).match('tpm_gene_kallisto') }, + { assert snapshot(process.out.counts_gene).match('counts_gene_kallisto') }, + { assert snapshot(process.out.counts_gene_length_scaled).match('counts_gene_length_scaled_kallisto') }, + { assert snapshot(process.out.counts_gene_scaled).match('counts_gene_scaled_kallisto') }, + { assert snapshot(process.out.lengths_gene).match('lengths_gene_kallisto') }, + { assert snapshot(process.out.tpm_transcript).match('tpm_transcript_kallisto') }, + { assert snapshot(process.out.counts_transcript).match('counts_transcript_kallisto') }, + { assert snapshot(process.out.lengths_transcript).match('lengths_transcript_kallisto') }, + { assert snapshot(process.out.versions).match('versions_kallisto') }, + ) + } + + } + + test("saccharomyces_cerevisiae - kallisto - gtf - stub") { + + options "-stub" + + when { + process { + """ + input[0] = Channel.of([ [], [] ]) + input[1] = Channel.of([ [], [] ]) + input[2] = Channel.of([ [], [] ]) + input[3] = 'kallisto' + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out.tpm_gene).match('tpm_gene_kallisto -stub') }, + { assert snapshot(process.out.counts_gene).match('counts_gene_kallisto - stub') }, + { assert snapshot(process.out.counts_gene_length_scaled).match('counts_gene_length_scaled_kallisto - stub') }, + { assert snapshot(process.out.counts_gene_scaled).match('counts_gene_scaled_kallisto - stub') }, + { assert snapshot(process.out.lengths_gene).match('lengths_gene_kallisto - stub') }, + { assert snapshot(process.out.tpm_transcript).match('tpm_transcript_kallisto - stub') }, + { assert snapshot(process.out.counts_transcript).match('counts_transcript_kallisto - stub') }, + { assert snapshot(process.out.lengths_transcript).match('lengths_transcript_kallisto - stub') }, + { assert snapshot(process.out.versions).match('versions_kallisto - stub') }, + ) + } + + } + test("saccharomyces_cerevisiae - salmon - gtf") { + + setup { + + run("UNTAR") { + script "../../../untar/main.nf" + process { + """ + input[0] = [ + [ id:'test'], // meta map + file(params.test_data['saccharomyces_cerevisiae']['genome']['salmon_results'], checkIfExists: true) + ] + """ + } + } + run("CUSTOM_TX2GENE") { + script "../../../custom/tx2gene/main.nf" + process { + """ + input[0] = [ + [ id:'test'], // meta map + file(params.test_data['saccharomyces_cerevisiae']['genome']['genome_gfp_gtf'], checkIfExists: true) + ] + input[1] = UNTAR.out.untar.map { meta, dir -> [ meta, dir.listFiles().collect() ] } + input[2] = 'salmon' + input[3] = 'gene_id' + input[4] = 'gene_name' + """ + } + } + } + + when { + process { + """ + input[0] = UNTAR.out.untar.map { meta, dir -> [ meta, dir.listFiles().collect() ] } + input[1] = CUSTOM_TX2GENE.out.tx2gene + input[2] = Channel.of([ [], [] ]) + input[3] = 'salmon' + """ + } + } + + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out.tpm_gene).match('tpm_gene_salmon') }, + { assert snapshot(process.out.counts_gene).match('counts_gene_salmon') }, + { assert snapshot(process.out.counts_gene_length_scaled).match('counts_gene_length_scaled_salmon') }, + { assert snapshot(process.out.counts_gene_scaled).match('counts_gene_scaled_salmon') }, + { assert snapshot(process.out.lengths_gene).match('lengths_gene_salmon') }, + { assert snapshot(process.out.tpm_transcript).match('tpm_transcript_salmon') }, + { assert snapshot(process.out.counts_transcript).match('counts_transcript_salmon') }, + { assert snapshot(process.out.lengths_transcript).match('lengths_transcript_salmon') }, + { assert snapshot(process.out.versions).match('versions_salmon') }, + ) + } + + } + + test("saccharomyces_cerevisiae - salmon - gtf - stub") { + + options "-stub" + + when { + process { + """ + input[0] = Channel.of([ [], [] ]) + input[1] = Channel.of([ [], [] ]) + input[2] = Channel.of([ [], [] ]) + input[3] = 'salmon' + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out.tpm_gene).match('tpm_gene_salmon -stub') }, + { assert snapshot(process.out.counts_gene).match('counts_gene_salmon - stub') }, + { assert snapshot(process.out.counts_gene_length_scaled).match('counts_gene_length_scaled_salmon - stub') }, + { assert snapshot(process.out.counts_gene_scaled).match('counts_gene_scaled_salmon - stub') }, + { assert snapshot(process.out.lengths_gene).match('lengths_gene_salmon - stub') }, + { assert snapshot(process.out.tpm_transcript).match('tpm_transcript_salmon - stub') }, + { assert snapshot(process.out.counts_transcript).match('counts_transcript_salmon - stub') }, + { assert snapshot(process.out.lengths_transcript).match('lengths_transcript_salmon - stub') }, + { assert snapshot(process.out.versions).match('versions_salmon - stub') }, + ) + } + + } +} + diff --git a/modules/nf-core/tximeta/tximport/tests/main.nf.test.snap b/modules/nf-core/tximeta/tximport/tests/main.nf.test.snap new file mode 100644 index 00000000000..8fffdee7bef --- /dev/null +++ b/modules/nf-core/tximeta/tximport/tests/main.nf.test.snap @@ -0,0 +1,434 @@ +{ + "tpm_gene_salmon -stub": { + "content": [ + [ + "[].gene_tpm.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-07T18:39:06.800740434" + }, + "tpm_transcript_salmon - stub": { + "content": [ + [ + "[].transcript_tpm.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-07T18:39:06.85254371" + }, + "lengths_gene_kallisto - stub": { + "content": [ + [ + "[].gene_lengths.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-07T18:38:25.819034695" + }, + "counts_gene_scaled_salmon - stub": { + "content": [ + [ + "[].gene_counts_scaled.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-07T18:39:06.830406351" + }, + "counts_gene_kallisto - stub": { + "content": [ + [ + "[].gene_counts.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-07T18:38:25.786135178" + }, + "lengths_transcript_salmon - stub": { + "content": [ + [ + "[].transcript_lengths.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-07T18:39:06.872032109" + }, + "versions_salmon - stub": { + "content": [ + [ + "versions.yml:md5,721fc5c3bfa6792e8982f2662908b836" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-07T18:39:06.880462837" + }, + "counts_gene_length_scaled_kallisto": { + "content": [ + [ + "test.gene_counts_length_scaled.tsv:md5,4944841ac711124d29673b6b6ed16ef3" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-07T18:38:12.725731622" + }, + "lengths_transcript_salmon": { + "content": [ + [ + "test.transcript_lengths.tsv:md5,db6d8ab9f8e1123d5984fd534b4347dc" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-07T18:38:53.923548884" + }, + "counts_transcript_kallisto": { + "content": [ + [ + "test.transcript_counts.tsv:md5,42e0106e75fa97c1c684c6d9060f1724" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-07T18:38:12.759794819" + }, + "tpm_gene_kallisto -stub": { + "content": [ + [ + "[].gene_tpm.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-07T18:38:25.776973968" + }, + "counts_transcript_kallisto - stub": { + "content": [ + [ + "[].transcript_counts.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-07T18:38:25.840001534" + }, + "counts_transcript_salmon": { + "content": [ + [ + "test.transcript_counts.tsv:md5,ff0f5be09ca7a322672c0074ba35da17" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-07T18:38:53.914507596" + }, + "lengths_gene_salmon - stub": { + "content": [ + [ + "[].gene_lengths.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-07T18:39:06.840100581" + }, + "tpm_gene_salmon": { + "content": [ + [ + "test.gene_tpm.tsv:md5,6076364cc78741a4f8bc8935a045d13d" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-07T18:38:53.862028739" + }, + "tpm_transcript_salmon": { + "content": [ + [ + "test.transcript_tpm.tsv:md5,7a334b565e1e865efb1caf615f194ef7" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-07T18:38:53.904133886" + }, + "lengths_transcript_kallisto": { + "content": [ + [ + "test.transcript_lengths.tsv:md5,f974b52840431a5dae57bcb615badbf1" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-07T18:38:12.767653999" + }, + "counts_gene_length_scaled_kallisto - stub": { + "content": [ + [ + "[].gene_counts_length_scaled.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-07T18:38:25.794941447" + }, + "counts_transcript_salmon - stub": { + "content": [ + [ + "[].transcript_counts.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-07T18:39:06.863547229" + }, + "counts_gene_scaled_kallisto": { + "content": [ + [ + "test.gene_counts_scaled.tsv:md5,39d14e361434978b3cadae901a26a028" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-07T18:38:12.732177272" + }, + "counts_gene_salmon": { + "content": [ + [ + "test.gene_counts.tsv:md5,c14cab7e15cfac73ec0602dc2c404551" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-07T18:38:53.869874219" + }, + "versions_salmon": { + "content": [ + [ + "versions.yml:md5,a6476f297a8e9396f4cfc151cd7f25ed" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-07T18:38:53.932495594" + }, + "counts_gene_length_scaled_salmon": { + "content": [ + [ + "test.gene_counts_length_scaled.tsv:md5,5f92a6784f6edc5e3b336c71c3ee7daf" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-07T18:38:53.878059078" + }, + "tpm_gene_kallisto": { + "content": [ + [ + "test.gene_tpm.tsv:md5,85d108269769ae0d841247b9b9ed922d" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-07T18:38:12.708173143" + }, + "lengths_transcript_kallisto - stub": { + "content": [ + [ + "[].transcript_lengths.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-07T18:38:25.850016483" + }, + "lengths_gene_kallisto": { + "content": [ + [ + "test.gene_lengths.tsv:md5,db6becdf807fd164a9c63dd1dd916d9c" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-07T18:38:12.740759081" + }, + "counts_gene_scaled_kallisto - stub": { + "content": [ + [ + "[].gene_counts_scaled.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-07T18:38:25.806265856" + }, + "tpm_transcript_kallisto": { + "content": [ + [ + "test.transcript_tpm.tsv:md5,65862ed9d4a05abfab952e680dc0e49d" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-07T18:38:12.74912992" + }, + "lengths_gene_salmon": { + "content": [ + [ + "test.gene_lengths.tsv:md5,1691ea2677612805cd699265c83024d7" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-07T18:38:53.894765047" + }, + "counts_gene_length_scaled_salmon - stub": { + "content": [ + [ + "[].gene_counts_length_scaled.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-07T18:39:06.820739062" + }, + "counts_gene_kallisto": { + "content": [ + [ + "test.gene_counts.tsv:md5,e89c28692ea214396b2d4cb702a804c3" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-07T18:38:12.720883422" + }, + "versions_kallisto": { + "content": [ + [ + "versions.yml:md5,a6476f297a8e9396f4cfc151cd7f25ed" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-07T18:38:12.774657438" + }, + "counts_gene_salmon - stub": { + "content": [ + [ + "[].gene_counts.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-07T18:39:06.811186633" + }, + "versions_kallisto - stub": { + "content": [ + [ + "versions.yml:md5,721fc5c3bfa6792e8982f2662908b836" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-07T18:38:25.859377492" + }, + "tpm_transcript_kallisto - stub": { + "content": [ + [ + "[].transcript_tpm.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-07T18:38:25.828403645" + }, + "counts_gene_scaled_salmon": { + "content": [ + [ + "test.gene_counts_scaled.tsv:md5,fdfb3d23aaf5d4316d81247ec4664ca0" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-07T18:38:53.885887907" + } +} \ No newline at end of file diff --git a/modules/nf-core/tximeta/tximport/tests/tags.yml b/modules/nf-core/tximeta/tximport/tests/tags.yml new file mode 100644 index 00000000000..f5238f1b25c --- /dev/null +++ b/modules/nf-core/tximeta/tximport/tests/tags.yml @@ -0,0 +1,2 @@ +tximport: + - "modules/nf-core/tximport/**" diff --git a/tests/config/test_data.config b/tests/config/test_data.config index cfcdd51f009..bb1ea8bc486 100644 --- a/tests/config/test_data.config +++ b/tests/config/test_data.config @@ -3,7 +3,7 @@ params { // Base directory for test data - test_data_base = "https://raw.githubusercontent.com/nf-core/test-datasets/modules" + test_data_base = "https://raw.githubusercontent.com/nf-core/test-datasets/tximport" test_data { 'sarscov2' { @@ -627,7 +627,8 @@ params { 'saccharomyces_cerevisiae' { 'genome' { genome_gfp_gtf = "${params.test_data_base}/data/genomics/eukaryotes/saccharomyces_cerevisiae/genome_gfp.gtf" - kallisto_results = "${params.test_data_base}/data/genomics/eukaryotes/saccharomyces_cerevisiae/kallisto_results.tar.gz" + kallisto_results = "${params.test_data_base}/data/genomics/eukaryotes/saccharomyces_cerevisiae/kallisto_results.tar.gz" + salmon_results = "${params.test_data_base}/data/genomics/eukaryotes/saccharomyces_cerevisiae/salmon_results.tar.gz" } } 'generic' { From 016000672fbf307c0100618cd06dab9dd7986491 Mon Sep 17 00:00:00 2001 From: Jonathan Manning Date: Thu, 8 Feb 2024 11:28:44 +0000 Subject: [PATCH 02/10] Populate meta --- modules/nf-core/tximeta/tximport/meta.yml | 131 ++++++++++++++++------ 1 file changed, 97 insertions(+), 34 deletions(-) diff --git a/modules/nf-core/tximeta/tximport/meta.yml b/modules/nf-core/tximeta/tximport/meta.yml index 89f08bd51cf..76c957c4078 100644 --- a/modules/nf-core/tximeta/tximport/meta.yml +++ b/modules/nf-core/tximeta/tximport/meta.yml @@ -1,55 +1,118 @@ --- # yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/meta-schema.json -name: "tximport" -## TODO nf-core: Add a description of the module and list keywords -description: write your description here +name: "tximeta_tximport" +description: | + Import transcript-level abundances and estimated counts for gene-level + analysis packages keywords: - - sort - - example - - genomics + - gene + - kallisto + - pseudoalignment + - salmon + - transcript tools: - - "tximport": - ## TODO nf-core: Add a description and other details for the software below - description: "Import and summarize transcript-level estimates for transcript- and gene-level analysis" - homepage: "None" - documentation: "None" - tool_dev_url: "None" - doi: "" - licence: ['LGPL >=2'] + - "tximeta": + description: "Transcript Quantification Import with Automatic Metadata" + homepage: "https://bioconductor.org/packages/release/bioc/html/tximeta.html" + documentation: "https://bioconductor.org/packages/release/bioc/vignettes/tximeta/inst/doc/tximeta.html" + tool_dev_url: "https://github.com/thelovelab/tximeta" + doi: "10.1371/journal.pcbi.1007664" + licence: ["GPL-2"] -## TODO nf-core: Add a description of all of the variables used as input input: - # Only when we have meta - meta: type: map description: | - Groovy Map containing sample information - e.g. `[ id:'sample1', single_end:false ]` - - ## TODO nf-core: Delete / customise this example input - - bam: + Groovy Map containing information related to the experiment as a whole + e.g. `[ id:'SRP123456' ]` + - quants: + type: directory + description: Paths to subdirectories corresponding to + sample-wise runs of Salmon or Kallisto + - meta2: + type: map + description: | + Groovy Map containing reference information related to the species + reference e.g. `[ id:'yeast' ]` + - tx2gene: type: file - description: Sorted BAM/CRAM/SAM file - pattern: "*.{bam,cram,sam}" - -## TODO nf-core: Add a description of all of the variables used as output + description: A transcript/ gene mapping table such as those generated by + custom/tx2gene + pattern: "*.{csv,tsv}" + - meta3: + type: map + description: | + Groovy Map containing information related to the experiment as a whole + e.g. `[ id:'SRP123456' ]` + - coldata: + type: file + description: | + Optional 'coldata' file equivalent to a sample sheet where the first + column corresponds to the sample names (directory names in the input + salmon/ kallisto results) + pattern: "*.{csv,tsv}" + - quant_type: + type: string + description: Quantification type, 'kallisto' or 'salmon' + output: - #Only when we have meta - meta: type: map description: | - Groovy Map containing sample information - e.g. `[ id:'sample1', single_end:false ]` - + Groovy Map containing information related to the experiment as a whole + e.g. `[ id:'SRP123456' ]` + - tpm_gene: + type: file + description: | + Abundance (TPM) values derived from tximport output after + summarizeToGene(), without a 'countsFromAbundance' specification + pattern: "*gene_tpm.tsv" + - counts_gene: + type: file + description: | + Count values derived from tximport output after + summarizeToGene(), without a 'countsFromAbundance' specification + pattern: "*gene_counts.tsv" + - counts_gene_length_scaled: + type: file + description: | + Count values derived from tximport output after summarizeToGene(), with + a 'countsFromAbundance' specification of 'lengthScaledTPM' + pattern: "*gene_counts_length_scaled.tsv" + - counts_gene_scaled: + type: file + description: | + Count values derived from tximport output after summarizeToGene(), with + a 'countsFromAbundance' specification of 'scaledTPM' + pattern: "*gene_counts_scaled.tsv" + - gene_lengths: + type: file + description: | + Length values derived from tximport output after summarizeToGene(), + without a 'countsFromAbundance' specification + pattern: "*gene_lengths.tsv" + - tpm_transcript: + type: file + description: | + Abundance (TPM) values derived from tximport output without + summarizeToGene(), without a 'countsFromAbundance' specification + pattern: "*transcript_tpm.tsv" + - counts_transcript: + type: file + description: | + Count values derived from tximport output without + summarizeToGene(), without a 'countsFromAbundance' specification + pattern: "*transcript_counts.tsv" + - transcript_lengths: + type: file + description: | + Length values derived from tximport output without summarizeToGene(), + without a 'countsFromAbundance' specification + pattern: "*gene_lengths.tsv" - versions: type: file description: File containing software versions pattern: "versions.yml" - ## TODO nf-core: Delete / customise this example output - - bam: - type: file - description: Sorted BAM/CRAM/SAM file - pattern: "*.{bam,cram,sam}" authors: - "@pinin4fjords" From 9b3fb00807fef97748006757d532620bd2db3acf Mon Sep 17 00:00:00 2001 From: Jonathan Manning Date: Thu, 8 Feb 2024 11:29:03 +0000 Subject: [PATCH 03/10] Fix up tximport --- .../nf-core/tximeta/tximport/environment.yml | 2 +- modules/nf-core/tximeta/tximport/main.nf | 22 +- .../tximeta/tximport/tests/main.nf.test | 1 + .../tximeta/tximport/tests/main.nf.test.snap | 296 ++++++++++++++---- .../nf-core/tximeta/tximport/tests/tags.yml | 4 +- 5 files changed, 243 insertions(+), 82 deletions(-) diff --git a/modules/nf-core/tximeta/tximport/environment.yml b/modules/nf-core/tximeta/tximport/environment.yml index 475d5e007bf..a8fcf5e3f56 100644 --- a/modules/nf-core/tximeta/tximport/environment.yml +++ b/modules/nf-core/tximeta/tximport/environment.yml @@ -1,6 +1,6 @@ --- # yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json -name: "tximport" +name: "tximeta_tximport" channels: - conda-forge - bioconda diff --git a/modules/nf-core/tximeta/tximport/main.nf b/modules/nf-core/tximeta/tximport/main.nf index e2ebf4df50d..4eb5cee9b22 100644 --- a/modules/nf-core/tximeta/tximport/main.nf +++ b/modules/nf-core/tximeta/tximport/main.nf @@ -2,10 +2,10 @@ process TXIMETA_TXIMPORT { label "process_medium" - conda "bioconda::bioconductor-tximeta=1.20.1" + conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/bioconductor-tximeta:1.20.1--r41hdfd78af_0' : - 'quay.io/biocontainers/bioconductor-tximeta:1.20.1--r43hdfd78af_0' }" + 'biocontainers/bioconductor-tximeta:1.20.1--r43hdfd78af_0' }" input: tuple val(meta), path("quants/*") @@ -14,15 +14,15 @@ process TXIMETA_TXIMPORT { val quant_type output: - path "*gene_tpm.tsv" , emit: tpm_gene - path "*gene_counts.tsv" , emit: counts_gene - path "*gene_counts_length_scaled.tsv", emit: counts_gene_length_scaled - path "*gene_counts_scaled.tsv" , emit: counts_gene_scaled - path "*gene_lengths.tsv" , emit: lengths_gene - path "*transcript_tpm.tsv" , emit: tpm_transcript - path "*transcript_counts.tsv" , emit: counts_transcript - path "*transcript_lengths.tsv" , emit: lengths_transcript - path "versions.yml" , emit: versions + tuple val(meta), path("*gene_tpm.tsv") , emit: tpm_gene + tuple val(meta), path("*gene_counts.tsv") , emit: counts_gene + tuple val(meta), path("*gene_counts_length_scaled.tsv"), emit: counts_gene_length_scaled + tuple val(meta), path("*gene_counts_scaled.tsv") , emit: counts_gene_scaled + tuple val(meta), path("*gene_lengths.tsv") , emit: lengths_gene + tuple val(meta), path("*transcript_tpm.tsv") , emit: tpm_transcript + tuple val(meta), path("*transcript_counts.tsv") , emit: counts_transcript + tuple val(meta), path("*transcript_lengths.tsv") , emit: lengths_transcript + path "versions.yml" , emit: versions when: task.ext.when == null || task.ext.when diff --git a/modules/nf-core/tximeta/tximport/tests/main.nf.test b/modules/nf-core/tximeta/tximport/tests/main.nf.test index 62de407da9b..27061ec44c4 100644 --- a/modules/nf-core/tximeta/tximport/tests/main.nf.test +++ b/modules/nf-core/tximeta/tximport/tests/main.nf.test @@ -6,6 +6,7 @@ nextflow_process { tag "modules" tag "modules_nfcore" + tag "custom/tx2gene" tag "tximeta" tag "tximeta/tximport" tag "untar" diff --git a/modules/nf-core/tximeta/tximport/tests/main.nf.test.snap b/modules/nf-core/tximeta/tximport/tests/main.nf.test.snap index 8fffdee7bef..154dac9e5f1 100644 --- a/modules/nf-core/tximeta/tximport/tests/main.nf.test.snap +++ b/modules/nf-core/tximeta/tximport/tests/main.nf.test.snap @@ -2,74 +2,104 @@ "tpm_gene_salmon -stub": { "content": [ [ - "[].gene_tpm.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + [ + [ + + ], + "[].gene_tpm.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] ] ], "meta": { "nf-test": "0.8.4", "nextflow": "23.10.1" }, - "timestamp": "2024-02-07T18:39:06.800740434" + "timestamp": "2024-02-08T10:26:33.349620253" }, "tpm_transcript_salmon - stub": { "content": [ [ - "[].transcript_tpm.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + [ + [ + + ], + "[].transcript_tpm.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] ] ], "meta": { "nf-test": "0.8.4", "nextflow": "23.10.1" }, - "timestamp": "2024-02-07T18:39:06.85254371" + "timestamp": "2024-02-08T10:26:33.407000817" }, "lengths_gene_kallisto - stub": { "content": [ [ - "[].gene_lengths.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + [ + [ + + ], + "[].gene_lengths.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] ] ], "meta": { "nf-test": "0.8.4", "nextflow": "23.10.1" }, - "timestamp": "2024-02-07T18:38:25.819034695" + "timestamp": "2024-02-08T10:25:57.130634129" }, "counts_gene_scaled_salmon - stub": { "content": [ [ - "[].gene_counts_scaled.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + [ + [ + + ], + "[].gene_counts_scaled.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] ] ], "meta": { "nf-test": "0.8.4", "nextflow": "23.10.1" }, - "timestamp": "2024-02-07T18:39:06.830406351" + "timestamp": "2024-02-08T10:26:33.388528409" }, "counts_gene_kallisto - stub": { "content": [ [ - "[].gene_counts.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + [ + [ + + ], + "[].gene_counts.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] ] ], "meta": { "nf-test": "0.8.4", "nextflow": "23.10.1" }, - "timestamp": "2024-02-07T18:38:25.786135178" + "timestamp": "2024-02-08T10:25:57.108636331" }, "lengths_transcript_salmon - stub": { "content": [ [ - "[].transcript_lengths.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + [ + [ + + ], + "[].transcript_lengths.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] ] ], "meta": { "nf-test": "0.8.4", "nextflow": "23.10.1" }, - "timestamp": "2024-02-07T18:39:06.872032109" + "timestamp": "2024-02-08T10:26:33.422671766" }, "versions_salmon - stub": { "content": [ @@ -81,175 +111,245 @@ "nf-test": "0.8.4", "nextflow": "23.10.1" }, - "timestamp": "2024-02-07T18:39:06.880462837" + "timestamp": "2024-02-08T10:26:33.430828435" }, "counts_gene_length_scaled_kallisto": { "content": [ [ - "test.gene_counts_length_scaled.tsv:md5,4944841ac711124d29673b6b6ed16ef3" + [ + { + "id": "test" + }, + "test.gene_counts_length_scaled.tsv:md5,4944841ac711124d29673b6b6ed16ef3" + ] ] ], "meta": { "nf-test": "0.8.4", "nextflow": "23.10.1" }, - "timestamp": "2024-02-07T18:38:12.725731622" + "timestamp": "2024-02-08T10:25:38.079831055" }, "lengths_transcript_salmon": { "content": [ [ - "test.transcript_lengths.tsv:md5,db6d8ab9f8e1123d5984fd534b4347dc" + [ + { + "id": "test" + }, + "test.transcript_lengths.tsv:md5,db6d8ab9f8e1123d5984fd534b4347dc" + ] ] ], "meta": { "nf-test": "0.8.4", "nextflow": "23.10.1" }, - "timestamp": "2024-02-07T18:38:53.923548884" + "timestamp": "2024-02-08T10:26:20.409923203" }, "counts_transcript_kallisto": { "content": [ [ - "test.transcript_counts.tsv:md5,42e0106e75fa97c1c684c6d9060f1724" + [ + { + "id": "test" + }, + "test.transcript_counts.tsv:md5,42e0106e75fa97c1c684c6d9060f1724" + ] ] ], "meta": { "nf-test": "0.8.4", "nextflow": "23.10.1" }, - "timestamp": "2024-02-07T18:38:12.759794819" + "timestamp": "2024-02-08T10:25:38.142889369" }, "tpm_gene_kallisto -stub": { "content": [ [ - "[].gene_tpm.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + [ + [ + + ], + "[].gene_tpm.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] ] ], "meta": { "nf-test": "0.8.4", "nextflow": "23.10.1" }, - "timestamp": "2024-02-07T18:38:25.776973968" + "timestamp": "2024-02-08T10:25:57.100100112" }, "counts_transcript_kallisto - stub": { "content": [ [ - "[].transcript_counts.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + [ + [ + + ], + "[].transcript_counts.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] ] ], "meta": { "nf-test": "0.8.4", "nextflow": "23.10.1" }, - "timestamp": "2024-02-07T18:38:25.840001534" + "timestamp": "2024-02-08T10:25:57.147237978" }, "counts_transcript_salmon": { "content": [ [ - "test.transcript_counts.tsv:md5,ff0f5be09ca7a322672c0074ba35da17" + [ + { + "id": "test" + }, + "test.transcript_counts.tsv:md5,ff0f5be09ca7a322672c0074ba35da17" + ] ] ], "meta": { "nf-test": "0.8.4", "nextflow": "23.10.1" }, - "timestamp": "2024-02-07T18:38:53.914507596" + "timestamp": "2024-02-08T10:26:20.400364854" }, "lengths_gene_salmon - stub": { "content": [ [ - "[].gene_lengths.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + [ + [ + + ], + "[].gene_lengths.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] ] ], "meta": { "nf-test": "0.8.4", "nextflow": "23.10.1" }, - "timestamp": "2024-02-07T18:39:06.840100581" + "timestamp": "2024-02-08T10:26:33.398475629" }, "tpm_gene_salmon": { "content": [ [ - "test.gene_tpm.tsv:md5,6076364cc78741a4f8bc8935a045d13d" + [ + { + "id": "test" + }, + "test.gene_tpm.tsv:md5,6076364cc78741a4f8bc8935a045d13d" + ] ] ], "meta": { "nf-test": "0.8.4", "nextflow": "23.10.1" }, - "timestamp": "2024-02-07T18:38:53.862028739" + "timestamp": "2024-02-08T10:26:20.344780418" }, "tpm_transcript_salmon": { "content": [ [ - "test.transcript_tpm.tsv:md5,7a334b565e1e865efb1caf615f194ef7" + [ + { + "id": "test" + }, + "test.transcript_tpm.tsv:md5,7a334b565e1e865efb1caf615f194ef7" + ] ] ], "meta": { "nf-test": "0.8.4", "nextflow": "23.10.1" }, - "timestamp": "2024-02-07T18:38:53.904133886" + "timestamp": "2024-02-08T10:26:20.387928015" }, "lengths_transcript_kallisto": { "content": [ [ - "test.transcript_lengths.tsv:md5,f974b52840431a5dae57bcb615badbf1" + [ + { + "id": "test" + }, + "test.transcript_lengths.tsv:md5,f974b52840431a5dae57bcb615badbf1" + ] ] ], "meta": { "nf-test": "0.8.4", "nextflow": "23.10.1" }, - "timestamp": "2024-02-07T18:38:12.767653999" + "timestamp": "2024-02-08T10:25:38.151716159" }, "counts_gene_length_scaled_kallisto - stub": { "content": [ [ - "[].gene_counts_length_scaled.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + [ + [ + + ], + "[].gene_counts_length_scaled.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] ] ], "meta": { "nf-test": "0.8.4", "nextflow": "23.10.1" }, - "timestamp": "2024-02-07T18:38:25.794941447" + "timestamp": "2024-02-08T10:25:57.11634828" }, "counts_transcript_salmon - stub": { "content": [ [ - "[].transcript_counts.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + [ + [ + + ], + "[].transcript_counts.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] ] ], "meta": { "nf-test": "0.8.4", "nextflow": "23.10.1" }, - "timestamp": "2024-02-07T18:39:06.863547229" + "timestamp": "2024-02-08T10:26:33.414880747" }, "counts_gene_scaled_kallisto": { "content": [ [ - "test.gene_counts_scaled.tsv:md5,39d14e361434978b3cadae901a26a028" + [ + { + "id": "test" + }, + "test.gene_counts_scaled.tsv:md5,39d14e361434978b3cadae901a26a028" + ] ] ], "meta": { "nf-test": "0.8.4", "nextflow": "23.10.1" }, - "timestamp": "2024-02-07T18:38:12.732177272" + "timestamp": "2024-02-08T10:25:38.099993433" }, "counts_gene_salmon": { "content": [ [ - "test.gene_counts.tsv:md5,c14cab7e15cfac73ec0602dc2c404551" + [ + { + "id": "test" + }, + "test.gene_counts.tsv:md5,c14cab7e15cfac73ec0602dc2c404551" + ] ] ], "meta": { "nf-test": "0.8.4", "nextflow": "23.10.1" }, - "timestamp": "2024-02-07T18:38:53.869874219" + "timestamp": "2024-02-08T10:26:20.354375418" }, "versions_salmon": { "content": [ @@ -261,115 +361,160 @@ "nf-test": "0.8.4", "nextflow": "23.10.1" }, - "timestamp": "2024-02-07T18:38:53.932495594" + "timestamp": "2024-02-08T10:26:20.420803452" }, "counts_gene_length_scaled_salmon": { "content": [ [ - "test.gene_counts_length_scaled.tsv:md5,5f92a6784f6edc5e3b336c71c3ee7daf" + [ + { + "id": "test" + }, + "test.gene_counts_length_scaled.tsv:md5,5f92a6784f6edc5e3b336c71c3ee7daf" + ] ] ], "meta": { "nf-test": "0.8.4", "nextflow": "23.10.1" }, - "timestamp": "2024-02-07T18:38:53.878059078" + "timestamp": "2024-02-08T10:26:20.363868637" }, "tpm_gene_kallisto": { "content": [ [ - "test.gene_tpm.tsv:md5,85d108269769ae0d841247b9b9ed922d" + [ + { + "id": "test" + }, + "test.gene_tpm.tsv:md5,85d108269769ae0d841247b9b9ed922d" + ] ] ], "meta": { "nf-test": "0.8.4", "nextflow": "23.10.1" }, - "timestamp": "2024-02-07T18:38:12.708173143" + "timestamp": "2024-02-08T10:25:38.057843107" }, "lengths_transcript_kallisto - stub": { "content": [ [ - "[].transcript_lengths.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + [ + [ + + ], + "[].transcript_lengths.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] ] ], "meta": { "nf-test": "0.8.4", "nextflow": "23.10.1" }, - "timestamp": "2024-02-07T18:38:25.850016483" + "timestamp": "2024-02-08T10:25:57.156495037" }, "lengths_gene_kallisto": { "content": [ [ - "test.gene_lengths.tsv:md5,db6becdf807fd164a9c63dd1dd916d9c" + [ + { + "id": "test" + }, + "test.gene_lengths.tsv:md5,db6becdf807fd164a9c63dd1dd916d9c" + ] ] ], "meta": { "nf-test": "0.8.4", "nextflow": "23.10.1" }, - "timestamp": "2024-02-07T18:38:12.740759081" + "timestamp": "2024-02-08T10:25:38.108862173" }, "counts_gene_scaled_kallisto - stub": { "content": [ [ - "[].gene_counts_scaled.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + [ + [ + + ], + "[].gene_counts_scaled.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] ] ], "meta": { "nf-test": "0.8.4", "nextflow": "23.10.1" }, - "timestamp": "2024-02-07T18:38:25.806265856" + "timestamp": "2024-02-08T10:25:57.12281111" }, "tpm_transcript_kallisto": { "content": [ [ - "test.transcript_tpm.tsv:md5,65862ed9d4a05abfab952e680dc0e49d" + [ + { + "id": "test" + }, + "test.transcript_tpm.tsv:md5,65862ed9d4a05abfab952e680dc0e49d" + ] ] ], "meta": { "nf-test": "0.8.4", "nextflow": "23.10.1" }, - "timestamp": "2024-02-07T18:38:12.74912992" + "timestamp": "2024-02-08T10:25:38.120589862" }, "lengths_gene_salmon": { "content": [ [ - "test.gene_lengths.tsv:md5,1691ea2677612805cd699265c83024d7" + [ + { + "id": "test" + }, + "test.gene_lengths.tsv:md5,1691ea2677612805cd699265c83024d7" + ] ] ], "meta": { "nf-test": "0.8.4", "nextflow": "23.10.1" }, - "timestamp": "2024-02-07T18:38:53.894765047" + "timestamp": "2024-02-08T10:26:20.378553626" }, "counts_gene_length_scaled_salmon - stub": { "content": [ [ - "[].gene_counts_length_scaled.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + [ + [ + + ], + "[].gene_counts_length_scaled.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] ] ], "meta": { "nf-test": "0.8.4", "nextflow": "23.10.1" }, - "timestamp": "2024-02-07T18:39:06.820739062" + "timestamp": "2024-02-08T10:26:33.37373482" }, "counts_gene_kallisto": { "content": [ [ - "test.gene_counts.tsv:md5,e89c28692ea214396b2d4cb702a804c3" + [ + { + "id": "test" + }, + "test.gene_counts.tsv:md5,e89c28692ea214396b2d4cb702a804c3" + ] ] ], "meta": { "nf-test": "0.8.4", "nextflow": "23.10.1" }, - "timestamp": "2024-02-07T18:38:12.720883422" + "timestamp": "2024-02-08T10:25:38.073913456" }, "versions_kallisto": { "content": [ @@ -381,19 +526,24 @@ "nf-test": "0.8.4", "nextflow": "23.10.1" }, - "timestamp": "2024-02-07T18:38:12.774657438" + "timestamp": "2024-02-08T10:25:38.160474368" }, "counts_gene_salmon - stub": { "content": [ [ - "[].gene_counts.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + [ + [ + + ], + "[].gene_counts.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] ] ], "meta": { "nf-test": "0.8.4", "nextflow": "23.10.1" }, - "timestamp": "2024-02-07T18:39:06.811186633" + "timestamp": "2024-02-08T10:26:33.362111332" }, "versions_kallisto - stub": { "content": [ @@ -405,30 +555,40 @@ "nf-test": "0.8.4", "nextflow": "23.10.1" }, - "timestamp": "2024-02-07T18:38:25.859377492" + "timestamp": "2024-02-08T10:25:57.163673476" }, "tpm_transcript_kallisto - stub": { "content": [ [ - "[].transcript_tpm.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + [ + [ + + ], + "[].transcript_tpm.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] ] ], "meta": { "nf-test": "0.8.4", "nextflow": "23.10.1" }, - "timestamp": "2024-02-07T18:38:25.828403645" + "timestamp": "2024-02-08T10:25:57.138588368" }, "counts_gene_scaled_salmon": { "content": [ [ - "test.gene_counts_scaled.tsv:md5,fdfb3d23aaf5d4316d81247ec4664ca0" + [ + { + "id": "test" + }, + "test.gene_counts_scaled.tsv:md5,fdfb3d23aaf5d4316d81247ec4664ca0" + ] ] ], "meta": { "nf-test": "0.8.4", "nextflow": "23.10.1" }, - "timestamp": "2024-02-07T18:38:53.885887907" + "timestamp": "2024-02-08T10:26:20.370640686" } } \ No newline at end of file diff --git a/modules/nf-core/tximeta/tximport/tests/tags.yml b/modules/nf-core/tximeta/tximport/tests/tags.yml index f5238f1b25c..fc96a89e0be 100644 --- a/modules/nf-core/tximeta/tximport/tests/tags.yml +++ b/modules/nf-core/tximeta/tximport/tests/tags.yml @@ -1,2 +1,2 @@ -tximport: - - "modules/nf-core/tximport/**" +tximeta/tximport: + - "modules/nf-core/tximeta/tximport/**" From 7c96ff921ddd209b4947319f3603e64e476a9439 Mon Sep 17 00:00:00 2001 From: Jonathan Manning Date: Thu, 8 Feb 2024 11:31:55 +0000 Subject: [PATCH 04/10] Appease eclint --- modules/nf-core/tximeta/tximport/main.nf | 4 +- modules/nf-core/tximeta/tximport/meta.yml | 10 ++--- .../tximeta/tximport/templates/tximport.r | 38 +++++++++---------- 3 files changed, 26 insertions(+), 26 deletions(-) diff --git a/modules/nf-core/tximeta/tximport/main.nf b/modules/nf-core/tximeta/tximport/main.nf index 4eb5cee9b22..d29ee3209d1 100644 --- a/modules/nf-core/tximeta/tximport/main.nf +++ b/modules/nf-core/tximeta/tximport/main.nf @@ -27,9 +27,9 @@ process TXIMETA_TXIMPORT { when: task.ext.when == null || task.ext.when - script: + script: template 'tximport.r' - + stub: """ touch ${meta.id}.gene_tpm.tsv diff --git a/modules/nf-core/tximeta/tximport/meta.yml b/modules/nf-core/tximeta/tximport/meta.yml index 76c957c4078..9b819a9be9b 100644 --- a/modules/nf-core/tximeta/tximport/meta.yml +++ b/modules/nf-core/tximeta/tximport/meta.yml @@ -3,7 +3,7 @@ name: "tximeta_tximport" description: | Import transcript-level abundances and estimated counts for gene-level - analysis packages + analysis packages keywords: - gene - kallisto @@ -46,7 +46,7 @@ input: e.g. `[ id:'SRP123456' ]` - coldata: type: file - description: | + description: | Optional 'coldata' file equivalent to a sample sheet where the first column corresponds to the sample names (directory names in the input salmon/ kallisto results) @@ -54,7 +54,7 @@ input: - quant_type: type: string description: Quantification type, 'kallisto' or 'salmon' - + output: - meta: type: map @@ -65,7 +65,7 @@ output: type: file description: | Abundance (TPM) values derived from tximport output after - summarizeToGene(), without a 'countsFromAbundance' specification + summarizeToGene(), without a 'countsFromAbundance' specification pattern: "*gene_tpm.tsv" - counts_gene: type: file @@ -95,7 +95,7 @@ output: type: file description: | Abundance (TPM) values derived from tximport output without - summarizeToGene(), without a 'countsFromAbundance' specification + summarizeToGene(), without a 'countsFromAbundance' specification pattern: "*transcript_tpm.tsv" - counts_transcript: type: file diff --git a/modules/nf-core/tximeta/tximport/templates/tximport.r b/modules/nf-core/tximeta/tximport/templates/tximport.r index 8130d58479a..e255017f878 100755 --- a/modules/nf-core/tximeta/tximport/templates/tximport.r +++ b/modules/nf-core/tximeta/tximport/templates/tximport.r @@ -16,13 +16,13 @@ library(tximport) #' Build a table from a SummarizedExperiment object #' -#' This function takes a SummarizedExperiment object and a specific slot name to extract -#' assay data. It then combines the first two columns of the rowData with the specified +#' This function takes a SummarizedExperiment object and a specific slot name to extract +#' assay data. It then combines the first two columns of the rowData with the specified #' assay data slot into a new data table. #' #' @param se.obj A SummarizedExperiment object from which to build the table. #' @param slot The name of the slot in the assays list from which to extract data. -#' +#' #' @return A data frame combining the first two columns of the rowData with the assay data from the specified slot. build_table <- function(se.obj, slot) { @@ -31,9 +31,9 @@ build_table <- function(se.obj, slot) { #' Write a table to a file from a SummarizedExperiment object with given parameters #' -#' This function generates a table from a SummarizedExperiment object using specified parameters -#' and writes the resulting table to a file. The file name is constructed using a prefix and a -#' suffix from the parameters, and the table is written with tab separation, without quoting text, +#' This function generates a table from a SummarizedExperiment object using specified parameters +#' and writes the resulting table to a file. The file name is constructed using a prefix and a +#' suffix from the parameters, and the table is written with tab separation, without quoting text, #' and without row names. #' #' @param params A list containing the parameters needed for file generation and table writing. @@ -52,11 +52,11 @@ write_se_table <- function(params, prefix) { #' Read Transcript Metadata from a Given Path #' -#' This function reads transcript metadata from a specified file path. The file is expected to -#' be a tab-separated values file without headers, containing transcript information. The function -#' checks if the file is empty and stops execution with an error message if so. It reads the file -#' into a data frame, expecting columns for transcript IDs, gene IDs, and gene names. Additional -#' processing is done to ensure compatibility with a predefined data structure (e.g., `txi[[1]]`), +#' This function reads transcript metadata from a specified file path. The file is expected to +#' be a tab-separated values file without headers, containing transcript information. The function +#' checks if the file is empty and stops execution with an error message if so. It reads the file +#' into a data frame, expecting columns for transcript IDs, gene IDs, and gene names. Additional +#' processing is done to ensure compatibility with a predefined data structure (e.g., `txi[[1]]`), #' including adding missing entries and reordering based on the transcript IDs found in `txi[[1]]`. #' #' @param tinfo_path The file path to the transcript information file. @@ -87,20 +87,20 @@ read_transcript_info <- function(tinfo_path){ #' Create a SummarizedExperiment Object #' -#' Constructs a SummarizedExperiment object using provided matrices for counts, abundance, and length, -#' along with metadata for columns and rows. This function facilitates the organization of experimental -#' data (e.g., RNA-seq or other high-throughput data) in a structured format that is convenient for +#' Constructs a SummarizedExperiment object using provided matrices for counts, abundance, and length, +#' along with metadata for columns and rows. This function facilitates the organization of experimental +#' data (e.g., RNA-seq or other high-throughput data) in a structured format that is convenient for #' further analyses and visualization. #' -#' @param counts A matrix or DataFrame containing counts data, with rows as features (e.g., genes) and +#' @param counts A matrix or DataFrame containing counts data, with rows as features (e.g., genes) and #' columns as samples. -#' @param abundance A matrix or DataFrame containing abundance data (e.g., TPM or FPKM) with the same +#' @param abundance A matrix or DataFrame containing abundance data (e.g., TPM or FPKM) with the same #' dimensions and row/column names as the counts data. -#' @param length A matrix or DataFrame containing feature lengths, matching the dimensions and row/column +#' @param length A matrix or DataFrame containing feature lengths, matching the dimensions and row/column #' names of the counts data. -#' @param col_data A DataFrame containing sample-level metadata, with rows corresponding to columns in the +#' @param col_data A DataFrame containing sample-level metadata, with rows corresponding to columns in the #' counts, abundance, and length matrices. -#' @param row_data A DataFrame containing feature-level metadata, with rows corresponding to features in +#' @param row_data A DataFrame containing feature-level metadata, with rows corresponding to features in #' the counts, abundance, and length matrices. #' #' @return A SummarizedExperiment object containing the supplied data and metadata. From 23f2f3985bf44db2a719ed49b70d19857188d834 Mon Sep 17 00:00:00 2001 From: Jonathan Manning Date: Thu, 8 Feb 2024 11:47:56 +0000 Subject: [PATCH 05/10] Fix conda --- .../nf-core/tximeta/tximport/environment.yml | 2 +- .../tximeta/tximport/tests/main.nf.test.snap | 72 +++++++++---------- 2 files changed, 37 insertions(+), 37 deletions(-) diff --git a/modules/nf-core/tximeta/tximport/environment.yml b/modules/nf-core/tximeta/tximport/environment.yml index a8fcf5e3f56..24b202222e3 100644 --- a/modules/nf-core/tximeta/tximport/environment.yml +++ b/modules/nf-core/tximeta/tximport/environment.yml @@ -6,4 +6,4 @@ channels: - bioconda - defaults dependencies: - - "bioconda::bioconductor-tximport=1.30.0" + - "bioconda::bioconductor-tximeta=1.20.1" diff --git a/modules/nf-core/tximeta/tximport/tests/main.nf.test.snap b/modules/nf-core/tximeta/tximport/tests/main.nf.test.snap index 154dac9e5f1..11b79dbb635 100644 --- a/modules/nf-core/tximeta/tximport/tests/main.nf.test.snap +++ b/modules/nf-core/tximeta/tximport/tests/main.nf.test.snap @@ -14,7 +14,7 @@ "nf-test": "0.8.4", "nextflow": "23.10.1" }, - "timestamp": "2024-02-08T10:26:33.349620253" + "timestamp": "2024-02-08T11:43:57.624950043" }, "tpm_transcript_salmon - stub": { "content": [ @@ -31,7 +31,7 @@ "nf-test": "0.8.4", "nextflow": "23.10.1" }, - "timestamp": "2024-02-08T10:26:33.407000817" + "timestamp": "2024-02-08T11:43:57.67112954" }, "lengths_gene_kallisto - stub": { "content": [ @@ -48,7 +48,7 @@ "nf-test": "0.8.4", "nextflow": "23.10.1" }, - "timestamp": "2024-02-08T10:25:57.130634129" + "timestamp": "2024-02-08T11:43:25.185576246" }, "counts_gene_scaled_salmon - stub": { "content": [ @@ -65,7 +65,7 @@ "nf-test": "0.8.4", "nextflow": "23.10.1" }, - "timestamp": "2024-02-08T10:26:33.388528409" + "timestamp": "2024-02-08T11:43:57.653958581" }, "counts_gene_kallisto - stub": { "content": [ @@ -82,7 +82,7 @@ "nf-test": "0.8.4", "nextflow": "23.10.1" }, - "timestamp": "2024-02-08T10:25:57.108636331" + "timestamp": "2024-02-08T11:43:25.165389568" }, "lengths_transcript_salmon - stub": { "content": [ @@ -99,7 +99,7 @@ "nf-test": "0.8.4", "nextflow": "23.10.1" }, - "timestamp": "2024-02-08T10:26:33.422671766" + "timestamp": "2024-02-08T11:43:57.688955249" }, "versions_salmon - stub": { "content": [ @@ -111,7 +111,7 @@ "nf-test": "0.8.4", "nextflow": "23.10.1" }, - "timestamp": "2024-02-08T10:26:33.430828435" + "timestamp": "2024-02-08T11:43:57.698863128" }, "counts_gene_length_scaled_kallisto": { "content": [ @@ -128,7 +128,7 @@ "nf-test": "0.8.4", "nextflow": "23.10.1" }, - "timestamp": "2024-02-08T10:25:38.079831055" + "timestamp": "2024-02-08T11:43:13.767001542" }, "lengths_transcript_salmon": { "content": [ @@ -145,7 +145,7 @@ "nf-test": "0.8.4", "nextflow": "23.10.1" }, - "timestamp": "2024-02-08T10:26:20.409923203" + "timestamp": "2024-02-08T11:43:45.710229136" }, "counts_transcript_kallisto": { "content": [ @@ -162,7 +162,7 @@ "nf-test": "0.8.4", "nextflow": "23.10.1" }, - "timestamp": "2024-02-08T10:25:38.142889369" + "timestamp": "2024-02-08T11:43:13.7960929" }, "tpm_gene_kallisto -stub": { "content": [ @@ -179,7 +179,7 @@ "nf-test": "0.8.4", "nextflow": "23.10.1" }, - "timestamp": "2024-02-08T10:25:57.100100112" + "timestamp": "2024-02-08T11:43:25.155684508" }, "counts_transcript_kallisto - stub": { "content": [ @@ -196,7 +196,7 @@ "nf-test": "0.8.4", "nextflow": "23.10.1" }, - "timestamp": "2024-02-08T10:25:57.147237978" + "timestamp": "2024-02-08T11:43:25.207029265" }, "counts_transcript_salmon": { "content": [ @@ -213,7 +213,7 @@ "nf-test": "0.8.4", "nextflow": "23.10.1" }, - "timestamp": "2024-02-08T10:26:20.400364854" + "timestamp": "2024-02-08T11:43:45.703693047" }, "lengths_gene_salmon - stub": { "content": [ @@ -230,7 +230,7 @@ "nf-test": "0.8.4", "nextflow": "23.10.1" }, - "timestamp": "2024-02-08T10:26:33.398475629" + "timestamp": "2024-02-08T11:43:57.66270305" }, "tpm_gene_salmon": { "content": [ @@ -247,7 +247,7 @@ "nf-test": "0.8.4", "nextflow": "23.10.1" }, - "timestamp": "2024-02-08T10:26:20.344780418" + "timestamp": "2024-02-08T11:43:45.66339226" }, "tpm_transcript_salmon": { "content": [ @@ -264,7 +264,7 @@ "nf-test": "0.8.4", "nextflow": "23.10.1" }, - "timestamp": "2024-02-08T10:26:20.387928015" + "timestamp": "2024-02-08T11:43:45.697263797" }, "lengths_transcript_kallisto": { "content": [ @@ -281,7 +281,7 @@ "nf-test": "0.8.4", "nextflow": "23.10.1" }, - "timestamp": "2024-02-08T10:25:38.151716159" + "timestamp": "2024-02-08T11:43:13.80450998" }, "counts_gene_length_scaled_kallisto - stub": { "content": [ @@ -298,7 +298,7 @@ "nf-test": "0.8.4", "nextflow": "23.10.1" }, - "timestamp": "2024-02-08T10:25:57.11634828" + "timestamp": "2024-02-08T11:43:25.171915858" }, "counts_transcript_salmon - stub": { "content": [ @@ -315,7 +315,7 @@ "nf-test": "0.8.4", "nextflow": "23.10.1" }, - "timestamp": "2024-02-08T10:26:33.414880747" + "timestamp": "2024-02-08T11:43:57.680037609" }, "counts_gene_scaled_kallisto": { "content": [ @@ -332,7 +332,7 @@ "nf-test": "0.8.4", "nextflow": "23.10.1" }, - "timestamp": "2024-02-08T10:25:38.099993433" + "timestamp": "2024-02-08T11:43:13.772150052" }, "counts_gene_salmon": { "content": [ @@ -349,7 +349,7 @@ "nf-test": "0.8.4", "nextflow": "23.10.1" }, - "timestamp": "2024-02-08T10:26:20.354375418" + "timestamp": "2024-02-08T11:43:45.67022546" }, "versions_salmon": { "content": [ @@ -361,7 +361,7 @@ "nf-test": "0.8.4", "nextflow": "23.10.1" }, - "timestamp": "2024-02-08T10:26:20.420803452" + "timestamp": "2024-02-08T11:43:45.719355986" }, "counts_gene_length_scaled_salmon": { "content": [ @@ -378,7 +378,7 @@ "nf-test": "0.8.4", "nextflow": "23.10.1" }, - "timestamp": "2024-02-08T10:26:20.363868637" + "timestamp": "2024-02-08T11:43:45.676693139" }, "tpm_gene_kallisto": { "content": [ @@ -395,7 +395,7 @@ "nf-test": "0.8.4", "nextflow": "23.10.1" }, - "timestamp": "2024-02-08T10:25:38.057843107" + "timestamp": "2024-02-08T11:43:13.748907143" }, "lengths_transcript_kallisto - stub": { "content": [ @@ -412,7 +412,7 @@ "nf-test": "0.8.4", "nextflow": "23.10.1" }, - "timestamp": "2024-02-08T10:25:57.156495037" + "timestamp": "2024-02-08T11:43:25.217230264" }, "lengths_gene_kallisto": { "content": [ @@ -429,7 +429,7 @@ "nf-test": "0.8.4", "nextflow": "23.10.1" }, - "timestamp": "2024-02-08T10:25:38.108862173" + "timestamp": "2024-02-08T11:43:13.778373051" }, "counts_gene_scaled_kallisto - stub": { "content": [ @@ -446,7 +446,7 @@ "nf-test": "0.8.4", "nextflow": "23.10.1" }, - "timestamp": "2024-02-08T10:25:57.12281111" + "timestamp": "2024-02-08T11:43:25.177826097" }, "tpm_transcript_kallisto": { "content": [ @@ -463,7 +463,7 @@ "nf-test": "0.8.4", "nextflow": "23.10.1" }, - "timestamp": "2024-02-08T10:25:38.120589862" + "timestamp": "2024-02-08T11:43:13.786421751" }, "lengths_gene_salmon": { "content": [ @@ -480,7 +480,7 @@ "nf-test": "0.8.4", "nextflow": "23.10.1" }, - "timestamp": "2024-02-08T10:26:20.378553626" + "timestamp": "2024-02-08T11:43:45.690776907" }, "counts_gene_length_scaled_salmon - stub": { "content": [ @@ -497,7 +497,7 @@ "nf-test": "0.8.4", "nextflow": "23.10.1" }, - "timestamp": "2024-02-08T10:26:33.37373482" + "timestamp": "2024-02-08T11:43:57.645938511" }, "counts_gene_kallisto": { "content": [ @@ -514,7 +514,7 @@ "nf-test": "0.8.4", "nextflow": "23.10.1" }, - "timestamp": "2024-02-08T10:25:38.073913456" + "timestamp": "2024-02-08T11:43:13.762000393" }, "versions_kallisto": { "content": [ @@ -526,7 +526,7 @@ "nf-test": "0.8.4", "nextflow": "23.10.1" }, - "timestamp": "2024-02-08T10:25:38.160474368" + "timestamp": "2024-02-08T11:43:13.812751439" }, "counts_gene_salmon - stub": { "content": [ @@ -543,7 +543,7 @@ "nf-test": "0.8.4", "nextflow": "23.10.1" }, - "timestamp": "2024-02-08T10:26:33.362111332" + "timestamp": "2024-02-08T11:43:57.637020412" }, "versions_kallisto - stub": { "content": [ @@ -555,7 +555,7 @@ "nf-test": "0.8.4", "nextflow": "23.10.1" }, - "timestamp": "2024-02-08T10:25:57.163673476" + "timestamp": "2024-02-08T11:43:25.226293343" }, "tpm_transcript_kallisto - stub": { "content": [ @@ -572,7 +572,7 @@ "nf-test": "0.8.4", "nextflow": "23.10.1" }, - "timestamp": "2024-02-08T10:25:57.138588368" + "timestamp": "2024-02-08T11:43:25.195424656" }, "counts_gene_scaled_salmon": { "content": [ @@ -589,6 +589,6 @@ "nf-test": "0.8.4", "nextflow": "23.10.1" }, - "timestamp": "2024-02-08T10:26:20.370640686" + "timestamp": "2024-02-08T11:43:45.682361988" } } \ No newline at end of file From 07dc512ad6b43b92646cd1233594fca87072348f Mon Sep 17 00:00:00 2001 From: Jonathan Manning Date: Thu, 8 Feb 2024 11:58:02 +0000 Subject: [PATCH 06/10] Fix singularity --- modules/nf-core/tximeta/tximport/main.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/nf-core/tximeta/tximport/main.nf b/modules/nf-core/tximeta/tximport/main.nf index d29ee3209d1..7123dfd5915 100644 --- a/modules/nf-core/tximeta/tximport/main.nf +++ b/modules/nf-core/tximeta/tximport/main.nf @@ -4,7 +4,7 @@ process TXIMETA_TXIMPORT { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/bioconductor-tximeta:1.20.1--r41hdfd78af_0' : + 'https://depot.galaxyproject.org/singularity/bioconductor-tximeta%3A1.20.1--r43hdfd78af_0' : 'biocontainers/bioconductor-tximeta:1.20.1--r43hdfd78af_0' }" input: From f7f1be074dfda197634e897bf10c3e2ac50e2c13 Mon Sep 17 00:00:00 2001 From: Jonathan Manning Date: Thu, 8 Feb 2024 14:05:41 +0000 Subject: [PATCH 07/10] Update test_data.config --- tests/config/test_data.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/config/test_data.config b/tests/config/test_data.config index bb1ea8bc486..b2479bbbb4d 100644 --- a/tests/config/test_data.config +++ b/tests/config/test_data.config @@ -3,7 +3,7 @@ params { // Base directory for test data - test_data_base = "https://raw.githubusercontent.com/nf-core/test-datasets/tximport" + test_data_base = "https://raw.githubusercontent.com/nf-core/test-datasets/modules" test_data { 'sarscov2' { From d251a153e1c34c4d1ecbfadedaa574d5ac03b856 Mon Sep 17 00:00:00 2001 From: Jonathan Manning Date: Thu, 8 Feb 2024 14:55:44 +0000 Subject: [PATCH 08/10] poke ci --- modules/nf-core/tximeta/tximport/meta.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/nf-core/tximeta/tximport/meta.yml b/modules/nf-core/tximeta/tximport/meta.yml index 9b819a9be9b..8b7b632bdcf 100644 --- a/modules/nf-core/tximeta/tximport/meta.yml +++ b/modules/nf-core/tximeta/tximport/meta.yml @@ -36,8 +36,8 @@ input: reference e.g. `[ id:'yeast' ]` - tx2gene: type: file - description: A transcript/ gene mapping table such as those generated by - custom/tx2gene + description: A transcript to gene mapping table such as those generated + by custom/tx2gene pattern: "*.{csv,tsv}" - meta3: type: map From 2da2e829ea1745df2bfdb69a90dcc6166ef2632c Mon Sep 17 00:00:00 2001 From: Jonathan Manning Date: Thu, 8 Feb 2024 15:03:49 +0000 Subject: [PATCH 09/10] remove rogue empty line --- modules/nf-core/tximeta/tximport/main.nf | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/nf-core/tximeta/tximport/main.nf b/modules/nf-core/tximeta/tximport/main.nf index 7123dfd5915..1f7aec3986e 100644 --- a/modules/nf-core/tximeta/tximport/main.nf +++ b/modules/nf-core/tximeta/tximport/main.nf @@ -1,4 +1,3 @@ - process TXIMETA_TXIMPORT { label "process_medium" From 1cd7450de8b6c4f74f713de44208d25be94407de Mon Sep 17 00:00:00 2001 From: Jonathan Manning Date: Thu, 8 Feb 2024 15:10:45 +0000 Subject: [PATCH 10/10] Update tests/config/test_data.config Co-authored-by: Maxime U Garcia --- tests/config/test_data.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/config/test_data.config b/tests/config/test_data.config index b2479bbbb4d..d5efa7e7552 100644 --- a/tests/config/test_data.config +++ b/tests/config/test_data.config @@ -628,7 +628,7 @@ params { 'genome' { genome_gfp_gtf = "${params.test_data_base}/data/genomics/eukaryotes/saccharomyces_cerevisiae/genome_gfp.gtf" kallisto_results = "${params.test_data_base}/data/genomics/eukaryotes/saccharomyces_cerevisiae/kallisto_results.tar.gz" - salmon_results = "${params.test_data_base}/data/genomics/eukaryotes/saccharomyces_cerevisiae/salmon_results.tar.gz" + salmon_results = "${params.test_data_base}/data/genomics/eukaryotes/saccharomyces_cerevisiae/salmon_results.tar.gz" } } 'generic' {