# How to specify the list of contigs in AGP gap file used for ENA submissions

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     +


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).