组装好的基因组通过agp文件得到contig序列

https://github.com/tanghaibao/jcvi/issues/391


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:

  1. assembly.agp, your AGP file specifying how to make assembly from contigs
  2. assembly.gff3, the annotation results you want to transfer
  3. assembly.fasta, scaffolded assembly
  4. contigs.fasta, original contig sequences

You don't need ALLMAPS, just run the suggested commands.


参考:https://github.com/tanghaibao/jcvi/issues/391
  • 发表于 2022-11-17 20:33
  • 阅读 ( 2154 )
  • 分类:基因组学

你可能感兴趣的文章

相关问题

0 条评论

请先 登录 后评论
omicsgene
omicsgene

生物信息

700 篇文章

作家榜 »

  1. omicsgene 700 文章
  2. 安生水 348 文章
  3. Daitoue 167 文章
  4. 生物女学霸 120 文章
  5. xun 82 文章
  6. 红橙子 78 文章
  7. rzx 75 文章
  8. CORNERSTONE 72 文章