Update XML

It is possible to programmatically update any metadata object. The only exception to this rule is that submitted run objects can't be made to point to different data files. To update an object, you need a submission XML document with MODIFY actions pointing to the updated objects.

 

Using Submission XML to update objects

To update objects, you must use the MODIFY action instead of ADD action. The MODIFY action should point to XML documents containing objects to be updated. When MODIFY action is given it is verified that the objects being updated must already have been accessioned. This is done by comparing the object alias or the previously assigned accession number against objects already submitted.

Below is an example of a Submission XML document used to update sample objects stored in sample.xml document. Please note the use the MODIFY action and please retain the empty attribute target as this is required to validate the Submission XML Schema.

<?xml version="1.0" encoding="UTF-8"?>
<SUBMISSION_SET>
   <SUBMISSION alias="anUpdate" center_name="YourCenterName">
	<ACTIONS>
   		<ACTION>
   			<MODIFY source="sample.xml" schema="sample"/>
   		</ACTION>
<ACTION>
<PROTECT/>
</ACTION>  
</ACTIONS>
</SUBMISSION>
</SUBMISSION_SET>

Preparing objects for update

You can update any object, but submitted run objects can't be updated to point to different data file.

Checklist for preparing an object for update:

  • The XML for the object must either contain alias and center_name or the assigned accession.
  • If you provide us with the alias and center_name they must be given exactly as in the original submission. The alias and center_name are guaranteed by the archive to constitute unique identifiers for the objects.
  • If you provide us with the accession it must be the accession number assigned to the object during the original submission.
  • Either refname or accession are mandatory if references are made to other objects.
  • In Study objects, the INSDC project ID can't be updated to zero ('0') from an already-assigned non-negative value.
  • IN Sample objects, INSDC taxonomy ID can't be updated to zero ('0') from an already-assigned non-negative value.

 

Example 

Original Sample XML

<SAMPLE accession="EGAN00000000011" center_name="MyCenter"
        alias="Solexa sequencing of H.sapiens random 200 bp library">       
    <SAMPLE_NAME>
        <TAXON_ID>9606</TAXON_ID>
        <COMMON_NAME>Human</COMMON_NAME>
    </SAMPLE_NAME>
    <DESCRIPTION>Solexa sequencing of Saccharomyces paradoxus 
	strain W7 random 200 bp library</DESCRIPTION>
</SAMPLE>

Updated Sample XML (using the assigned accession)

<SAMPLE accession="EGA00000000011" >
    <TITLE>My title</TITLE>
    <SAMPLE_NAME>
        <TAXON_ID>9606</TAXON_ID>
        <COMMON_NAME>H.sapiens</COMMON_NAME>
        <ANONYMIZED_NAME>Sample A2424</ANONYMIZED_NAME>
    </SAMPLE_NAME>
    <DESCRIPTION>Solexa sequencing of H.sapiens random 200 bp library</DESCRIPTION>
    <SAMPLE_ATTRIBUTES>
        <SAMPLE_ATTRIBUTE>
            <TAG>Gender</TAG>
    		<VALUE>male</VALUE>
        </SAMPLE_ATTRIBUTE>
        <SAMPLE_ATTRIBUTE>
            <TAG>Phenotype</TAG>
		    <VALUE>Pancreatic cancer</VALUE>
    	</SAMPLE_ATTRIBUTE>
	</SAMPLE_ATTRIBUTES>
</SAMPLE>

Updated Sample XML (using the alias and center name)

<SAMPLE center_name="MyCenter"
        alias="Solexa sequencing of H.sapiens random 200 bp library">
    <TITLE>H.sapiens</TITLE>
    <SAMPLE_NAME>
        <TAXON_ID>9606</TAXON_ID>
        <COMMON_NAME>Human</COMMON_NAME>
        <ANONYMIZED_NAME>Sample A2424</ANONYMIZED_NAME>
    </SAMPLE_NAME>
    <DESCRIPTION>Solexa sequencing of H.sapiens random 200 bp library</DESCRIPTION>
    <SAMPLE_ATTRIBUTES>
        <SAMPLE_ATTRIBUTE>
            <TAG>Gender</TAG>
            <VALUE>male</VALUE>
        </SAMPLE_ATTRIBUTE>
        <SAMPLE_ATTRIBUTE>
            <TAG>phenotype</TAG>
            <VALUE>Pancreatic cancer</VALUE>
        </SAMPLE_ATTRIBUTE>
    </SAMPLE_ATTRIBUTES>
</SAMPLE>