Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ adaptivecard.json
slackreport.json
.nextflow*
work/
docs/manual_tests.md
data/
results/
.DS_Store
Expand Down
7 changes: 7 additions & 0 deletions conf/modules.config
Original file line number Diff line number Diff line change
Expand Up @@ -1752,4 +1752,11 @@ process {
]
]
}

withName: 'NFCORE_EAGER:EAGER:CLASSIFY_MTDNA_HAPLOGROUP:HAPLOGREP3_CLASSIFY' {
ext.args = {
def phylotree = params.human_mtdna_phylotree ?: (params.human_mtdna_reference.toLowerCase() == 'rsrs' ? 'phylotree-rsrs@17.1' : 'phylotree-fu-rcrs@1.2')
"--tree ${phylotree}"
}
}
}
10 changes: 5 additions & 5 deletions docs/development/code_conventions.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ The alias should ideally make it intuitive to understand which subworkflow the m

- The unique module names specified above should make it possible to always configure modules without the need for a regex/glob when using `withName`. Exception to this is modules named within nf-core subworkflows, which should be configured with a regex/glob.
- The order of attributes within configuration blocks should always be the following:
1. tag (mandatory)
2. ext.args\* (optional. Followed by ext.args{2,3,...} in ascending order)
3. ext.prefix (optional)
4. publishDir (optional)
5. any other attributes go to the end.
1. tag (mandatory)
2. ext.args\* (optional. Followed by ext.args{2,3,...} in ascending order)
3. ext.prefix (optional)
4. publishDir (optional)
5. any other attributes go to the end.
- NEVER use `meta.id` in module configuration (`tag`,`ext.*`), but instead the full explicit combination of unique attributes expected. `meta.sample_id` is fine to use and is equivalent to `meta.id`, but should be supplemented by `meta.library_id` and `meta.lane` etc, as required.
- Every process that is reference-specific MUST include `${meta.reference}` in its `tag` and `ext.prefix` attributes. This is to avoid confusion when running the pipeline with multiple references.
- Tags that include reference and sample information should be formatted as `${meta.reference}|${meta.sample_id}_*`. Reference specific attributes go on the left-hand-side of the tag, data-specific attributes on the right-hand-side.
Expand Down
2 changes: 1 addition & 1 deletion docs/development/dev_docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ To add new input files or options to the reference sheet, you have to complete a

### Multi-reference input workflow

1. Add new column named <SOFTWARE_FILETYPE> and test data to the test reference sheet (https://github.com/nf-core/test-datasets/blob/eager/reference/reference_sheet_multiref.csv).
1. Add new column named <SOFTWARE_FILETYPE> and test data to the test reference sheet (<https://github.com/nf-core/test-datasets/blob/eager/reference/reference_sheet_multiref.csv>).
2. Read in new input via nf-validation plugin within the reference_indexing_multi local subworkflow.
1. Add new "property" <SOFTWARE_FILETYPE> to the fasta validation schema (assets/schema_fasta.json).
1. Add "type" of your object, e.g. `"type": "string"` for file paths and `"type": "integer"` for numbers.
Expand Down
16 changes: 16 additions & 0 deletions docs/development/manual_tests.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<!-- markdownlint-disable -->
# Manual Tests

Here is a list of manual tests we can run with the expect output commands
Expand Down Expand Up @@ -1133,3 +1134,18 @@ nextflow run main.nf -profile test,docker --outdir ./results -w work/ -resume --
## Expect: BAM input shows up in FastQC -> mapping results.
nextflow run main.nf -profile test,docker --outdir ./results -w work/ --convert_inputbam --skip_deduplication -resume -ansi-log false -dump-channels
```

### MTDNA HAPLOGROUP CLASSIFICATION

```bash
#### MTDNA HAPLOGROUP CLASSIFICATION with default settings
## Expect: Directory created 'mtdna_haplogroup/<reference>/<sample_id>' containing a .txt file for each sample with haplogroup assignments
## Expect: The haplogroup .txt file contains at minimum columns for rank, name, quality, range, and details of the haplogroup assignment
nextflow run main.nf -profile docker,test --outdir ./results/mtdna_haplogroup_test --run_genotyping --genotyping_tool ug --genotyping_source raw --run_classify_mtdna_haplogroup -resume

#### MTDNA HAPLOGROUP CLASSIFICATION with specific arguments
## Expect: Directory created 'mtdna_haplogroup/<reference>/<sample_id>' containing a .txt file for each sample with haplogroup assignments
## Expect: The haplogroup assignment may differ based on the classification settings
nextflow run main.nf -profile docker,test --outdir ./results/mtdna_haplogroup_test --run_classify_mtdna_haplogroup --run_genotyping --genotyping_tool ug --genotyping_source raw --run_classify_mtdna_haplogroup --human_mtdna_reference rsrs --human_mtdna_phylotree phylotree-rsrs@1.0 -resume
```
<!-- markdownlint-enable -->
4 changes: 2 additions & 2 deletions docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ Only the `reference_name`, and `fasta` columns are mandatory, whereas all other

Files for `fai`, `dict`, `mapper_index` will be generated by the pipeline for you if not specified.

A real-world example could look as follows, where a user-supplied `.dict` file and `circular_target ` and `mitochondrion_header` are not specified:
A real-world example could look as follows, where a user-supplied `.dict` file and `circular_target` and `mitochondrion_header` are not specified:

```txt
reference_name,fasta,fai,dict,mapper_index,circular_target,mitochondrion
Expand Down Expand Up @@ -217,7 +217,7 @@ If `-profile` is not specified, the pipeline will run locally and expect all sof
- `apptainer`
- A generic configuration profile to be used with [Apptainer](https://apptainer.org/)
- `wave`
- A generic configuration profile to enable [Wave](https://seqera.io/wave/) containers. Use together with one of the above (requires Nextflow ` 24.03.0-edge` or later).
- A generic configuration profile to enable [Wave](https://seqera.io/wave/) containers. Use together with one of the above (requires Nextflow `24.03.0-edge` or later).
- `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, Charliecloud, or Apptainer.

Expand Down
5 changes: 5 additions & 0 deletions modules.json
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,11 @@
"git_sha": "3a5fef109d113b4997c9822198664ca5f2716208",
"installed_by": ["modules"]
},
"haplogrep3/classify": {
"branch": "master",
"git_sha": "81880787133db07d9b4c1febd152c090eb8325dc",
"installed_by": ["modules"]
},
"kraken2/kraken2": {
"branch": "master",
"git_sha": "653218e79ffa76fde20319e9062f8b8da5cf7555",
Expand Down
2 changes: 1 addition & 1 deletion modules/nf-core/fastqc/main.nf

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

7 changes: 7 additions & 0 deletions modules/nf-core/haplogrep3/classify/environment.yml

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

47 changes: 47 additions & 0 deletions modules/nf-core/haplogrep3/classify/main.nf

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

45 changes: 45 additions & 0 deletions modules/nf-core/haplogrep3/classify/meta.yml

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

59 changes: 59 additions & 0 deletions modules/nf-core/haplogrep3/classify/tests/main.nf.test

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

72 changes: 72 additions & 0 deletions modules/nf-core/haplogrep3/classify/tests/main.nf.test.snap

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

5 changes: 5 additions & 0 deletions modules/nf-core/haplogrep3/classify/tests/nextflow.config

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

5 changes: 5 additions & 0 deletions nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,11 @@ params {
run_sexdeterrmine = false
sexdeterrmine_bedfile = null

// mtDNA haplogroup classification
run_mtdna_haplogroup_classification = false
human_mtdna_reference = 'rcrs'
human_mtdna_phylotree = null

// Genotyping
run_genotyping = false
genotyping_tool = null
Expand Down
Loading
Loading