buenrostrolab / FigR

Functional Inference of Gene Regulation
https://buenrostrolab.github.io/FigR/
MIT License
34 stars 10 forks source link

Altering the aesthetics of plotfigRNetwork() #20

Open sylestiel opened 1 year ago

sylestiel commented 1 year ago

@vkartha

Can you suggest ways to play with the aesthetics of the Network generated from plotfigRNetwork()?

Colors, text size, etc

vkartha commented 1 year ago

@sylestiel I'm including some parameters in the plotfigRNetwork function to assist with this, specifically:

TFnodecol, DORCnodecol

to allow you to change colors for TF and DORC nodes in the network graph

and

posEdgecol , negEdgecol

to allow you to change colors for acitvating and repressive edges in the network graph

and

labelSize to allow you to specify the fontsize of labels.

Would there be anything else you specifically need to change?

sylestiel commented 1 year ago

That would be wonderful. I will play with these parameters and should I feel that something else needs to be addressed I will get back to you. Thanks!

vkartha commented 1 year ago

@sylestiel let me know if it works OK, the function has been updated so you just need a fresh install. See default params below:

plotfigRNetwork <- function(figR.d,
                        score.cut=1,
                        DORCs=NULL,
                        TFs=NULL,
                        weight.edges=FALSE,
                        TFnodecol='Tomato',
                        DORCnodecol='Sky Blue',
                        posEdgecol='Forest Green',
                        negEdgecol='Purple',
                        labelSize=13,
                        showLegend=TRUE)
sylestiel commented 1 year ago

@vkartha I'm getting the following error message:

Error: C stack usage 7971376 is too close to the limit

vkartha commented 1 year ago

Hmm, that doesn't seem to be related to the function at all (Also hard to troubleshoot since it's a pretty vague error). If you could make sure you re-installed FigR correctly (i.e. you see the new parameters pop up as options, after re-starting your R session), that would reassure us that you are using the right build

sylestiel commented 1 year ago

@vkartha It worked. Thanks!! Can you add a parameter to repel labels to minimize overlap? Or is that asking for too much?