Skip to content

Commit

Permalink
More descriptive names for modules and subworkflows
Browse files Browse the repository at this point in the history
  • Loading branch information
FernandoDuarteF committed Dec 6, 2024
1 parent b84b762 commit c69d846
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 21 deletions.
2 changes: 2 additions & 0 deletions bin/plot_markers1.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/usr/bin/env Rscript

# Modified from https://gitlab.com/ezlab/busco_protocol/-/blob/main/support_protocol2/plot_markers/scripts/plot_markers1.R?ref_type=heads

# load libraries
require(RIdeogram)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
process PLOT_BUSCO_IDEOGRAM {
process GENOME_ANNOTATION_BUSCO_IDEOGRAM {
tag "${genusspeci}_${lineage}"
label 'process_single'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
process GENOME_BUSCO_IDEOGRAM {
process GENOME_ONLY_BUSCO_IDEOGRAM {
tag "$meta.id"
label 'process_single'

Expand All @@ -19,22 +19,18 @@ process GENOME_BUSCO_IDEOGRAM {
"""
grep -v "#" ${busco_full_table} | cut -f 2,3,4,5 | grep -v "Missing" > ${prefix}_busco_coordinates.txt
#echo "Current directory: \$(pwd)"
#echo "Contents of current directory:"
#ls -l
#echo "Contents of projectDir:"
#ls -l $projectDir/bin
#echo "Contents of plot_markers1.R script"
#cat $projectDir/bin/plot_markers1.R
# Get chromosome lengths:
seqkit fx2tab -i -n -l ${genome} > ${prefix}_for_karyotype.txt
# Call script for table wrangling
$projectDir/bin/plot_markers1.R ${prefix}_for_karyotype.txt ${prefix}
# Call script for plotting
$projectDir/bin/plot_busco_ideogram.R --busco_output ${prefix}_busco_coordinates.txt --karyotype ${prefix}_karyotype.txt --prefix ${prefix}
$projectDir/bin/plot_busco_ideogram.R \\
--busco_output ${prefix}_busco_coordinates.txt \\
--karyotype ${prefix}_karyotype.txt \\
--prefix ${prefix} \\
$args
cat <<-END_VERSIONS > versions.yml
"${task.process}":
Expand Down
4 changes: 2 additions & 2 deletions subworkflows/local/genome_and_annotation.nf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ include { LONGEST } from '../../modules/local/longes
include { BUSCO_BUSCO } from '../../modules/nf-core/busco/busco/main'
include { QUAST } from '../../modules/nf-core/quast/main'
include { AGAT_SPSTATISTICS } from '../../modules/nf-core/agat/spstatistics/main'
include { PLOT_BUSCO_IDEOGRAM } from '../../modules/local/plot_busco_ideogram'
include { GENOME_ANNOTATION_BUSCO_IDEOGRAM } from '../../modules/local/genome_annotation_busco_ideogram'
include { GFFREAD } from '../../modules/nf-core/gffread/main'
include { ORTHOFINDER } from '../../modules/nf-core/orthofinder/main'
include { FASTAVALIDATOR } from '../../modules/nf-core/fastavalidator/main'
Expand Down Expand Up @@ -182,7 +182,7 @@ workflow GENOME_AND_ANNOTATION {
}
}

PLOT_BUSCO_IDEOGRAM ( ch_plot_input )//removed this temporarily:, ch_karyotype
GENOME_ANNOTATION_BUSCO_IDEOGRAM ( ch_plot_input )//removed this temporarily:, ch_karyotype

ch_tree_data = ch_tree_data.mix(BUSCO_BUSCO.out.batch_summary.collect { meta, file -> file })

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@

include { QUAST } from '../../modules/nf-core/quast/main'
include { BUSCO_BUSCO } from '../../modules/nf-core/busco/busco/main'
include { GENOME_BUSCO_IDEOGRAM } from '../../modules/local/genome_ideogram'
include { GENOME_ONLY_BUSCO_IDEOGRAM } from '../../modules/local/genome_only_busco_ideogram'

workflow GENOME {
workflow GENOME_ONLY {

take:
ch_fasta // channel: [ val(meta), [ fasta ] ]
Expand Down Expand Up @@ -34,7 +34,7 @@ workflow GENOME {
| combine(ch_full_table, by:0)


GENOME_BUSCO_IDEOGRAM (
GENOME_ONLY_BUSCO_IDEOGRAM (
ch_input_ideo
)

Expand Down
10 changes: 5 additions & 5 deletions workflows/genomeqc.nf
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ include { CREATE_PATH } from '../modules/local/create_pa
include { NCBIGENOMEDOWNLOAD } from '../modules/nf-core/ncbigenomedownload/main'
include { PIGZ_UNCOMPRESS as UNCOMPRESS_FASTA } from '../modules/nf-core/pigz/uncompress/main'
include { PIGZ_UNCOMPRESS as UNCOMPRESS_GFF } from '../modules/nf-core/pigz/uncompress/main'
include { GENOME } from '../subworkflows/local/genome'
include { GENOME_ONLY } from '../subworkflows/local/genome_only'
include { GENOME_AND_ANNOTATION } from '../subworkflows/local/genome_and_annotation'
include { MULTIQC } from '../modules/nf-core/multiqc/main'
include { TREE_SUMMARY } from '../modules/local/tree_summary'
Expand Down Expand Up @@ -201,13 +201,13 @@ workflow GENOMEQC {

// Run genome only or genome + gff
if (params.genome_only) {
GENOME (
GENOME_ONLY (
ch_input.fasta
)
ch_multiqc_files = ch_multiqc_files
| mix(GENOME.out.quast_results.map { meta, results -> results })
| mix(GENOME.out.busco_short_summaries.map { meta, txt -> txt })
ch_versions = ch_versions.mix(GENOME.out.versions.first())
| mix(GENOME_ONLY.out.quast_results.map { meta, results -> results })
| mix(GENOME_ONLY.out.busco_short_summaries.map { meta, txt -> txt })
ch_versions = ch_versions.mix(GENOME_ONLY.out.versions.first())
} else {
GENOME_AND_ANNOTATION (
ch_input.fasta,
Expand Down

0 comments on commit c69d846

Please sign in to comment.