Normally folks would like to lift over from contigs to scaffolds/chromosomes.
https://github.com/tanghaibao/jcvi/wiki/ALLMAPS%3A-How-to-lift-over-gene-annotations
But, you want the reverse mapping here so we'd need to swap the AGP file.
python -m jcvi.formats.agp swap assembly.agp
This generates a new AGP assembly.swapped.agp. You'll see that it basically swaps the components/objects from the original AGP file. We would then need to generate a .chain file for liftOver.
python -m jcvi.formats.chain fromagp JM-2.swapped.agp assembly.fasta contigs.fasta
The assembly.fasta and contigs.fasta are two FASTA files from scaffolded assembly, and contigs, respectively. This generates assembly.swapped.chain file which you could then use in liftOver, in the direction from assembly to contigs, as mentioned at the beginning.
liftOver -gff assembly.gff3 assembly.swapped.chain contigs.gff3 unmapped
This should generate a GFF on the contig coordinates.
In summary, you will need to prepare:
You don't need ALLMAPS, just run the suggested commands.
如果觉得我的文章对您有用,请随意打赏。你的支持将鼓励我继续创作!