Saltar a contenido

Blog

Este blog pretende ser una colleción, ordenada temporalmente, de algunas de las ideas que, por algún motivo, circulan por mi cabeza. En otros tiempos este tipo de cosas las escribía en las redes sociales, pero el ruído acabó molestándome demasiado. Habrá entradas tanto en castellano como en inglés, así que, que nadie espere demasiado orden.

Population Delimitation Practice

I have developed a population genetics practice where students are tasked with delimiting genetic groups. They must do this by analyzing genetic structure alongside other variables, such as taxa and the country of origin.

The primary objective is to teach students that genetic structure alone is often insufficient for defining populations; context and additional biological data are essential.

The practice is a web application hosted on our laboratory’s static site and developed using marimo. There is quite a bit of "magic" happening under the hood to make this work seamlessly in the browser:

  • Pyodide: A Python interpreter compiled to WebAssembly, allowing the logic to run entirely client-side.

  • 3D Scatter Widget: A custom widget I developed using Python and TypeScript. This was my first serious foray into JavaScript/TypeScript, and I honestly couldn't have built it without the help of AI tools.

Reading A Conflict of Visions

I have just finished reading A Conflict of Visions by Thomas Sowell.

While I didn't love the writing style, I think the central premise is brilliant: underlying the politics and ideologies of different people is a specific vision of human nature.

  • The Unconstrained Vision: Some believe that humans can truly understand the complexities of how communities work. They argue that "advanced" individuals can mold society for the greater good.

  • The Constrained Vision: Others feel that societies are far too complex to be fully understood and that people are primarily driven by their own interests. In this view, trying to reshape society according to our own ideals often ends in disaster. Furthermore, because human beings have conflicting desires, no "ideal" solution can ever be found—only trade-offs and compromises.

While the first group evaluates outcomes and calls for intervention when results aren't "perfect," the second group simply aspires to maintain a social process that produces a "good enough" result.

Scatter 3D notebook widget

For the longest time I have needed a program to plot scatter plots in 3D with the ability of selecting points using a lasso tool. For instance, I needed to select some individuals in a plot showing genetic distances in order to know its geographical origin.

During a long time we used CurlyWhirly, but that software is not maintained anymore, then we moved to glue, but I always found that software a little too cumbersome for my taste. Many times I've looked for alternatives, but I found none.

Alas, I was resigned, but last december I heard about anywidget in the Talk Python Podcast, a library created to ease the development of marimo and jupyter notebook widgets. I have never programmed anything serious in Javascript, but I thought that maybe with the help of an AI tool and anywidget I could try to build a 3D scatterplot notebook widget to my liking, and I did it!

You can download the widget from its GitHub repository or from PyPI. We have already used it in our research on the history of the tomato.

Seminario sobre la historia del tomate

Hoy hablaré sobre la historia del tomate fuera de su región de origen, desde el siglo XVI hasta la actualidad. El seminario se hará en la sala de juntas del COMAV a las 15:00. Si alguien tiene curiosidad puede echar un ojo a las diapositivas.

Cartel seminario historia del tomate

uv seminar

uv seminar announcement

Today we will talk about uv, virtual environments, package dependencies, reproducibility and Python project management.

All the seminar materials can be found in its GitHub repository.

The seminar will be held in IBMCP at UPV at the Ricardo Flores room and is open for anybody interested in Python that is not yet familiar with uv.

Reading Bernoulli's fallacy

I have started reading Bernoull's fallacy by Aubrey Clayton.

It has some very nice ideas about bayesian and frequentists statistics, but so far I think that the philosophy behind bayesian statistics is much better explained in Scientific reasoning Reasoning: The Bayesian Approach by Colin Howson. Moreover, I think it really overstates the benefit that ditching frequentist statistics would do to science. In my opinion the scientific enterprise is something much more complex than just statistic reasoning. For instance, in genetics we use statistics, but the role of this kind of inference is somewhat secondary.

uv seminar

I have prepared a seminar about Python project management with uv. My idea is to teach it to PhD student's and scientists that are already using Python, but that are not yet aware of the modern tooling that could help them with reproducibility and package management.

The seminar will be held in IBMCP at UPV on the 18th of november and will be open for anybody interested.