Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RagTag patch bug #155

Open
r-poloni opened this issue Mar 2, 2023 · 2 comments
Open

RagTag patch bug #155

r-poloni opened this issue Mar 2, 2023 · 2 comments

Comments

@r-poloni
Copy link

r-poloni commented Mar 2, 2023

Hi, I am using RagTag to to scaffold (with scaffold command) and then fill the gaps in a PacBio genome I have, using as a reference another PacBio genome, chromosome-scale. However, the program stucks almost immediatly. It seems a problem of python asking for strings but receiving binary files from the last command, but seems something that cannot be fixed with a quick look.
Thank you in advance!

This is the output I get from slurm (.err file afterwords)

Thu Mar 2 10:13:50 2023 --- VERSION: RagTag v2.1.0
Thu Mar 2 10:13:50 2023 --- WARNING: This is a beta version of ragtag patch
Thu Mar 2 10:13:50 2023 --- CMD: ragtag.py patch -u hifiasm_0.16.1_Eg_no_HiC.bp.p_ctg.gfa_newscaffolds.fa purged.fa
Thu Mar 2 10:13:50 2023 --- INFO: Running: ragtag_splitasm.py -o /ragtag/patch/ragtag_output/ragtag.patch.ctg.agp /ragtag/patch/hifiasm_0.16.1_Eg_no_HiC.bp.p_ctg.gfa_newscaffolds.fa > /ragtag/patch/ragtag_output/ragtag.patch.ctg.fasta 2> /ragtag/patch/ragtag_output/ragtag.patch.err
Traceback (most recent call last):
File "/ragtag_2.1.0/bin/ragtag_patch.py", line 518, in
main()
File "/ragtag_2.1.0/bin/ragtag_patch.py", line 318, in main
run_oae(cmd, reference_ctg_fn, ragtag_log)
File "/ragtag_2.1.0/lib/python3.6/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_splitasm.py -o /ragtag/patch/ragtag_output/ragtag.patch.ctg.agp /ragtag/patch/hifiasm_0.16.1_Eg_no_HiC.bp.p_ctg.gfa_newscaffolds.fa > /ragtag/patch/ragtag_output/ragtag.patch.ctg.fasta 2> /ragtag/patch/ragtag_output/ragtag.patch.err. Check stderr file for details.

ragtag.patch.err

[fai_load] build FASTA index.
Traceback (most recent call last):
File "/env/ragtag_2.1.0/bin/ragtag_splitasm.py", line 111, in
main()
File "/env/ragtag_2.1.0/bin/ragtag_splitasm.py", line 65, in main
gap_coords = [(i.start(), i.end()) for i in re.finditer(r'N+', seq) if i.end() - i.start() > min_gap_size]
File "/env/ragtag_2.1.0/lib/python3.6/re.py", line 229, in finditer
return _compile(pattern, flags).finditer(string)
TypeError: cannot use a string pattern on a bytes-like object

@malonge
Copy link
Owner

malonge commented Mar 24, 2023

Hi there,

Looks like your fasta file is incorrectly formatted. Try to use the fasta file with other standard tools to confirm that it's properly formatted. For example, perhaps your fasta file is compressed with gzip rather than bgzip? If not this, it will be some other small formatting issue.

@r-poloni
Copy link
Author

Hi, thank you for the answer. The file works perfectly with other programs and also with RagTag scaffold, so it seems strange that it is not well formatted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants