[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Pilon might need newer scala



Hi,

Le 01/10/2021 à 16:52, Andreas Tille a écrit :
Hi,

I intended to update pilon to its latest upstream version but
got:

scalac -classpath /usr/share/java/htsjdk.jar -d pilon.jar src/main/scala/org/broadinstitute/pilon/*
src/main/scala/org/broadinstitute/pilon/BamFile.scala:24: error: object jdk is not a member of package scala
import scala.jdk.CollectionConverters._
              ^
src/main/scala/org/broadinstitute/pilon/BamFile.scala:65: error: value asScala is not a member of java.util.List[htsjdk.samtools.SAMSequenceRecord]
     val seqs = r.getFileHeader.getSequenceDictionary.getSequences.asScala
                                                                   ^
src/main/scala/org/broadinstitute/pilon/BamFile.scala:96: error: value asScala is not a member of htsjdk.samtools.SAMRecordIterator
     val reads = r.queryUnmapped.asScala.filter(validateRead(_)).toList
                                 ^
src/main/scala/org/broadinstitute/pilon/BamFile.scala:119: error: value asScala is not a member of htsjdk.samtools.SAMRecordIterator
possible cause: maybe a semicolon is missing before `value asScala'?
       (region.start-10000) max 0, (region.stop+10000) min region.contig.length).asScala
                                                                                 ^
src/main/scala/org/broadinstitute/pilon/PileUpRegion.scala:22: error: object jdk is not a member of package scala
import scala.jdk.CollectionConverters._
              ^
src/main/scala/org/broadinstitute/pilon/BamFile.scala:297: error: value asScala is not a member of htsjdk.samtools.SAMRecordIterator
     for (read <- r.iterator.asScala) {
                             ^
src/main/scala/org/broadinstitute/pilon/BamFile.scala:341: error: value asScala is not a member of htsjdk.samtools.SAMRecordIterator
     val reads = r.queryOverlapping(region.name, region.start, region.stop).asScala.filter(validateRead(_)).toList
                                                                            ^
src/main/scala/org/broadinstitute/pilon/Scaffold.scala:31: error: object jdk is not a member of package scala
import scala.jdk.CollectionConverters._
              ^
src/main/scala/org/broadinstitute/pilon/PileUpRegion.scala:136: error: value asScala is not a member of java.util.List[htsjdk.samtools.CigarElement]
     val cigarElements = cigar.getCigarElements.asScala
                                                ^
src/main/scala/org/broadinstitute/pilon/Scaffold.scala:351: error: value asScala is not a member of htsjdk.samtools.SAMRecordIterator
     for (read <- reader.iterator.asScala if (!read.getReadUnmappedFlag)) {
                                  ^
10 errors found


Just verifying with Pierre whether my assumption that this requires
newer Scala is correct or whether there might be possibly a simple fix.

Yes, as a follow-up to the discussion we had some weeks ago [0]: scala.jdk has been provided since Scala 2.13, and in Debian we are stuck with 2.11 at the moment.

If I remember correctly, many of the last upstream commits of pilon modify the code so that it needs Scala 2.13, and I figured out patching the code to depend on Scala 2.11 would not be that trivial.

So yes, I think we definitely need a newer Scala :-(


Kind regards

      Andreas.


Best regards,

--
Pierre

[0] https://lists.debian.org/debian-med/2021/09/msg00016.html


Reply to: