Entering edit mode
2.7 years ago
ManuelDB
▴
110
I am running GATK4 MarkDuplicates and when it is run directly in the command line
gatk MarkDuplicates --INPUT ./minimap2_sort.sam --METRICS_FILE ./dupMetrics.txt --CREATE_INDEX true --OUTPUT ./sorted_rmdupMINIMAP.bam
This works fine. However, if I create a script with exactly the same code I got this error
To get help, see http://broadinstitute.github.io/picard/index.html#GettingHelp
htsjdk.samtools.SAMException: Cannot read non-existent file: file:///mainfs/home/mdb1c20/my_onw_NGS_pipeline/scripts_my_first_NGS/comparing_tools/results/assample_results/minipap/to_variants/./minimap_sort.sam
^^^ ^
Can you see the 3 ///
Are you running
MarkDuplicates
in the directory that hasminimap2_sort.sam
?In other words, I think this file doesn't exist,
/mainfs/home/mdb1c20/my_onw_NGS_pipeline/scripts_my_first_NGS/comparing_tools/results/assample_results/minipap/to_variants/minimap_sort.sam
, butminimap_sort.sam
exists somewhere. To avoid this issue, you could try providing the absolute path tominimap_sort.sam
(e.g.--INPUT /mainfs/home/...intermediate_path.../minimap2_sort.sam
)This exist
This doesn't
With the absolute path, the 3 /// are added as well
Why is GATK adding
///
?What does "when I create a script" mean? Just a file that you try to submit as
bash script.sh
with the command in it?It looks like this is Java's Path class doing this -
Sorry it is not a solution to the
file:///
issue since from everything reported, it looks like MarkDuplicates isn't finding a file that exists. If it's a one-off analysis I would try to just add the absolute path.