mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-12-27 15:53:16 -05:00
207930139a
* New last/lastal to align query sequences on a target index `lastal` is the main program of the [LAST](https://gitlab.com/mcfrith/last) suite. It align query DNA sequences in FASTA or FASTQ format to a target index of DNA or protein sequences. The index is produced by the `lastdb` program (module `last/lastdb`). The score matrix for evaluating the alignment can be chosen among preset ones or computed iteratively by the `last-train` program (module `last/train`). For this reason, the `last/lastal` module proposed here has one input channel containing an optional file, that has to be dummy when not used. The LAST aligner outputs MAF files that can be very large (up to hundreds of gigabytes), therefore this module unconditionally compresses its output with gzip. This new module is part of the work described in Issue #464. During this development, we fix the version of LAST to 1219 to ensure consistency (hence ignore lint's version warning). * Apply suggestions from code review Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Un-hardcode the path to the LAST index. Among multiple alternatives I have chosen the following command to detect the sample name of the index, because it fails in situations where there is no index files in the index folder, and in situations were there are two indexes files in the folder. Not failing would result in feeding garbage information in the INDEX_NAME variable. basename \$(ls $index/*.bck) .bck In case of missing file, a clear error message is given by `ls`. In case of more than one file, the error message of `basename` is more cryptic, unfortunately. (`basename: extra operand ‘.bck’`) Alternatives that do not fail if there is no .bck file: basename $index/*bck .bck find $index -name '*bck' | sed 's/.bck//' Alternatives that do not fail if there are more than one .bck file: basename -s .bck $index/*bck ls $index/*.bck | xargs basename -s .bck find $index -name '*bck' | sed 's/.bck//' Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com>
52 lines
1.3 KiB
YAML
52 lines
1.3 KiB
YAML
name: last_lastal
|
|
description: Find suitable score parameters for sequence alignment
|
|
keywords:
|
|
- LAST
|
|
- align
|
|
- fastq
|
|
- fasta
|
|
tools:
|
|
- last:
|
|
description: LAST finds & aligns related regions of sequences.
|
|
homepage: https://gitlab.com/mcfrith/last
|
|
documentation: https://gitlab.com/mcfrith/last/-/blob/main/doc/last-train.rst
|
|
tool_dev_url: https://gitlab.com/mcfrith/last
|
|
doi: ""
|
|
licence: ['GPL v3-or-later']
|
|
|
|
input:
|
|
- index:
|
|
type: directory
|
|
description: Directory containing the files of the LAST index
|
|
pattern: "lastdb/"
|
|
- meta:
|
|
type: map
|
|
description: |
|
|
Groovy Map containing sample information
|
|
e.g. [ id:'test', single_end:false ]
|
|
- fastx:
|
|
type: file
|
|
description: FASTA/FASTQ file
|
|
pattern: "*.{fasta,fastq}"
|
|
- param_file:
|
|
type: file
|
|
description: Trained parameter file
|
|
pattern: "*.par"
|
|
|
|
output:
|
|
- meta:
|
|
type: map
|
|
description: |
|
|
Groovy Map containing sample information
|
|
e.g. [ id:'test', single_end:false ]
|
|
- version:
|
|
type: file
|
|
description: File containing software version
|
|
pattern: "*.{version.txt}"
|
|
- maf:
|
|
type: file
|
|
description: Gzipped MAF (Multiple Alignment Format) file
|
|
pattern: "*.{maf.gz}"
|
|
|
|
authors:
|
|
- "@charles-plessy"
|