Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions _quarto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,17 @@ website:
- flywheel.markdown
- pipelines.markdown
- reproducibility.markdown
- data-visualization-and-presentation-templates.qmd
- workflows.markdown
- cluster_intro.markdown
- bash_startup.qmd
- cluster_rstudio.qmd
- cluster-screen.qmd
- gpu-computing.markdown
- rpackages.markdown
- python.md
- pennsive_neuro_pip_instructions.qmd
- neurohacking.qmd
- containers.qmd
- contributing.qmd

Expand Down
214 changes: 214 additions & 0 deletions cluster-screen.qmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,214 @@
# Using `screen` on the Cluster
Created by: Gina Yu

Last Updated: July 30,2026

`screen` is a terminal utility that allows you to keep terminal sessions running in the background, even after you disconnect from the cluster, close your terminal, or lose your SSH connection.

`screen` can be used to:

- Keep commands running in the background
- Run long-running jobs or scripts
- Maintain remote terminal sessions
- Monitor interactive analyses over time
- Return to the same terminal session at a later time
- Organize multiple terminal sessions simultaneously

This page assumes that you are already familiar with logging into the cluster through SSH. For a broader introduction to cluster computing, please see the [Cluster Computing](cluster_intro.markdown) page.

## Screen terminology:
A screen session can have one of two states:

- **Attached** — You are currently connected to the session.

- **Detached** — The session is still running, but no terminal is currently connected to it.

Detached sessions continue running until they are explicitly terminated. A detached session is **still active** and any programs running inside it will continue executing.

# Quick Reference

The table below summarizes the most commonly used `screen` commands.

| Task | Command |
|------|---------|
| Start a new session | `screen` |
| Start a named session | `screen -S my_session` |
| List active sessions | `screen -ls` |
| Reattach to a session | `screen -r my_session` |
| Force reattach to a session | `screen -d -r my_session` |
| Kill a session | `screen -S my_session -X quit` |
| Detach from a session | **Ctrl + A**, then **D** |

# Starting a `screen` Session

## First, SSH into the Takim2 cluster

```bash
ssh yourPennKey@takim2
```

Replace `yourPennKey` with your actual PennKey.

After logging in, your terminal should look similar to:

```text
yourPennKey@takim2 ~$
```

To start a new `screen` session, simply type:

```bash
screen
```

Alternatively, you can create a named session, which is recommended if you plan to have multiple sessions:

```bash
screen -S my_session
```

## Working Inside a `screen` Session

Once inside a `screen` session, you can use the terminal just as you normally would after logging into the cluster.

For example, you can:

- Start an interactive R session by typing `R`
- Run scripts such as `Rscript analysis.R` or `python script.py`
- Navigate directories using commands such as `cd my_project`
- Submit jobs using `bsub`
- Monitor log files or other running processes

Think of a `screen` session as a terminal that remains active even after you disconnect.

> **Note:** `screen` does not provide additional computing resources. It simply keeps your terminal session alive. For computationally intensive jobs requiring specific CPU or memory resources, use the cluster scheduler with `bsub`.

To leave a `screen` session without stopping the commands running inside it, press:

**Ctrl + A**, then **D**

This detaches the session while allowing any running commands to continue executing in the background.

# Managing Existing `screen` Sessions

To view all active `screen` sessions, type:

```bash
screen -ls
```

The output will look similar to:

```
123456.pts-2.takim2 (Detached)
```

where:

- `123456` is the session ID.
- `(Detached)` indicates that the session is still running in the background.

To reconnect to a session, type:

```bash
screen -r 123456
```

or, if you named your session:

```bash
screen -r my_session
```

To permanently end a session, type:

```bash
screen -S 123456 -X quit
```

or simply type `exit` from within the session.

If multiple `screen` sessions are active, the output may look similar to:

Example output:

```text
There are screens on:
123456.analysis (Detached)
987654.testing (Detached)

2 Sockets in /run/screen/S-yourPennKey.
```

# Best Practices

To keep your workspace organized, it is recommended to remove `screen` sessions that are no longer needed.

Unused sessions can:

- Continue running programs that consume CPU, memory, or other cluster resources
- Create clutter by accumulating detached sessions
- Make it more difficult to identify active work when using `screen -ls`

Using descriptive session names (e.g., `screen -S simulation`) can also make it easier to manage multiple sessions.


# Example Workflow

```bash
ssh yourPennKey@takim2
screen -S analysis
R
```

Run your analysis as usual.

When you want to disconnect without stopping your work:

- Press **Ctrl + A**, then **D**

Later, reconnect by logging back into the cluster and running:

```bash
screen -r analysis
```

# Troubleshooting
## Recovering After a Disconnect

If your internet connection drops or you accidentally close your terminal, your `screen` session will continue running on the cluster.

Simply reconnect to the cluster using SSH:

```bash
ssh yourPennKey@takim2
```

Then list your available sessions:

```bash
screen -ls
```

Finally, reconnect to your session:

```bash
screen -r my_session
```

## Session Already Attached
If `screen` reports that a session is already attached, you can force it to detach from the previous terminal and reconnect to your current one:

```bash
screen -d -r my_session
```

## Managing Existing Sessions
To terminate the current `screen` session from within the session itself, simply type:

```bash
exit
```

# In Summary
`screen` is especially useful for interactive work where you expect to reconnect later. For non-interactive analyses or jobs requiring substantial computational resources, submitting a job through the cluster scheduler (`bsub`) is generally the preferred approach.
154 changes: 154 additions & 0 deletions data-visualization-and-presentation-templates.qmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
# Data Visualization Tools and Presentation Templates
Created by: Gina Yu

Last Updated: July 30,2026

This page provides a brief overview of software and resources commonly used for scientific data visualization. While statistical software such as R and Python are used to generate figures, additional design software can help transform these outputs into publication-quality figures, posters, presentations, and graphical abstracts.

Below are several commonly used tools and resources within biostatistics and neuroimaging research.

## Adobe Illustrator

Adobe Illustrator is a vector graphics editor commonly used for editing and combining figures generated from statistical software.

### Common Uses in Biostatistics

- Editing plots exported from R (e.g., `ggplot2` figures)
- Combining multiple plots into publication-quality multi-panel figures
- Adjusting fonts, labels, colors, and spacing
- Creating schematic diagrams to accompany statistical results

Illustrator works with vector graphics, allowing figures to be resized without losing quality. It is not to be confused with Adobe Photoshop, which focuses primarily on editing raster images and photographs. Illustrator is generally the preferred software for figure design and layout.

## BioRender

BioRender is a web-based platform designed for creating scientific diagrams and conceptual illustrations. Although it is commonly used in wet-lab and biological research, it can also be valuable for communicating statistical methods and study designs.

### Common Uses in Biostatistics

- Biological pathway diagrams
- Simulation workflow diagrams
- Study design illustrations
- Graphical abstracts
- Conceptual figures explaining statistical methods

BioRender provides an extensive library of scientific icons and templates, allowing users to create professional-quality figures without advanced graphic design experience.

## Adobe InDesign

Adobe InDesign is a publishing and layout program used to organize figures, text, and graphics into cohesive documents.

### Common Uses in Biostatistics

- Designing conference posters
- Creating reports and manuscripts with integrated figures
- Arranging multiple visualizations into a single layout
- Preparing presentation materials

InDesign is particularly useful when assembling multiple figures into posters or presentation materials while maintaining consistent formatting.

## Poster and Slide Templates

Rather than designing every presentation or poster from scratch, many researchers begin with pre-existing templates.

Common examples include:

- Conference poster templates
- PowerPoint presentation templates
- Lab-specific presentation templates
- University-branded poster and slide templates

Within PennSIVE and other research groups, lab members often maintain **unofficial Penn-branded poster and slide templates** that can serve as useful starting points for presentations and conference posters. Be sure to verify any institutional branding requirements before using these templates for official presentations.

## General Figure Design Principles

Regardless of the software used, effective scientific figures should:

- Clearly communicate one primary message
- Avoid unnecessary visual clutter
- Use readable fonts and appropriately sized labels
- Maintain consistent colors and formatting across figures
- Include informative legends and figure captions when appropriate
- Be interpretable without extensive explanation in the accompanying text

## Export Recommendations

Choosing the appropriate file format is an important final step when preparing figures, posters, or presentations. Different formats are optimized for different purposes.

| Output | Recommended Format | Notes |
|---------|--------------------|-------|
| Figures for manuscripts | PDF or SVG | Preserves vector graphics for high-quality publication. |
| Conference posters | PDF | Preferred by most printing services. |
| Presentation slides | PPTX or PDF | PPTX for editing; PDF for presenting or sharing. |
| Images | PNG | High-resolution raster image suitable for presentations and web use. |
| Photographs | JPEG | Smaller file size, but not recommended for figures containing text. |

### What is SVG?

**Scalable Vector Graphics (SVG)** is a vector-based image format commonly used when exporting figures from software such as R (`ggplot2`) or Adobe Illustrator. Unlike raster formats such as PNG or JPEG, SVG images can be resized without losing image quality, making them ideal for publication-quality figures and posters.

When possible, export plots from R as **PDF** or **SVG** before making edits in Adobe Illustrator.

## Example Workflow in PennSIVE

A typical workflow might look like:

1. Analyze data and generate plots in R using packages such as `ggplot2`
2. Export figures as PDF or SVG files
3. Refine and combine figures in Adobe Illustrator
4. Create conceptual diagrams or workflow illustrations in BioRender
5. Assemble posters or presentations in Adobe InDesign or PowerPoint using an appropriate template
6. Export the final poster as a PDF and submit it for printing.

## Links to Data Visualization Resources

### Software

- [Adobe Illustrator](https://www.adobe.com/products/illustrator.html)
- [BioRender](https://www.biorender.com/)
- [Adobe InDesign](https://www.adobe.com/products/indesign.html)

## Poster Printing

PennSIVE commonly uses **SlideMakers** for conference poster printing.

**Email:** <posters@slidemakers.net>

When submitting a poster for printing, CC:

- PI name
- Business Office Rep Name

A typical email should include the following information:

```text
Would you print this poster please?

Poster size:
Material:
Delivery date:
Name:
Organization:
Delivery address:
Cell number:
```

Before submitting your poster, verify:

- Poster dimensions are correct.
- The poster has been exported as a high-resolution PDF.
- All figures and text appear correctly after exporting.
- The requested delivery date allows sufficient printing time.

## Poster and Slide Templates

Using an existing template can save significant time when preparing conference posters or presentations. Rather than designing layouts from scratch, templates provide a consistent structure, formatting, and branding.

### Available Templates

- [PennSIVE Overleaf Poster Template](https://www.overleaf.com/1216716794yfgvhygqcsnc#59613a)
- [PennSIVE Google Slides / Presentation Template](https://docs.google.com/presentation/d/1M2b0Ol9a-3MA9RSE6ogMcI6cAELjXnoc/edit?usp=sharing&ouid=111089011874061202278&rtpof=true&sd=true)
- Within our [Penn Box](upenn.app.box.com/), under PennSIVE Lab Share Folders > Poster Logo and Lab Presentation Template, you will see several other presentation templates to choose from.

These templates have been shared by PennSIVE lab members and can serve as a useful starting point for conference posters, lab presentations, and research talks. Users are encouraged to make their own copy before editing. Furthermore, within the PennSIVE Lab Share Folders, under "Poster Logo and Lab Presentation Template", there are more templates that are available for use/editing.

Loading