Merge branch 'Jalview-JS/develop' of https://source.jalview.org/git/jalview.git into...
authorhansonr <hansonr@STO24954W.ad.stolaf.edu>
Mon, 1 Apr 2019 14:31:10 +0000 (09:31 -0500)
committerhansonr <hansonr@STO24954W.ad.stolaf.edu>
Mon, 1 Apr 2019 14:31:10 +0000 (09:31 -0500)
buildcore.xml
src/jalview/ext/ensembl/EnsemblGene.java

index 9520f9e..3c21f43 100644 (file)
@@ -6,7 +6,7 @@
     </classpath>
   </taskdef>
 
-  <target name="build-all-cores" id="build-all-cores">
+  <target name="build-all-cores" id="build-all-cores" depends="toJs">
     <foreach target="CallToJs" param="classlist">
       <path>
         <fileset dir="./classlists/" includes="*.txt" />
@@ -22,7 +22,8 @@
 
   <target name="toJs" id="toJs">
     <!-- sensible defaults for default target -->
-    <property name="site.path" value="site/swingjs" />
+    <property name="site" value="site"/>
+    <property name="site.path" value="${site}/swingjs" />
     <property name="core.name" value="_jalview" />
     <property name="classlist"  
       description="Class list .txt generated by java2script classloader to be bundled into corefile - default is _j2sclasslist.txt" 
@@ -35,8 +36,8 @@
 
     <!-- make core files -->
 
-    <echo>creating and compressing core files - warnings are OK; "does not exist" is trouble</echo>
-    <echo>reading core class list from file coreclasses</echo>
+    <echo>Building core file '${core.name}' - warnings are OK; "does not exist" is trouble</echo>
+    <echo>Reading core class list from file ${classlist}</echo>
     <loadresource property="coreclasses">
       <file file="${classlist}"/>
     </loadresource>
                ${coreclasses}
                " />
     </antcall>
+    <antcall target="publish-core-template"/>
+  </target>
+
+  <target name="publish-core-template" id="publish-core-template" description="Creates a new file ${template.name}_${core.name} from ${template.html} in ${site} which include core file ${core.name} in the Info block">
+    <!-- TODO: extend to process all html templates -->
+    <property name="template.html" value="jalview_bin_Jalview.html"/>
+    <property name="template.name" value="JalviewJS"/>
 
-    <echo>......Now copy an html file in site/ and add   core:"${core.name}",    to the Info block.</echo>
-    <copy file="site/jalview_bin_Jalview.html" tofile="site/JalviewJS_${core.name}.html"/>
-    <replace token="NONE" value="${core.name}" file="site/JalviewJS_${core.name}.html"/>
+    <echo>......Now copying ${site}/${template.html} as ${$template.name}_${core.name}.html with core:"${core.name}", added to the Info block.</echo>
+    <copy file="${site}/${template.html}" tofile="${site}/${template.name}_${core.name}.html"/>
+    <replace token="NONE" value="${core.name}" file="${site}/${template.name}_${core.name}.html"/>
 
   </target>
 
index 7904df3..0d73a47 100644 (file)
@@ -135,9 +135,6 @@ public class EnsemblGene extends EnsemblSeqProxy
   @Override
   public AlignmentI getSequenceRecords(String query) throws Exception
   {
-         
-         
-         
     /*
      * convert to a non-duplicated list of gene identifiers
      */
@@ -540,10 +537,11 @@ public class EnsemblGene extends EnsemblSeqProxy
   @Override
   public String getTestQuery()
   {
-    return "ENSG00000157764"; // BRAF, 5 transcripts, reverse strand
+    return Platform.isJS() ? "ENSG00000123569" : "ENSG00000157764";
+    // ENSG00000123569 // H2BFWT histone, 2 transcripts, reverse strand
+    // ENSG00000157764 // BRAF, 5 transcripts, reverse strand
     // ENSG00000090266 // NDUFB2, 15 transcripts, forward strand
     // ENSG00000101812 // H2BFM histone, 3 transcripts, forward strand
-    // ENSG00000123569 // H2BFWT histone, 2 transcripts, reverse strand
   }
 
   /**