Skip to content

Commit aa3cb9a

Browse files
authored
Merge pull request #49 from maressyl/fix-molLength
Fix undesirable molecule length randomness in generate_molecules.py
2 parents 1d544aa + 9eab57e commit aa3cb9a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

simulating/generate_molecules.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ def generate_molecules_from_bed(genome_file_path,
9797
chr,pos = get_chr_pos_from_abs_postion(position=random.randint(1,genome_length), lengths=chrom_lengths)
9898
gene = 'no_gene'
9999
start = pos - math.floor(random.normalvariate(mu=mol_len/2, sigma=15))
100-
end = pos + mol_len
100+
end = start + mol_len
101101
if start <= 0 or end > len(genome[chr]):
102102
continue
103103
molecules.append((chr, gene, start, end))

0 commit comments

Comments
 (0)