0

I'm trying to use qsub to submit multiple parallel jobs, but I'm running into trouble with passing parameter substitutions into qsub. I'm using the -V option, but it doesn't seem to recognize what ${variable} is. Here's some code I tried running:

qsub -cwd -V -pe shared 4 -l h_data=8G,h_rt=00:10:00,highp -N bt2align3 -b y "projPath="$SCRATCH/CUTnTag/data_kayaokur2020"; sample="K4m3_rep1"; cores=8; 
bowtie2 --end-to-end --very-sensitive --no-mixed --no-discordant --phred33 -I 10 -X 700 
-p ${cores} 
-x ${projPath}/bowtie2_index/GRCh38_noalt_analysis/GRCh38_noalt_as 
-1 ${projPath}/raw_fastq/${sample}_R1.fastq.gz 
-2 ${projPath}/raw_fastq/${sample}_R2.fastq.gz 
-S ${projPath}/alignment/sam/${sample}_bowtie2.sam &> ${projPath}/alignment/sam/bowtie2_summary/${sample}_bowtie2.txt"

I just get an error that says "Invalid null command."

Is qsub not able to recognize parameter expansions? Is there a different syntax I should be using? Thanks.

  • 1
    I'd expect your bash shell to resolve those variable expansions before qsub ever saw them. e.g. `qsub ... -p 2 -x /example/project/path/bowtie2_index/GRCh38_noalt_analysis/GRCh38_noalt_as ...` – Jeff Schaller Jun 10 '22 at 17:41
  • 1
    shellcheck.net has a lot of suggestions on how to improve this, and it mentions that there is a problem with the `sample` var. – danielhoherd Jun 10 '22 at 18:01

0 Answers0