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

diff ERROR: bad order: #42

Closed
IsaacDiaz026 opened this issue Jun 12, 2023 · 11 comments
Closed

diff ERROR: bad order: #42

IsaacDiaz026 opened this issue Jun 12, 2023 · 11 comments

Comments

@IsaacDiaz026
Copy link

IsaacDiaz026 commented Jun 12, 2023

Hello,

I am trying to use dnmtools diff to calculate methylation differences between two .meth files generated using dnmtools counts. The command I used is dnmtools diff "$RESULTS"/hap1.sort.meth "$RESULTS"/hap2.sort.meth -o "$RESULTS"/2023-06-11_hap1_hap2_DiffMeth.diff -A

I get the following error :
ERROR: bad order:
chrom=chr1 [id=0] pos=0
appears after
chrom=chr1 [id=0] pos=140725478431896

I tried sorting the .meth files even though they are already sorted. One thing that is strange is a the end of the error message is says "pos=140725478431896". There is definitely not a position 140725478431896 in my data, since my genome is only 350 Mb. I also noticed that if I rerun the exact same command it generates the same error but with a different pos=Number at the end.

For example, the same command with the same input files produced the following error
ERROR: bad order:
chrom=chr1 [id=0] pos=0
appears after
chrom=chr1 [id=0] pos=7811889804981395782

@andrewdavidsmith
Copy link
Collaborator

Can you confirm that the two files have the same number of lines, and that the position number (all those digits) appears in the .meth file? You can verify the first with wc -l and the second with grep.

@IsaacDiaz026
Copy link
Author

The two files both have 115903749 lines. The position number mentioned in the error does not appear in the .meth file.

@andrewdavidsmith
Copy link
Collaborator

Thanks. I'll try to look into this soon. In the meantime, any help you can give me reproducing this error would accelerate the process. I do understand your data might be confidential, so that might not be possible.

@IsaacDiaz026
Copy link
Author

Can I share the .meth files to you through google drive?

@andrewdavidsmith
Copy link
Collaborator

Yes. And feel free to send me an email if you prefer.

@IsaacDiaz026
Copy link
Author

Just shared it

@andrewdavidsmith
Copy link
Collaborator

I reproduced the error and it was pretty surface-level so I was able to fix it with some minor changes I think. It's fixed with 3266dde

If you are not able to build by cloning the repo, and want me to make a release, let me know. That might take a day or so.

@IsaacDiaz026
Copy link
Author

If you could make a release that would be great. I am having trouble cloning the repo

@andrewdavidsmith
Copy link
Collaborator

@IsaacDiaz026 The new release is available. It should fix the problem you had. If it has more problems, please create another issue -- thanks for your input!

@xies4
Copy link

xies4 commented Sep 7, 2023

Can you confirm that the two files have the same number of lines, and that the position number (all those digits) appears in the .meth file? You can verify the first with wc -l and the second with grep.
Hi @andrewdavidsmith, I encountered the same error:

bad order:
chrom=chrUn_KI270315v1 [id=73] pos=89
appears after
chrom=chrUn_KI270315v1 [id=73] pos=829 

But I have different numbers of lines in the two input files. Is this required? I didn't read anything saying that the two input files have to have the same positions. Thanks.

@andrewdavidsmith
Copy link
Collaborator

@xies4 Please open a new issue.

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

3 participants