Sydney-Informatics-Hub / ONT-bacpac-nf

Bacterial profiling workflow for ONT data, written in Nextflow.
GNU General Public License v3.0
1 stars 0 forks source link

create_phylogeny_And_heatmap.r - Image labels/size to be dynamically re-adjusted #20

Closed nandan75 closed 3 months ago

nandan75 commented 4 months ago

Describe the bug

Fontconfig error: No writable cache directories
null device
          1

When the R script create_phylogeny_And_heatmap.r

is run.

To Reproduce run the step create_phylogeny_And_Heatmap_image.nf

Expected behavior Expected The plot combined_plot_mqc.png is created however issues with labels

Screenshots If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):

Additional context Screenshot 1 : Is expected image as generated outside nextflow (bash pipeline) Screenshot 2 : As generated in nextflow

The datasets (species) are different- so please do not compare the heatmaps :-)

Both images used the same create_phylogeny_And_heatmap.r script

nandan75 commented 4 months ago

Tried the following

locate the cache directory using the following command in a terminal:

fc-cache -v
/usr/lib/fontconfig/cache: not cleaning unwritable cache directory

Create a Local Cache Directory

mkdir -p ~/.cache/fontconfig

Set Permissions:

chmod 755 ~/.cache/fontconfig

Set Environment Variable in R script (bin/create_phylogeny_And_heatmap.r):

Sys.setenv(FONTCONFIG_CACHE = "~/.cache/fontconfig")

This DOES NOT CHANGE the image and solve the problem

nandan75 commented 4 months ago
nandan75 commented 4 months ago

This issue is now identified as more of

nandan75 commented 4 months ago

Pushed changes