From b619c31a9a4e3b548e9e166028a12b5db96eb070 Mon Sep 17 00:00:00 2001 From: tcarver <tjc> Date: Wed, 9 Apr 2014 09:50:35 +0100 Subject: [PATCH] prompt to concatenate or use GFF tabix index --- uk/ac/sanger/artemis/io/DocumentEntryFactory.java | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/uk/ac/sanger/artemis/io/DocumentEntryFactory.java b/uk/ac/sanger/artemis/io/DocumentEntryFactory.java index f530a0863..a83b7b235 100644 --- a/uk/ac/sanger/artemis/io/DocumentEntryFactory.java +++ b/uk/ac/sanger/artemis/io/DocumentEntryFactory.java @@ -31,6 +31,8 @@ import uk.ac.sanger.artemis.util.LinePushBackReader; import java.io.File; import java.io.IOException; +import javax.swing.JOptionPane; + /** * This class contains the method makeDocumentEntry (), which creates a @@ -79,7 +81,18 @@ abstract public class DocumentEntryFactory document.getInputStream() instanceof net.sf.samtools.util.BlockCompressedInputStream) { if(IndexedGFFDocumentEntry.isIndexed( ((File)document.getLocation()) )) - return new IndexedGFFDocumentEntry(document); + { + Object[] possibleValues = { "Use index", "Ignore index" }; + int sel = JOptionPane.showOptionDialog(null, + "Use the GFF index file (to increase the performance)\n"+ + "or concatenate the sequences together?", + "Indexed GFF", + JOptionPane.DEFAULT_OPTION, JOptionPane.WARNING_MESSAGE, + null, possibleValues, possibleValues[0]); + + if(sel == 0) + return new IndexedGFFDocumentEntry(document); + } } final LinePushBackReader document_reader = -- GitLab