malonge / RagTag

Tools for fast and flexible genome assembly scaffolding and improvement
MIT License
473 stars 49 forks source link

Error when running RagTag patch command #174

Closed nvuhunganh closed 10 months ago

nvuhunganh commented 10 months ago

Hello, I encountered this error when I attempted to run RagTag patch on my two fasta files.

(base) [ltlam@head01 data]$ ragtag.py patch \
 /datausers2/ibt/ltlam/data/inspector_corrected_scaffold.fa \
 /datausers2/ibt/ltlam/data/human/hg38.fa \ 
 -o /datausers2/ibt/ltlam/data/ragtag_polishing/ \
-w -t 56 --aligner /datausers2/ibt/ltlam/software/minimap2 \
--mm2-params '-x asm5'
Wed Jan  3 09:59:14 2024 --- WARNING: This is a beta version of `ragtag patch`
Wed Jan  3 09:59:14 2024 --- CMD: ragtag.py patch /datausers2/ibt/ltlam/data/inspector_corrected_scaffold.fa /datausers2/ibt/ltlam/data/human/hg38.fa -o /datausers2/ibt/ltlam/data/ragtag_polishing/ -w -t 56 --aligner /datausers2/ibt/ltlam/software/minimap2 --mm2-params -x asm5
Wed Jan  3 09:59:14 2024 --- WARNING: Without '-u' invoked, some component/object AGP pairs might share the same ID. Some external programs/databases don't like this. To ensure valid AGP format, use '-u'.
Wed Jan  3 09:59:14 2024 --- INFO: Running: ragtag_splitasm.py -o /datausers2/ibt/ltlam/data/ragtag_polishing/ragtag.patch.ctg.agp /datausers2/ibt/ltlam/data/inspector_corrected_scaffold.fa > /datausers2/ibt/ltlam/data/ragtag_polishing/ragtag.patch.ctg.fasta 2> /datausers2/ibt/ltlam/data/ragtag_polishing/ragtag.patch.err
Wed Jan  3 10:05:10 2024 --- INFO: Finished running : ragtag_splitasm.py -o /datausers2/ibt/ltlam/data/ragtag_polishing/ragtag.patch.ctg.agp /datausers2/ibt/ltlam/data/inspector_corrected_scaffold.fa > /datausers2/ibt/ltlam/data/ragtag_polishing/ragtag.patch.ctg.fasta 2> /datausers2/ibt/ltlam/data/ragtag_polishing/ragtag.patch.err
Wed Jan  3 10:05:10 2024 --- INFO: Running: ragtag_rename.py /datausers2/ibt/ltlam/data/human/hg38.fa -p qseq -o /datausers2/ibt/ltlam/data/ragtag_polishing/ragtag.patch.rename.agp > /datausers2/ibt/ltlam/data/ragtag_polishing/ragtag.patch.rename.fasta 2> /datausers2/ibt/ltlam/data/ragtag_polishing/ragtag.patch.err
Traceback (most recent call last):
  File "/datausers2/ibt/ltlam/.local/bin/ragtag_patch.py", line 518, in <module>
    main()
  File "/datausers2/ibt/ltlam/.local/bin/ragtag_patch.py", line 337, in main
    run_oae(cmd, query_rename_fn, ragtag_log)
  File "/datausers2/ibt/ltlam/.local/lib/python3.8/site-packages/ragtag_utilities/utilities.py", line 126, in run_oae
    raise RuntimeError('Failed : %s > %s 2> %s. Check stderr file for details.' % (" ".join(cmd), out, err))
RuntimeError: Failed : ragtag_rename.py /datausers2/ibt/ltlam/data/human/hg38.fa -p qseq -o /datausers2/ibt/ltlam/data/ragtag_polishing/ragtag.patch.rename.agp > /datausers2/ibt/ltlam/data/ragtag_polishing/ragtag.patch.rename.fasta 2> /datausers2/ibt/ltlam/data/ragtag_polishing/ragtag.patch.err. Check stderr file for details.

At first, I thought maybe there was a problem within my input fasta file. However, it worked when I tried mapping them using minimap2, so I could not figure the problem out yet.

Best, Anh Nguyen

nvuhunganh commented 10 months ago

I figured that my reference file was not at the right size, so I tried re-downloading that file again, and everything works well now.