Skip to content

Commit

Permalink
Merge pull request #1 from charles-plessy/minus-s-option
Browse files Browse the repository at this point in the history
Minus s option
  • Loading branch information
U13bs1125 authored Jun 18, 2024
2 parents 8493b3b + bcb46f8 commit 5b3fa86
Show file tree
Hide file tree
Showing 48 changed files with 1,304 additions and 123 deletions.
13 changes: 13 additions & 0 deletions conf/modules.config
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,14 @@ process {
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]

withName: 'LAST_LASTDB' {
// See https://gitlab.com/mcfrith/last/-/blob/main/doc/lastdb.rst for details
// -R01: uppercase all sequences and then lowercase simple repeats
// -c: soft-mask lowercase letters
// -S2: index both strands
ext.args = { "-R01 -c -u${params.seed} -S2" }
}

withName: 'LAST_SPLIT_O2M' {
ext.prefix = { "${meta.id}.o2m_aln" }
ext.args = { "--reverse -m${params.last_split_mismap}" }
Expand Down Expand Up @@ -47,6 +55,11 @@ process {
ext.args = { "--split-f=MAF+ ${params.lastal_args} ${params.lastal_extr_args}" }
}

withName: 'LAST_LASTAL_M2M' {
ext.prefix = { "${meta.id}.m2o_aln" }
ext.args = { "${params.lastal_args} ${params.lastal_extr_args}" }
}

withName: 'LAST_DOTPLOT_O2O' {
ext.prefix = { "${meta.id}.o2o_plt" }
ext.args = { "--rot2=h --sort2=3 --strands2=1 ${params.dotplot_options}" }
Expand Down
1 change: 1 addition & 0 deletions conf/test.config
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ params {

// Target
target = params.pipelines_testdata_base_path + 'modules/data/genomics/sarscov2/genome/genome.fasta'
lastal_args = '-C2' // Remove -D1e9 because the virus genomes are so small.

// Genome references
genome = 'R64-1-1'
Expand Down
16 changes: 13 additions & 3 deletions docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,13 @@

You need at least two genomes, a _target_, which will be indexed, and one or more _queries_, which will be aligned to the _target_. Paths to the genome files for the _queries_ are passed with the _nf-core_ samplesheet `--input` system, and path to the genome file of the _target_ is passed with the `--target` parameter. Note that the computation is not symmetric: inverting _target_ and _query_ does not lead to strictly identical results.

## Samplesheet input
## Input

### Target genome

The target genome sequence is taken from a FASTA-formated file passed by the `--target` parameter. Its masking information (sequences in lower-case letters) is first discarded, and then simple repeats (like `cacacacacacacacac`) are converted to lower-case (`lastdb -R01`). The lowercased letters in the _target_ **and** in the _query_ will be excluded for initial matches (`lastdb -c`). Both strands of the genome are indexed (`lastdb -S2`).

### Samplesheet for query genome(s)

You will need to create a samplesheet with information about the samples you would like to analyse before running the pipeline. Use this parameter to specify its location. It has to be a comma-separated file with 2 columns, a header row and single or multiple sample rows (genome samples) as shown in the examples below.

Expand Down Expand Up @@ -96,10 +102,14 @@ An [example samplesheet](../assets/samplesheet.csv) has been provided with the p

## Fixed arguments (taken from the [LAST cookbook][] and the [LAST tuning][] manual)

- The `lastdb` step soft-masks simple repeats by default, (`-c -R01`).It indexes both strands (`-S2`), which increases speed at the expense of memory usage.

- The `last-train` commands runs with `--revsym` as the DNA strands play equivalent roles in the studied genomes.

- The `lastdb` command takes all CPU cores available (`lastdb -P0`). Note that
when using more than one core, the output of `lastdb` may vary, causing the
order of tied positions to change. To prevent this to happen, you can pass a
nextflow parameter file to the pipeline that reduces the number of CPUs
allocated to `LAST_LASTDB` to 1.

## Running the pipeline

The typical command for running the pipeline is as follows:
Expand Down
14 changes: 7 additions & 7 deletions modules.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,37 +17,37 @@
},
"last/dotplot": {
"branch": "master",
"git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5",
"git_sha": "3fa9017b55b9c26e1c327ca189d3942b55f4d496",
"installed_by": ["modules"]
},
"last/lastal": {
"branch": "master",
"git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5",
"git_sha": "3fa9017b55b9c26e1c327ca189d3942b55f4d496",
"installed_by": ["modules"]
},
"last/lastdb": {
"branch": "master",
"git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5",
"git_sha": "3fa9017b55b9c26e1c327ca189d3942b55f4d496",
"installed_by": ["modules"]
},
"last/mafswap": {
"branch": "master",
"git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5",
"git_sha": "3fa9017b55b9c26e1c327ca189d3942b55f4d496",
"installed_by": ["modules"]
},
"last/split": {
"branch": "master",
"git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5",
"git_sha": "3fa9017b55b9c26e1c327ca189d3942b55f4d496",
"installed_by": ["modules"]
},
"last/train": {
"branch": "master",
"git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5",
"git_sha": "3fa9017b55b9c26e1c327ca189d3942b55f4d496",
"installed_by": ["modules"]
},
"multiqc": {
"branch": "master",
"git_sha": "b7ebe95761cd389603f9cc0e0dc384c0f663815a",
"git_sha": "8f2062e7b4185590fb9f43c275381a31a6544fc0",
"installed_by": ["modules"]
}
}
Expand Down
6 changes: 4 additions & 2 deletions modules/nf-core/last/dotplot/environment.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 16 additions & 2 deletions modules/nf-core/last/dotplot/main.nf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 15 additions & 8 deletions modules/nf-core/last/dotplot/meta.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

85 changes: 85 additions & 0 deletions modules/nf-core/last/dotplot/tests/main.nf.test

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

38 changes: 38 additions & 0 deletions modules/nf-core/last/dotplot/tests/main.nf.test.snap

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions modules/nf-core/last/dotplot/tests/tags.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions modules/nf-core/last/lastal/environment.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 18 additions & 3 deletions modules/nf-core/last/lastal/main.nf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 5b3fa86

Please sign in to comment.