zstephens / neat-genreads

NEAT read simulation tools
Other
95 stars 27 forks source link

IndexError: list index out of range #105

Open mariaelf97 opened 7 months ago

mariaelf97 commented 7 months ago

Describe the bug When trying to simulate reads with length greater than 400, I get an IndexError: list index out of range error

To Reproduce Steps to reproduce the behavior: python gen_reads.py -r ~/amplicons/GCA_014899445.1_amplicon_22.fasta -o output -R 400 -p 1 -M 0 -c 100

Error:

Using default sequencing error model.
Warning: Read length of error model (101) does not match -R value (400), rescaling model...
Using default gc-bias model.
Index not found, creating one... 
0.021 (sec)
reading CP041800.1_amplicon_22... 
0.001 (sec)
--------------------------------
sampling reads...
[Traceback (most recent call last):
  File "/storage/mahmadi/tools/neat-genreads/gen_reads.py", line 901, in <module>
    main()
  File "/storage/mahmadi/tools/neat-genreads/gen_reads.py", line 609, in main
    [cig for cig in sequences.all_cigar[1] if len(cig) != 100]:
IndexError: list index out of range

Fasta file is as below:

>CP041800.1_amplicon_22
GGCAGCCGTGTTGTGGATGGACGAAGCCGTGGCACGTGCGCACGGCCTGACCCCGCGGGCCCGGATCGTCGCCCAGGCACTCGTCGGCGCCGAGCCCTACTACCACCTGGACGGCCCGGTGCAGTCCACCGCGAAGGTGCTGGAGAAGGCCGGCATGAAGATCGGCGACATCGACATCGTCGAGATCAACGAGGCGTTCGCGTCCGTGGTGCTGTCCTGGGCGCGGGTGCACGAGCCCGACATGGACCGGGTCAACGTCAACGGCGGGGCGATCGCGCTGGGGCATCCGGTGGGCTGCACCGGCAGCCGGCTGATCACCACCGCCCTGCACGAGCTCGAGCGCACCGACCAGAGCCTCGCGCTGATCACCATGTGCGCCGGCGGGGCCCTGTCCACCGGCACCATCATCGAGCGGATTTAACCTAGCTGCGGCAGGGCACCGTGCGGCGTGACTGCAACATGAAGCGACCGATGATTAGATAGCGAGGCGGACGCGCGCCTTTGGCGACCCTTGGTCGCTAGGATCAGCGTCATGCCGAAATCACCGCCGCGGTTTCTGAATTCGCCGCTCAGCGACTTCTTTATCAAGTGGATGTCACGGATTAATACCTGGATGTACCGCCGCAACGACGGGGAGGGTCTGGGCGGCACCTTCCAGAAGATTCCGGTCGCGCTGCTGACCACCACCGGCCGCAAGACCGGCCAGCCGCGGGTCAACCCGCTCTACTTCCTGCGCGACGGTGGGCGGGTCATTGTCGCGGCCTCCAAGGGCGGCGCGGAGAAGAACCCGATGTGGTACCTCAACCTCAAGGCCAACCCCAAGGTTCAGGTACAGATCAAAAAGGAAGTGCTGGACCTTACCGCGCGGGACGCGACCGACGAGGAGCGCGCCGAATATTGGCCACAGTTGGTCACGATGTACCCAAGTTATCAGGACTACCAGTCCTGGACCGACCGCACGATCCCGATCGTGGTTTGCGAACCCTGACCGTTCCCAACTTCGCCGAACGTGAAGCCA

Expected behavior I was expecting to get a fastq file with simulated reads from the fasta file

Desktop (please complete the following information):

joshfactorial commented 7 months ago

For the latest improvements and bug fixes, be sure to check out our new repository: https://github.com/ncsa/neat

Version 3.4 (https://github.com/ncsa/NEAT/releases/tag/3.4) should be bug free (let us know if not!) and have a very similar interaction as this version. You can also see our newest development with version 4.1.