Entering edit mode
6.2 years ago
gdeniz
▴
20
Hi, I seem to have a problem getting my output in the right location. Using the following call..
workdir="$1"
files=($(awk '{print $1}' $2 ))
infile="$workdir"/bam/${files[$SGE_TASK_ID]}.sorted.dedup.bam
macs2 predictd -i $infile -f BAM -g mm -m 5 50 --outdir "$workdir"/macs2/qc --rfile ${$infile%.sorted.dedup.bam}_model.r
..my input goes to $workdir/bam
Any suggestions? Thanks!
Thanks for your suggestions, always happy to improve my quoting. Unfortunately, this didn't seem to solve the issue:
Any other ideas? Do you think it is a quoting issue?
Can you verify that the command looks OK? Change the last line to
Also, it would help if you could give an example of how you invoke the script, with actual parameters.
I get the following error:
Here an attempt to clarify my parameters:
Should've spotted this early on: change
${$infile%.sorted.dedup.bam}
to${infile%.sorted.dedup.bam}
Here is the echo'd output:
That echo call made me realize what is wrong:
the
$infile
variable seems to overwrite the output dir because it contains an absolute path. Changing the call option to:solves the problem.
Thanks for pointing me towards the answer!