Skip to content

Instantly share code, notes, and snippets.

View fomightez's full-sized avatar

Wayne's Bioinformatics Code Portal fomightez

View GitHub Profile
@fomightez
fomightez / realtime_vpython_matplotlib_combo.py
Last active November 4, 2016 13:44
code to paste into a cell of a notebook from VPython Binder to demonstrate realtime integration of matplotlib with VPython
%matplotlib notebook
# use `%matplotlib notebook` if you are using current JupyterLab
from vpython import *
import matplotlib.pyplot as plt
plt.style.use('ggplot')
# based on "AtomicSolid" by Bruce Sherwood
# adapted to include realtime matplotlib by Wayne Decatur
@fomightez
fomightez / a few references for data table conventions.md
Last active September 27, 2020 18:42
A few references for column and row conventions in data tables

A few references for column and row tidy data conventions in data tables and spreadsheets

from abstract of Data organization in spreadsheets. By Broman and Woo 2017. The American Statiscian >"Spreadsheets are widely used software tools for data entry, storage, analysis, and visualization. Focusing on the data entry and storage aspects, this paper offers practical recommendations for organizing spreadsheet data to reduce errors and ease later analyses. The basic principles are: be consistent, write dates like YYYY-MM-DD, don't leave any cells empty, put just one thing in a cell, organize the data as a single rectangle (with subjects as rows and variables as columns, and with a single header row), create a data dictionary, don't include calculations in the raw data files, don't use font color or highlighting as data, choose good names for things, make b

@fomightez
fomightez / some_resources.md
Last active August 22, 2019 10:08
Resources for documenting and publishing code with biological science

It seems you are asking about a few related things here. There is no short answer as some of this depends on your motivation, time, resources, skills, target audience, journal, etc. Plus a lot of the best practices are subjective or in flux.

I'd suggest looking at some of the resources below, find some direction and examples you find admirable, and see what you'd like to implement for this time. And what is possible for next time. Someone suggested using Jupyter notebooks which is great especially since you can now share live ones using Binder, see https://github.com/fomightez/methods_in_yeast_genetics/tree/master/cell_density_estimator for an example. Alternatively or as a companion site/documentation, I suggest using read the docs (https://readthedocs.org/) and Github for a making a step by step version that a biologist with limited computational skills could use it (or youself maybe a year from now) and then you can adapt that into a paper. That way you have a long version that the paper can refer read

@fomightez
fomightez / tmpnb_resources.md
Last active July 6, 2017 14:33
tmpnb_resources

tmpnb resources

images for another gist

See here for technical information relating to making and using this type of gist.

@fomightez
fomightez / Using current scripts on tmpnb.org with automated toggling off of VPython.md
Last active March 26, 2017 18:40
Using current scripts on tmpnb.org with automated toggling off of VPython

Scripts work the same as with VPython, just not as pretty. Falls back gracefully.

How to prepare to run

  • Open the script you wish to run in your favorite text editor. Wordpad on the Windows system or TextWrangler or TextEdit on the Mac system will work. Microsoft Word is best avoided. In this case, it may work for copying ad long as you don't try saving it.

  • Go to tmpnb.org or try.jupyter.org in your browser. A Jupyter dashboard page will come up after a moment and it will look similar to below.

tmpnb.org main page.png

@fomightez
fomightez / Resources for running code in cloud-based Jupyter notebooks in your browser.md
Last active July 6, 2017 15:28
Resources for running code in cloud-based Jupyter notebooks in your browser
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@fomightez
fomightez / domino_guide_resources.md
Last active July 6, 2017 16:40
domino_guide_resources

domino guide resources

images for another gist

See here for technical information relating to making and using this type of gist.

@fomightez
fomightez / using_scripts_on_domino.md
Last active July 6, 2017 16:42
Using current scripts on Domino Data Science Platform

Scripts will run with VPython on the full-featured Domino Data Science Platform.
You need to remember to conclude session to have generated files be saved to your account, plus stop the company from complaining in your email. All final results of each session are archived for easy retrieval.

How to prepare to run

  • Sign in to your Domino Data Lab account.
    Sirotkin lab accounts can sign in here. (Older accounts can sign in here.)

  • After login, your page will look like below.

@fomightez
fomightez / a_text_list_to_python.md
Last active August 16, 2022 20:42
Text list ===> Python-code list object

Text list ===> Python-code list object
Quick example of how to paste a list extracted from text elsewhere with each item on a separate line and convert it to a Python list easily. Good for small lists and eliminates need for separate file or for running running regex in editor to add commas and then format to Python-code list by hand.
You can get this entire thing as Python code in the raw gist.
This markdown renders nicely here or here.

STEP 1: Paste list as a docstring below first line and in front of ```.

list_as_string ='''
RF2