How I Learned to Stop Worrying and Love the Shell

Every now and then, I am faced with a problem that I have not faced before and I set out to try to solve it using Bash, preferably as a one-liner. Often, it's more about genomics tools. This page chronicles the tasks I've faced and the code that I wrote to solve them. Some may be short, while some may deserve a longer piece, but all of them helped me learn some new things, and I hope you do too. As I write these, I know that some of them might have more elegant or faster solutions. If you think you know one, let me know!

#3. Filtering BAM reads based on variant alleles at position

#2. Exact duplicate (not PCR duplicate!) reads in BAM files

#1. Converting subsets of a BAM to FASTA/FASTQ using samtools

Advent of Code 2023 - I'm being AdventuRust!

I've been meaning to get into Rust and THIS. IS. IT. I'll be attempting to solve the problems from this year's Advent of Code in Rust, with the hope that a practical exposure to the language would help get better at it. Rust has a lot of pros that have been documented many times by many people - this and this are some examples. Given my full time workload as a grad student, my goal was to make it to a week of Advent, and anything beyond that is a bonus. I have been coding in Python since I thirteen - more than half of my life - back when print "Hello World" was just as valid as print("Hello World"). As a result, Rust did feel a bit strange but it's been fun. I'd set a target of completing at least one week of Advent and I've already gotten past that so I'm well chuffed with my progress so far. I decided to stop at Day 16 as I got busy with my travels but it has been a great learning experience. Since my main goal was to learn the language rather than make the leaderboard or come up with super low execution times, i often opted for brute force solutions where I could have used dynamic programming. I think maybe that's something to aim for in next year's edition! Check out my solutions for each of the days below.

Day 1: Trebuchet?!

Day 2: Cube Conundrum

Day 3: Gear Ratios

Day 4: Scratchcards

Day 5: If You Give A Seed A Fertilizer

Day 6: Wait For It

Day 7: Camel Cards

Day 8: Haunted Wasteland

Day 9: Mirage Maintenance

Day 10: Pipe Maze

Day 11: Cosmic Expansion

Day 12: Hot Springs

Day 13: Point of Incidence

Day 14: Parabolic Reflector Dish

Day 15: Lens Library

Day 16: The Floor Will Be Lava