# Joining scaffolds to get full genome?

I am using Ray to assemble a about 7.2 kb picornavirus genome. I am using k-mer of 55. Following is the exact code that I used.

mpiexec -n 1 Ray -k 55 -s 2-CA-SVA-2_S2_L001_R1_001.fastq_q30_trim_LR_15.fasta  -o rayd55tr


This worked quite well as I got a scaffolds.fasta file with two scaffolds one with 5730 bp and another with 1548 bp.

Now, I am confused how I can join those scaffolds to get one linear genome. I joined them manually and blasted just to check and I got something like below :.

Is there any tool to join these two contigs together to have one complete linear genome? I have reference genome too if needed.

• What did you blast against? Your image just shows a few identical sequences, but we can't interpret any blast results without knowing what was blasted against what. Also, if you have a reference genome, why didn't you use that to assemble the contigs? Nov 25 '17 at 17:15
• Are there any good tools available for reference based contigs joining ? Nov 26 '17 at 7:48
• It is quite important to know what kind of sequencing data you have used for people to provide accurate tips. Nov 30 '17 at 7:56

Ragout worked well for me. It is a reference-based scaffolder.

ragout.py --outdir output/ input/ragout.rcp > message.txt 2> error.txt --threads 8 --overwrite


The ragout.rcp file contains a 'recipe' with the reference sequence and the contigs in FASTA format.:

.references = ensembl
.target = assembly

ensembl.fasta = ref.fa
assembly.fasta = contigs.fa


In my case, it reduced the number of contigs 10-fold and increased the N50 10-fold. It added N's between the contigs.

• Please consider expanding your answer. How/when does it work well ? How will it help the OP in their case?
– llrs
Nov 27 '17 at 11:55
• I have added my code and what Ragout did for me. What does 'OP' mean? Nov 27 '17 at 13:52
• Great edit! OP comes from Original Poster to refer the one that asked the question. I hope this will be useful.
– llrs
Nov 27 '17 at 15:42

In some cases you might consider reference-based scaffolding, as per charlesdarwin's answer. I would argue that in most cases this will only provide limited information, as this will only really provide you with the order of the contigs as it is in your reference, as opposed to how it is in your sampled organism. In that sense it really only provides pseudo-scaffolding that makes your assembly look artificially good.

In all cases you will have to check wether your raw data supports your scaffolding solution.

Example: you will never be able to call structural variants across contig boundaries if you use reference based scaffolding.

I would suggest you try different k-mer sized for your assembly algorithm, and look into dedicated scaffolding tools. Without knowing your type of sequencing data it is hard to suggest anything specific.