samtools / htsjdk

A Java API for high-throughput sequencing data (HTS) formats.
http://samtools.github.io/htsjdk/
283 stars 243 forks source link

Resolve issues around integrating HTTP NIO provider #1689

Open lbergelson opened 11 months ago

lbergelson commented 11 months ago

Trying to add an http nio provider as a test dependency as part of #1688 caused issues because of some deficiencies in the library.

See the test results here

There are 2 failure types:

  1. Not implemented exceptions HtsgetBAMCodecTest because of a missing Path.resolveSibling() method
  2. A failure in SamReaderFactoryTest.testOpenURIFallback() due not falling back for http URLS

example

Gradle suite > Gradle test > htsjdk.beta.codecs.reads.htsget.HtsgetBAM.HtsgetBAMCodecTest > testGetHeader FAILED
    java.lang.UnsupportedOperationException: Not implemented
        at org.broadinstitute.http.nio.HttpPath.resolveSibling(HttpPath.java:362)
        at htsjdk.samtools.SamFiles.lookForIndex(SamFiles.java:71)
        at htsjdk.samtools.SamFiles.findIndex(SamFiles.java:38)
        at htsjdk.beta.plugin.reads.ReadsBundle.resolveIndex(ReadsBundle.java:167)
        at htsjdk.beta.plugin.reads.ReadsBundle.resolveIndex(ReadsBundle.java:147)
        at htsjdk.beta.plugin.registry.ReadsResolver.getReadsDecoder(ReadsResolver.java:73)
        at htsjdk.beta.codecs.reads.htsget.HtsgetBAM.HtsgetBAMCodecTest.testGetHeader(HtsgetBAMCodecTest.java:47)