r3fang / SnapATAC

Analysis Pipeline for Single Cell ATAC-seq
GNU General Public License v3.0
301 stars 125 forks source link

Step 11 snaptools unrecognized argument #95

Open smoot-samuel opened 5 years ago

smoot-samuel commented 5 years ago

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
yasserIRCM commented 5 years ago

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

r3fang commented 4 years ago

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 notifications@github.com 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.

jingyaq commented 4 years ago

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!

r3fang commented 4 years ago
  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
bgorissen commented 4 years ago

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).