From a59756286e7f58d7ccd639b149bbeeecd7409995 Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Mon, 8 Jun 2020 11:22:36 +0100 Subject: [PATCH] JAL-3641 allow protocol to be configured at top of script --- examples/groovy/FastQParser.groovy | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/groovy/FastQParser.groovy b/examples/groovy/FastQParser.groovy index 7658539..8414e54 100644 --- a/examples/groovy/FastQParser.groovy +++ b/examples/groovy/FastQParser.groovy @@ -18,9 +18,9 @@ import jalview.io.DataSourceType /* * EDIT THE FILE PATH BELOW TO IMPORT A FASTQ FILE */ -FASTQ_FILE = "/Users/jprocter/Downloads/small_normalised_illumina_adeno.fastq.gz" -FASTQ_FILE = "/Users/jprocter/Downloads/test.fastq" +FASTQ_FILE = "/Users/jprocter/Downloads/test.fastq" +FASTQ_FILE_PROTOCOL = DataSourceType.FILE // could also be DataSourceType.URL /* * A parser class to read or write the format @@ -135,7 +135,7 @@ def myFormat = { -> // read in the file specified at the top of the Groovy script -FastQFile parser = new FastQFile(new FileParse(FASTQ_FILE, DataSourceType.FILE)); +FastQFile parser = new FastQFile(new FileParse(FASTQ_FILE, FASTQ_FILE_PROTOCOL)); AlignmentI al = new jalview.datamodel.Alignment(parser.getSeqsAsArray()); parser.addAnnotations(al); jalview.gui.AlignFrame newwindow = new jalview.gui.AlignFrame(al,800,600); -- 1.7.10.2