'FastQC script not working and showing error with qsub additional argument required

'''
'#!/bin/bash'
'#PBS -j oe'
'#PBS -q day'
'#PBS -N fastqc'
'#PBS -l nodes:1:ppn=4'
'#PBS -l walltime=01:00:00'
'#PBS --mem=20G'

'echo "hostname"'
'module load wd/containers/fastqc.img'

# set input/output directory variables
'INDIR=/home/d21050/wd/rawdata/fastq/'
'REPORTDIR=fastqc_reports'
'mkdir -p $REPORTDIR'

'cd /home/d21050/wd/rawdata/fastq/'
'fastqc --outdir $REPORTDIR $INDIR/SRR1552444.fastq'


    **I have used this script and run on HPC using qsub but it shows:-**
    

qsub wd/scripts/fastqc.sh [a single - is not a valid option]

    usage: qsub [-a date_time] [-A account_string] [-b secs]
    [-c [ none | { enabled | periodic | shutdown |
    depth=<int> | dir=<path> | interval=<minutes>}... ]
    [-C directive_prefix] [-d path] [-D path]
    [-e path] [-h] [-I] [-j oe|eo|n] [-k {oe}] [-l resource_list] [-m n|{abe}]
    [-M user_list] [-N jobname] [-o path] [-p priority] [-P proxy_user [-J <jobid]]
    [-q queue] [-r y|n] [-S path] [-t number_to_submit] [-T type]  [-u user_list]
    [-w] path
    [-W additional_attributes] [-v variable_list] [-V ] [-x] [-X] [-z] [script]

even after adding different arguments, it shows the same response. Can anyone help what went wrong with my commands or scripts?



Solution 1:[1]

If this is an exact copy of your script, it seems like it's a formatting error.

  1. Why is each line surrounded by single quotation marks? On my HPC, this won't run due to the #PBS lines being read incorrectly.
  2. Is the last line with ** in your shell script?
  3. If the ''' on line 1 is in your script, this also shouldn't be there.

Here is a help page for markdown on StacksOverflow I would refer to in the future.

My scripts for fastqc look similar, but without the quotes and run fine. Here is an example of a FastQC array:

#!/bin/sh
#PBS -lwalltime=6:00:00
#PBS -lselect=1:ncpus=1:mem=4gb
#PBS -N FastQC
#PBS -j oe
#PBS -J 1-100

module load fastqc

DATA_DIR=/path/to/indir
OUT_DIR=/path/to/outdir

cd $DATA_DIR
File_In=`sed ${PBS_ARRAY_INDEX}"q;d" 00_File_List.txt`

fastqc -o $OUT_DIR ${File_In}_R1_001.fastq.gz
fastqc -o $OUT_DIR ${File_In}_R2_001.fastq.gz

echo "Done with ${File_In}"

Although there is clearly a difference in how to request job parameters, so I would refer to your HPC's docs for this.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 dthorbur