bcl2fastq on Mac
1
3
Entering edit mode
5.2 years ago
New2R ▴ 60

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 (http://macappstore.org/rpm2cpio/). Then extracted contents using

rpm2cpio.pl 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 • 6.5k views
ADD COMMENT
1
Entering edit mode

You can always try conda

ADD REPLY
0
Entering edit mode

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

ADD REPLY
0
Entering edit mode

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 REPLY
0
Entering edit mode

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

 bcl_to_fastq 
-R /path to runfolder-dir/ 
-O /path to output-dir/ 
--ignore-missing

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/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/Users/sampaths/anaconda2/lib/python2.7/site-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/Users/sampaths/anaconda2/lib/python2.7/site-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Users/sampaths/anaconda2/lib/python2.7/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/Users/sampaths/anaconda2/lib/python2.7/site-packages/bcl2fastq.py", line 319, in bcl2fastq
    call_status = run_bcl2fastq(runfolder, cmd_args)
  File "/Users/sampaths/anaconda2/lib/python2.7/site-packages/bcl2fastq.py", line 143, in run_bcl2fastq
    sp.check_call(cmd, stdout=fh, stderr=fh, shell=True)
  File "/Users/sampaths/anaconda2/lib/python2.7/subprocess.py", 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 https://support.illumina.com/content/dam/illumina-support/documents/documentation/software_documentation/bcl2fastq/bcl2fastq2_guide_15051736_v2.pdf (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 REPLY
0
Entering edit mode

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 REPLY
0
Entering edit mode
5.0 years ago
GokalpC ▴ 100

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 COMMENT
0
Entering edit mode

After using your build to run:

docker run --platform linux/amd64 skysbiodocker/bcl2fastq2 bcl2fastq --runfolder-dir /Users/xxx/xxx --ignore-missing-bcls

...I receive the error below. Any suggestions?

2023-02-22 20:10:29 [ded900] ERROR: bcl2fastq::common::Exception: 2023-Feb-22 20:10:29: No such file or directory (2): /home/sky/Desktop/trial_build/bcl2fastq/src/cxx/lib/io/Xml.cpp(201):
Throw in function boost::property_tree::ptree
bcl2fastq::io::parseXmlFile(const boost::filesystem::path&) Dynamic exception type:
boost::exception_detail::clone_impl<bcl2fastq::common::IoError>
std::exception::what: Unable to open '/Users/xxx/xxx/RunInfo.xml' file for reading
ADD REPLY
0
Entering edit mode

Use the 101010 button (NOT the double quote button) to format code. The former is for code, the latter is to quote something someone said elsewhere. I've fixed it for you (as best as I can - the double quote option wreaks havoc on new lines) this time

code_formatting

ADD REPLY
0
Entering edit mode

When using docker, you should mount your files. Use the --volume option after the run portion of the command to mount it.

for example:

docker run --volume /Users/xxx/xxx:/sequencing_data --platform linux/amd64 skysbiodocker/bcl2fastq2 bcl2fastq --runfolder-dir sequencing_data --ignore-missing-bcls

This puts the data into the container.

I am not sure if this is an okay practice as I have just started to docker, so please keep that in mind.

ADD REPLY

Login before adding your answer.

Traffic: 2015 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6