Troubleshooting: Difference between revisions
No edit summary |
|||
Line 81: | Line 81: | ||
</div> | </div> | ||
There is a space at line "-db /db/ncbiblast/nrte/latest/nt \ ". This will cause error as "-query my_fasta.fa" being taken as an individual command. The blast command will throw error as "Error: Too many positional arguments ..." | There is a space at line "-db /db/ncbiblast/nrte/latest/nt \ ". This will cause error as "-query my_fasta.fa" being taken as an individual command. The blast command will throw help prompt since there is no input file found. The other error could be "error as "Error: Too many positional arguments ..." due to the operand parameter line. | ||
The solution is to remove the extra space. | The solution is to simply remove the extra space(s). | ||
[[#top|Back to Top]] | [[#top|Back to Top]] |
Latest revision as of 13:29, 28 January 2019
Introduction
This page provides the common errors and solutions for jobs at GACRC cluster. The examples are made from Sapelo2 environment, but the solutions apply to Linux clusters as well.
File format
The text files, such as submission script, fasta file or other text data files at Linux should be in ASCII format. If the files are generated under other operating system or copied from the web, there could introduce hidden characters which cannot be recognized by Linux. Hence bring the error for the job. There are many posts elaborating on this problem, such as editpadpro
Here is the command to check on the file format, using file sub.sh as an example file name below:
file sub.sh
The expected the correct format is ASCII. There could be a variation of response, such as python script, ASCII with long lines. All these responses are acceptable as long as it is ASCII text format without wrong endings:
sub.sh: Bourne-Again shell script, ASCII text
Here are common wrong formats:
sub.sh: Bourne-Again shell script, UTF-8 Unicode text executable sub.sh: Bourne-Again shell script, ASCII text, with CRLF line terminators
Most time it is easy to be fixed by saving the file in Unix format or using the following command at cluster:
dos2unix sub.sh
For the file in UTF-8 Unicode encoding, the easiest way is to manually remove the weird characters in a Linux text editor, such as vi, nano or pico.
Invalid DISPLAY variable
Python script using matplotlib complains DISPLAY error. It is observed in faststructure, oligotyping, QIIME and other applications. Such as in QIIME:
ml qiime/1.9.1_conda conda activate /usr/local/apps/gb/qiime/1.9.1_conda python /usr/local/apps/gb/qiime/1.9.1_conda/bin/core_diversity_analyses.py ... File "/usr/local/apps/gb/qiime/1.9.1_conda/lib/python2.7/site-packages/matplotlib/backends/backend_qt5.py", line 138, in _create_qApp raise RuntimeError('Invalid DISPLAY variable') RuntimeError: Invalid DISPLAY variable
The solution is to define DISPLAY backend before the function script:
ml qiime/1.9.1_conda conda activate /usr/local/apps/gb/qiime/1.9.1_conda echo "backend: Agg" > ~/.config/matplotlib/matplotlibrc python /usr/local/apps/gb/qiime/1.9.1_conda/bin/core_diversity_analyses.py
Unrecognized lines following backslash line continuation
In case of using backslash to continue the lines, there should be no extra space after backslash. Otherwise the following lines will be parsed as separate command and cause errors:
#PBS -S /bin/bash
#PBS -N j_blast
#PBS -q batch
#PBS -l nodes=1:ppn=1:AMD
#PBS -l walltime=8:00:00
#PBS -l mem=10gb
#PBS -M username@uga.edu
#PBS -m abe
cd $PBS_O_WORKDIR
module load BLAST+/2.7.1-foss-2016b-Python-2.7.14
blastn -num_threads 4 \
-db /db/ncbiblast/nrte/latest/nt \
-query my_fasta.fa
There is a space at line "-db /db/ncbiblast/nrte/latest/nt \ ". This will cause error as "-query my_fasta.fa" being taken as an individual command. The blast command will throw help prompt since there is no input file found. The other error could be "error as "Error: Too many positional arguments ..." due to the operand parameter line.
The solution is to simply remove the extra space(s).