When our home inspector went through he mentioned to me that I should replace the existing rubber hoses on the washing machine with steel-reinforced ones. I wondered if washing machine hoses were specially prone to fail, perhaps something to do with the intermittent nature of the load (if you look at the hoses when the… Read More Washing machine hoses
I was given to believe that Python’s execfile statement simply executed all the commands in a file and continued on its way. This is not entirely true, at least in Python 2.7: imported modules seem not to be handled by the execfile statement, which seems to be rather odd to me. import numpydef gen(n=100): return… Read More execfile and imported modules
Since BAM files are the binary version of SAM files, which in turn stand for Sequence Alignment/Mapping, its a little strange to store unaligned data (the raw reads from the sequencer) in a BAM. However, as eloquently argued by others, the text based FASTQ format is showing its age and an indexed binary file is a… Read More Raw (unaligned), paired reads in a BAM file
As part of an exercise I’m doing I was supplied with a FASTQ file which contains a set of reads and I needed to figure out how to get a VCF file out. A what what now? Exactly. When we try to obtain the sequence of some DNA the big machine that we dump our DNA does… Read More SAM! BAM! VCF! What?
Originally posted on Ronald Duncan's Blog:
Unfortunately a quick google search on “ASCII Delimited Text” shows that IBM and Oracle failed to read the ASCII specification and both define ASCII Delimited Text as a CSV format. ASCII Delimited Text should use the record separators defined as ASCII 28-31. The most common formats are CSV…
I often write and use Python programs that require input parameters to tell them what to do. When there are a few parameters I usually pass them through the command line (my current favorite framework for command line argument parsing is the amazing docopt module). When there are many parameters, however, command line arguments can get… Read More Parameter files in Python for Python programs
Problem: You have a git hub repository with code in several folders. You want to move one of the sub folders into its own separate repository (for example, it was experimental code you were working on, which you now want to spin off into its own life) Solution: Use git subtree split as detailed here… Read More git subtree split
The latest version of PyCharm can run the pep8.py tool on your code to flag coding style violations on the fly. I thought this was cool, but it can be annoying sometimes. This is because pep8 consists of coding guidelines and some of them are a matter of taste. My personal quirk is that I… Read More Another reason to love PyCharm
This rant was triggered when I was going over the format for FASTQ files. This is a pure rant: I propose no good solutions for anything here. I’m not even angry – just bemused. I’m a novice, so there are probably good reasons for keeping ASCII files for raw data which I just don’t know about. First,… Read More Why do we use ASCII files in genomics?
The kitchen has an old Nutone vent hood. The fan didn’t spin as fast as it should and the fan blades looked rusty so I decided to replace the motor and blades. I found a replacement motor off Amazon (of all places) and found a metal fan of the exact same design off ebay. I… Read More Ghost in the wiring
I raved previously about docopt. Docopt can be finicky about how you write the docstring. Here are some tips: No empty line between “Usage:” and the first usage pattern. Usage: <—- Don't do thismutate snp [-r ] [-p ] No empty lines between usage patterns Usage:mutate snp [-r ] [-p ] <—- Don't do thismutate… Read More Docopt notes