SnapATAC icon indicating copy to clipboard operation
SnapATAC copied to clipboard

Step 11 snaptools unrecognized argument

Open smoot-samuel opened this issue 5 years ago • 5 comments

Hello,

When I attempt the runMACS function I get back an unrecognized argument error message from snaptools in which I am told the file is not being found. Any idea where I might have gone wrong? Thanks.

runMACS(

  • obj=x.sp[which(x.sp@cluster==1),],
  • output.prefix="ATAC_Whole_Mouse_Pancreas_14.5_WPC",
  • path.to.snaptools="/Users/samuelsmoot/.virtualenvs/r-reticulate/bin/snaptools",
  • path.to.macs="/usr/local/bin/macs2",
  • gsize="mm",
  • buffer.size=500,
  • num.cores=5,
  • macs.options="--nomodel --shift 37 --ext 73 --qval 1e-2 -B --SPMR --call-summits",
  • tmp.folder=tempdir()
  • ); Epoch: checking input parameters ... Epoch: extracting fragments from each snap files ... usage: snaptools [-h] ... snaptools: error: unrecognized arguments: Seq/scATAC Mouse Whole Pancreas 14.5 /SnapATAC/E14_5_whole_pancreata.snap cat: /var/folders/ws/qbfvzq1x1n74904k5z6b8sgh0000gn/T//RtmpDshtJ0/file2814938de55.bed.gz: No such file or directory

smoot-samuel avatar Sep 12 '19 06:09 smoot-samuel

Hi I had the same error check if the path in the snap object is correct type x.sp@file if it's incorrect you can change it using the stringr package extract it using x=x.sp@file then correct x=as.vector(x) x=str_replace_all(x,"oldpath","correctpath") put it back using x.sp@file=x

yasserIRCM avatar Sep 12 '19 17:09 yasserIRCM

You might want to change the x.sp@file which stores the location of the snap file and it must point to the snap file. If you have saved the snap object as “rds” and load it in a different directory, you might experience this problem.

On Sep 12, 2019, at 1:38 PM, yasserIRCM [email protected] wrote:

Hi I had the same error check if the path in the snap object is correct type x.sp@file if it's incorrect you can change it using the stringr package extract it using x=x.sp@file then correct x=as.vector(x) x=str_replace_all(x,"oldpath","correctpath") put it back using x.sp@file=x

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/r3fang/SnapATAC/issues/95?email_source=notifications&email_token=ABT6GG7IKQVQXUXQBIBVGGLQJJ5CNA5CNFSM4IV72S42YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6SVODI#issuecomment-530929421, or mute the thread https://github.com/notifications/unsubscribe-auth/ABT6GGYN2KYYSK5EEAOCLQLQJJ5CNANCNFSM4IV72S4Q.

r3fang avatar Oct 03 '19 17:10 r3fang

Hi, I'm having the same issue. Checked that my x.sp@file path is correct, but still getting an error with RunMACS because the bed.gz input file for MACS2 is empty. Is there anything else that might be causing this error? Thanks so much for your help!

jingyaq avatar Oct 21 '19 06:10 jingyaq

  1. can you run this command with tmp.folder=./ so that the temp (bed.gz) file will be stored in the current folder so that we can check if the fragments are actually extracted from the snap file.
  2. can you please check if the barcodes in the snap object are consistent with barcodes in the snap file.
  3. can you follow @yasserIRCM instruction above

r3fang avatar Jan 04 '20 02:01 r3fang

This error occurs due to spaces in the folder or file name. The arguments to snaptools should be between quotes (but currently they are not).

bgorissen avatar Jul 06 '20 21:07 bgorissen