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

Issue for thread error #10

Closed
masterzhen119 opened this issue Mar 13, 2023 · 3 comments
Closed

Issue for thread error #10

masterzhen119 opened this issue Mar 13, 2023 · 3 comments

Comments

@masterzhen119
Copy link

I mimic the format like AltHap Input file Segment. After I give the third format code to use the Flopp.It has the following error:
./target/release/flopp -f /home/project11/Alt_test/test_EM_sim2/Data/0_1_althap_.txt -p 2 -o /home/project11/Alt_test/test_EM_sim2/Data/unpolished_results.txt
The error is:
Reading inputs (BAM/VCF/frags). thread 'main' panicked at 'index out of bounds: the len is 1 but the index is 2', /home/project11/Zhen/flopp/src/file_reader.rs:60:41 note: run with RUST_BACKTRACE=1 environment variable to display a backtrace
What should I do?
Thanks!

@bluenote-1577
Copy link
Owner

bluenote-1577 commented Mar 14, 2023

Hi @masterzhen119,

Thanks for bringing up this issue.

I looked at AltHap, and it seems that their segment file and H-PoP's (https://github.com/MinzhuXie/H-PoPG) fragment file has different formats.

AltHap has two lines at the top of the file that give the number of columns and reads. H-PoP's fragment file does not require this.

flopp requires H-PoP's file format, so AltHap's segment does not work. The segment/fragment file given to flopp must not have these two lines at the top.

I noticed that flopp also requires tabs, and not spaces, in the segment/fragment file in the code. I have fixed this with the latest push, so that spaces also work.

So this segment file:

2 chr3_1 1 13103 37 1132 IIIIIIIII
2 chr3_2 1 1310321 46 110302 IIIIIIIIIIIII
2 chr3_3 1 3220001 44 3001 IIIIIIIIIII
2 chr3_4 1 322000 40 30023 IIIIIIIIIII

should work now (with the latest version).

Let me know how it goes.

@masterzhen119
Copy link
Author

Hi @masterzhen119,

Thanks for bringing up this issue.

I looked at AltHap, and it seems that their segment file and H-PoP's (https://github.com/MinzhuXie/H-PoPG) fragment file has different formats.

AltHap has two lines at the top of the file that give the number of columns and reads. H-PoP's fragment file does not require this.

flopp requires H-PoP's file format, so AltHap's segment does not work. The segment/fragment file given to flopp must not have these two lines at the top.

I noticed that flopp also requires tabs, and not spaces, in the segment/fragment file in the code. I have fixed this with the latest push, so that spaces also work.

So this segment file:

2 chr3_1 1 13103 37 1132 IIIIIIIII
2 chr3_2 1 1310321 46 110302 IIIIIIIIIIIII
2 chr3_3 1 3220001 44 3001 IIIIIIIIIII
2 chr3_4 1 322000 40 30023 IIIIIIIIIII

should work now (with the latest version).

Let me know how it goes.

Thanks! And I will try and tell your result.

@masterzhen119
Copy link
Author

Hi @masterzhen119,
Thanks for bringing up this issue.
I looked at AltHap, and it seems that their segment file and H-PoP's (https://github.com/MinzhuXie/H-PoPG) fragment file has different formats.
AltHap has two lines at the top of the file that give the number of columns and reads. H-PoP's fragment file does not require this.
flopp requires H-PoP's file format, so AltHap's segment does not work. The segment/fragment file given to flopp must not have these two lines at the top.
I noticed that flopp also requires tabs, and not spaces, in the segment/fragment file in the code. I have fixed this with the latest push, so that spaces also work.
So this segment file:

2 chr3_1 1 13103 37 1132 IIIIIIIII
2 chr3_2 1 1310321 46 110302 IIIIIIIIIIIII
2 chr3_3 1 3220001 44 3001 IIIIIIIIIII
2 chr3_4 1 322000 40 30023 IIIIIIIIIII

should work now (with the latest version).
Let me know how it goes.

Thanks! And I will try and tell your result.

After testing, it matches now! Thanks!

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