I am trying to run this picard tool RevertSam
, but I am not sure why it is throwing error for "non-existent" file. I can also ls
this bam file, so it is there. What am I missing here?
fileName="little.bam"
JAVAOPTS="-Xms2g -Xmx4g -XX:+UseSerialGC -Dpicard.useLegacyParser=false"
/usr/bin/java ${JAVAOPTS} -jar /usr/bin/picard.jar RevertSam -I /mnt/an/test/${fileName} -O $PWD -SORT_ORDER queryname -COMPRESSION_LEVEL 0 -VALIDATION_STRINGENCY SILENT
I am not sure why it generates this error for non-exixtent file though the file is presen in given location.
Deflater: Intel; Inflater: Intel; Provider GCS is not available; Picard version: Version:2.20.8-SNAPSHOT
[Thu Nov 26 10:56:33 CST 2020] picard.sam.RevertSam done. Elapsed time: 0.00 minutes.
Runtime.totalMemory()=2075918336
To get help, see http://broadinstitute.github.io/picard/index.html#GettingHelp
Exception in thread "main" htsjdk.samtools.SAMException: Cannot read non-existent file: file:///mnt/an/test/little.bam
at htsjdk.samtools.util.IOUtil.assertFileIsReadable(IOUtil.java:483)
at htsjdk.samtools.util.IOUtil.assertFileIsReadable(IOUtil.java:470)
at picard.sam.RevertSam.doWork(RevertSam.java:248)
at picard.cmdline.CommandLineProgram.instanceMain(CommandLineProgram.java:305) at picard.cmdline.PicardCommandLine.instanceMain(PicardCommandLine.java:103) at picard.cmdline.PicardCommandLine.main(PicardCommandLine.java:113)