Skip to content

Commit

Permalink
made shuffle algorithm warn instead of fail when not enough sequences…
Browse files Browse the repository at this point in the history
… are found.
  • Loading branch information
jsonbrooks committed Oct 22, 2019
1 parent 2a7acde commit 8d84b59
Show file tree
Hide file tree
Showing 13 changed files with 8 additions and 3,843,396 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,7 @@ Thumbs.db
.project

# Local gradle from wrapper
.gradle/
.gradle/

# Large FIMO files we don't need
cisml.xml
5 changes: 4 additions & 1 deletion src/main/kotlin/step/RandomSequences.kt
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,10 @@ fun randomSequences(twoBit: Path,
}

val incomplete = outputsTrackers.filter { it.outputs.size < outputsPerInput }
if (incomplete.isNotEmpty()) throw Exception("Could not find enough sequences matching GC Content of inputs")
if (incomplete.isNotEmpty()) {
val missing = incomplete.map { outputsPerInput - it.outputs.size }.sum()
log.warn { "Could not find enough sequences matching GC Content of inputs. Missing sequences: $missing" }
}

val outputSequences = outputsTrackers.flatMap { it.outputs }

Expand Down
Loading

0 comments on commit 8d84b59

Please sign in to comment.