Plotting · Coding · Python

Inferring the gender based on exome sequencing

So today I came across the annoying issue that someone had not bothered to document the gender of samples, even when we generated exome sequencing data of those. So I wrote a script to figure this out based on coverage on the X and Y chromosomes, but not in the pseudoautosomal regions. The script can… Continue reading Inferring the gender based on exome sequencing

Coding · Python

Random password generator in Python with custom keyboard shortcut

I use different, randomly generated passwords for all my accounts. I have used a website to generate those before, but today I wrote a small script to handle this job. The main idea is based on this StackOverflow question, which I adapted and extended to suit my needs. It’s probably not completely cryptographically safe as pointed out by… Continue reading Random password generator in Python with custom keyboard shortcut

Python

Resizing and combining multiple svg images

This post discusses a similar problem to my previous post on combining png images but this time the images are in the svg format. Svg (Scalable Vector Graphics) defines images in XML format and has the advantage that zooming is possible since it’s a vectorized format, and editing e.g. the size of text is still possible. I based… Continue reading Resizing and combining multiple svg images

Python

Resizing and combining multiple png images

I wanted to combine multiple images to one figure and add letter annotations for the figure legend. I wanted to do this in Python, of course, and below is what I came up with. Some of it is hardcoded since it obviously depends on the size and preferred combination of your images. I will combine 6 png… Continue reading Resizing and combining multiple png images

Coding · Plotting · Python

Altmetric scores for bioRxiv preprints, part 2

This post is part of the series starring altmetric attention scores and bioRxiv preprints, see also the earlier post about my Twitter bot, getting the altmetric scores and part 1 of the analysis. Today I’ll have a look at the top 10% altmetric scores and how fast the preprint got that score. These are the articles… Continue reading Altmetric scores for bioRxiv preprints, part 2

Plotting · Python

Altmetric scores for bioRxiv preprints, part 1

This post is following my earlier posts about my Twitter bot for interesting preprints and how to get altmetric scores for all bioRxiv preprints. In this post, I want to take a first look at the obtained data. I’ll do this using the Python pandas module. When working with pandas DataFrames interactively it’s convenient to… Continue reading Altmetric scores for bioRxiv preprints, part 1