Closed masterzhen119 closed 1 year ago
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.
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.
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!
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=1environment variable to display a backtrace
What should I do? Thanks!