Closed pd3 closed 5 years ago
Belated thanks for making this reasonably-sized test case! I'll look into it as soon as I get a chance!
For now I've been running pilon with this temporary fix
diff --git a/src/main/scala/org/broadinstitute/pilon/GenomeRegion.scala b/src/main/scala/org/broadinstitute/pilon/GenomeRegion.scala
index e1a00e5..05a9d16 100644
--- a/src/main/scala/org/broadinstitute/pilon/GenomeRegion.scala
+++ b/src/main/scala/org/broadinstitute/pilon/GenomeRegion.scala
@@ -732,9 +732,13 @@ class GenomeRegion(val contig: ReferenceSequence, start: Int, stop: Int)
}
def refBase(locus: Int) = {
- require(inRegion(locus), "can't fetch base outside region")
- //bases(index(locus)).toChar.toUpper
- contigBases(locus - 1).toChar.toUpper
+ if ( !inRegion(locus) )
+ {
+ log("Warning: can't fetch base "+locus+", it is outside of the region: "+contig.getName+":"+start+"-"+stop+", replacing with N\n")
+ "N";
+ }
+ else
+ contigBases(locus - 1).toChar.toUpper
Same error message. But if remove the "--vcf" option, everything works. You can use other tools to generate vcf.
I've encountered the same problem as described in https://github.com/broadinstitute/pilon/issues/4.
A test case to reproduce the problem can be downloaded from here ftp://ngs.sanger.ac.uk/scratch/project/team145/pd3/pilon-crash.tgz
Briefly, this is the command
and it ends with this exception