Skip to content

Comments

Compare motifs#162

Merged
avantikalal merged 7 commits intomainfrom
compare-motifs
Sep 8, 2025
Merged

Compare motifs#162
avantikalal merged 7 commits intomainfrom
compare-motifs

Conversation

@avantikalal
Copy link
Collaborator

@avantikalal avantikalal commented Aug 11, 2025

Improvements to motif scanning, especially to the compare_motifs function.

  1. In scan_sequences, the argument names was not being propagated. Fixed.
  2. In compare_motifs, the argument rc was not being propagated. Fixed.
  3. In compare_motifs, the docstring contained an argument ref_allele which does not exist. Removed.
  4. compare_motifs would previously return an error if no motifs are found. I added a condition if len(scan) > 0:.
  5. compare_motifs previously would scan both ref and alt sequences using the threshold pthresh and return the motif match scores in both. If a motif match was above the threshold in one sequence but not the other, it would only return one score and would return NA for the other. Now, I added an extra scanning step which will fill in sub-threshold p-values.
  6. compare_motifs previously would return only match scores for motifs in the ref and alt sequences. Now, it returns both match scores and p-values.
  7. compare_motifs previously would return the ratio of match scores in alt vs. ref sequences. Since motif match scores are on a log scale, I changed this to the difference.
  8. Added a test for compare_motifs
  9. Reran the VEP tutorial to demonstrate these changes

@avantikalal avantikalal merged commit 613c96c into main Sep 8, 2025
2 checks passed
@avantikalal avantikalal deleted the compare-motifs branch September 8, 2025 03:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants