I ran the following code in bash (I added print statements for ease):
# Module loading
echo "I am loading the specified modules"
module load Singularity/version_number
# Define the path to the singularity:
singularity_image="/path/to/folder/GATK/gatk_latest.sif"
echo "I am going to make the `.dict ` file"
singularity exec $singularity_image /gatk/gatk --java-options -Xms8000m \
CreateSequenceDictionary \
-R /path/to/my/primary_assembly.fa \
-O /path/to/the/primary_assembly.dict
echo "I am all done"
However, I get the following out
file:
I am loading the specified modules
job_scripts_number: line 23:
.dict: command not found I am going to make the file
INFO NativeLibraryLoader - Loading libgkl_compression.so from
jar:file:/gatk/gatk-package-4.4.0.0-local.jar!/path/to/libgkl_compression.so [Today's date] CreateSequenceDictionary --OUTPUT
path/to/my/primary_assembly.dict
--REFERENCE /path/to/my/primary_assembly.fa
--TRUNCATE_NAMES_AT_WHITESPACE true --NUM_SEQUENCES 2147483647 --VERBOSITY INFO --QUIET false --VALIDATION_STRINGENCY STRICT --COMPRESSION_LEVEL 2 --MAX_RECORDS_IN_RAM 999999 --CREATE_INDEX false --CREATE_MD5_FILE false --help false --version false --showHidden false --USE_JDK_DEFLATER false --USE_JDK_INFLATER false [Today's date] Executing as user@node_number on Linux version
; OpenJDK 64-Bit Server VM version;
Deflater: A; Inflater: A; Provider is available; Picard
version: Version:4.4.0.0 [Today's date]
picard.sam.CreateSequenceDictionary done. Elapsed time: 0.53 minutes.
Runtime.totalMemory()=8388608000 Tool returned: 0 Using GATK jar
/gatk/gatk-package-4.4.0.0-local.jar Running:
java -Dsamjdk.use_async_io_read_samtools=false -Dsamjdk.use_async_io_write_samtools=true -Dsamjdk.use_async_io_write_tribble=false -Dsamjdk.compression_level=2 -Xms8000m -jar /gatk/gatk-package-4.4.0.0-local.jar CreateSequenceDictionary -R
/path/to/primary_assembly.fa
-O /path/to/primary_assembly.dict
I am all done
Why would I get the error ".dict: command not found I am going to make the file " especially when I look at the head
of the .dict file and it seems to look the way it should?
#!/bin/bash
andset -eo pipefail
as the first and second lines of your script. The former specifies the interpreter and the latter fails the entire script the moment one command fails. If you'd had that line, your script would have stopped executing at.dict: command not found
and the last line of your STDERR would tell you where the problem was. $\endgroup$