-
Notifications
You must be signed in to change notification settings - Fork 28
Making AGP Files
Michael Alonge edited this page Jun 5, 2019
·
1 revision
We provide a simple utility called make_agp.py
to produce an AGP v2.0 file reflecting the ordering and orienting performed by RaGOO. Here is an example using default RaGOO settings.
# Get the data and run RaGOO
cd /path/to/current/working/directory
ln -s /path/to/contigs.fasta
ln -s /path/to/reference.fasta
ragoo.py -g 100 contigs.fasta reference.fasta
# Get the info needed for make_agp
ls ragoo_output/orderings/* > orderings.fofn
samtools faidx contigs.fasta
make_agp.py orderings.fofn contigs.fasta.fai 100
Make sure that the gap sizes match. In this example, we specified a gap size of 100 with the -g
flag in ragoo.py. 100 is then the last positional argument for make_agp.py. If gap sizes do not match, no error will be thrown, but your AGP file will be wrong.
If you use either of these features, then be sure to use the correct fasta index file. Each feature produces a new set of input contigs before ordering and orienting and these are the contigs for which the index must be supplied to make_agp. Here is an example of using misassembly correction:
# Get the data and run RaGOO
cd /path/to/current/working/directory
ln -s /path/to/contigs.fasta
ln -s /path/to/reference.fasta
ragoo.py -g 100 -R reads.fasta -T corr contigs.fasta reference.fasta
# Get the info needed for make_agp
ls ragoo_output/orderings/* > orderings.fofn
# Index the new set of contigs
samtools faidx ragoo_output/ctg_alignments/contigs.misasm.break.fa
make_agp.py orderings.fofn ragoo_output/ctg_alignments/contigs.misasm.break.fa.fai 100