Skip to content

Commit

Permalink
Fix email
Browse files Browse the repository at this point in the history
  • Loading branch information
Jumitti committed Apr 26, 2024
1 parent c89048f commit dddd999
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions tfinder/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -426,11 +426,11 @@ def transform_matrix(matrix):

@staticmethod
# Generate random sequences for p_value
def generate_ranseq(probabilities, seq_length, progress_bar, num_random_seqs):
def generate_ranseq(probabilities, seq_length, progress_bar):
motif_length = seq_length
random_sequences = []

for _ in range(num_random_seqs):
for _ in range(1000000):
random_sequence = IMO.generate_random_sequence(motif_length, probabilities)
random_sequences.append(random_sequence)
progress_bar.update(1)
Expand Down Expand Up @@ -479,8 +479,6 @@ def individual_motif_finder(dna_sequences, threshold, matrix, progress_bar, calc

matrices = IMO.transform_matrix(matrix)

num_random_seqs = 1000000

seq_length = len(matrices['+ f']['A'])

if calc_pvalue == 'ATGCPreset':
Expand All @@ -491,7 +489,7 @@ def individual_motif_finder(dna_sequences, threshold, matrix, progress_bar, calc

probabilities = [percentage_a, percentage_c, percentage_g, percentage_t]

random_sequences = IMO.generate_ranseq(probabilities, seq_length, progress_bar, num_random_seqs)
random_sequences = IMO.generate_ranseq(probabilities, seq_length, progress_bar)

random_scores = {}
matrix_random_scores = []
Expand Down Expand Up @@ -525,7 +523,7 @@ def individual_motif_finder(dna_sequences, threshold, matrix, progress_bar, calc

probabilities = [percentage_a, percentage_c, percentage_g, percentage_t]

random_sequences = IMO.generate_ranseq(probabilities, seq_length, progress_bar, num_random_seqs)
random_sequences = IMO.generate_ranseq(probabilities, seq_length, progress_bar)

if calc_pvalue == 'ATGCProportion':
random_scores = {}
Expand Down

0 comments on commit dddd999

Please sign in to comment.