RagTag icon indicating copy to clipboard operation
RagTag copied to clipboard

patch output genome is identical to input target genome

Open wackerk opened this issue 2 years ago • 3 comments

Hello! I am attempting to patch a scaffold-assembled reference genome of a congener of my focal bird species (TANG, in the code below) with a chromosome-level reference genome of a more distantly related species (CAMAR, in the code below). I ran RagTag with default settings and the stderr output file tracking the progress showed that the program worked appropriately. However, when I use QUAST to compare the original scaffold reference (TANG) with the patched reference, results indicate that the genomes are identical (same # contigs, N50, L50, etc). Any ideas on what has happened? An issue with using default settings perhaps?

Code used for RagTag:

RAGTAG=/home/kwacker/RagTag/ragtag.py
TANG=/nfs/turbo/lsa-wingerb1/kswacker/tangara_popgen/ref_genomes/tang/tang_gyr_ref.fasta
CAMAR=/nfs/turbo/lsa-wingerb1/kswacker/tangara_popgen/ref_genomes/camar/GCA_901933205.1_STF_HiC_genomic.fna
OUT=/nfs/turbo/lsa-wingerb1/kswacker/tangara_popgen/ref_genomes/tang_patch/
NUCMER=/home/kwacker/anaconda3/bin/nucmer

$RAGTAG patch $TANG $CAMAR -u -o $OUT --aligner $NUCMER

I would also add that I used QUAST to compare my original scaffold reference (TANG) and the original chromosome reference (CAMAR), and found that the chromosome-level genome assembly was much better as expected. So I don't believe the issue is that I'm incorrectly running QUAST.

Thanks in advance for any ideas you might have!

wackerk avatar Jan 11 '24 15:01 wackerk

Hello @wackerk !

Have you resolved this issue?

Donandrade avatar Sep 13 '24 15:09 Donandrade

I got the same issue. How do you suggest to tune ragtag parameters?

lcanesin avatar Aug 20 '25 13:08 lcanesin

Hey!

Did you make sure that you have query and target in the correct spots in your parameters? If they are incorrectly in the wrong order you could have your "scaffolded" fasta patching the reference by accident. There'd be nothing to patch so it comes out the same.

I have some instances where patching fails but I think it's because the patch size is large. In my case, we lost ~10Mb in a diploid assembly because he region was autozygous and hifiasm failed to append the homozygous region to both hap1 and hap2 (it only did so for hap2).

DustinSokolowski avatar Nov 03 '25 17:11 DustinSokolowski