kkonganti@1: # NextFlow DSL2 Module kkonganti@1: kkonganti@1: ```bash kkonganti@1: TABLE_SUMMARY kkonganti@1: ``` kkonganti@1: kkonganti@1: ## Description kkonganti@1: kkonganti@1: Concatenates a list of tables (CSV or TAB delimited) in `.txt` or `.csv` format. The table files to be concatenated **must** have a header as the header from one of the table files will be used as the header for the concatenated result table file. kkonganti@1: kkonganti@1: \ kkonganti@1:   kkonganti@1: kkonganti@1: ### `input:` kkonganti@1: kkonganti@1: ___ kkonganti@1: kkonganti@1: Type: `tuple` kkonganti@1: kkonganti@1: Takes in the following tuple of `val` table key (`table_sum_on`) and a list of table files of input type `path` (`tables`) to be concatenated. For this module to work, a `bin` directory with the script `create_mqc_data_table.py` should be present where the NextFlow script using this DSL2 module will be run. This `python` script will convert the aggregated table to `.yml` format to be used with `multiqc`. kkonganti@1: kkonganti@1: Ex: kkonganti@1: kkonganti@1: ```groovy kkonganti@1: [ ['ectyper'], ['/data/sample1/f1_ectyper.txt', '/data/sample2/f2_ectyper.txt'] ] kkonganti@1: ``` kkonganti@1: kkonganti@1: \ kkonganti@1:   kkonganti@1: kkonganti@1: #### `table_sum_on` kkonganti@1: kkonganti@1: Type: `val` kkonganti@1: kkonganti@1: A single key defining what tables are being concatenated. For example, if all the `ectyper` results are being concatenated for all samples, then this can be `ectyper`. kkonganti@1: kkonganti@1: Ex: kkonganti@1: kkonganti@1: ```groovy kkonganti@1: [ ['ectyper'], ['/data/sample1/f1_ectyper.txt', '/data/sample2/f2_ectyper.txt'] ] kkonganti@1: ``` kkonganti@1: kkonganti@1: \ kkonganti@1:   kkonganti@1: kkonganti@1: #### `tables` kkonganti@1: kkonganti@1: Type: `path` kkonganti@1: kkonganti@1: NextFlow input type of `path` pointing to a list of tables (files) to be concatenated. kkonganti@1: kkonganti@1: \ kkonganti@1:   kkonganti@1: kkonganti@1: ### `output:` kkonganti@1: kkonganti@1: ___ kkonganti@1: kkonganti@1: Type: `tuple` kkonganti@1: kkonganti@1: Outputs a tuple of table key (`table_sum_on` from `input:`) and list of concatenated table files (`tblsummed`). kkonganti@1: kkonganti@1: \ kkonganti@1:   kkonganti@1: kkonganti@1: #### `tblsummed` kkonganti@1: kkonganti@1: Type: `path` kkonganti@1: kkonganti@1: NextFlow output type of `path` pointing to the concatenated table files per table key (Ex: `ectyper`). kkonganti@1: kkonganti@1: \ kkonganti@1:   kkonganti@1: kkonganti@1: #### `mqc_yml` kkonganti@1: kkonganti@1: Type: `path` kkonganti@1: kkonganti@1: NextFlow output type of `path` pointing to the `.yml` file storing table contents in `YAML` format which can be used to inject this table as part of the `multiqc` report. kkonganti@1: kkonganti@1: \ kkonganti@1:   kkonganti@1: kkonganti@1: #### `versions` kkonganti@1: kkonganti@1: Type: `path` kkonganti@1: kkonganti@1: NextFlow output type of `path` pointing to the `.yml` file storing software versions for this process.