Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
gshafiei committed Nov 12, 2024
2 parents 28288d5 + 5a12726 commit d771283
Show file tree
Hide file tree
Showing 17 changed files with 101 additions and 66 deletions.
9 changes: 5 additions & 4 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# you will see them accessed via {{ site.title }}, {{ site.github_repo }}, and so on.
# You can create any custom variable you would like, and they will be accessible
# in the templates via {{ site.myvariable }}.
title: Penn LINC Neuroinformatics
title: PennLINC Lab Manual
description: Informatics tutorials
baseurl: "/" # the subpath of your site, e.g. /blog
url: "https://PennLINC.github.io" # the base hostname & protocol for your site, e.g. http://example.com
Expand Down Expand Up @@ -112,9 +112,10 @@ aux_links_new_tab: false
nav_sort: case_sensitive # Capital letters sorted before lowercase

# External navigation links
# nav_external_links:
# - title: Just the Docs on GitHub
# url: https://github.com/just-the-docs/just-the-docs
nav_external_links:
- title: Lab Website
url: https://pennlinc.io
opens_in_new_tab: true

# Footer content
# appears at the bottom of every page's main content
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
---
layout: default
title: Generalized Additive Models
title: Generalized Additive Models (GAMs)
parent: Common Methods
nav_order: 1
---

One of the preferred statistical modeling methods in the lab is the generalized additive model (GAM),
Expand Down
1 change: 0 additions & 1 deletion docs/CommonMethods/gradient.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
layout: default
title: Gradients
parent: Common Methods
nav_order: 2
---

A popular modeling method in the lab for neuroimaging data is the gradient.
Expand Down
5 changes: 5 additions & 0 deletions docs/CommonMethods/haufe_transforms.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
layout: default
title: Haufe Transforms
parent: Common Methods
---
1 change: 0 additions & 1 deletion docs/CommonMethods/meta-analysis/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ title: Meta-analysis
parent: Common Methods
has_children: true
has_toc: true
nav_order: 3
---
# Meta-analysis

Expand Down
5 changes: 5 additions & 0 deletions docs/CommonMethods/neuromaps.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
layout: default
title: NeuroMaps
parent: Common Methods
---
7 changes: 7 additions & 0 deletions docs/CommonMethods/nonnegative_matrix_factorization.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
layout: default
title: Non-negative Matrix Factorization (NMF)
parent: Common Methods
---

One type of NMF we like in the lab is Orthogonal Projective NMF (opNMF).
5 changes: 5 additions & 0 deletions docs/CommonMethods/partial_least_squares.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
layout: default
title: Partial Least Squares (PLS)
parent: Common Methods
---
5 changes: 5 additions & 0 deletions docs/CommonMethods/personalized_functional_networks.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
layout: default
title: Personalized Functional Networks (PFNs)
parent: Common Methods
---
5 changes: 5 additions & 0 deletions docs/CommonMethods/ridge_regression.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
layout: default
title: Ridge Regression
parent: Common Methods
---
5 changes: 5 additions & 0 deletions docs/CommonMethods/spin_testing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
layout: default
title: Spin Tests
parent: Common Methods
---
7 changes: 6 additions & 1 deletion docs/DataWorkflows/FetchingYourPMACSData.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
---
layout: default
title: Getting Static Data from PMACS
title: Getting Static Data
parent: Data Workflows
nav_order: 2
has_toc: true
---

{: .warning-title }
> Deprecation Warning
>
> We are currently upgrading our data sharing system so that all static data will be on CUBIC. This section will be deprecated when the new CUBIC data sharing system is in effect.
# What is static data?
{: .no_toc}

Expand Down
58 changes: 16 additions & 42 deletions docs/LabHome/CommunicationAndCollaboration.md
Original file line number Diff line number Diff line change
@@ -1,67 +1,41 @@
---
layout: default
title: Lab Noise, Communication, and Collaboration
title: Communication, Collaboration, & Slack
parent: Lab Basics
nav_order: 7
---
## Communication, Collaboration, & Norms on Using Slack

# Lab Noise, Communication, and Collaboration
Our lab has a very active slack! PennLINC’s slack channels are within the Psychosis and Neurodevelopment Section slack organization (”Penn Neuropsych” org). This organization includes hundreds of members and norms will vary across groups in this org. Here we outline several of the best practices and norms for slack use in PennLINC.

All of our work is highly collaborative, and collaboration is oftentimes what makes science fun. Several basic notes follow below, which of course cannot even scratch the surface of what can both right and wrong in a scientific collaboration. In general, we strive for clear and constructive communication that helps us all do better science and enjoy our work. While the lab is a relatively informal environment, mutual respect, professionalism, and supporting each other (broadly, as humans) is essential. Because of the open floorplan, being quite attuned to noise and volume is important for everyone's work environment. Please reach out to Ted anytime and suggest updates to this pages as other important situations arise.
**Why we use slack.** Fun fact: slack is an acronym that stands for “Searchable Log of All Communication and Knowledge”. Nearly all projects in the lab involve teams of scientists; correspondence often contains incredibly valuable knowledge. Pairwise correspondence — including email and direct messages on slack — are not searchable and thus all info contained there is lost. In contrast, information on open channels is findable forever. Searching the lab slack is a major resource for lab members.

### Lab Noise
**Why we should use open channels**. Using open channels allows us to find decisions and conversations that may not seem important at the time, but often turn out to be. Furthermore, team members may be in a meeting, doing focused work, or on vacation; asking on an open channel allows a broader group of people to respond in a timely manner. As such, we try to keep all correspondence related to a project on a project channel. Use of direct messages in general defeats purpose of slack, and should be limited to personal/ non-science correspondence.

We try to maintain an environment conducive to focused work (coding/writing) in the open space in the pod. In the open space, conversations should always use quiet voices. For anything beyond a brief exchange (inc zoom calls), an office or the common area should be used. Ted's office can always be used for meetings or conversations when it is not already in use. It is encouraged that we nicely remind each others of this-- regardless of relative seniority/position-- and strive for a practice of thanking the person who is providing the necessary reminder. Note that the soundproofing in the office spaces are not superb either and some volume control is needed even behind a closed door.
!**Important!: No PHI.** Protected health information (PHI; identifying information including participant names, addresses, etc) should only be transmitted using health-system approved means. PHI should *never* be placed on slack. In general, code is ok to post on slack but it is good to avoid posting data.

**Norms on communication**. Lab members keep different hours, especially with travel and remote work. Thus, we have decided as a group that it is ok — not worthy of an apology! — to send a slack message after normal business hours. However, to ensure that this is not intrusive, we recommend adjusting your slack settings to silence notifications after your typical working hours (“View preferences” > “Notifications” under your profile on slack). While the lab norm is to try to help each other and respond to questions as quickly as possible, the default assumption is that slack message is NOT time sensitive. All lab members are encouraged to block time on their schedule with slack silenced to allow for focused coding, analysis, and writing.

### Modes of correspondence
**Types of channels**. There are several types of channels on slack. The most common type is a “Project Channel” — see below. In addition to project channels, there are general channels for announcements, informatics, specific imaging modalities, and specific methods. When you join PennLINC, you will be automatically added to a set of ~20 of these general channels. The description is usually listed under “channel description”.

In general, open project channels on Slack are preferred. However, note that faculty and senior staff are often a member of dozens of channels and threads can get lost. For specific tasks that take time & consideration -- like manuscript review, grant feedback, career development quesetions, and letters of reccomendation -- email is greatly preferred. Please try to avoid direct messages to Ted except for really quick ("one-off") queries.
**Project channels**. Each new scientific project should have a dedicated project channel, with every member of the team included. Beyond the project lead and Ted, at a minimum the team usually also includes one of the senior scientists from the informatics team and also the second author who serves as the reproducabibuddy. Every project should also have an associated github repo on the PennLINC org, a notion notebook in the PennLINC org, and (usually) a project folder on CUBIC. All these elements — slack channel, github repo, notion notebook, cubic project — should have the same name. A common naming convention is `LastName_ProjectName`.

Protected health information (PHI; identifying information including participant names, addresses, etc) should only be transmitted using health-system approved means. PHI should *never* be placed on slack.
**Where to post questions**. It can be confusing where to post questions on slack. In general, we recommend first posting to your project channel, as responses will be more easily found. However, sometimes expertise beyond the core project team will be needed. For technical questions beyond the project channel, #informatics is a good bet. However, note that there are several dedicated channels for specific common methods, including #gams and #spin_tests. For questions on CUBIC, there is a #cubic channel. For nitty-gritty questions related to a specific imaging modality, look for #pennlinc_{modality} (e.g., fMRI, dMRI, etc).

Finally, it is good to remember that all electronic written correspondence (including email and slack) have a poor record of privacy. If the content of your correspondence is not something you'd want a lot of people to see, please strongly consider a phone call rather than a written message.
**When to email Ted.** Ted is a member >100 channels, so things can get lost. For specific tasks that take time & consideration – like manuscript review, grant feedback, career development quesetions, and letters of recommendation – Ted prefers email. It is ok to DM Ted for quick (“one-off”) queries, but for tasks that take time (manuscript review, letters, etc) please email him directly.

**A note on privacy**. Whether using slack or email, all electronic written correspondence has a poor history of privacy. If the content of your correspondence is not something you’d want a lot of people to see, please strongly consider a phone call rather than a written message.

### Slack best practices

For _projects_ use a dedicated project channel for all correspondence.

For general infrastructure / informatics q's, use the #informatics channel on slack or the #pennlinc_general channel.

For cool papers, post to #pennlinc_papers.

For talks, post to #pennlinc_talks and send to Sophia to update the calendar.

For faculty review of manuscripts, grants, or other documents, send to Ted via email.

In general, try to avoid the slack direct message channels for project correspondence, as they are lost and not searchable.



### Setting priorities & expectations

In general, the biggest constraint we all face is _time_. As such, one thing that should be addressed in every weekly meeting is the relative priority of different tasks / projects. This is important to re-assess continuously to make sure they align with scientific impact, career development priorities, and the demands of funded projects.


### Navigating collaborations

A couple general tips follow below. In general, the rule of thumb is "talk to your faculty supervisor early and often." Specific cases where you should talk to Ted ahead of time include:
**A note on collaboration.** Specific cases where you should talk to Ted ahead of time include:

1) Starting new collaborations outside the lab.

2) Asking a member of our lab to do something that is likely to be fairly time consuming.

3) Any effort that requires repeated rounds of input / questions to a member of another lab.

4) Meeting with other faculty members outside our immediate group/section. In general, Ted tends to prefer to be present for collab mtgs with other faculty. In general it is a also good idea to keep Ted (via cc) in the loop on correspondence with collaborating faculty outside our section.




3) Any effort that requires repeated rounds of input / questions to a member of another lab.

### Troubleshooting
4) Meeting with other faculty members outside our immediate group/section. In general, Ted tends to prefer to be present for collab mtgs with other faculty. In general it is a also good idea to keep Ted (via cc) in the loop on correspondence with collaborating faculty outside our section.

In general, the most stressful situations in science often come from inter-personal conflict. Usually this can be resolved with direct and honest communication. In large collaborative efforts, some degree of mis-communication is inevitable -- and does not reflect anyone "doing something wrong" -- please don't hesitate to reach out to discuss.
**Troubleshooting collaborations.** In general, the most stressful situations in science often come from inter-personal conflict. Usually this can be resolved with direct and honest communication. In large collaborative efforts, some degree of mis-communication is inevitable and does not reflect anyone doing something wrong” – please dont hesitate to reach out to discuss.


18 changes: 18 additions & 0 deletions docs/LabHome/space.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
layout: default
title: Lab Space
parent: Lab Basics
nav_order: 8
---

## PennLINC Space at Richards

All of our work is highly collaborative, and collaboration is usually what makes science fun. Several basic notes on collaborating in an open work space follow below. In general, we strive for clear and constructive communication that helps us all do better science and enjoy our work. Because of the open floorplan, being quite attuned to noise and volume is important for everyone’s work environment. Please reach out to Ted anytime and suggest updates to this pages as other important situations arise.

### Lab Noise

We try to maintain an environment conducive to focused work (coding/writing) in the open space in the pod. In the open space, conversations should always use quiet voices. For anything beyond a brief exchange (inc zoom calls), an office or the common area outside of the pod should be used. The facilty offices can be used for meetings or conversations if they are unoccupied. It is encouraged that we nicely remind each others of this – regardless of relative seniority/position – and strive for a practice of thanking the person who is providing the necessary reminder. Note that the soundproofing in the office spaces are not superb either and some volume control is needed even behind a closed door.

### Shared Space / Desks / Offices

Full time employees get assigned a desk in the open space of the pod or one of the offices. Depending on the current capacity there might not be any desks available that can be assigned to visiting or rotating students. In this case we want to have a culture of just grabbing open desks and moving to another open desk in case the person that desk is assigned to arrives at the lab. People with an assigned permanent desk that only use their desk on certain days of the week are asked to leave a post-it note on their desk for people looking for a desk to know it is available. The #whereami channel on slack should be used to keep your colleagues aware if you will be away for an extended period and your desk can be used. There is a key to the pod's offices in a lock box in the back at the office next to the printer. The code to the lock box is pinned to the #richards slack channel.
29 changes: 16 additions & 13 deletions docs/cubic/cubic.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,22 +150,23 @@ echo PATH=/directory/where/your/installation/lives:${PATH} >> ~/.bashrc
source ~/.bashrc
```

# Installing miniconda in your project
# Installing miniforge in your project

You will want a python installation that you have full control over. After logging in as your project user and changing permission on your `.bashrc` file, you can install miniconda using
You will want a python installation that you have full control over. After logging in as your project user and changing permission on your `.bashrc` file, you can install miniforge using

```bash
$ wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
$ chmod +x Miniconda3-latest-Linux-x86_64.sh
$ ./Miniconda3-latest-Linux-x86_64.sh
$ cd ~
$ wget https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-x86_64.sh
$ chmod +x Miniforge3-Linux-x86_64.sh
$ ./Miniforge3-Linux-x86_64
```

You will need to hit Enter to continue and type `yes` to accept the license terms. The default installation location is fine (it will be `$HOME/miniconda3`). Sometimes you will run into a memory error at this step. If this happens, just log out and log back in and the issue should be remediated. This can be avoided in the first place by, when SSHing into CUBIC, logging into `*login4`.
You will need to hit Enter to continue and type `yes` to accept the license terms. The default installation location is fine (it will be `$HOME/miniforge3`). Sometimes you will run into a memory error at this step. If this happens, just log out and log back in and the issue should be remediated. This can be avoided in the first place by, when SSHing into CUBIC, logging into `*login4`.

When prompted if you want to initialize miniconda3, respond again with `yes`
When prompted if you want to initialize miniforge3, respond again with `yes`

```bash
Do you wish the installer to initialize Miniconda3
Do you wish the installer to initialize Miniforge3
by running conda init? [yes|no]
[no] >>> yes
```
Expand All @@ -174,17 +175,17 @@ For the changes to take place, log out of your sudo bash session and your second

```bash
$ exit
$ sudo -u xcpdev sudosh
$ sudo -u [PROJECTNAME] sudosh
(base) $ which conda
~/miniconda3/bin/conda
~/miniforge3/bin/conda
```

You will notice that your shell prompt now begins with `(base)`, indicating that you are in conda's base environment.

There will be a permission issue with your conda installation. You will need to change ownership of your miniconda installation. To fix this run

```bash
chown -R `whoami` ~/miniconda3
$ chown -R `whoami` ~/miniforge3
```

When you launch jobs on CUBIC, they will autmoatically use CUBIC's base conda environment instead of your project user's miniconda installation. To fix this, you will need to initialize miniconda for a bash script submitted to qsub by running
Expand All @@ -200,7 +201,9 @@ conda create -n myproject python=3.11
conda activate myproject
```

Note: For simple use of a Python interpreter managed by `conda`, you can use the installed module(s) like `module load python/anaconda/3`. But it is highly recommended to install miniconda as described above.
Note: An important benefit of using Miniforge is that it gives you access to `mamba`! This can be used in place of most `conda` commands (e.g., `mamba install ...` or `mamba update...`) and uses a C-based implementation of `conda` that tends to run noticeably faster.

Note: For simple use of a Python interpreter managed by `conda`, you can use the installed module(s) like `module load python/anaconda/3`. But it is **highly recommended** to install miniforge as described above.

# Interacting with CUBIC: data analysis and data transfer

Expand Down Expand Up @@ -538,7 +541,7 @@ analysis. We do this with `conda`.

#### REPL (Interactive Programming)

You can code in Jupyter Notebooks right in `code-server`. First, ensure that you have a [conda environment setup](http://pennlinc.github.io/docs/cubic#installing-miniconda-in-your-project-the-hard-way).
You can code in Jupyter Notebooks right in `code-server`. First, ensure that you have a [conda environment setup](http://pennlinc.github.io/docs/cubic#installing-miniforge-in-your-project).
Once you're ready, start up your `code-server` and make sure the [Jupyter extension](https://code.visualstudio.com/docs/datascience/jupyter-notebooks) is installed. Use the command palette (`cmd`+`shift`+`p`) to search for Jupyter interpreters.

<img src="https://code.visualstudio.com/assets/docs/getstarted/tips-and-tricks/OpenCommandPalatte.gif" alt="cmdpalette">
Expand Down
Loading

0 comments on commit d771283

Please sign in to comment.