----- Mail original -----
> De: "Olivier Sallou" <[email protected]>
> À: "Andreas Tille" <[email protected]>
> Cc: "Debian Med Project List" <[email protected]>
> Envoyé: Dimanche 17 Août 2014 14:11:58
> Objet: Re: [Help] Latest version of IGV fails to build
> 
> 
> 
> ----- Mail original -----
> > De: "Andreas Tille" <[email protected]>
> > À: "Debian Med Project List" <[email protected]>
> > Envoyé: Vendredi 15 Août 2014 13:29:27
> > Objet: [Help] Latest version of IGV fails to build
> > 
> > Hi,
> > 
> > I commited the packaging for last IGV to Git but it fails to build:
> > 
> > compile:
> >     [javac] /tmp/buildd/igv-2.3.34+dfsg/build.xml:175: warning:
> >     'includeantruntime' was not set, defaulting to build.sysclasspath=last;
> >     set to false for repeatable builds
> >     [javac] Compiling 864 source files to /tmp/buildd/igv-2.3.34+dfsg/tmp
> >     [javac] warning: [options] bootstrap class path not set in conjunction
> >     with -source 1.6
> >     [javac]
> >     /tmp/buildd/igv-2.3.34+dfsg/src/org/broad/igv/sam/SAMWriter.java:58:
> >     error: BAMFileWriter is not public in net.sf.samtools; cannot be
> >     accessed from outside package
> >     [javac]             writer = new BAMFileWriter(stream, null);
> >     [javac]                          ^
> >     [javac] Note: Some input files use or override a deprecated API.
> >     [javac] Note: Recompile with -Xlint:deprecation for details.
> >     [javac] Note: Some input files use unchecked or unsafe operations.
> >     [javac] Note: Recompile with -Xlint:unchecked for details.
> >     [javac] 1 error
> >     [javac] 1 warning
> > 
> > BUILD FAILED
> > 
> > 
> > I guess for a Java-knowledged person this is easy to fix but I have no
> > idea how.  I also have the impression we could extend our
> > "Files-Excluded" to some more JARs which are distributed with IGV
> > source.
> > 
> Hi,
> I dont't if you found someone to fix this in the meanwhile, but I think it is
> a matter of version of samtools library between the one originally used by
> igv and the one available in Debian.
> 
> 
> This issue is related to a matter of method visibility inside/outside the
> samtools package. The method was certainly public in original library and is
> now private. Maybe a new method should be used, we should check the samtools
> API.
> 
> https://github.com/samtools/htsjdk/blob/master/src/java/htsjdk/samtools/BAMFileWriter.java
> shows that BAMFileWriter is protected, so cannot be used by external
> libraries.
> 
> Maybe something like, from SAMFileWriterFactory.java, could do the job:
> 
> write = makeBAMWriter(mySamFileHeader,false,one_output_file);
> 
> but we need to map the stream to one_ouput_file, and see what could be mapped
> to mySamFileHeader...

There is indeed an issue. The samtools library (picard-tools) in Debian has a 
private access to the BAMFileWriter but does not offer public method to create 
one with a stream. There is possibility to do so for a File, but not a stream. 
so there is no way to adapt this method for the moment with the library in 
Debian.

We need the method:
 public SAMFileWriter makeBAMWriter(final SAMFileHeader header, final boolean 
presorted, final OutputStream stream) 

Latest in picard-tools does not provide such method, while available at [0]



An other option is to comment this method (as well in tests), this is what I 
made in current patch I pushed to git repo (though I also put the expected but 
not available method to use). Method on streams does not seem to be used 
elsewhere.... and compilation/basic run goes fine.

But could there be any side effect ? People using igv.jar as a library?

I also udpated 01-build.xml patch that had some errors with batik-codec and 
goby jars.

I did not upload however, according to decision to be made if methods should be 
commented or not, waiting to get available methods in picard-tools.

[0] 
https://github.com/samtools/htsjdk/blob/master/src/java/htsjdk/samtools/SAMFileWriterFactory.java

Olivier



> 
> 
> So, this is a way to fix this, but with an API quite different, ie adapting
> IVG to the samtools version available in Debian.
> 
> I will try to see if I can try to fix this next week, but it may not be so
> easy... and more complex to maintain.
> 
> Olivier
> 
> > Feel free to fix and upload the package (or just commit a fix to Git and
> > tell me to upload)
> > 
> >        Andreas.
> > 
> > --
> > http://fam-tille.de
> > 
> > 
> > --
> > To UNSUBSCRIBE, email to [email protected]
> > with a subject of "unsubscribe". Trouble? Contact
> > [email protected]
> > Archive: https://lists.debian.org/[email protected]
> > 
> >
> 
> 
> --
> To UNSUBSCRIBE, email to [email protected]
> with a subject of "unsubscribe". Trouble? Contact [email protected]
> Archive:
> https://lists.debian.org/[email protected]
> 
>


--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]
Archive: 
https://lists.debian.org/[email protected]

Reply via email to