RagTag icon indicating copy to clipboard operation
RagTag copied to clipboard

ValueError: line 496: object identifier out of order

Open wuxingbo1986 opened this issue 4 years ago • 6 comments

Dear all,

anyone have solution to the "ValueError: line 496: object identifier out of order" error ?

I looked at #21 and tries to change the parameter but still have the error.

I am scaffolding the contigs from ccs using an reference genome. Here is the code I used:

ragtag.py scaffold -C -g 100 -m 100 -f 10000 primary_final.fasta m54334U_All4cells.ccs.asm.bp.p_ctg.fa --mm2-params '-x asm20' -o ragtag_ccs -t 40

Thank you.

wuxingbo1986 avatar Jul 29 '21 16:07 wuxingbo1986

Hi there,

Can you please share the output logged to stderr?

Thanks, Mike

malonge avatar Jul 29 '21 19:07 malonge

here it is:

Tue Jul 20 15:55:02 2021 --- RagTag v1.0.1 Tue Jul 20 15:55:02 2021 --- CMD: /software/7/apps/ragtag/1.0.1/bin/ragtag_scaffold.py -C -g 100 -m 100 -f 10000 primary_final.fasta m54334U_All4cells.ccs.asm.bp.p_ctg.fa --mm2-params -x asm20 -o ragtag_ccs -t 40 Tue Jul 20 15:55:02 2021 --- 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'. Tue Jul 20 15:55:02 2021 --- Mapping the query genome to the reference genome Tue Jul 20 15:55:02 2021 --- Running: minimap2 -x asm20 primary_final.fasta m54334U_All4cells.ccs.asm.bp.p_ctg.fa > ragtag_ccs/query_against_ref.paf 2> ragtag_ccs/query_against_ref.paf.log Tue Jul 20 22:33:38 2021 --- Finished running : minimap2 -x asm20 primary_final.fasta m54334U_All4cells.ccs.asm.bp.p_ctg.fa > ragtag_ccs/query_against_ref.paf 2> ragtag_ccs/query_against_ref.paf.log Tue Jul 20 22:33:38 2021 --- Reading whole genome alignments Tue Jul 20 22:33:42 2021 --- Filtering and merging alignments Tue Jul 20 22:33:48 2021 --- Ordering and orienting query sequences Tue Jul 20 22:33:48 2021 --- Writing scaffolds Tue Jul 20 22:33:48 2021 --- Writing: ragtag_ccs/ragtag.scaffolds.agp Traceback (most recent call last): File "/software/7/apps/ragtag/1.0.1/bin/ragtag_scaffold.py", line 528, in main() File "/software/7/apps/ragtag/1.0.1/bin/ragtag_scaffold.py", line 506, in main write_orderings(output_path + "ragtag.scaffolds.agp", output_path + "ragtag.confidence.txt", query_file, mapped_ref_seqs, fltrd_ctg_alns, pad_sizes, gap_types, make_chr0, overwrite_files, not remove_suffix) File "/software/7/apps/ragtag/1.0.1/bin/ragtag_scaffold.py", line 154, in write_orderings agp.add_seq_line(*out_agp_line) File "/software/7/apps/ragtag/1.0.1/lib/python3.7/site-packages/ragtag_utilities/AGPFile.py", line 170, in add_seq_line self._raise_line_err(line_number, "object identifier out of order") File "/software/7/apps/ragtag/1.0.1/lib/python3.7/site-packages/ragtag_utilities/AGPFile.py", line 71, in _raise_line_err raise ValueError(message)

Thanks.

wuxingbo1986 avatar Jul 29 '21 19:07 wuxingbo1986

Hi there,

Would you be able to update to v2.0.1? If so, rerun using the latest code and let me know how it goes, again sharing the stderr if there is a problem.

Anything >v2 is backwards incompatible, so you will need to start from scratch (delete the previous output directory).

malonge avatar Jul 29 '21 19:07 malonge

installed with conda and tried but still the error, see below;

Traceback (most recent call last): File "/home/xingbo.wu/.conda/envs/ragtag/bin/ragtag_scaffold.py", line 577, in main() File "/home/xingbo.wu/.conda/envs/ragtag/bin/ragtag_scaffold.py", line 555, in main write_orderings(output_path + file_prefix + ".agp", output_path + file_prefix + ".confidence.txt", query_file, mapped_ref_seqs, fltrd_ctg_alns, pad_sizes, gap_types, make_chr0, True, not remove_suffix, skip_no_cat) File "/home/xingbo.wu/.conda/envs/ragtag/bin/ragtag_scaffold.py", line 160, in write_orderings agp.add_seq_line(*out_agp_line) File "/home/xingbo.wu/.conda/envs/ragtag/lib/python3.7/site-packages/ragtag_utilities/AGPFile.py", line 216, in add_seq_line self._add_line(agp_line) File "/home/xingbo.wu/.conda/envs/ragtag/lib/python3.7/site-packages/ragtag_utilities/AGPFile.py", line 139, in _add_line raise AGPError(self.fname, agp_line.line_number, "object identifier out of order") ragtag_utilities.AGPFile.AGPError:

FILE : /lustre/project/gbru/gbru_hydrangea/EndlessSummer/ragtag_ccs/ragtag.scaffold.agp LINE : 412 ERROR: object identifier out of order

Thanks

wuxingbo1986 avatar Jul 30 '21 02:07 wuxingbo1986

Hi there,

So the direct error is that RagTag scaffold is trying to write an improperly formatted AGP file. But I can't tell why this is happening in the first place. Would you be open to sharing your data with me so I can reproduce the error on my end? [email protected]

malonge avatar Jul 30 '21 14:07 malonge

HI Malonge,

I am also facing a similar problem. Your insights would have been very helpful to me. Screenshot 2023-03-22 at 11 00 18 AM

Sameer1028 avatar Mar 22 '23 15:03 Sameer1028