Skip to content

Commit

Permalink
Merge pull request #14 from cidgoh/asm_QC
Browse files Browse the repository at this point in the history
Update assembly QC parameter descriptions
  • Loading branch information
anwarMZ authored Jul 11, 2023
2 parents ea1459d + 8f6f49c commit ee8ddb2
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 25 deletions.
4 changes: 2 additions & 2 deletions conf/modules.config
Original file line number Diff line number Diff line change
Expand Up @@ -141,13 +141,13 @@ process {
mode: params.publish_dir_mode,
pattern: '*.{gfa,log,fasta,yml,corrections,LastGraph}'
]
ext.args = "--assembler ${params.assembler} \
ext.args = "--assembler ${params.sr_assembler}"
--gsize ${params.assembly_genomesize} \
--minlen ${params.min_contig_len} \
--mincov ${params.min_contig_coverage}"
}
withName: RENAME_SHOVILL {
withName: RENAME_CTG {
publishDir = [
path: { "${params.outdir}/assembly/${meta.id}" },
mode: params.publish_dir_mode,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
process RENAME_SHOVILL {
process RENAME_CTG {
tag "$meta.id"
label 'process_low'

Expand Down
21 changes: 12 additions & 9 deletions nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,9 @@ params {
// Aligner used for dehosting ('minimap2' or 'bwa')
dehosting_aligner = 'minimap2'
// Path to (human) reference genome used for dehosting
reference_genome = "/mnt/cidgoh-object-storage/database/reference_genomes/human/GRCh38.p14/GCF_000001405.40/GCF_000001405.40_GRCh38.p14_genomic.fna"
host_genome = "/mnt/cidgoh-object-storage/database/reference_genomes/human/GRCh38.p14/GCF_000001405.40/GCF_000001405.40_GRCh38.p14_genomic.fna"
// ID/name for reference genome
ref_genome_id = 'test'
host_genome_id = 'test'

// bwa options
// Whether to sort ('sort') or view ('view') the BAM file obtained from BWA
Expand Down Expand Up @@ -138,18 +138,21 @@ params {
show_hidden_params = false
schema_ignore_params = 'genomes'

// Shovill options
sr_assembler = 'spades' // WGS_ASSEMBLY: choice of genome assembler for short read data [skesa,spades,megahit,velvet]

// CheckM options
checkm_db = false
checkm_db = false // ASSEMBLY_QC: path to local CheckM lineages directory

// QUAST options
reference = false
reference_gff = false
combine_quast = false
reference_genome_fasta = false // ASSEMBLY_QC: path to reference genome file
reference_genome_gff = false // ASSEMBLY_QC: path to reference genome annotation file (.GFF)
combine_quast = false // ASSEMBLY_QC: whether to aggregate individual QUAST results file

// BUSCO options
busco_lineage = "auto"
busco_lineages_path = "/mnt/cidgoh-object-storage/database/busco"
busco_config = false
busco_lineage = "auto" // ASSEMBLY_QC: the BUSCO lineage to use, or "auto" to automatically select lineage
busco_lineages_path = "/mnt/cidgoh-object-storage/database/busco" // ASSEMBLY_QC: path to local BUSCO lineages directory
busco_config = false // ASSEMBLY_QC: path to BUSCO config file

// Config options
custom_config_version = 'master'
Expand Down
16 changes: 8 additions & 8 deletions subworkflows/local/assembly_qc.nf
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,18 @@ workflow ASSEMBLY_QC {
if ( params.combine_quast ) {
QUAST(
assembly.map{it[1]}.collect(),
params.reference ? params.reference : [],
params.reference_gff ? params.reference_gff : [],
params.reference ? assembly.map{ true } : params.reference,
params.reference_gff ? assembly.map{ true } : params.reference_gff
params.reference_genome_fasta ? params.reference_genome_fasta : assembly.map{ [] },
params.reference_genome_gff ? params.reference_genome_gff : assembly.map{ [] },
params.reference_genome_fasta ? assembly.map{ true } : params.reference_genome_fasta,
params.reference_genome_gff ? assembly.map{ true } : params.reference_genome_gff
)
} else {
QUAST(
assembly.map{it[1]},
params.reference ? params.reference : assembly.map{ [] },
params.reference_gff ? params.reference_gff : assembly.map{ [] },
params.reference ? assembly.map{ true } : params.reference,
params.reference_gff ? assembly.map{ true } : params.reference_gff
params.reference_genome_fasta ? params.reference_genome_fasta : assembly.map{ [] },
params.reference_genome_gff ? params.reference_genome_gff : assembly.map{ [] },
params.reference_genome_fasta ? assembly.map{ true } : params.reference_genome_fasta,
params.reference_genome_gff ? assembly.map{ true } : params.reference_genome_gff
)
}

Expand Down
9 changes: 5 additions & 4 deletions subworkflows/local/wgs_assembly.nf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// import modules
include { SHOVILL } from '../../modules/nf-core/shovill'
include { RENAME_SHOVILL } from '../../modules/local/rename_shovill'
include { RENAME_CTG as RENAME_CTG_SHOVILL; RENAME_CTG as RENAME_CTG_DRAGONFLYE } from '../../modules/local/rename_ctg'
// include { } from '../../modules/local/rename_shovill'
include { DRAGONFLYE } from '../../modules/nf-core/dragonflye'

Expand All @@ -11,8 +11,9 @@ workflow WGS_ASSEMBLY {
main:
if (params.mode=="nanopore"){
reads | DRAGONFLYE
RENAME_CTG_DRAGONFLYE(DRAGONFLYE.out.contigs, reads.map{ "fa" })

contigs = DRAGONFLYE.out.contigs
contigs = RENAME_CTG_DRAGONFLYE.out
corrections = []
assembly_log = DRAGONFLYE.out.log
raw_contigs = DRAGONFLYE.out.raw_contigs
Expand All @@ -24,9 +25,9 @@ workflow WGS_ASSEMBLY {
reads.filter{ it[0].single_end == false } | SHOVILL

// rename contig files
RENAME_SHOVILL(SHOVILL.out.contigs, reads.map{ "fa" })
RENAME_CTG_SHOVILL(SHOVILL.out.contigs, reads.map{ "fa" })

contigs = RENAME_SHOVILL.out
contigs = RENAME_CTG_SHOVILL.out
corrections = SHOVILL.out.corrections
assembly_log = SHOVILL.out.log
raw_contigs = SHOVILL.out.raw_contigs
Expand Down
2 changes: 1 addition & 1 deletion workflows/seqqc.nf
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ workflow SEQQC {
if(!params.skip_taxonomy_qc){
TAXONOMY_QC (
ch_reads_qc,
params.reference_genome
params.host_genome
)
ch_assembly_reads = TAXONOMY_QC.out.ch_tax_qc_reads
}
Expand Down

0 comments on commit ee8ddb2

Please sign in to comment.