Question: bcl2fastq on Mac
gravatar for New2R
4 months ago by
New2R20 wrote:

Does bcl2fastq work on a mac? bcl2fastq is available as a Linux rpm file bcl2fastq2-v2.20.0.422-Linux-x86_64.rpm. I tried extracting the the rpm contents by first installing rpm2cpio on mac using brew

brew install rpm2cpio

seen here ( Then extracted contents using bcl2fastq2-v2.20.0.422-Linux-x86_64.rpm | cpio -idmv

This extracts the contents with the binary located with the following folder path usr/local/bin/bcl2fastq. I tried executing the bcl2fastq using command

/usr/local/bin/bcl2fastq --runfolder-dir <RunFolder> --output-dir <BaseCalls>

But this did not work. It errors out saying that the binary is not executable. I tried chmod +x. But not successful.

Anybody successfully able to run this on mac. Or is this a Linux distribution with no hope on a mac. Appreciate any help with this.

next-gen • 482 views
ADD COMMENTlink modified 9 weeks ago by GokalpC40 • written 4 months ago by New2R20

You can always try conda

ADD REPLYlink written 4 months ago by RamRS21k

Or..... the old school way - run Linux inside a VM

ADD REPLYlink written 4 months ago by Santosh Anand4.8k

Please, no. There is no upside to using a Linux VM on a Mac, especially given that running custom Linux binaries of any flavor is virtually invisible unless one is working on the shell.

EDIT: For some software, you'll have to take the VM route. Looks like bcl2fastq is one of those software applications where VM is the only way to go.

ADD REPLYlink modified 4 months ago • written 4 months ago by RamRS21k

I tried conda and installed bcl2fastq-nextseq. Now I am having trouble executing it. I tried

-R /path to runfolder-dir/ 
-O /path to output-dir/ 

It gave me the following error

Using /Users/path to runfolder-dir/SampleSheet.csv
[2019-02-07 10:32:08 - INFO] Processing /path to runfolder-dir/SampleSheet.csv
[2019-02-07 10:32:08 - INFO] Found 55 samples for run 190111_NB501338_0413_AHFFWMAFXY
[2019-02-07 10:32:08 - INFO] Run complete.
[2019-02-07 10:32:08 - INFO] Converting .bcl to .fastq using: $>bcl2fastq -r 12 -d 12 -p 24 -w 12 --barcode-mismatches 0 --no-lane-splitting -R . -R /path to runfolder-dir/ -O /path to output-dir --ignore-missing
Traceback (most recent call last):
  File "/Users/sampaths/anaconda2/bin/bcl_to_fastq", line 11, in <module>
    load_entry_point('bcl2fastq==1.2.4', 'console_scripts', 'bcl_to_fastq')()
  File "/Users/sampaths/anaconda2/lib/python2.7/site-packages/click/", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/Users/sampaths/anaconda2/lib/python2.7/site-packages/click/", line 717, in main
    rv = self.invoke(ctx)
  File "/Users/sampaths/anaconda2/lib/python2.7/site-packages/click/", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Users/sampaths/anaconda2/lib/python2.7/site-packages/click/", line 555, in invoke
    return callback(*args, **kwargs)
  File "/Users/sampaths/anaconda2/lib/python2.7/site-packages/", line 319, in bcl2fastq
    call_status = run_bcl2fastq(runfolder, cmd_args)
  File "/Users/sampaths/anaconda2/lib/python2.7/site-packages/", line 143, in run_bcl2fastq
    sp.check_call(cmd, stdout=fh, stderr=fh, shell=True)
  File "/Users/sampaths/anaconda2/lib/python2.7/", line 190, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command 'bcl2fastq -r 12 -d 12 -p 24 -w 12 --barcode-mismatches 0 --no-lane-splitting -R . -R /path to runfolder-dir/ -O /path to output-dir --ignore-missing' returned non-zero exit status 127

I contacted the author at GitHub and he told me that there extenal dependancies not available at bioconda. The Illumina documentation here (page 26) indicates zlib, librt and libpthread as dependancies.

zib was present in anaconda, but there other two were not available. The bcl2fastq.log file had this written to file

/bin/sh: bcl2fastq: command not found
/bin/sh: bcl2fastq: command not found

So I am not sure how I should proceed from here.

ADD REPLYlink written 4 months ago by New2R20

I'm guessing bcl2fastq was not built to play well with macOS. You're better off taking the VM route as advised by Santosh Anand.

ADD REPLYlink written 4 months ago by RamRS21k
gravatar for GokalpC
9 weeks ago by
GokalpC40 wrote:

Why don't you try docker for mac.

You can try various images under docker hub.

I recently released a compatible build with many kernel versions.

docker pull skysbiodocker/bcl2fastq2
ADD COMMENTlink written 9 weeks ago by GokalpC40
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1280 users visited in the last hour