fulcrumgenomics / fgbio

Tools for working with genomic and high throughput sequencing data.
http://fulcrumgenomics.github.io/fgbio/
MIT License
308 stars 67 forks source link

PickIlluminaIndices fails to create indices #69

Open nh13 opened 8 years ago

nh13 commented 8 years ago
java -Xmx48G -jar /path/to/fgbio/target/scala-2.11/fgbio-0.1.2-SNAPSHOT.jar \
    PickIlluminaIndices \
    -n 1000000 \
    -o /path/to/output.txt \
    --vienna-rna-dir /path/to/ViennaRNA-2.2.5/src \
    -l 10 \
    -e 2 \
    --allow-reverses=false \
    --allow-reverse-complements=false \
    --allow-palindromes=false \
    --max-homopolymer=2 \
    --min-gc=0.0 \
    --max-gc=0.7 \
    -t=32 \
    --min-delta-g=-10.0 \
    --adapters=Nil

I tried both master and the additions on #68. In the latter case, no Exception is thrown inside each execute statement in the IndexSet.remove method, but we get:

INFO    2016-07-22 14:09:16 PickIlluminaIndicesCommand  Down to 186400 indices.
INFO    2016-07-22 14:09:16 PickIlluminaIndicesCommand  Down to 186300 indices.
INFO    2016-07-22 14:09:16 PickIlluminaIndicesCommand  Down to 186200 indices.
INFO    2016-07-22 14:09:16 PickIlluminaIndicesCommand  Down to 186100 indices.
INFO    2016-07-22 14:09:17 PickIlluminaIndicesCommand  Down to 186000 indices.
INFO    2016-07-22 14:09:17 PickIlluminaIndicesCommand  Down to 185900 indices.
INFO    2016-07-22 14:09:17 PickIlluminaIndicesCommand  Down to 185800 indices.
[2016/07/22 14:09:17 | FgBioMain | Info] PickIlluminaIndices failed. Elapsed time: 3.20 minutes.
Exception in thread "main" java.lang.IllegalStateException: Unable to remove the index from the ranked indices: {sequence: TACTATTCCA, score: -2143048647, minEditDistance:1}
    at com.fulcrumgenomics.util.PickIlluminaIndicesCommand.execute(PickIlluminaIndicesCommand.java:323)
    at com.fulcrumgenomics.util.PickIlluminaIndices.execute(PickIlluminaIndices.scala:59)
    at com.fulcrumgenomics.cmdline.FgBioMain.makeItSo(FgBioMain.scala:70)
    at com.fulcrumgenomics.cmdline.FgBioMain.makeItSoAndExit(FgBioMain.scala:53)
    at com.fulcrumgenomics.cmdline.FgBioMain$.main(FgBioMain.scala:41)
    at com.fulcrumgenomics.cmdline.FgBioMain.main(FgBioMain.scala)

This does not happen each time I run the tool, so it is obviously there's a concurrency issue.

nh13 commented 8 years ago

I added a call to super.contains(index) in the IndexSet.remove method prior to the call to super.remove, such that if the index was not contained an exception would be thrown. And an exception was thrown. So we are calling IndexSet.remove passing an index that is not in the set.