qsub


Running samtools from a qsub


I'm trying to run some samtools commands from a qsub call (to run on a cluster). For some reason, the commands do not seem to be recognized. However, if I copy-paste the command and run it directly from the terminal cluster, it works fine. Has anybody experienced such issues or have an idea what I'm doing wrong?
Thanks,
Patrick
My qsub (this doesn't work):
#!/bin/bash
#./etc/sysconfig/pssc
#PBS -S /bin/bash
#PBS JOB_NAME="QSH_$(whoami)"
#PBS NODE_NUM="1"
#PBS NODE_PPN="${NODE_NCPUS}"
#PBS HOURS="24"
#PBS MINUTES="00"
#PBS SECONDS="00"
#PBS WALLTIME=${HOURS}:${MINUTES}:${SECONDS}
#PBS RES_LIST="nodes=${NODE_NUM}:ppn=${NODE_PPN}"
#PBS DIR_WORK="${PBS_O_WORKDIR}"
#PBS QUEUE="high"
#PBS cd ${DIR_WORK}
samtools index /data/test.bam /data/test.bai
If I run the command directly from the terminal, it works:
samtools index /data/test.bam /data/test.bai
Did you remember to cd into your working dir? I do not believe that qsub expands the $ variables in e.g. PBS cd ${DIR_WORK}.
Try with this script:
#!/bin/bash
#./etc/sysconfig/pssc
#PBS JOB_NAME=test
#PBS WALLTIME=24:00:00
cd ${PBS_O_WORKDIR}
echo `pwd`
dir

Related Links

Checking output from qsub : Sungrid cluster
qsub: get last job id submitted
Job summited with qsub does not write output and enters E status
Qsub job runs but doesn't write to file
Qsub job not running - possible issue in submission script
How do I know where my qsub job is running/being written
Pipe Symbol in qsub Job name
SLURM how to qsub a task when another task is finished?
Can multiple qsub submissions read the same group of files?
SGE faild to submit job, attribute is not a memory value
How do you submit a job on multiple queues with Torque?
Maui - preventing jobs from running on the same node
qsub: What is the standard when to get occasional updates on a submitted job?
Submitting a job to qsub generates an error, “Warning: no access to tty”
Running samtools from a qsub
How do I schedule a job on multiple nodes with qsub Univa 8.1.7?

Categories

HOME
pug
oauth
websphere
vb6
blockchain
warnings
performancecounter
visual-studio-2013
zend-framework2
specflow
terrain
java-home
tumblr
simpy
i2c
structuremap
constructor
height
jboss7.x
hashicorp-vault
xul
tee
activesync
store
cratedb
eclipse-luna
sendkeys
scenebuilder
ng-show
attask
clover
multicore
pycrypto
embedly
thingsboard
tcpclient
binutils
restfb
tflearn
http-method
badge
java-ee-7
onesignal
vcard
frp
edge-detection
cell-array
consumer
fractals
pdflatex
spreedly
geopy
body-parser
transient
rhino
phpspreadsheet
css-counter
nunit-3.0
liquid-xml
android-download-manager
jquery-multidatespicker
android-preferences
socketscan
stdclass
mediawiki-extensions
microdata
ttcn
jtds
etherpad
fontconfig
gmt
bettercms
project-template
inject
icefaces
pydio
git-annex
multifile-uploader
jenkins-scriptler
ninject.web.mvc
zuora
fabric-twitter
apigee-baas
stream-framework
calibration
ffserver
pyopengl
ibm-data-studio
code-first-migrations
adodb
line-numbers
livechat
grunt-express
iostream
dache
code-testing
io.js
winrt-httpclient
logentries
bfd
.net-cf-3.5
nuspec
vertical-scrolling
transitive-closure-table
usn
deploying
nintendo
tcxgrid
surf
qtembedded
nagle
symbol-server
j-interop
winverifytrust
web-statistics
virtualquery
document-library

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App