BAM to CRAM

Last updated: 2024/12/04 TL;DR As pointed out by Colin, converting a BAM file to CRAM is simply one command: samtools view -T genome/chrX.fa -C -o eg/ERR188273_chrX.cram eg/ERR188273_chrX.bam Of note is that the reference file used to produce the BAM file is required and is used as an argument for the -T option. As for why…

Continue Reading

Calculating the h-index

Updated 2014 September 19th to include a method that does not require sorting. The h-index is an index that is calculated by measuring the number of articles, say $$n$$, that has at least $$n$$ citations. If you published 10 articles, and each of them had four citations, your h-index would be four, since there are…

Continue Reading

A transpose tool

Updated 2014 September 19th to compare different transpose tools I wrote a simple transpose tool, using Perl, for taking in tabular data and outputting a transposed version of the data. The primary motivation for writing this was because when viewing files with a lot of columns on the command-line, it becomes hard to match the…

Continue Reading