Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

haplotyper error #8

Open
SamVegaEs opened this issue Oct 30, 2023 · 2 comments
Open

haplotyper error #8

SamVegaEs opened this issue Oct 30, 2023 · 2 comments

Comments

@SamVegaEs
Copy link

Hello! Good afternoon. Good work developing the program.
I have managed to download, install and run the program successfully with the example reads, however, when I try to run my nanopore reads I get this consistent error message in the log file:

[2023-10-30T17:39:17Z DEBUG jtk_cli::pipeline] Opening C1_candida_trial_jtk.fq
[2023-10-30T17:39:21Z DEBUG haplotyper::entry] Input    ReadNum 37102
[2023-10-30T17:39:21Z DEBUG haplotyper::entry] Input    BasePair(Mbp)   386
[2023-10-30T17:39:45Z DEBUG haplotyper::repeat_masking] MASKREPEAT      UNIQUE  0       6219258
[2023-10-30T17:39:45Z DEBUG haplotyper::repeat_masking] MASKREPEAT      MaskMoreThan    1540    12
[2023-10-30T17:39:45Z DEBUG haplotyper::repeat_masking] MASKREPEAT      MaskLen 12      6208
[2023-10-30T17:39:46Z DEBUG haplotyper::repeat_masking] MASKREPEAT      TotalMask       60302166        386122434
[2023-10-30T17:39:46Z DEBUG haplotyper::repeat_masking] MASKREPEAT      MaskedKmers     6208    12
[2023-10-30T17:39:46Z DEBUG haplotyper::determine_chunks] MINIMAP2      VERSION 2.26-r1175

[2023-10-30T17:39:46Z DEBUG haplotyper::determine_chunks] Select Unit: Configuration:DetermineUnitConfig { chunk_len: 2000, chunk_num: 3000
, margin: 500, threads: 8, min_cluster: 2, exclude_repeats: 0.85, purge_copy_num: 8, seed: 19090432890 }
[2023-10-30T17:40:12Z DEBUG haplotyper::determine_chunks] UNITNUM       3000    PICKED
[2023-10-30T17:40:12Z DEBUG haplotyper::determine_chunks] DETERMINE     UnitOvlp        Creating        "/shared/home/sv264/git_repos/tools
/seq_tools/assemblers/jtk/52515411"
[2023-10-30T17:40:13Z DEBUG haplotyper::determine_chunks] DETERMINE     UnitOvlp        Removing        "/shared/home/sv264/git_repos/tools
/seq_tools/assemblers/jtk/52515411"
[2023-10-30T17:40:14Z DEBUG haplotyper::determine_chunks] UNITNUM       1679    REMOVED
[2023-10-30T17:40:14Z DEBUG haplotyper::encode] ENCODE  ErrorRate       0.3
[2023-10-30T17:40:14Z DEBUG haplotyper::encode] Creating "/shared/home/sv264/git_repos/tools/seq_tools/assemblers/jtk/97736991".
[2023-10-30T17:40:41Z DEBUG haplotyper::encode] Removing "/shared/home/sv264/git_repos/tools/seq_tools/assemblers/jtk/97736991"
thread '<unnamed>' panicked at 'range end index 24500 out of range for slice of length 10966', haplotyper/src/encode/mod.rs:141:23
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
thread '<unnamed>' panicked at 'range end index 18579 out of range for slice of length 2257', haplotyper/src/encode/mod.rs:141:23
thread '<unnamed>' panicked at 'range end index 3736 out of range for slice of length 0', haplotyper/src/encode/mod.rs:141:23
thread '<unnamed>' panicked at 'range end index 3836 out of range for slice of length 1696', haplotyper/src/encode/mod.rs:148:42
thread '<unnamed>' panicked at 'range end index 6594 out of range for slice of length 501', haplotyper/src/encode/mod.rs:141:23

and goes one for a while.
Any idea if this has happened before or on how to fix this?

Thanks!
Sam :D

@ban-m
Copy link
Owner

ban-m commented Oct 30, 2023

Thank you for using JTK!
This error message basically means that the starting position of an alignment between the reads and the chunk points exceeds the length of the query.

This may not be the case, but could you check if there are any duplicates in the input reads?
In other words, if two reads have the same ID in the fastq file, this would confuse JTK during the alignment step.

If the error persists, could you set verbose = 3 in the TOML file and re-run? This will preserve the chunks and reads generated during the pipeline.

@SamVegaEs
Copy link
Author

Thank you so much for the quick response.
That was indeed the case. Once I removed the duplicated reads the program worked perfectly fine.

Thanks!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants