Closed tylerjkennedy closed 2 years ago
You need to set the execute permission on the binary. Do chmod +x snap-aligner (from the directory where it is, or use the full pathname).
From: tylerjkennedy @.> Sent: Friday, September 10, 2021 8:49 AM To: amplab/snap @.> Cc: Subscribed @.***> Subject: [amplab/snap] Running SNAP on macOS (#135)
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
- You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Famplab%2Fsnap%2Fissues%2F135&data=04%7C01%7Cbolosky%40microsoft.com%7C3c3a13c4bcf24550e9e408d9747271db%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637668857162616678%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=NbR1J%2BPGS784AdtjYMyhAe9PmcCcD%2FsLNmM077dqnhc%3D&reserved=0, or unsubscribehttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAAHPTWMZSS2AC6MVOHLMKY3UBISFDANCNFSM5DZTLZFQ&data=04%7C01%7Cbolosky%40microsoft.com%7C3c3a13c4bcf24550e9e408d9747271db%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637668857162626670%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=9Ik0KnU%2B9R%2Bqbv5hFup%2BJ5tjSD%2Fq69KaaRv0MYW15ME%3D&reserved=0. Triage notifications on the go with GitHub Mobile for iOShttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapps.apple.com%2Fapp%2Fapple-store%2Fid1477376905%3Fct%3Dnotification-email%26mt%3D8%26pt%3D524675&data=04%7C01%7Cbolosky%40microsoft.com%7C3c3a13c4bcf24550e9e408d9747271db%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637668857162636664%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=3vc8ozTDck%2B0bEQLujzP%2FYHRroKXQg1%2FQ653phCH1Ic%3D&reserved=0 or Androidhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fplay.google.com%2Fstore%2Fapps%2Fdetails%3Fid%3Dcom.github.android%26referrer%3Dutm_campaign%253Dnotification-email%2526utm_medium%253Demail%2526utm_source%253Dgithub&data=04%7C01%7Cbolosky%40microsoft.com%7C3c3a13c4bcf24550e9e408d9747271db%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637668857162636664%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=nmxNot5%2Bn6D2Y5kkoMAL7ZxoymnPppEvkkH38vD%2BLbg%3D&reserved=0.
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?
Arun, you built this. Do you know which libraries he needs to make it run?
From: tylerjkennedy @.> Sent: Friday, September 10, 2021 9:07 AM To: amplab/snap @.> Cc: Bill Bolosky @.>; Comment @.> Subject: Re: [amplab/snap] Running SNAP on macOS (#135)
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?
- You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Famplab%2Fsnap%2Fissues%2F135%23issuecomment-917022968&data=04%7C01%7Cbolosky%40microsoft.com%7Ccd6d230896e84ae5b4b208d9747504f0%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637668868214314152%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=50bKcLlyQ3BElb78YoWRFgdoQd9Odu0qCh3N2kEn9Xg%3D&reserved=0, or unsubscribehttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAAHPTWIQI2POFKY6YOVYCDTUBIUKFANCNFSM5DZTLZFQ&data=04%7C01%7Cbolosky%40microsoft.com%7Ccd6d230896e84ae5b4b208d9747504f0%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637668868214324139%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=XUlFwIxsK3G17nHjL9W2ekERYal5cj2eeE8UXhnLNe0%3D&reserved=0. Triage notifications on the go with GitHub Mobile for iOShttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapps.apple.com%2Fapp%2Fapple-store%2Fid1477376905%3Fct%3Dnotification-email%26mt%3D8%26pt%3D524675&data=04%7C01%7Cbolosky%40microsoft.com%7Ccd6d230896e84ae5b4b208d9747504f0%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637668868214334138%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=pU60%2BUke9d7gDxqmU1bZ5VjfDLpEGwNFAcUSwY4rLic%3D&reserved=0 or Androidhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fplay.google.com%2Fstore%2Fapps%2Fdetails%3Fid%3Dcom.github.android%26referrer%3Dutm_campaign%253Dnotification-email%2526utm_medium%253Demail%2526utm_source%253Dgithub&data=04%7C01%7Cbolosky%40microsoft.com%7Ccd6d230896e84ae5b4b208d9747504f0%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637668868214334138%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=El5dxU3Ts9UUeeD9cJaNpzi7LcMz45G5P9w33DN4naw%3D&reserved=0.
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 ?
That error happens when it can't open the input FASTA file (the comment about already having gotten its size is incorrect and should be fixed).
Are you sure you gave it the right input file name (and path if it's not in the current directory)? And that you can read the file? Try doing head WBcel235.fa and see if it prints out the first few lines of the file.
From: tylerjkennedy @.> Sent: Friday, September 10, 2021 2:06 PM To: amplab/snap @.> Cc: Bill Bolosky @.>; Comment @.> Subject: Re: [amplab/snap] Running SNAP on macOS (#135)
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
- You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Famplab%2Fsnap%2Fissues%2F135%23issuecomment-917211214&data=04%7C01%7Cbolosky%40microsoft.com%7C7c4ddade7ddb47622a1308d9749eda42%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637669047884497257%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=hbWNN1q0dh84FLinj3UCbm8RYNAcYaWKy45WGUyZznw%3D&reserved=0, or unsubscribehttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAAHPTWP7NFTR3SNJ3ZHETALUBJXNDANCNFSM5DZTLZFQ&data=04%7C01%7Cbolosky%40microsoft.com%7C7c4ddade7ddb47622a1308d9749eda42%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637669047884497257%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=n8vUAUqEMIyQV4uazdf%2FbzqMuWHkTKYLJ6HMglDy4bc%3D&reserved=0. Triage notifications on the go with GitHub Mobile for iOShttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapps.apple.com%2Fapp%2Fapple-store%2Fid1477376905%3Fct%3Dnotification-email%26mt%3D8%26pt%3D524675&data=04%7C01%7Cbolosky%40microsoft.com%7C7c4ddade7ddb47622a1308d9749eda42%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637669047884507255%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=ovzmsQdjFLnLb5Qu3CbJ3P1alRkbtLrFzEeV%2BQ6nYfc%3D&reserved=0 or Androidhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fplay.google.com%2Fstore%2Fapps%2Fdetails%3Fid%3Dcom.github.android%26referrer%3Dutm_campaign%253Dnotification-email%2526utm_medium%253Demail%2526utm_source%253Dgithub&data=04%7C01%7Cbolosky%40microsoft.com%7C7c4ddade7ddb47622a1308d9749eda42%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637669047884517238%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=i6z%2FsDwezKQ1hbWfYiSkduM6%2FS8q39bjPiFIX7af9s4%3D&reserved=0.
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.
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