broadinstitute/picard

java environment not detected when using option OUTPUT in BuilBamIndex

r-poloni opened this issue · 1 comments

Bug Report

Affected tool(s)

BuilBamIndex

Affected version(s)

picard 3
jdk-17.0.6

Description

I am running the BuilBamIndex with parallel, and get an error "/usr/bin/bash: java: command not found".

Steps to reproduce

This is the command:

ls -1 "$DEDUPFOLDER"/*dedup.bam |
    parallel -j 10 echo "Indexing sample {}" \; java -jar "$PICARD" BuildBamIndex INPUT={} OUTPUT="$DEDUPFOLDER"/{}.bai

When I use the "OUTPUT" option, I get thge error, if I remove the option, everything goes fine, and the indexes are written in my current working directory. This is not an issue of java I believe, because other toold such as MarkDuplicates work just fine, with the exact same command.
Of course it is not a big deal, but I think it's better to have the issue reported.

@r-poloni The error message you report appears to be coming from bash, not picard. picard doesn't seem to even be executing. I would suggest trying to reproduce this error without parallel, using BuildBamIndex directly with an OUTPUT arg. If you can provide an example where that fails, we can take a look, but otherwise I don't see a Picard issue here.