, 26 tweets, 10 min read
My Authors
Read all threads
I think most biologists would benefit from learning to code. Learning programming languages gives your brain a new way to think and is deeply satisfying (for me and probably you, too). I've collected my favorite resources for image analysis in python below #womenwhocode #python
(Quick plug: if you're intrigued about image analysis and coding and will be at #ASCBEMBO19, visit my poster at board B18 on Tuesday 12/10 from 1:30 PM - 3:00 PM, where I'll share my approach to analyze single molecule RNA data in three dimensional space!)
I approach "how to get started?" with the perspective of a self taught programmer who had developed tools that are useful to answer biological questions we have in the @LabLerit
To be clear, I don’t have a formal background in computational biology, computer science, or data science. But I really love to program and want more biologists to learn. It can daunting to start, though, especially for the skilled perfectionists who abound in science
To begin, you need to understand how the beautiful images you capture on the microscope are stored in files. In the @LabLerit, we take lots of static 3D multichannel stacks that we store as tif files and look at using ImageJ.
The images we see are visual representations of an underlying matrix containing information about the intensity of detected light at each pixel. These pixels map to your microscope camera’s detection of photons for each given fluorescence channel
@NikonInst’s microscopyU has a super detailed article outlining how CCD cameras work to detect photons microscopyu.com/digital-imagin….

In general, when I have a question about microscope hardware, I go to @NikonInst microscopyU first microscopyu.com/popular-articl…
Ok, so you have images that are matrices of light intensity values. What next? I start by careful inspection of the images by eye. This approach reflects my background as an experimentalist. You’ve got to start by examining the raw images closely.
(There’s a role in image analysis for unbiased quantification to detect phenotypes not recognized by eye, but for the beginner I think it’s best to start with something you can see by eye)
Now you’ve detected a phenotype. Quantifying allows you to run statistical tests to estimate the reproducibility of your phenotype. Doing so reassures your audience that you've done replicates and chosen representative images rather than cherry picking dramatic images
What can you do with image analysis? To get started, I recommend this iBio seminar from @annecarpentor (@CellProfiler lead) and Kevin Eliceiri @UWMadisonLOCI (@FijiSc lead)
It's not strictly necessary, but experience analyzing your data using programs like @FijiSc and @CellProfiler helps you to understand what you can do with computers and images (and these do have macros / pipelines available to help automate tasks for reproducibility)
With powerful open-source tools like @CellProfiler and @FijiSc available, why write code to analyze your images? My answers: 1) reproducibility, 2) deeper understanding of the analysis, 3) easy to re-use (save time in theory), 4) gain skills that can pay the bills $$$!
Why choose python? 1) easy to learn, 2) popular with others, 3) many useful packages (pre-written code) available to help you analyze your data, 4) open source (no expensive licenses), 5) Jupyter notebooks are a nice way to get fast feedback on your code and intermediate results
Now, how do you actually get started? You need the python language installed, a variety of software packages for scientific processing, Jupyter notebook, and git
Managing your python language and package installation can be very messy! I highly recommend using conda to manage your environment. I learned the hard way, but this tutorial may save you some grief: kaust-vislab.github.io/python-novice-…
To get started using Jupyter notebooks, it helps to have a basic understanding of the python language. As a minimum, you'll want to know if statements, for loops, package installation, and functions.
My favorite python tutorial is the Google python class. It's fast, the instructor is funny, and there are useful exercises. Technically it's teaching an older version of the python language, but the differences are trivial. developers.google.com/edu/python
To get started using python to analyze images, I recommend this @embl image processing course. This course got me started analyzing my own data in Jupyter notebooks. There's a pre_tutorial available for those who are new to Jupyter: git.embl.de/grp-bio-it/pyt…
You'll almost certainly need to segment your images for your analysis. My favorite resource for this is the Allen Institute for Cell Science Cell Segmenter allencell.org/segmenter.html
These tools are probably enough to get you started on your analysis problem! You'll likely be segmenting images, extracting object information, and then storing the results via .csv files
If that becomes unmanageable, you may want to look into using a relational database. I use postgres to manage a database for each experiment that contains data about the images and the objects inside those images. postgresqltutorial.com/what-is-postgr…
Last, but definitely not least, version control software is relatively simple to get started using and worth the time. If you're an academic researcher, you can get an academic account with unlimited private repositories on github. atlassian.com/git/tutorials/…
As your project grows, you may find that you want to share your code with others. I'm currently at this step and using this book for guidance: merely-useful.github.io/rse/index.html
Finally, be sure to reach out and find local resources. Here at Emory, our imaging core @emoryici, data science club @datasci4sciATL, and local leaders like @nicholdav have been very helpful for me as I've learned
@emoryici @datasci4sciATL @nicholdav That was a lot of information, but don't forget that you can start small and build as you go. Give it a try!

And if you know of other useful resources for us biologists, please do share them below!
Missing some Tweet in this thread? You can try to force a refresh.

Enjoying this thread?

Keep Current with Pearl Ryder

Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

Twitter may remove this content at anytime, convert it as a PDF, save and print for later use!

Try unrolling a thread yourself!

how to unroll video

1) Follow Thread Reader App on Twitter so you can easily mention us!

2) Go to a Twitter thread (series of Tweets by the same owner) and mention us with a keyword "unroll" @threadreaderapp unroll

You can practice here first or read more on our help page!

Follow Us on Twitter!

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just three indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3.00/month or $30.00/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal Become our Patreon

Thank you for your support!