amplab/snap

Running SNAP on macOS

tylerjkennedy opened this issue · 9 comments

Hello,

I'm trying to use SNAP on a mac and am having difficulty following the instructions to run the program. I tried downloading the file available under Macosx binary and then moving that into the bin file in my path, but I am unable to access the program. I tried typing snap-aligner into terminal and I see "Permission denied." If i type sudo snap-aligner I get "command not found." What is the proper way to download, install and run SNAP on a mac?

Thank you,

Tyler

Thank you, that worked, now I get the error:

Welcome to SNAP version 1.0.0.

dyld: lazy symbol binding failed: Symbol not found: ____chkstk_darwin
Referenced from: /usr/local/bin/snap-aligner (which was built for Mac OS X 10.15)
Expected in: /usr/lib/libSystem.B.dylib

dyld: Symbol not found: ____chkstk_darwin
Referenced from: /usr/local/bin/snap-aligner (which was built for Mac OS X 10.15)
Expected in: /usr/lib/libSystem.B.dylib

Abort trap: 6

I'm running 10.13.6. Can I run SNAP without updating to 10.15?

Hi Tyler,

I added some code to the dev branch of SNAP to make it compile and run on OS X. Would it be possible for you to compile SNAP from source and try again ?

Steps to compile from source:

git clone -b dev https://github.com/amplab/snap
cd snap
make

Let me know if you face any issues.

--Arun

Thank you very much, this looks like it works. In the old version of SNAP I was using, through the MiModD application, I was able to batch multiple alignments together and send them all into a single bam output file. The input was:

mimodd snap-batch -s
"snap paired ref.fa reads1_1.fastq reads1_2.fastq.gz --iformat gz --header 1_hdr.sam -o alignment.bam"
"snap paired ref.fa reads2_1.fastq reads2_2.fastq.gz --iformat gz --header 2_hdr.sam -o alignment.bam"
"snap paired ref.fa reads3_1.fastq reads3_2.fastq.gz --iformat gz --header 3_hdr.sam -o alignment.bam"

Is it possible to run something like this through the current version of Snap?

Looking through the MiModD user guide, I'm guessing the snap-batch code came from their end and isn't part of snap? I'm trying instead to align each of my files individually but am now having an issue building an index. If I put in the c elegans reference genome WBcel235.fa:

snap-aligner index WBcel235.fa output_directory

I get:
Welcome to SNAP version 1.0dev.104.
Auto-set key size to 6
Auto-set locationSize to 4
Hash table slack 0.300000
Loading FASTA file 'WBcel235.fa' into memory...Unable to open FASTA file 'WBcel235.fa' (even though we already got its size)
Unable to read FASTA file
SNAP exited with exit code 1 from line 346 of file SNAPLib/GenomeIndex.cpp

Could you share the fasta file for us to try out ?

Sorry, I must have had a typo somewhere. I tried to run it again this morning and everything worked fine. Thank you again for all of your help and for this great aligner.