Skip to content

Commit

Permalink
Fixed ideogram not working for genome mode
Browse files Browse the repository at this point in the history
  • Loading branch information
FernandoDuarteF committed Dec 6, 2024
1 parent a43634a commit b84b762
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 44 deletions.
6 changes: 5 additions & 1 deletion bin/plot_markers1.R
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@ colnames(karyotype1) <- c("Chr", "End", "Start", "species", "size", "color")
# reorder columns
karyotype <- karyotype1[, c(1,3,2,4,5,6)]

write.table(karyotype, file = paste0("data/karyotype/", out_name, "_karyotype.txt"), quote = FALSE, row.names = FALSE, col.names = TRUE, sep = "\t")
# debugging code
print("Karyotype table\n")
head(karyotype)

write.table(karyotype, file = paste0(out_name, "_karyotype.txt"), quote = FALSE, row.names = FALSE, col.names = TRUE, sep = "\t")



Expand Down
39 changes: 0 additions & 39 deletions bin/plot_markers2.R

This file was deleted.

8 changes: 8 additions & 0 deletions conf/modules.config
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,14 @@ process {
]
}

withName: 'GENOME_BUSCO_IDEOGRAM' {
publishDir = [
path: { "${params.outdir}/genome_busco_ideogram" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
}

withName: 'GENE_OVERLAPS' {
publishDir = [
path: { "${params.outdir}/gene_overlaps" },
Expand Down
11 changes: 9 additions & 2 deletions modules/local/genome_ideogram.nf
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,22 @@ 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
Rscript /home/ucbtfrd/pipelines/genomeqc/bin/plot_markers1.R ${prefix}_for_karyotype.txt ${prefix}
$projectDir/bin/plot_markers1.R ${prefix}_for_karyotype.txt ${prefix}
# Call script for plotting
Rscript /home/ucbtfrd/pipelines/genomeqc/bin/plot_markers2.R ${prefix}_karyotype.txt ${prefix}_busco_coordinates.txt ${prefix}
$projectDir/bin/plot_busco_ideogram.R --busco_output ${prefix}_busco_coordinates.txt --karyotype ${prefix}_karyotype.txt --prefix ${prefix}
cat <<-END_VERSIONS > versions.yml
"${task.process}":
Expand Down
4 changes: 2 additions & 2 deletions modules/nf-core/busco/busco/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ process BUSCO_BUSCO {

conda "${moduleDir}/environment.yml"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/busco:5.7.1--pyhdfd78af_0':
'biocontainers/busco:5.7.1--pyhdfd78af_0' }"
'https://depot.galaxyproject.org/singularity/busco:5.8.0--pyhdfd78af_0':
'biocontainers/busco:5.8.0--pyhdfd78af_0' }"

input:
tuple val(meta), path(fasta, stageAs:'tmp_input/*')
Expand Down

0 comments on commit b84b762

Please sign in to comment.