Generating list of known fusions for Arriba from COSMIC
I managed to solve this with a one-liner:

grep -v 'Sample ID' CosmicFusionExport.tsv | cut -f 12 | grep -v -e '^$' | perl -lne '/^(\S+?)\{\S+\d+}\S+_(\S+?)\{/; print "$1\t$2"' | sort -u &gt; CosmicFusionList.tsv 


The various parts of the piped command are as follows:


Remove header:grep -v 'Sample ID' CosmicFusionExport.tsv |
Extract 12th field (Translocation Name):cut -f 12 |
Remove blank entries:grep -v -e '^$' |
Extract gene symbols from 12th column:perl -lne '/^(\S+?)\{\S+\d+}\S+_(\S+?)\{/; print "$1\t$2"' |
Remove duplicate lines:sort -u &gt; CosmicFusionList.tsv
Optionally the final two stages could be:sort -u | gzip -c &gt; CosmicFusionList.tsv.gz to make use of file compression (for what it's worth on a 3.9 kB file)


Since the authors of arriba have neglected to document this necessary data munging step, I've posted it here in Q and A format in the hope that it will be useful to others, and other solutions can be proposed.