dohlee / metheor

:comet: Ultrafast DNA methylation heterogeneity calculation from bisulfite alignments (Lee et al., PLOS Computational Biology. 2023)
GNU General Public License v3.0
41 stars 8 forks source link

thread 'main' panicked at 'index out of bounds: the len is 103 but the index is 103', src/qfdrp.rs:52:13 #6

Closed RysBen closed 1 year ago

RysBen commented 1 year ago

Dear Lee,

When I tested metheor qfdrp using a target bisulfite sequencing data, I encountered the following error:

thread 'main' panicked at 'index out of bounds: the len is 103 but the index is 103', src/qfdrp.rs:52:13

I'm not familiar with Rust, but it seems to be related to MAX_READ_LEN. So I would like to ask if the software is suitable for 150bp sequencing reads. And If it applies to 150bp pair data, is there a recommended method to handle this?

How to reproduce the error Here is my test command.

metheor qfdrp -i test.sam -o test.out

Here is test.sam

@HD VN:1.0  SO:coordinate
@SQ SN:chrM LN:16571
A00358:625:HLKN7DSX2:4:2116:27950:36589_1:N:0:TCCTCATG+CAAGACCT 163 chrM    6   42  135M    =   322 451 CAAATCTATCACCCTATTAACCACTCACAAAAACTCTCCATACATTTAATATTTTCATCTAAAAAATATACACACAATAACATTACAAAACACTAAAACCAAAACACCCTATATCACAATATCTATCTTTAATTC FFFFFF:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:FFFFFFFFFF:FF:FFF:FFFFFFFFF:FFFFFFFFFFFF:FFF,FFFFFFFFFFFF:F:FFFFFFFFFFFFFFFFFF:F:FFF:FFFFF::,FF NM:i:36 MD:Z:2G0G24G0G0G1G8G5G0G7G3G0G0G0G0G0G1G1G3G1G3G4G1G1G2G2G0G1G2G0G1G8G2G2G5G5G4 XM:Z:..xh........................zxh.h........h.....hh.......z...xhhhhh.h.h...z.z...h....h.z.h..z..xh.h..zx.h........h..z..x.....x.....h....    XR:Z:GA XG:Z:GA
A00358:625:HLKN7DSX2:4:1473:27407:35055_1:N:0:TCCTCATG+CAAGACCT 99  chrM    7   40  135M    =   29  157 AGGTTTATTATTTTATTAATTATTTATGGGAGTTTTTTATGTATTTGGTATTTTTGTTTGGGGGGTGTGTATGTGATAGTATTGTGAGATGTTGGAATTGGAGTATTTTATGTTGTAGTATTTGTTTTTGATTTT FFF:FFFFFFFF:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:FFFFFFFFF:FFF:FFFFFFFFFFFFFFF NM:i:37 MD:Z:4C3C1C0C0C6C0C1C1C1C5C1C1C0C3C12C2C11C1C1C5C4C4C1C4G0C0C4C1C0C0C5C1C5C3C7C0C0  XM:Z:....h...h.hhh......hh.h.h.z.....h.h.hh...h............z..x...........h.z.z.....h....z....z.x.....xz....h.hhh.....z.x.....x...h.......hx    XR:Z:CT XG:Z:CT

Thanks in advance.

dohlee commented 1 year ago

Thank you for the report. I've provisionally changed MAX_READ_LEN to 201, which allows FDRP and qFDRP to be computed for 150bp sequencing reads. Note that it will increase memory consumption to some extent.

Please update metheor to the latest version (0.1.3) and let me know if there is still a problem.

Thanks, Dohoon

RysBen commented 1 year ago

Thanks for the update, the version v1.0.3 now handles 150bp data properly. By the way, metheor showed good preformance(RAM: 224M; time: 75min) on my test data(~261 million alignments).

Thank you again for contributing the excellent software.

dohlee commented 1 year ago

Good to hear that metheor works well with your data! Please don't hesitate to file an issue if you have any bugs or feature requests :)

Closing this issue.