From 5600712d326f77e73cb5c887fe6eb4006e008abb Mon Sep 17 00:00:00 2001
From: Robert Bossy <Robert.Bossy@inra.fr>
Date: Wed, 17 Feb 2021 12:33:24 +0100
Subject: [PATCH] renamed strain form fields

---
 dsmz-match.plan | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/dsmz-match.plan b/dsmz-match.plan
index 0d02a85..9379fae 100644
--- a/dsmz-match.plan
+++ b/dsmz-match.plan
@@ -11,7 +11,7 @@
     <xslTransform>bacdive2alvisnlp.xslt</xslTransform>
   </read>
 
-  <saturate-strain-number>
+  <saturate-catalog-number>
     <feature class="Action">
       <target>documents.sections:strain_number</target>
       <action>str:split:',':each(contents)</action>
@@ -20,19 +20,19 @@
 
     <section class="Action">
       <target>documents.sections:strain_number.nav:features:each</target>
-      <action>nav:parent.document.new:section:strain-number(str:trim(target.@value))</action>
+      <action>nav:parent.document.new:section:catalog-number(str:trim(target.@value))</action>
       <createSections/>
     </section>
-  </saturate-strain-number>
+  </saturate-catalog-number>
 
-  <strain-name class="Action">
-    <target>documents.sections:strain-number</target>
-    <action>document.new:section:strain-name(sections:species.contents ^ " " ^ target.contents)</action>
+  <species-and-number class="Action">
+    <target>documents.sections:catalog-number</target>
+    <action>document.new:section:species-and-number(sections:species.contents ^ " " ^ target.contents)</action>
     <createSections/>
-  </strain-name>
+  </species-and-number>
 
   <match class="FileMapper">
-    <target>documents.(sections:strain-number | sections:strain-name)</target>
+    <target>documents.(sections:catalog-number | sections:species-and-number)</target>
     <form>contents</form>
     <targetFeatures>,taxid,canonical-name,path,pos,rank</targetFeatures>
   </match>
@@ -67,7 +67,7 @@
     <equivalent-strains class="TabularExport">
       <outDir>.</outDir>
       <corpusFile>equivalent-strains.txt</corpusFile>
-      <lines>documents[sections[@rank == "no rank"]].sections:strain-number[contents ?= " "]</lines> <!-- exclude ym20-087 kondo51 etc -->
+      <lines>documents[sections[@rank == "no rank"]].sections:catalog-number[contents ?= " "]</lines> <!-- exclude ym20-087 kondo51 etc -->
       <columns separator=";">
 	str:replace(str:lower(contents), " ", ":");
 	document.sections[@rank == "no rank"]{0}.@taxid
@@ -77,18 +77,18 @@
     <new-strains>
       <identifier class="Action">
 	<target>documents[sections[@rank == "species" or @rank == "subspecies"]]</target>
-	<action>set:feat:new-taxid(str:replace(str:lower(sections:strain-number[contents ^= "DSM"].contents), " ", ":"))</action>
+	<action>set:feat:new-taxid(str:replace(str:lower(sections:catalog-number[contents ^= "DSM"].contents), " ", ":"))</action>
 	<setFeatures/>
       </identifier>
 
       <export class="TabularExport">
 	<outDir>.</outDir>
 	<corpusFile>taxa+id_dsmz.txt</corpusFile>
-	<lines>documents[@new-taxid].(sections:strain-number|sections:strain-name)</lines>
+	<lines>documents[@new-taxid].(sections:catalog-number | sections:species-and-number)</lines>
 	<columns separator=";">
 	  contents;
 	  document.@new-taxid;
-	  document.sections:strain-name[contents ?= "DSM"].contents;
+	  document.sections:species-and-number[contents ?= "DSM"].contents;
 	  document.sections[@taxid]{0}.@path ^ "/" ^ document.@new-taxid;
 	  document.sections[@taxid]{0}.@pos;
 	  "no rank"
-- 
GitLab