Closed ialbert closed 7 years ago
Hi @ialbert , yes I should add this in the documentation, the input file is a list of path to BAM files.
echo RK15_S15_corrected.bam > input.list
java -jar ~/src/jvarkit/dist/findallcoverageatposition.jar -p "chr18:34314650" input.list
that's why I usually use 'find' for this tool.
Ah ok, I got it.
The documentation states that the usage is:
but for me it seems to only work when the file is specified from the stdin:
echo RK15_S15_corrected.bam | java -jar ~/src/jvarkit/dist/findallcoverageatposition.jar -p "chr18:34314650"
produces:
whereas:
java -jar ~/src/jvarkit/dist/findallcoverageatposition.jar -p "chr18:34314650" RK15_S15_corrected.bam
produces an empty line:
I believe that the problem is that the
r=IOUtils.openURIForBufferedReading(filename);
inhttps://github.com/lindenb/jvarkit/blob/master/src/main/java/com/github/lindenb/jvarkit/tools/misc/FindAllCoverageAtPosition.java#L504
returns the contents of the file, whereas the
scan
that uses the iterator expects the iterator to return the name of the file rather than the contents of ithttps://github.com/lindenb/jvarkit/blob/master/src/main/java/com/github/lindenb/jvarkit/tools/misc/FindAllCoverageAtPosition.java#L227