Using the Digital Research Alliance of Canada
2023-01-30
Cannot run/execute any of those commands from ~
The three possibilities:
srun - Use to submit a script to be executed in real time (the process of running the job will be printed in the screen instead of saved into a file)sbatch - Use to submit a script to be executed latersalloc - Use to allocate resources for a job in real time.
srun NEEDED_INFO script/command
srun, need to load software required need to the session
module load software to the script does not work--account=acount_name - def-laboidp or def-desgagne or def-germain1--time=d-HH:MM:SS - time required for the script, eg. 12hs: --time=12:00:00--mem=1G - memory required (here, 1G, default 254M)module load StdEnv/2020 blast+ # load the softwares
cd $SCRATCH
srun --account=def-desgagne --time=01:00:00 --mem=1024M\
blastp -query prots.fasta\
-db $myDatabase\
-out prots_Databased.txt\
-outfmt '7' # output in table format
prots.fasta is in the current folder, or its path is given in full
prots_Database.txt\ to separate one command in several lines, add a space in the next line to separate the words$myDatabase
.p* - protein database.n* - nucleotide databasesbatch script or sbatch NEEDED_INFO script
#!/bin/sh#SBATCH tell the scheduler what we need for this job#!/bin/sh
#SBATCH --account=def-desgagne
#SBATCH --time=01:00:00
#SBATCH --mem=1024M
module load StdEnv/2020 blast+
myDatabase=/database/path
cd $SCRATCH
blastp -query prots.fasta\
-db $myDatabase\
-out prots_Databased.txt\
-outfmt '7' # output in table format
salloc - salloc NEEDED_INFO