SGE submit script


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting SGE submit script
# 1  
Old 10-26-2017
SGE submit script

Hi,

I'm trying to edit my working bash script to an SGE script in order to submit it as a job to the cluster.

Currently I have:
Code:
 
#!/bin/bash

# Perform fastqc on files in a specified directory.

for ((j=1; j <=17; j++))
do
   directory=/data4/una/batch"$j"/
   files=$""$directory"/*.fastq.gz"
   batch=$"batch_"$j""
   outfile=$""$batch"_submit_script.sh"

     echo "#!/bin/bash">>$outfile;
     echo "# Your job name">>$outfile;
     echo "# -N $batch">>$outfile;
     echo "# The job should be placed into the queue 'all.q'">>$outfile;
     echo "#$ -q all.q">>$outfile;
     echo "# Running in the current working directory">>$outfile;
     echo "#$ -cwd">>$outfile;
     echo "">>$outfile;
     echo "# Export some necessary environment variables">>$outfile;
     echo "#$ -S /bin/bash">>$outfile;
     echo "#$ -v PATH">>$outfile;
     echo "#$ -v LD_LIBRARY_PATH">>$outfile;
     echo "#$ -v PYTHONPATH">>$outfile;
     echo "# Finally, put your command here">>$outfile;
     echo "">>$outfile;
     echo "#$ for i in $files;">>$outfile;
     echo "#$ do;">>$outfile;
     echo "#$ fastqc -f fastq -o /data4/una/test/fastq/$i;">>$outfile;
     echo "#$done">>$outfile;
     echo "">>$outfile;

     qsub $outfile;
done

But I'm getting an error:
Code:
Unable to read script file because of error: ERROR! invalid option argument "-f"

But
Code:
 fastqc -f fastq -o /data4/una/test/fastq/$i

is a totally valid line in my bash script. Smilie

Thoughts?

Thanks!
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Submit a qsub script SGE

Hello, I'm working on a SGE cluster and trying to echo the variables passed to the qsub command. My script is as follows #!/bin/bash #$ -V #$ -cwd #$ -pe make 10 if ; then echo "Variable is not set" else echo "Variable says: $StatedUserName" fi and I run the... (1 Reply)
Discussion started by: nans
1 Replies

2. Shell Programming and Scripting

Trying to submit web form content to a shell script

Hi I was hoping some one could help me with a problem I have. I am trying to collect some information from a web form and save it to a text file. I found an example on this site that is sort of what I am trying to accomplish, the shell script bellow should echo the input back to the browser... (0 Replies)
Discussion started by: Paul Walker
0 Replies

3. Shell Programming and Scripting

Exec submit form in bash script

Hi All, I'm new in forum. Many congratulations to everyone for all work. I'm not an expert in bash script I've a problem with a sh file. The sh file run every t minuts and it read data from txt file and then compile form. Finally, the user, from the web browser click on send. The script... (0 Replies)
Discussion started by: Herbert
0 Replies

4. Programming

Html form to submit data to bash script

hi all, im going to design a web html form so users can input what username and password they want to make the ftp account, once they enter in a username and password they click on the submit button and it submits it to a bash script and then the bash script will run and finish of making the... (3 Replies)
Discussion started by: robertkwild
3 Replies

5. UNIX and Linux Applications

Looking to reduce the number a cpus available for SGE

Hey all Im looking to reduce the number of cpus available on a certain node in our cluster available for jobs using SGE. i.e. we have one node that has 24 cpus available for jobs on SGE, i would like to reduce that to 16. Thanks (1 Reply)
Discussion started by: olifu02
1 Replies

6. Shell Programming and Scripting

Request for help with SGE submission script manipulation

Hi, I have the following SGE submission (HPC calculation) script, which is just a Bash script: #!/bin/bash -l #$ -S /bin/bash #$ -l h_rt=1:00:0 #$ -l mem=4G #$ -N XXX #$ -pe qlc 24 #$ -P XXX #$ -wd /home/uccaxxx/Scratch/222PdT/3vac/c0001/ mpirun -m $TMPDIR/machines -np $NSLOTS... (2 Replies)
Discussion started by: crunchgargoyle
2 Replies

7. Web Development

include virtual perl-script - submit button opens a new page..

hello 2 all I can't understand how to insert a perl-script into .shml in a right way. <form> should be working but it's not doing that: <!--#include virtual="/cgi-bin/script.cgi?filename"--> filename is a name of the file which script is using the script is used for a score show (the number... (3 Replies)
Discussion started by: tip78
3 Replies

8. Shell Programming and Scripting

include virtual perl-script - submit button opens a new page..

hello 2 all I can't understand how to insert a perl-script into .shml in a right way. <form> should be working but it's not doing that: <!--#include virtual="/cgi-bin/script.cgi?filename"--> filename is a name of the file which script is using the script is used for a score show (the number... (0 Replies)
Discussion started by: tip78
0 Replies

9. Shell Programming and Scripting

Script to submit a job with date parm in maestro

I'm a newbie in scripting attempting to create a script where i can submit a job (in maestro/tivoli) with parameters,in maestro CLI i can do that no problem,i'm thinking about creating a script that will accept input while the script is executing, more like below structure: exec the script -... (1 Reply)
Discussion started by: Kirojin
1 Replies

10. Shell Programming and Scripting

submit a ksh script in background

I submitted a ksh script in the background last night before leaving work: ./ping_test & When I came into work this morning I discovered that it had stopped running when my session timed out. So, I then tried it again this morning and logged out before letting it time out as one unix site... (4 Replies)
Discussion started by: captainzeb
4 Replies
Login or Register to Ask a Question