Wing Ki (Catherine) Wong

PhD in Bioinformatics, Scientist in Antibody Development

Simple Search Algorithms

Over the break, I was looking at competitive coding and had a proper look at different types of algorithms. I was presented with a task to find the shortest path to traverse a graph – a classical algorithmic problem that is surprisingly common in both Computational Chemistry and Biology. In this blog post, I am attempting to explain to my future self how to do these searches using efficient algorithms.

Continue reading

Parallel in native bash

N=5
num_jobs="\j"
for F in ./*.txt
do
  	if [ -f ${F%.txt}.csv ]; then
                continue
        fi
	while (( ${num_jobs@P} >= N )); do
        wait -n
   done
       	echo ${F%.pip}.ht
        ../main.o -i ${F} -o ${F%.txt}.csv &
done

Optimising Pandas usage

Take home: use numpy instead of pandas if you have numerous calculations.

 

Source: https://engineering.upside.com/a-beginners-guide-to-optimizing-pandas-code-for-speed-c09ef2c6a4d6