zstephens / neat-genreads

NEAT read simulation tools
Other
96 stars 27 forks source link

Bed file with more regions than reference #100

Closed MikeWLloyd closed 2 years ago

MikeWLloyd commented 2 years ago

I am splitting by chr, simulating each chr and then recombining. I didn't split my bed file by chr, and when I run the full bed (all chr) against a single chr fasta file, I get the following error:

    for k in input_regions.keys():
RuntimeError: dictionary changed size during iteration

It comes from this statement, which is python2 syntax.

        for k in input_regions.keys():
            if k not in ref_list:
                n_in_bed_only += 1
                del input_regions[k]

I believe it could be changed to for i in list(input_regions):

MikeWLloyd commented 2 years ago

moving to newer repo.