2. Example - Oshlack/Clinker GitHub Wiki

Give it a go!

So you've run through the through the installation and are itching to try Clinker. Follow along with the instructions below to generate your very own BCR:ABL1 fusion figure!

NOTE This example will take approximately 30 minutes to finish (FYI, that's quite quick). Please note that when you use your own, much larger data sets, that runtime can take 1-3 hours (mostly due to the alignment).

A BCR:ABL1 Example

Using Bpipe (preferred method)

Just use this... Then you can set and forget and parallelise samples... Plus it's so much easier... https://github.com/ssadedin/bpipe

  1. First you need to set yourself up an environment variable to let the system know where you actually installed Clinker. Easy! Simply navigate to the Clinker directory (the folder with fusion, plotit, resources etc.) and enter the following export CLINKERDIR=$PWD.

    This just associates the variable $CLINKERDIR with the path to clinker, i.e. if you type $CLINKERDIR into your command line, you will get /path/to/clinker/root/ as a result. Neat.

    For those with more experience working within Linux, you can also add this to your shell profile so you don't have to do this every time.

  2. You will find two .fastq files in $CLINKERDIR/test/fastq and a simple fusion caller output in `$CLINKERDIR/test/caller'. No need to do anything with these, just get a feel for the format and naming conventions.

  3. bpipe is folder driven, that is, whenever you run the bpipe command a .bpipe folder will appear containing information pertaining to the pipeline. THEREFORE! You cannot run two bpipe jobs from the same folder concurrently. I personally create a run folder within the intended resource directory and execute the following commands within there. Something like:

    /path/to/output/SAMPLE1/run

    It helps keeps things organised.

  4. Get your chef hat on, let's do some cooking. Run the most basic Clinker command ever, below.

    WARNING: You may need to increase align_mem=4000000000 genome_mem=4000000000 to whatever your environment can deal with. In this case, with competitive mapping, this may need to be increased to 32000000000! If you're running this on your person laptop, try running it with these limits BUT set competitive=false... The final result won't look pretty, but you will have proved you have a working Clinker environment!

    bpipe -p out=/path/to/your/results/folder -p caller=$CLINKERDIR/test/caller/bcr_abl1.csv -p col=1,2,3,4 -p genome=19 -p print=true -p competitive=true -p header=true -p align_mem=4000000000 -p genome_mem=4000000000 -p fusions=BCR:ABL1 $CLINKERDIR/workflow/clinker.pipe $CLINKERDIR/test/fastq/*.fastq.gz

    I know this may look intimidating, but it's really simple! Let's break it down.

  • bpipe: We're telling bpipe to execute Clinker.

  • -p: This is how bpipe recognises that the following entry is a parameter it needs to worry about. It MUST be put before each parameter.

  • out: The path to where you want your clinker output to go

  • caller: The path to where the output of your fusion caller software is.

  • header: You have a header row in your caller result, e.g. true/false

  • col: The columns for chromosome1,breakpoint1,chromosome2,breakpoint2 that define the fusion junction. eg. chr1,1234,chr2,5678. NOTE: Given the large number of fusion caller suites available, this hamfisted way will allow most current ones and future ones to work, given that this is essential information. Another common format is chr1:breakpoint1, which Clinker also works with, just enter 2 columns instead, e.g. col=1,2

  • genome: Which genome did you use to create the results? Only two available for now, 19 and 38.

  • print: We want a PDF for this fusion.

  • fusions: The list of fusions we want a PDF of.

  • competitive: You're going to want to set this to true... competitively map to the superTranscriptome.

  • $CLINKERDIR/workflow/clinker.pipe: Chuck all of the previous parameters into our pipeline.

  • $CLINKERDIR/test/fastq/*.fastq.gz: Then throw all fastq files in this directory into the Clinker pipeline.

    That wasn't so bad now was it. You can view all of the parameters in more detail under the hood.

  1. Wait until the pipeline is finished, about 2 minutes.

  2. Navigate to /path/to/your/results/folder to find your PDF, waiting to be viewed.

  3. Give a slightly audible, woot!. You have graduated from Clinker school.