From: Jim Procter Date: Mon, 8 Jun 2020 10:22:36 +0000 (+0100) Subject: JAL-3641 allow protocol to be configured at top of script X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=a59756286e7f58d7ccd639b149bbeeecd7409995;p=jalview.git JAL-3641 allow protocol to be configured at top of script --- 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);