Skip to content

Commit

Permalink
rebasing
Browse files Browse the repository at this point in the history
  • Loading branch information
Hugenotte585 committed Jun 25, 2023
1 parent 6833dca commit ecba4c7
Show file tree
Hide file tree
Showing 8 changed files with 1,212 additions and 49 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ Homo_sapiens_3prime_UTR.fa
Homo_sapiens_3prime_UTR.fa.fai
MLM_mammals_species_aware_5000_weights
Scer_half_life.csv
**/__pycache__/
4 changes: 2 additions & 2 deletions encoding_utils/sequence_operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ def motif_mask_encoding(seq,motifs,seq_len=300,total_len=303,masker=np.zeros(5))
return x_batch, y_masked_batch, y_batch, mask_batch, motif_mask_batch


#create test set with sequences that include motifs only
#create test set with sequences that include motifs only


def compute_target_seq(seq, motifs, seq_len = 300, total_len = 305):
Expand Down Expand Up @@ -529,4 +529,4 @@ def batched_transform(batch, mask_rate=0.1, max_len=300):
x = torch.from_numpy(x.transpose(0,2,1)).float()
y = torch.from_numpy(y).long()

return x, y, mask, []
return x, y, mask, []
2 changes: 1 addition & 1 deletion helpers/metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ def compute(self):
"""
if self.total != 0:
return self.correct.float() / self.total
return torch.tensor(0) # if we gotta divide by 0
return torch.tensor(0) # if we gotta divide by 0
Loading

0 comments on commit ecba4c7

Please sign in to comment.