Submitting a bin sample ================== For every bin we like to submit, we will need to create a bin sample. That bin sample should be linked to the environmental sample. As before, we will rely upon the programmatical submission using ``curl`` and an XML file. First, create a work folder for submissions and a subfolder for the sample files:: mkdir -p /mnt/submission/bins/sample/ cd /mnt/submission/bins/sample Create submission.xml ^^^^^^^^^^ The next thing you need to to is to create a file submission.xml with the following content (same as before so you could just copy the file from previous submissions):: You can use an editor like ``gedit`` to do so. It is actually the same file as the submission.xml for the study (except the HOLD part) so you could just copy that as well. Get the correct ENA checklist ^^^^^^^^^^ The following checklist should be used for binned assemblies: https://www.ebi.ac.uk/ena/browser/view/ERC000050 Create sample.xml ^^^^^^^^^^ There are a number of fields to be filled. You can download the XML file to see what can be filled out. Since this is a test submission, we will reduce that to the mandatory fields only, and we can copy some values from our previous environmental sample submission. However, you will need to fill the taxon fields yourself. Have a look in the GTDBtk results, look for your bin, and search the taxa in the NCBI taxonomy: https://www.ncbi.nlm.nih.gov/taxonomy Find out the taxid, common name and scientific name for your bin and fill the information in the XML file:: Bin sample for the metagenomic course 2022 TODO: your taxid TODO: taxons name TODO: taxons name DESCRIPTION ENA-CHECKLIST ERC000050 project name MGCourse 2022 sequencing method MiSeq assembly software MEGAHIT binning software METABAT investigation type metagenome binning parameters default isolation source forest soil collection date 2022-11-03 geographic location (country and/or sea) Germany geographic location (latitude) 52.019101 DD geographic location (longitude) 8.531007 DD broad-scale environmental context temperate woodland local environmental context temperate woodland environmental medium forest soil sample derived from TODO: you environmental sample accession here! metagenomic source outdoor metagenome Don't forget to fill in your environmental sample accession in the appropriate field. Note that you would need to add one sample for each of your bins, if you would like to submit all of them! In our case, we will only submit one bin for demonstration purposes. Submit the sample ^^^^^^^^^^^^^^^^ Now, it is time to submit:: cd /mnt/submission/bins/sample curl -u $ENA_USER:$ENA_PWD -F "SUBMISSION=@submission.xml" -F "SAMPLE=@sample.xml" "https://wwwdev.ebi.ac.uk/ena/submit/drop-box/submit/" > receipt.xml Make sure to use wwwdev to submit to the ENA test server. Get the sample accession number ^^^^^^^^^^^^^^^ The response is stored in the file "receipt.xml". You can find the accession number for your sample in this line:: Also note, that this number is only valid for today (as for the study accession), since it is discarded after 24 hours:: This submission is a TEST submission and will be discarded within 24 hours Note your bin sample accession number somewhere, you will need it for the next steps. Now let's submit our bin for this sample. References ^^^^^^^^^^ **ENA - Submitting Binned Metagenome Assemblies** https://ena-docs.readthedocs.io/en/latest/submit/assembly/metagenome/binned.html **ENA - Registering a Sample** https://ena-docs.readthedocs.io/en/latest/submit/samples.html