Closed DLuong79 closed 9 months ago
It may be the quotes you are using in the command. I have used similar shell scripts in the past without issue:
scsnv count -o ${sample}/barcode -k scsnv/data/737K-august-2016.txt -l V2 ${sample}/fastq
I figured out what was going on. I have to use double quotes in the code because the folder path I'm specifying has spaces in them (e.g. sample="Path to/sample 1"
), so I can't use curly braces. When running the code with the actual directory name instead of a variable name, I'd use \
to replace the spaces (e.g. -o Path\ to/sample\ 1/barcode
). However, I was defining the variable using double-quotes and the escape backslashes (sample="Path\ to/sample\ 1"
), causing the value to include the escape backslashes instead of treating them as normal spaces. Once I took out the escape slashes, everything worked as normal.
I'm handling a large number of samples at once, so it's more efficient for me to assign the folder paths as a variable and run those in a loop. Example:
While the count function can detect the fastq's, it's not generating the barcode file necessary for the next step. Is there are special syntax I need to use so that the command can recognize "$sample"/barcode as a valid output path?