This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How to label regions with plotHeatmap (deeptools) depending on optional arguments (bash)

I'm using deepTools via a bash script to plot heatmaps of ChIP-seq data, with multiple datasets having different parameters, and I would like to pass these optional arguments if present (some have only 2 ).

plotHeatmap \ 
    [...]
    --regionsLabel "${histone1} peaks" "${histone2} peaks" \
    "${histone3} peaks" "${histone4} peaks" \
    "${histone5} peaks" "${histone6} peaks" \
    [...]

It works if I use the right number of parameters, but it only creates errors if some $histoneNumber are missing...

I've tried this way (the number of loops corresponds to the total of histones I have).

if [[ $histone1 -eq 1 ]] ; then
    regionLabel_1="${histone1} peaks"
fi

[...]
   --regionsLabel ${regionLabel_1} ...

But it doesn't help more :

ValueError: length new labels != length original labels

Any help would be appreciated!

bash deeptools plotheatmap

0 answers

No answers yet.

Log in to answer this question.