Loads of pain converting simulation output (ppm and TIF) time series into a movie format that a journal likes has led me to start this page. Heres a list of standard ffmpeg (Mac OSX 10.12.3, Terminal) tools used on Terminal with standard tools. You might need to install some of them if you are on some flavour of Linux (or not).

Combining movies and adding text to them

For a recent paper we had to concatenate few movies and add text to them. These are the commands that worked for me:

  1. Combining 3 movies horizontally:
    ffmpeg -i MovieS2A-sm.mov -i MovieS2B-sm.mov -i MovieS2C-sm.mov -filter_complex hstack=inputs=3 MovieS2ABC.mov
    For vertical replace hstack with vstack.
    Inputs=3 indicates the number of input files
  2. Finding the file size using VLC: SIZE 1440×482 (pixels)
  3. Adding a text legend to them in sequence
    ffmpeg -i MovieS2ABC.mov -vf "drawtext=text='A':x=10:y=10:fontsize=24:fontcolor=black" -c:a copy MovieS2ABC-Atxt.mov
    ffmpeg -i MovieS2ABC-Atxt.mov -vf "drawtext=text='B':x=490:y=10:fontsize=24:fontcolor=black" -c:a copy MovieS2ABC-Btxt.mov
    ffmpeg -i MovieS2ABC-Btxt.mov -vf "drawtext=text='C':x=970:y=10:fontsize=24:fontcolor=black" -c:a copy MovieS2ABC-Ctxt.mov

Fin! Samapt! Submit!

Installing FFMPEG

Caveat: I’m using a MAC OSX 10.12.5 (Sierra) with Xcode and multiple gnu developer tools installed using Mac Ports.

1) Convert .avi files to MAC readable (not just VLC) .mp4 files:

ffmpeg.exe -i %d.png -f mp4 -vcodec libx264 -pix_fmt yuv420p test.mp4

The .png file could be an input .avi file (in which case drop %d.png for your file series)

Convert to MOV using QuickTime->Export.

2) Convert pre-existing movie files in Quicktime .mov format to uncompressed AVI or even MAC compatible .mov

ffmpeg -i terasaki.mov -vcodec rawvideo -y terasaki.avi

I recently needed this to make Supplementary Materials files ImageJ readable and neeed UNCOMPRESSED avi files (all compression codecs seemed to trip up ImageJ). The output looks like this:

ffmpeg version 1.2.1 Copyright (c) 2000-2013 the FFmpeg developers
built on Jun 12 2013 13:46:16 with Apple clang version 4.1 (tags/Apple/clang-421.11.66) (based on LLVM 3.1svn)
configuration: --prefix=/opt/local --enable-swscale --enable-avfilter --enable-libmp3lame --enable-libvorbis --enable-libopus --enable-libtheora --enable-libschroedinger --enable-libopenjpeg --enable-libmodplug --enable-libvpx --enable-libspeex --enable-libass --enable-libbluray --enable-gnutls --enable-libfreetype --mandir=/opt/local/share/man --enable-shared --enable-pthreads --cc=/usr/bin/clang --arch=x86_64 --enable-yasm --enable-gpl --enable-postproc --enable-libx264 --enable-libxvid
libavutil      52. 18.100 / 52. 18.100
libavcodec     54. 92.100 / 54. 92.100
libavformat    54. 63.104 / 54. 63.104
libavdevice    54.  3.103 / 54.  3.103
libavfilter     3. 42.103 /  3. 42.103
libswscale      2.  2.100 /  2.  2.100
libswresample   0. 17.102 /  0. 17.102
libpostproc    52.  2.100 / 52.  2.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'terasaki-mk0780641002.mov':
major_brand     : qt
minor_version   : 0
compatible_brands: qt
creation_time   : 2017-06-19 06:11:05
encoder         : Mac OS X v? (AVF 1046.9.12, CM 1731.15.207, x86_64)
encoder-eng     : Mac OS X v? (AVF 1046.9.12, CM 1731.15.207, x86_64)
Duration: 00:00:04.67, start: 0.000000, bitrate: 926 kb/s
Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 370x220 [SAR 1:1 DAR 37:22], 924 kb/s, 6 fps, 6 tbr, 60 tbn, 120 tbc
creation_time   : 2017-06-19 06:11:05
handler_name    : Core Media Data Handler
Output #0, avi, to 'terasaki-mk0780641002.avi':
major_brand     : qt
minor_version   : 0
compatible_brands: qt
encoder-eng     : Mac OS X v? (AVF 1046.9.12, CM 1731.15.207, x86_64)
ISFT            : Lavf54.63.104
Stream #0:0(eng): Video: rawvideo (I420 / 0x30323449), yuv420p, 370x220 [SAR 1:1 DAR 37:22], q=2-31, 200 kb/s, 6 tbn, 6 tbc
creation_time   : 2017-06-19 06:11:05
handler_name    : Core Media Data Handler
Stream mapping:
Stream #0:0 -> #0:0 (h264 -> rawvideo)
Press [q] to stop, [?] for help
frame=   28 fps=0.0 q=0.0 Lsize=    3345kB time=00:00:04.66 bitrate=5871.8kbits/s
video:3339kB audio:0kB subtitle:0 global headers:0kB muxing overhead 0.188078%

For the mac OSX compatible movie files (quicktime playable), a small conversion with decocer fix:

>>ffmpeg -i videoS2.mov -pix_fmt yuv420p videoS2-v3.mov

Falls under the entry Encodingfordumbplayers


1) Stackoverflow: http://stackoverflow.com/questions/14430593/encoding-a-readable-movie-by-quicktime-using-ffmpeg

2) FFMPEG User-List http://www.ffmpeg-archive.org/Uncompressed-AVI-to-Uncompressed-Quicktime-td941357.html

3) https://trac.ffmpeg.org/wiki/Encode/H.264#Encodingfordumbplayers

Advice on asking me for recommendation letters


Since I have had to clarify this on numerous occasions to multiple people who’ve passed through my lab, this is a convenient place to put all these thoughts in one place. Also acknowledgement to the legendary John Eisen (of metagenomics fame) and his blog-post on exactly this topic.

1) Please email me your request atleast 1 week before your deadline to have sent it.

2) I need to see an updated CV (or resume) so that my facts about you are accurate.

3) Mention from when to when you have worked with me, if you are no longer in my lab. If you are still in my lab, please still mention your start date. You should add a brief summary what you did in that period (or are doing).

4) Please clarify what is the name/title and nature of the position that you are applying for. Specify the potential role you will play in it, if you were hired/recruited/placed. If a statement of purpose (SOP) is associated with it, please share the gist (summary) of it.

5) Provide all information I will need. For a brief moment, put yourself in my shoes. To be able to send the letter, you need to assist me- i.e.

  • If it’s by email then provide me the address.
  • If it’s as a hard copy then provide me the address of the recepient and whatever title-details are required.
  • Often these letters need to be in certain formats. Please send me this. In short, make my work simpler, so I can help you more effectively.
  • If the agency/organization/university has an online portal, please provide my name and email address ONLY AFTER you have taken my approval.

6) Providing a letter of recommendation is part of my job. It will be a recommendation and an honest assessment.

7) Your work with me or interactions in my class, depending on whether you worked with me or took my courses, will determine the nature of what I write. Think of it as कर्म

8 ) Should you choose to ask for letters from phd-student/technicians/project assistants/postdocs in the lab, please find out from the agency that has requested them what criteria they use for determining the appropriateness of the letter. Typically for academic/research positions a supervisory role is required, but not essential for obtaining recommendations.

9) Please do not add me as a referee without asking me first.


  • 19-12-2016: Anushree, Kunalika and Manasi’s combined efforts are published in PLOS ONE. A good combination of experiments and computation.
  • 13-12-2016: The lab travels to the MMSYMP: Computational and Experimental Studies of Microtubules and Motors at IIT Bombay, Powai, Mumbai.
  • 21-22 May 2016: Advances in mathematical and computational biology (AMCB) at IIT-Ropar: Instructional school organi

    Logo of IIT Ropar

    IIT Ropar

    zed by the Mohali node of NNMCB (National Network on Mathematical and Computational Biology)- a DST initiative to enhancetraining in math-comp biology. I will be speaking. Visting ਪੰਜਾਬ ਦੇ for science- a first- IIT-Ropar, Punjab

  • The iGEM (international genetically engineered machines) contest for 2016 is accepting PI registrations! Let the games begin!
  • #Biophysics Week called by the Biophysical Society of USA 7-11 March! And some amazing biophysics in the dispersal of fern spores, providing an understanding and inspiration for bio-mimetics.

    A report from the Royal Society Interface 2016 by Llorens et al.

    A report from the Royal Society Interface 2016 by Llorens et al.

  • Reproducibility of measurements in synthetic biology- the 2014-15 iGEM InterLab study involved measurements of fluorescence from promoters distributed to multiple labs have been collated and published in PlosOne. The results suggest measurement methodology is a bigger cause of variation between results from lab-to-lab as compared to the construct themselves. And the IISER Pune team is part of the consortium acknowledged in the paper!
  • Summer-Internship with the most exciting thing in neurobiology DIY since Luigi Galvani’s frog. http://blog.backyardbrains.com/

    Cockroach circadian circuit. http://blog.backyardbrains.com/2015/08/the-roach-race-cockroaches-on-wheels-to-study-circadian-rhythms/

    Cockroach circuit

  • The global availability of scientists and engineers from the World Economic Forum and plotted using Google’s DataViewer
  • 27-30 Dec 2015: the National Meeting on Mathematical and Computational Biology organized by the Pune node.
  • 2015 nobel prize for medicine and physiology- to some

By Jupyter


The Romans are under attack. "By Jupiter"

First steps in installing Jupyter on my Mac OSX 10.12.6 Sierra

  • Getting the Xcode command line tools
  • Install MacPorts https://www.macports.org
  • Install Python 3.5 >>sudo port install python35
  • Install PIP from their site using a curl script to get the most updated version https://pip.pypa.io/en/latest/installing/
  • If you got to this stage then pip should allow Jupiter to be installed. Not yet there.

Post-publication review and PLOS’ experiment with the Synthetic Biology Collection


An inducible luxI system (iptg) to produce the AHL above a threshold Pt. Kadam et al. (2016)

The iGEM 2015 synthetic biology contest was an important one for us. It marked our first attempt at putting together a project from IISER Pune. But beyond the novelty for us, many things were different this time around (#igem2015). First off, no preliminary or elimination rounds.

Secondly, we (yes, some self-backpatting here) organized an India Meetup in the run-up to the Jamboree. And third, and interestingly, the journal PLOS One (Public Library of Science) decided to use this as an opportunity to launch the PLOS iGEM collection, as a sort of meta-list, connected to iGEM. They decided to also go the radical way- with post-publication review. Time will tell how this latter experiment works out. And naturally our team’s efforts are there. With a lot of hard work put in by Snehal Kadam well after the contest and some griding-the-article together by mining long-forgotten (1 year ago!) protocol books, and some frantic emailing and interviewing, we managed to pull it off. You can read it here “Mycobacterium Revelio: Characterizing and Modeling Genetic Circuit Components towards a Bacterial Detection Tool”. The first 10 authors are BS-MS undergraduate students. Manasi and Neha are PhD students.

Ethics in Science


A superficial reading of popular media on science plagiarism, doctored results, falsification, backstabbing, sabotage appear to suggest that these have spilt over only recently from other hyper-competitive professions. But appearances are deceptive. This (as with many other human traits) has been around since we began to think.

Here I will attempt to bring together scientific ethics, ideas about ethical scientific practise and the positive side of all the noise about bad-science. In the interim, a few links.

  • Clearly a strategy of naming and shaming- Beall’s list makes for an interesting read. Many of those with some years in scientific research will vouch for the increase in emails claiming yet another OpenAccess journal to “submit your new research findings” to. This certainly seems to address (in a Rambo-esque manner- one man army) the question about the (sometimes more than apparent) questionable quality of the journals. Many you will find have indian-sounding names- because they are based in India. This together with Mr. Aly’s interview is a fascinating read about the rise of dubious journals and the economics of it. Naturally when ~1000 articles are published in our field every month, we often don’t have the time to check on this, so Dr. Beall does a useful job. But more such Bealls are needed to get a global perspective on this.
  • The article that appeared in Nature “Investigating journals: The dark side of publishing” (Mar 2013) can be read here [pdf] (for those of who can’t get beyond the paywall). The irony being ofcourse that it appears the critique of OpenAccess is strongest amongst journals which don’t practise it. However all is not lost, there is a “Critical Analysis of Scholarly OpenAccess Publishing” blog which has a number of criteria which could be used to define predatory-publishing:  checklist if you like.
  • Science in the time of predatory publishing (Gracias Senor Gabriel Garcia-Marquez): Interview with a journal editor Mr. Aly from Egypt or Belgium, a former emloyee of Hindawi Publishing, India (!) which leaves lots to one’s imagination. Predatory publishing or simply bad scientific-publishing? You make up your mind.


While ringing in the new year (anno domini, i.e. current era (CE) 2014) there has been a huge storm kicked up in the science publishing and science ‘generating’ communities. For long seen as one and the same (with editors and all reviewers doing work pro-bono, i.e. for no or token fees), the professionalization and possible expansion of scientific publication has some feel led to a chasm between the two communities.

I am ofcourse referring to the ‘sting’ by a member of the editorial staff of the journal Science (John Bohannon) and the counters by Mike Eisen and a bigger followup by Randy Schenkman. A nice review of similar stings in the past (submitting fake papers to journals and seeing them accepted, to demonstrate the flaws in the review system) highlights the efforts by Bohannon aren’t new. However the internet with its reach and speed, allow data to be gathered globally and surveyed somewhat quantitatively- as seen in this info-graphic from http://scicomm.scimagdev.org/

posted under Blog, Commentaries, Ethics in science, scientific_writing | Comments Off