https://github.com/broadinstitute/flipbook
A tool that lets you quickly flip through images in a local directory and record notes or answer questions about each one.
Science Score: 39.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 1 DOI reference(s) in README -
○Academic publication links
-
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (17.0%) to scientific vocabulary
Repository
A tool that lets you quickly flip through images in a local directory and record notes or answer questions about each one.
Basic Info
Statistics
- Stars: 20
- Watchers: 3
- Forks: 0
- Open Issues: 2
- Releases: 0
Metadata Files
README.md
FlipBook
This tool provides a simple user interface for quickly flipping through images stored in some directory on your computer. It also optionally shows a form where you can take notes or answer questions about each image or set of images.
Example uses:
- manual curation / review of sequencing data visualization images such as those generated by REViewer for short tandem repeat loci
- machine learning training set creation
- reviewing a pile of photos
Features:
- simple way to flip through many local image files using your web browser
- crawls a top-level directory to find .png, .jpeg, or .svg image files
- browser interface: home page lists all images
- browser interface: image pages show the image, an optional customizable form where you can take notes or answer questions about the image, next/previous page links, and optional other customizable info for context
- use subdirectories to group images. Any images found in the same subdirectory will be shown on the same page
- optionally generate a static html website to share your images and form responses publicly. Example @ https://broadinstitute.github.io/StrPileups/index.html
Install:
python3 -m pip install flipbook
Run:
python3 -m flipbook # start server for all images in the current directory and subdirectories
Below are more example command lines. Run with --help to see all available options and their descriptions.
``` python3 -m flipbook -x temp -x keyword2 /path/dir-with-images # -x are keyword(s) of paths to skip and /path/dir-with-images is the top level dir to search instead of the current dir
python3 -m flipbook -t /path/userresponses.xls # change where user responses get saved (default: flipbookform_responses.tsv)
python3 -m flipbook -m /path/metadata.tsv # provide a metadata table ```
After the server is running, open your web browser to http://localhost:8080 to start reviewing images.
Screenshots
Image page:

Home page:

These pages are also available on the StrPileups website, a GitHub Pages site that was generated by running
python3 -m flipbook --generate-static-website
Options:
- metadata table (
-m)
It's often useful to add extra info to the image pages to help with review - such as image descriptions, quality scores, etc.
To enable this, there are several ways to specify arbitrary key-value pairs to add to specific image pages.
The 1st way is to put a file called flipbook_metadata.json next to the image(s). All keys and values from this file
will appear on that image page. The 2nd way is to use -m to pass in a metadata table
(.tsv or .xls) with a Path column + arbitrary other columns. If the Path value matches the relative directory containing
the image(s), entries from that row will be added to this image page.
Since the keys and values are treated as html, they can be used to add more complex info - such as
colors, text formatting, tags with images from other web pages, iframes containing entire sections of external pages, etc.
- responses table (
-t)
As you fill in the forms at the top of the image pages, the responses are written to this table. If you later restart flipbook with the same -t, it will reload previous responses. You can also optionally use this table to provide additional columns to display - sometimes this can be more convenient than using -m.
Default: flipbook_form_responses.tsv
- custom form schema (
--form-schema-json)
If you'd like to use non-default questions in the image page forms, you can specify the path or url of a .json file containing a custom form schema. For a description and examples of the expected format see main/formschemaexamples.
- config file (
~/.flipbook_config)
Most settings that can be provided on the command line can also be set via this YAML config file instead. For example:
~/.flipbook_config
form-schema-json: /path/to/my-schema.json
hide-metadata-on-home-page: true
host: 127.0.0.1
port: 8080
For the full list of command-line options, run:
python3 -m flipbook --help
Comparing reviews:
If 2 or more people review the same images, the reviews can be compared using the compare_form_response_tables script.
For example:
python3 -m compare_form_response_tables egor_flipbook_form_responses.tsv ben_flipbook_form_responses.tsv -o combined_responses.tsv -s1 egor -s2 ben
This script will print concordance stats, and output a combined_responses.tsv table that contains one image per row as well as each person's review of the image.
To see the full list of args and descriptions, run python3 -m compare_form_response_tables --help
Development:
To create a local dev instance, run
``` git clone git@github.com:broadinstitute/flipbook.git cd flipbook
start server in dev mode so it reloads code on change
python3 -m flipbook /path/dir-with-images --dev-mode ```
Citation:
If you would like to cite FlipBook in your publication, please cite:
Dolzhenko E, Weisburd B, Ibañez K, Rajan-Babu IS, Anyansi C, Bennett MF, Billingsley K, Carroll A, Clamons S, Danzi MC, Deshpande V, Ding J, Fazal S, Halman A, Jadhav B, Qiu Y, Richmond PA, Saunders CT, Scheffler K, van Vugt JJFA, Zwamborn RRAJ; Genomics England Research Consortium; Chong SS, Friedman JM, Tucci A, Rehm HL, Eberle MA. REViewer: haplotype-resolved visualization of read alignments in and around tandem repeats. Genome Med. 2022 Aug 11;14(1):84. doi: 10.1186/s13073-022-01085-z. PMID: 35948990; PMCID: PMC9367089.
Owner
- Name: Broad Institute
- Login: broadinstitute
- Kind: organization
- Location: Cambridge, MA
- Website: http://www.broadinstitute.org/
- Twitter: broadinstitute
- Repositories: 1,083
- Profile: https://github.com/broadinstitute
Broad Institute of MIT and Harvard
GitHub Events
Total
- Watch event: 1
- Push event: 1
Last Year
- Watch event: 1
- Push event: 1
Committers
Last synced: over 3 years ago
All Time
- Total Commits: 151
- Total Committers: 3
- Avg Commits per committer: 50.333
- Development Distribution Score (DDS): 0.464
Top Committers
| Name | Commits | |
|---|---|---|
| bw2 | w****d@b****g | 81 |
| bw2 | b****2@u****m | 66 |
| bw2 | b****d@g****m | 4 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 11 months ago
All Time
- Total issues: 6
- Total pull requests: 0
- Average time to close issues: about 1 month
- Average time to close pull requests: N/A
- Total issue authors: 4
- Total pull request authors: 0
- Average comments per issue: 2.0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 1
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 1
- Pull request authors: 0
- Average comments per issue: 0.0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- bw2 (3)
- JokevanVugt (1)
- sclamons (1)
- Dylan-e (1)
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- pypi 102 last-month
- Total dependent packages: 0
- Total dependent repositories: 1
- Total versions: 22
- Total maintainers: 1
pypi.org: flipbook
Starts a simple image server that lets you quickly flip through image files from a local directory using your web browser and optionally answering customizable questions about each one
- Homepage: https://github.com/broadinstitute/flipbook
- Documentation: https://flipbook.readthedocs.io/
- License: MIT
-
Latest release: 1.2.2
published about 2 years ago
Rankings
Maintainers (1)
Dependencies
- configargparse *
- flask *
- flask-cors *
- gunicorn *
- jinja2 *
- openpyxl *
- pandas *
- requests *
- wcmatch *
- xlrd *
- xlwt *