Skip to content

Commit

Permalink
Merge pull request #16 from avantonder/apha
Browse files Browse the repository at this point in the history
Apha
  • Loading branch information
avantonder authored Oct 27, 2022
2 parents c1efa2a + 738d49b commit c8f4716
Show file tree
Hide file tree
Showing 20 changed files with 88 additions and 356 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,18 @@
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## v1.1 - [26/10/22]

- Fix masking bug
- Output Picard MARKDUPLICATES metrics for multiQC
- Delete unnecessary subworkflows and modules
- Correct samtools index version from 1.14 to 1.15.1
- Edit documentation
- Standardise old modules to current syntax
- Add skip_alignment option to make alignment creation optional
- Edit modules.config to output low_quality_pseudogenomes.tsv
- Update spoligotype database

## v1.0 - [21/10/22]

First release version of avantonder/bovisanalyzer.
Expand Down
2 changes: 2 additions & 0 deletions CITATIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@
- [MultiQC](https://pubmed.ncbi.nlm.nih.gov/27312411/)
> Ewels P, Magnusson M, Lundin S, Käller M. MultiQC: summarize analysis results for multiple tools and samples in a single report. Bioinformatics. 2016 Oct 1;32(19):3047-8. doi: 10.1093/bioinformatics/btw354. Epub 2016 Jun 16. PubMed PMID: 27312411; PubMed Central PMCID: PMC5039924.
- [picard-tools](https://broadinstitute.github.io/picard/)

- [Rasusa](https://github.com/mbhall88/rasusa)
> Hall MB. Rasusa: Randomly subsample sequencing reads to a specified coverage. 2019. doi:10.5281/zenodo.3731394
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ The pipeline is built using [Nextflow](https://www.nextflow.io), a workflow tool
2. Sort and index alignments ([`SAMtools`](https://sourceforge.net/projects/samtools/files/samtools/))
3. Duplicate read marking ([`picard`](https://broadinstitute.github.io/picard/))
4. Call and filter variants ([`BCFtools`](http://samtools.github.io/bcftools/bcftools.html))
5. Convert filtered bcf to pseudogenome fasta ([`vcf2pseudogenome.py`](https://github.com/nf-core/bactmap/blob/dev/bin/vcf2pseudogenome.py))
5. Convert filtered vcf to pseudogenome fasta ([`BCFtools`](http://samtools.github.io/bcftools/bcftools.html))
6. Mask each pseudogenome with zero-coverage, low coverage and poorly mapped regions ([`BCFtools`](http://samtools.github.io/bcftools/bcftools.html))
7. Calculate the percentage of the reference mapped in each pseudogenome fasta ([`seqtk`](https://github.com/lh3/seqtk))
12. Create alignment from pseudogenome by concatenating fasta files having first checked that the sample sequences are high quality([`calculate_fraction_of_non_GATC_bases.py`](https://github.com/nf-core/bactmap/blob/dev/bin/))
Expand Down
150 changes: 0 additions & 150 deletions assets/AF2122_region_exclude

This file was deleted.

2 changes: 1 addition & 1 deletion assets/multiqc_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ module_order:
- picard:
name: 'METRICS: Picard (raw)'
anchor: 'picard'
info: 'This section of the report shows Picard CollectMultipleMetrics after mapping with BWA.'
info: 'This section of the report shows the results of removing duplicate reads with Picard.'
path_filters:
- './picard_metrics/*'
- samtools:
Expand Down
8 changes: 7 additions & 1 deletion assets/spoligotype_db.tsv
Original file line number Diff line number Diff line change
Expand Up @@ -2218,4 +2218,10 @@
476773477777200 SB2794 1001111101111110111001111111111111110100000
676773677003600 SB2795 1101111101111110111101111110000000111100000
676763675737600 SB2796 1101111101111100111101111011110111111100000
660773677777600 SB2797 1101100001111110111101111111111111111100000
660773677777600 SB2797 1101100001111110111101111111111111111100000
276773617777600 SB2798 0101111101111110111100011111111111111100000
076771777777600 SB2799 0001111101111110011111111111111111111100000
276773677775600 SB2800 0101111101111110111101111111111111011100000
436733777774600 SB2801 1000111101110110111111111111111111001100000
676773177777600 SB2802 1101111101111110110011111111111111111100000
676773637777400 SB2803 1101111101111110111100111111111111111000000
4 changes: 2 additions & 2 deletions conf/modules.config
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ process {
ext.prefix = { "${meta.id}.markduplicates.sorted" }
publishDir = [
[
path: { "${params.outdir}/variants/picard_metrics" },
path: { "${params.outdir}/picard_metrics" },
mode: params.publish_dir_mode,
pattern: '*metrics.txt'
],
Expand Down Expand Up @@ -437,7 +437,7 @@ process {
publishDir = [
path: { "${params.outdir}/pseudogenomes" },
mode: params.publish_dir_mode,
pattern: '*.fas'
pattern: '*.{fas,tsv}'
]
}

Expand Down
19 changes: 4 additions & 15 deletions modules/local/alignpseudogenomes.nf
Original file line number Diff line number Diff line change
@@ -1,21 +1,10 @@
// Import generic module functions
include { initOptions; saveFiles; getSoftwareName } from './functions'

params.options = [:]
options = initOptions(params.options)

process ALIGNPSEUDOGENOMES {
label 'process_low'
publishDir "${params.outdir}",
mode: params.publish_dir_mode,
saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), publish_id:'') }
label 'process_medium'

conda (params.enable_conda ? "conda-forge::biopython=1.78" : null)
if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) {
container "https://depot.galaxyproject.org/singularity/biopython:1.78"
} else {
container "quay.io/biocontainers/biopython:1.78"
}
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/biopython:1.78' :
'quay.io/biocontainers/biopython:1.78' }"

input:
path pseudogenomes
Expand Down
13 changes: 4 additions & 9 deletions modules/local/fastqscanparse.nf
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
process FASTQSCANPARSE {
label 'process_low'
publishDir "${params.outdir}",
mode: params.publish_dir_mode,
saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), publish_id:'') }

conda (params.enable_conda ? 'conda-forge::numpy=1.15.2 conda-forge::pandas=0.23.4 conda-forge::scipy=1.2.1' : null)
if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) {
container "https://depot.galaxyproject.org/singularity/mulled-v2-9adca5a7d3b24119897cfc20386da6c7fa47bdab:77c1885b47edc369aceb4cccf161a549bdac3d4b-0"
} else {
container "quay.io/biocontainers/mulled-v2-9adca5a7d3b24119897cfc20386da6c7fa47bdab:77c1885b47edc369aceb4cccf161a549bdac3d4b-0"
}
conda (params.enable_conda ? "conda-forge::numpy=1.15.2 conda-forge::pandas=0.23.4 conda-forge::scipy=1.2.1" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/mulled-v2-9adca5a7d3b24119897cfc20386da6c7fa47bdab:77c1885b47edc369aceb4cccf161a549bdac3d4b-0' :
'quay.io/biocontainers/mulled-v2-9adca5a7d3b24119897cfc20386da6c7fa47bdab:77c1885b47edc369aceb4cccf161a549bdac3d4b-0' }"

input:
path json
Expand Down
66 changes: 0 additions & 66 deletions modules/local/functions.nf

This file was deleted.

21 changes: 5 additions & 16 deletions modules/local/krakenparse.nf
Original file line number Diff line number Diff line change
@@ -1,21 +1,10 @@
// Import generic module functions
include { initOptions; saveFiles; getSoftwareName } from './functions'

params.options = [:]
options = initOptions(params.options)

process KRAKENPARSE {
label 'process_medium'
publishDir "${params.outdir}",
mode: params.publish_dir_mode,
saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), publish_id:'') }
label 'process_high'

conda (params.enable_conda ? 'conda-forge::numpy=1.15.2 conda-forge::pandas=0.23.4 conda-forge::scipy=1.2.1' : null)
if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) {
container "https://depot.galaxyproject.org/singularity/mulled-v2-9adca5a7d3b24119897cfc20386da6c7fa47bdab:77c1885b47edc369aceb4cccf161a549bdac3d4b-0"
} else {
container "quay.io/biocontainers/mulled-v2-9adca5a7d3b24119897cfc20386da6c7fa47bdab:77c1885b47edc369aceb4cccf161a549bdac3d4b-0"
}
conda (params.enable_conda ? "conda-forge::numpy=1.15.2 conda-forge::pandas=0.23.4 conda-forge::scipy=1.2.1" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/mulled-v2-9adca5a7d3b24119897cfc20386da6c7fa47bdab:77c1885b47edc369aceb4cccf161a549bdac3d4b-0' :
'quay.io/biocontainers/mulled-v2-9adca5a7d3b24119897cfc20386da6c7fa47bdab:77c1885b47edc369aceb4cccf161a549bdac3d4b-0' }"

input:
path txt
Expand Down
16 changes: 5 additions & 11 deletions modules/local/read_stats.nf
Original file line number Diff line number Diff line change
@@ -1,17 +1,11 @@
process READ_STATS {
label 'process_low'
tag "$meta.id"

publishDir "${params.outdir}",
mode: params.publish_dir_mode,
saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), publish_id:'') }

conda (params.enable_conda ? 'conda-forge::numpy=1.15.2 conda-forge::pandas=0.23.4 conda-forge::scipy=1.2.1' : null)
if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) {
container "https://depot.galaxyproject.org/singularity/mulled-v2-9adca5a7d3b24119897cfc20386da6c7fa47bdab:77c1885b47edc369aceb4cccf161a549bdac3d4b-0"
} else {
container "quay.io/biocontainers/mulled-v2-9adca5a7d3b24119897cfc20386da6c7fa47bdab:77c1885b47edc369aceb4cccf161a549bdac3d4b-0"
}

conda (params.enable_conda ? "conda-forge::numpy=1.15.2 conda-forge::pandas=0.23.4 conda-forge::scipy=1.2.1" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/mulled-v2-9adca5a7d3b24119897cfc20386da6c7fa47bdab:77c1885b47edc369aceb4cccf161a549bdac3d4b-0' :
'quay.io/biocontainers/mulled-v2-9adca5a7d3b24119897cfc20386da6c7fa47bdab:77c1885b47edc369aceb4cccf161a549bdac3d4b-0' }"

input:
tuple val(meta), path(json), path(json), path(depth), path(mapreads)
Expand Down
Loading

0 comments on commit c8f4716

Please sign in to comment.