Skip to content

Consensus string#20

Closed
danielle-pinto wants to merge 5 commits intomainfrom
2026-02-23-cons
Closed

Consensus string#20
danielle-pinto wants to merge 5 commits intomainfrom
2026-02-23-cons

Conversation

@danielle-pinto
Copy link
Collaborator

No description provided.

we first scan for 'A', 'C', then 'G' and 'T',
so the final consensus string will be biased towards more A's, then C's, G's and T's.
This simply based on which nucleotide counts it will encounter first in the profile matrix.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I may add some examples of multiple consensus strings. I may also add another solution that returns all consensus strings.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added an example, but I will pass on adding another solution. I think time will be better spent on the BioPython recipes.


# make profile matrix

## Is it possible to do this in a more efficient vectorized way? I wanted to see if we could do countmap() for each column in a simple way that would involve looping over each column. I think this ended up being more efficient since we are just looping over each of the nucleotides
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to do this in a more efficient vectorized way? I wanted to see if we could do countmap() for each column in a simple way that would involve looping over each column. I think this ended up being more efficient since we are just looping over each of the nucleotides

@github-actions
Copy link

1 similar comment
@github-actions
Copy link

@kescobo
Copy link
Member

kescobo commented Feb 26, 2026

Preview at https://biojulia.github.io/BioTutorials/20

Hey nice, this works!

@github-actions
Copy link

github-actions bot commented Mar 2, 2026

@danielle-pinto danielle-pinto marked this pull request as ready for review March 2, 2026 14:20
@github-actions
Copy link

github-actions bot commented Mar 2, 2026

@danielle-pinto
Copy link
Collaborator Author

Going to delete this branch and open up a new PR that is on top of main (since we've made the switch to Xranklin).

@kescobo
Copy link
Member

kescobo commented Mar 2, 2026

#21

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