text: user57: I am battling the submission of scaffolded assembly to EBI, somehow I can not get AGP gap file right.
  background
  The only option seems to be using the Webin-CLI submission interface. For the scaffolded assembly submission, one needs the manifest file, the sequence (fasta or flat file), and AGP file, which denotes how contigs are glued together into scaffolds. I got already that the sequence file should contain only contigs, and EBI will glue them together using the AGP file.
  the problem
  So far so good, I checked the specification and the example provided and generated similarly looking files for my assembly, but then when I tried to validate the files using
  ena-webin-cli -context genome -userName XXX -password XXX -manifest manifest_file -outputDir asm01_submission -inputDir ena_submission_input -ascp -validate
  
  I got tons of errors with type
  ERROR: Scaffold "NODE_667656" has only "1" component, minimum two components expected.
  ERROR: Scaffold "NODE_353389" has only "1" component, minimum two components expected.
  ...
  
  supposedly for each contig that actually was not scaffolded. I am quite confused about this, as the example file contains tons of scaffold with one component only (for example the first one EG1_scaffold1).
  What am I missing?
  Sample of my AGP file (incl 1 scaffold and 3 contigs):
  Path_2003       1       1672    1       W       NODE_32694_length_1672_cov_36.024451    1       1672    +
  Path_2003       1673    1772    2       U       100     scaffold        yes     align_trnscpt
  Path_2003       1773    2521    3       W       NODE_61726_length_749_cov_25.233631     1       749     +
  Path_2003       2522    2621    4       U       100     scaffold        yes     align_trnscpt
  Path_2003       2622    5705    5       W       NODE_20424_length_3084_cov_26.290988    1       3084    +
  NODE_667656     1       86      1       W       NODE_667656_length_86_cov_136.111111    1       86      +
  NODE_353389     1       155     1       W       NODE_353389_length_155_cov_25.230769    1       155     +
  
  
  user57: Oh you silly sausage! Don't use AGP gap files.
  This is not a direct answer but a workaround. However, if your scaffolded genome is annotated, you might as well submit a flat file (.embl) instead of fasta and the gap file. The thing is, making that file is actually a lot more straightforward thanks to amazing EMBLmyGFF3. You will also need the locus tag (a string used as prefix for loci in your genome) you must pre-register in the web interface (it's among "Project" options). Note that although the script does handle some EBI specifics (like automatic filtering of gff3 tags they don't like, or filtering sequences < 100 bases), some there are things that need to be taken care of. For example, I had to remove duplicates (using agat_sp_fix_features_locations_duplicated.pl) and overlapping genes (using agat_sp_fix_overlaping_genes.pl), both available in AGAT collection. This might be different for genomes annotated with a different tool (mine was braker2).
  Anyway, once I was advised to use this tool, it took like 2 hours for 400Mbp genome including the uploading time, so I certainly recommend it over wrestling with AGP files.
  
original_text: 57: <p>I am battling the submission of scaffolded assembly to EBI, somehow I can not get AGP gap file right.</p>
  <p><em>background</em></p>
  <p>The only option seems to be using the <a href="https://ena-docs.readthedocs.io/en/latest/submit/assembly.html" rel="nofollow noreferrer">Webin-CLI submission interface</a>. For the scaffolded assembly submission, <a href="https://ena-docs.readthedocs.io/en/latest/submit/assembly/genome.html#scaffold-assembly" rel="nofollow noreferrer">one needs</a> the manifest file, the sequence (fasta or flat file), and AGP file, which denotes how contigs are glued together into scaffolds. I got already that the sequence file should contain only contigs, and EBI will glue them together using the AGP file.</p>
  <p><em>the problem</em></p>
  <p>So far so good, I checked <a href="https://www.ncbi.nlm.nih.gov/assembly/agp/AGP_Specification/" rel="nofollow noreferrer">the specification</a> and <a href="https://www.ncbi.nlm.nih.gov/assembly/agp/AGP_Specification/scaffold_from_contig_WGS.agp.v2.0/" rel="nofollow noreferrer">the example provided</a> and generated similarly looking files for my assembly, but then when I tried to validate the files using</p>
  <pre><code>ena-webin-cli -context genome -userName XXX -password XXX -manifest manifest_file -outputDir asm01_submission -inputDir ena_submission_input -ascp -validate
  </code></pre>
  <p>I got tons of errors with type</p>
  <pre><code>ERROR: Scaffold &quot;NODE_667656&quot; has only &quot;1&quot; component, minimum two components expected.
  ERROR: Scaffold &quot;NODE_353389&quot; has only &quot;1&quot; component, minimum two components expected.
  ...
  </code></pre>
  <p>supposedly for each contig that actually was not scaffolded. I am quite confused about this, as the example file contains tons of scaffold with one component only (for example the first one <code>EG1_scaffold1</code>).</p>
  <p>What am I missing?</p>
  <p>Sample of my AGP file (incl 1 scaffold and 3 contigs):</p>
  <pre><code>Path_2003       1       1672    1       W       NODE_32694_length_1672_cov_36.024451    1       1672    +
  Path_2003       1673    1772    2       U       100     scaffold        yes     align_trnscpt
  Path_2003       1773    2521    3       W       NODE_61726_length_749_cov_25.233631     1       749     +
  Path_2003       2522    2621    4       U       100     scaffold        yes     align_trnscpt
  Path_2003       2622    5705    5       W       NODE_20424_length_3084_cov_26.290988    1       3084    +
  NODE_667656     1       86      1       W       NODE_667656_length_86_cov_136.111111    1       86      +
  NODE_353389     1       155     1       W       NODE_353389_length_155_cov_25.230769    1       155     +
  </code></pre>
   57: <p>Oh you silly sausage! Don't use AGP gap files.</p>
  <p>This is not a direct answer but a workaround. However, if your scaffolded genome is annotated, you might as well submit a flat file (.embl) instead of fasta and the gap file. The thing is, making that file is actually a lot more straightforward thanks to amazing <a href="https://github.com/NBISweden/EMBLmyGFF3" rel="nofollow noreferrer">EMBLmyGFF3</a>. You will also need the locus tag (a string used as prefix for loci in your genome) you must pre-register in the web interface (it's among &quot;Project&quot; options). Note that although the script does handle some EBI specifics (like automatic filtering of gff3 tags they don't like, or filtering sequences &lt; 100 bases), some there are things that need to be taken care of. For example, I had to remove duplicates (using <code>agat_sp_fix_features_locations_duplicated.pl</code>) and overlapping genes (using <code>agat_sp_fix_overlaping_genes.pl</code>), both available in <a href="https://github.com/NBISweden/AGAT" rel="nofollow noreferrer">AGAT collection</a>. This might be different for genomes annotated with a different tool (mine was <code>braker2</code>).</p>
  <p>Anyway, once I was advised to use this tool, it took like 2 hours for 400Mbp genome including the uploading time, so I certainly recommend it over wrestling with AGP files.</p>
  