Skip to content

Commit

Permalink
Merge pull request #77 from usegalaxy-eu/checklist_update
Browse files Browse the repository at this point in the history
Automatic update of ENA Sample Checklists
  • Loading branch information
bedroesb authored Jan 24, 2023
2 parents 62d3457 + cde0b9b commit 7605d87
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 0 deletions.
8 changes: 8 additions & 0 deletions ena_upload/templates/ENA_template_PLATFORM.xml
Original file line number Diff line number Diff line change
Expand Up @@ -101,4 +101,12 @@
<INSTRUMENT_MODEL py:when="row.instrument_model.lower().strip() == 'dnbseq-g400 fast'">DNBSEQ-G400 FAST</INSTRUMENT_MODEL>
<INSTRUMENT_MODEL py:when="row.instrument_model.lower().strip() == 'unspecified'">unspecified</INSTRUMENT_MODEL>
</DNBSEQ>
<ELEMENT py:when="row.platform.lower().strip() == 'element'" py:choose="">
<INSTRUMENT_MODEL py:when="row.instrument_model.lower().strip() == 'element aviti'">Element AVITI</INSTRUMENT_MODEL>
<INSTRUMENT_MODEL py:when="row.instrument_model.lower().strip() == 'unspecified'">unspecified</INSTRUMENT_MODEL>
</ELEMENT>
<ULTIMA py:when="row.platform.lower().strip() == 'ultima'" py:choose="">
<INSTRUMENT_MODEL py:when="row.instrument_model.lower().strip() == 'ug 100'">UG 100</INSTRUMENT_MODEL>
<INSTRUMENT_MODEL py:when="row.instrument_model.lower().strip() == 'unspecified'">unspecified</INSTRUMENT_MODEL>
</ULTIMA>
</PLATFORM>
2 changes: 2 additions & 0 deletions ena_upload/templates/ENA_template_samples_ERC000047.xml
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,12 @@ def attributetest(row, column):
<VALUE>${row['number of standard tRNAs extracted']}</VALUE>
</SAMPLE_ATTRIBUTE>
</py:if>
<py:if test="attributetest(row, 'assembly software')">
<SAMPLE_ATTRIBUTE>
<TAG>assembly software</TAG>
<VALUE>${row['assembly software']}</VALUE>
</SAMPLE_ATTRIBUTE>
</py:if>
<py:if test="attributetest(row, 'feature prediction')">
<SAMPLE_ATTRIBUTE>
<TAG>feature prediction</TAG>
Expand Down
8 changes: 8 additions & 0 deletions ena_upload/templates/ENA_template_samples_ERC000048.xml
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,12 @@ def attributetest(row, column):
<VALUE>${row['number of standard tRNAs extracted']}</VALUE>
</SAMPLE_ATTRIBUTE>
</py:if>
<py:if test="attributetest(row, 'assembly software')">
<SAMPLE_ATTRIBUTE>
<TAG>assembly software</TAG>
<VALUE>${row['assembly software']}</VALUE>
</SAMPLE_ATTRIBUTE>
</py:if>
<py:if test="attributetest(row, 'feature prediction')">
<SAMPLE_ATTRIBUTE>
<TAG>feature prediction</TAG>
Expand Down Expand Up @@ -156,15 +158,19 @@ def attributetest(row, column):
<VALUE>${row['tRNA extraction software']}</VALUE>
</SAMPLE_ATTRIBUTE>
</py:if>
<py:if test="attributetest(row, 'completeness score')">
<SAMPLE_ATTRIBUTE>
<TAG>completeness score</TAG>
<VALUE>${row['completeness score']}</VALUE>
<UNITS>%</UNITS>
</SAMPLE_ATTRIBUTE>
</py:if>
<py:if test="attributetest(row, 'completeness software')">
<SAMPLE_ATTRIBUTE>
<TAG>completeness software</TAG>
<VALUE>${row['completeness software']}</VALUE>
</SAMPLE_ATTRIBUTE>
</py:if>
<py:if test="attributetest(row, 'completeness approach')">
<SAMPLE_ATTRIBUTE>
<TAG>completeness approach</TAG>
Expand Down Expand Up @@ -202,10 +208,12 @@ def attributetest(row, column):
<VALUE>${row['assembly quality']}</VALUE>
</SAMPLE_ATTRIBUTE>
</py:if>
<py:if test="attributetest(row, 'taxonomic identity marker')">
<SAMPLE_ATTRIBUTE>
<TAG>taxonomic identity marker</TAG>
<VALUE>${row['taxonomic identity marker']}</VALUE>
</SAMPLE_ATTRIBUTE>
</py:if>
<py:if test="attributetest(row, 'taxonomic classification')">
<SAMPLE_ATTRIBUTE>
<TAG>taxonomic classification</TAG>
Expand Down
28 changes: 28 additions & 0 deletions ena_upload/templates/SRA.common.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -675,6 +675,20 @@
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="ELEMENT">
<xs:complexType>
<xs:sequence>
<xs:element name="INSTRUMENT_MODEL" maxOccurs="1" minOccurs="1" type="com:typeElementModel"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="ULTIMA">
<xs:complexType>
<xs:sequence>
<xs:element name="INSTRUMENT_MODEL" maxOccurs="1" minOccurs="1" type="com:typeUltimaModel"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:choice>

</xs:complexType>
Expand Down Expand Up @@ -1040,6 +1054,20 @@
</xs:restriction>
</xs:simpleType>

<xs:simpleType name="typeElementModel">
<xs:restriction base="xs:string">
<xs:enumeration value="Element AVITI"/>
<xs:enumeration value="unspecified"/>
</xs:restriction>
</xs:simpleType>

<xs:simpleType name="typeUltimaModel">
<xs:restriction base="xs:string">
<xs:enumeration value="UG 100"/>
<xs:enumeration value="unspecified"/>
</xs:restriction>
</xs:simpleType>

<!-- STRING ENUMERATIONS END -->

</xs:schema>

0 comments on commit 7605d87

Please sign in to comment.