Contents

# install.packages("DiagrammeR")
library(DiagrammeR)
library(DiagrammeRsvg)
library(magrittr)
library(rsvg)

0.1 Flowchart for selection of RP eQTLs

grViz(diagram = "digraph flowchart {
      # define node aesthetics
      node [fontname = Arial, shape = oval, color = Lavender, style = filled, fixedsize = false, width = 10, height= 3.5, fontsize = 30]        
      tab1 [label = '@@1']
      tab2 [label = '@@2']
      tab3 [label = '@@3']
      tab4 [label = '@@4']
      tab5 [label = '@@5']

      # set up node layout
      tab1 -> tab2;
      tab2 -> tab3;
      tab3 -> tab4;
      tab3 -> tab5
      }

      [1]: 'n=\\nRPs with eQTLs in exposure\\n--eQTLs not LD-clumped--\\n(eQTL P<0.05)'
      [2]: 'n=\\nRPs with eQTLs in exposure\\n--eQTLs not LD-clumped--\\n(eQTL P<5x10-06)'    
      [3]: 'n=\\nRPs with eQTLs in exposure & outcome\\n--eQTLs not LD-clumped--\\n(eQTL P<5x10-06)\\nFor:\\nWald ratios'     
      [4]: 'n=\\nRPs with eQTLs in exposure & outcome\\n--eQTLs LD-clumped per RP--\\n(eQTL P<5x10-06)\\nFor:\\nindividual-RP meta-analyses'
      [5]: 'n=\\nRPs  with eQTLs in exposure & outcome\\n--eQTLs LD-clumped across RPs--\\n (eQTL P<5x10-06)\\nFor:\\ncollective-RP meta-analyses'
      ")
#ggsave(filename = "/n/home04/cdadams/Aim2/flowchart/flowchart.png", dpi=300)

0.2 Skyblue option (not using)

# I don't like the skyblue and white font.

grViz(diagram = "digraph flowchart {
      # define node aesthetics
      node [fontname = Arial, shape = oval, color = DeepSkyBlue, style = filled, fontcolor = White, fixedsize = false, width = 10, height= 3.5, fontsize = 30]        
      tab1 [label = '@@1']
      tab2 [label = '@@2']
      tab3 [label = '@@3']
      tab4 [label = '@@4']
      tab5 [label = '@@5']

      # set up node layout
      tab1 -> tab2;
      tab2 -> tab3;
      tab3 -> tab4;
      tab3 -> tab5
      }

      [1]: 'n=\\nRPs with eQTLs in exposure\\n--eQTLs not LD-clumped--\\n(eQTL P<0.05)'
      [2]: 'n=\\nRPs  with eQTLs in exposure\\n--eQTLs not LD-clumped--\\n(eQTL P<5x10-06)'    
      [3]: 'n=\\nRPs  with eQTLs in exposure & outcome\\n--eQTLs not LD-clumped--\\n(eQTL P<5x10-06)\\nFor:\\nWald ratios'     
      [4]: 'n=\\nRPs with eQTLs in exposure & outcome\\n--eQTLs LD-clumped per RP--\\n(eQTL P<5x10-06)\\nFor:\\nindividual-RP meta-analyses'
      [5]: 'n=\\nRPs  with eQTLs in exposure & outcome\\n--eQTLs LD-clumped across RPs--\\n (eQTL P<5x10-06)\\nFor:\\ncollective-RP meta-analyses'
      ")

0.3 Bash

mkdir /n/home04/cdadams/Aim2/flowchart
cd /n/home04/cdadams/Aim2/flowchart

echo "## Flowchart for selecting RPs

### Rpubs: https://rpubs.com/Charleen_D_Adams/758188" 

<p align="center">
<img src="https://github.com/LabLemos/journalclub/blob/main/April192021/rif.jpeg" width="700" height="500">
</p>

>> README.md

# Helpful commands
#rm -rf .git
#rm README.md 

git add flowchart.Rmd
git commit -m "flowchart for RP selection"
git branch -M main
git push --all

git add flowchart.png
git commit -m "flowchart for RP selection: had to be saved as an html and screenshot"
git branch -M main
git push --all

git add README.md
git commit -m "README.md"
git branch -M main
git push --all