In the lab, we use Obsidian as our personal and team knowledge management system.
Each lab member needs a Lab Notebook which is an Obsidian Vault using custom templates and conventions to allow robust construction of a lab knowledge base.
I recommend keeping things fairly simple with regard to plugins so key information is in a human- and machine-readable format. This helps when people look back to your notes after you've left the lab.
- Prerequisites:
- a
GitHubaccount - (for Tisza Lab members) membership to the
tiszalabGitHub organization GitHub DesktopinstalledObsidianinstalled
- a
- On a web browser, "Use this template" to fork this repo, i.e.
tiszalab/obs_lab_notes_frame
- Make a new private repo within your lab's organization (
tiszalabfor Tisza Lab members) named{Last}{First}_noteswhere {Last} is your last name and {First} is your first name
- On
GitHub Desktop, go to the top menu, left side, click "Add" button, click "Clone Repository". Select the repo you just created and "Clone"
- Open the
ObsidianApp. Then, open folder as vault, choosing the directory/repo you just cloned.
- After "trusting" the document, you should arrive at your
Lab Notes Homepage
Go to Settings -> Community Plugins. Search for plugins.
- Tasks <- Most essential plugin
- Advanced Tables
- Calendar
- Dataview
- Homepage
To get a feel for Obsidian as a lab notebook, let's talk about some concepts: Properties, Document Types (doc-type), Templates, Links, and Tags.
-
Propertiesare features that can be added to anote. These could be anything, but we want to use some standard things likedoc-type,date, andstatus, to organize our notes, increase searchability, and "export our brain" to some extent. Properties are inYAMLformat and appear at the top of notes. -
doc-typesincludeanalysis,experiment,project,kanban,meeting notes,project,report, andprotocol. Each time one of these notes is created, import the appropriate template (shown below) to add all the properties and sections it needs. Some templates, likeprotocolcan be added within anexperimentnote. -
Templatesare really justnoteobjects, but they are barebones outlines, with appropriate properties and sections. They can be imported into regularnoteobjects in your lab notebook. They must live intemplates/ -
Linkscan connect any notes together, just type [[note name]], "note name" between double square brackets -
Tagsare just words with hashtags, e.g. #tiszalab that you can label notes, tasks, tables, etc. This can be a quick way to associate notes/projects/ideas. -
I find this tutorial very useful for understanding
Obsidianand markdown
- From the
Lab Notes Homepage, click the linkdaily_notes/{YYYY-MM-DD}to create a daily note.daily noteis a lab-standardizeddoc-type, which means you should insert aTemplatefor every instance (new lab note). This allows us to organize, search and understand all of the data we collect.
- Bring up the
Command Palette, typingcommand + p, start typing "template", click "Templates: Insert template". Then find the daily notes template
- You'll see you've added some properties and sections, like
To-Dotask list. Add a random task or two, make them due today
-
Bring up the
Command Palette, typingcommand + p, start typing "task", click "Tasks: Create or edit task". -
After creating a task, typing "Enter" will bring up a new task line below
-
If you made a task with today as a due date, you'll see that "Tasks due this week" has now been populated.

-
Now create a new project (check out the fake
proj1to see an example) by making a new directory withinprojects/directory called{projectname}. Then make a newnotein this directory called{projectname} Landing Page. Import theproject templateand set up the project properties, etc.
-
OPTIONAL Make a Kanban board by creating a new
notein the project directory, importingkanban template, updating the properties, and then clicking on the "three dots" in the top right corner and Open as kanban board.
- GitHub Projects are how the lab keeps track of all the experiments, chores, and miscellaneous action items of a project.
- Some people find Kanban boards useful for their subproject personal planning

- Make a new
experiment, by creating a new directoryexperiments/within your project, and make a note there. Importexperiment template, update the properties. With your cursor in the Actions Section, importgeneric protocol template. Notice additional properties are also populated at the top. - At this point, you can probably delete the "fake" notes that came with this framework, like
proj1/
This system is not appropriate for "live" syncing or for multiple people co-editing a document in a vault simultaneously. The idea is to work locally and back up to GitHub frequently (at least daily)
- Open
GitHub Desktop, navigate to your notes' repo. Type a quick summary of your updated notes (a short sentence), then click "Commit to Main". That's it.
You can clone, update, change your vault on another computer the same way.
Now you are on your way!
Between obsidian.rocks and the Obsidian forum, you'll figure out most of what you need. this tutorial is great for markdown syntax. Here are some things I think may be useful.
There is more information about electronic lab notebooks and notetaking in the private Tisza Lab Onboarding Document. Use GitHub Desktop to clone the repository TiszaLab_Documents from tiszalab and open this repo as an Obsidian Vault. the latest doc can be found in onboarding/
Try to create or move notes to a sensible directory (probably sorted by project).
Any new templates have to go in templates/ or they won't be discoverable as templates.
Any random thoughts, notes, or documents that don't quite fit anywhere can go in sandbox/
Try to keep the base directory relatively clear.
This system is for notes, small/medium tables and images. This is not a data storage system. When in doubt, link a file from OneDrive/DropBox, etc.
Large files and images can be put in a OneDrive directory, then you can generate a link and paste it in your note
Bits and chunks of code/commands can and should be pasted into your notes. More fleshed out analyses, pipelines or tools should get their own GitHub repo, which can be linked to in your notes
For almost everything, to paste, use
shift + command + v
Use Pandoc. It should be installed just from the files in this repo/vault. If not, you can search on Community Plugins.
pandoc installation troubleshooting
Use the Command Palette, search "Pandoc",
Use the command line tool markitdown here. Some manual post-conversion refiguring may be required.
To preview another note, type: ![[]], with your note name inside the double brackets.
ex: ![[2024-09-05]]
You can preview just one section by appending "#" then the header name.
ex: ![[2024-09-05#To-Do]]
The plugins Tasks, Dataview, query, and Charts all bring functional code blocks, using triple back-ticks followed by the plugin name. These are like pseudocode allowing you to find/filter/display various objects in your vault.
Ex: using datatable
LIST
from "templates/protocols"
This is something with a bit of a learning curve, so refer to the plugin online documentation. However, it can really improve the organization of ideas, so I recommend learning the basics.
check out the example protocol here to get a sense of how nice these can look.
You can also add images and inline calculators if you wish.
These don't run code but make code you write and paste in look nice
R
sum_dt <- big_dt %>%
group_by(species) %>%
summarize(avg = mean(height),
growl = "grrr")Python
def minimap2_sr(reference: str, read1: str, read2:
str, cpus: str):
#raw_sam = open(rawsam_file, 'a')
# First command-line
mini2_command = ['minimap2', '-t', cpus,
'-ax', 'sr',
'--secondary=yes',
'--sam-hit-only',
'-f', '100000',
'-N' '150',
'-p', '0.98',
reference, read1, read2]
# Launch first process
with subprocess.Popen(
mini2_command,
stdout=subprocess.PIPE,
#stderr=STDOUT
) as mini2_proc:
fd_child = mini2_proc.stdout.fileno()
# read minimap2 output with pysam
filter_records = []
with pysam.AlignmentFile(fd_child, 'r') as ministream:
for record in ministream:
readLength: int=record.infer_read_length()
alignLength: int=record.query_alignment_length
# NM flag reports "edit distance" between read and ref
try:
alignEdit: int=dict(record.get_tags(with_value_type=False)).get('NM')
except:
alignEdit: int=0
try:
alignProp: float=alignLength/readLength
except:
alignProp: float=0
try:
alignAcc: float=(alignLength-alignEdit)/alignLength
except:
alignAcc: float=0
if alignProp >= 0.9 and alignAcc >= 0.8 and alignLength >= 100:
filter_records.append([
record.query_name,
record.reference_name,
readLength,
alignProp,
alignLength,
alignAcc
]
)
filter_df = pd.DataFrame(filter_records,
columns=['qname', 'rname',
'read_length', 'aln_prop',
'aln_len', 'aln_acc'])
return filter_dfbash
for FROG in $LOG ; do echo $FROG ; done