Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimizing a subset of antigens individually #85

Open
wants to merge 36 commits into
base: master
Choose a base branch
from

Conversation

davipatti
Copy link
Member

Thought this might be useful as a library function.

The function removes a subset of antigens and optimizes (yielding the 'reference' map). Then adds each antigen in the subset one by one, optimizes, and aligns to the reference. Position of each antigen in the subset is then added to the reference map.

Useful, for example, for maps containing 10s-100s of mutants.

There could be variations:

  • taking the mean position of points in the reference map, rather than the position without any of the subsetted antigens
  • same thing but for sera

Not sure if if put this in the best file. Also, would be interested if you'd suggest doing anything differently @shwilks.

@davipatti davipatti requested a review from shwilks February 18, 2022 19:09
@davipatti davipatti added the enhancement New feature or request label Feb 18, 2022
@davipatti
Copy link
Member Author

(Just seen a batch of .Rd files that I think the linter changed some wrapping in. Sorry)

@davipatti
Copy link
Member Author

Random thought - a simpler approach in this type of situation might be to give antigens in the subset a (much) lower weight.

@shwilks
Copy link
Member

shwilks commented Feb 21, 2022

Yeah, this is a nice addition, although I hesitate to add stuff like this to the core Racmacs package since as you say there are so many variants of this type of thing, and anything we add to Racmacs requires maintaining and ideally proper tests etc. Plus it feels maybe quite similar to the "frozen merge" https://acorg.github.io/Racmacs/articles/merging-maps.html#frozen-merge. I had at one point started a RacmacsUtils package for stuff like this, maybe that would be a good home for it?

@davipatti
Copy link
Member Author

Yeah tricky... in one way it would be cleaner to keep things like this in Racmacs, rather than having to maintain an additional utilities package. And less burden on users to be keeping tabs on two libraries. But I take your points... Happy to write some tests for this. And handle variants if/when demand arises? Up to you I guess!


The last step is doing the same as a frozen merge (I think). I tried to call mergeMaps with method='frozen-merge', but it couldn't handle more than two maps. Should it be able to do that?

davipatti and others added 23 commits February 22, 2022 16:04
… as the merged map. Also applies the plotspec.
…h columns corresponding to stress per titer when nd values are excluded and when they are included
…s provided, names will be taken from the row and column names when creating a map.
…es have different lengths or are missing for some points
* Verbosity argument also suppresses optimization progress messages
* Issue a warning if duplicate antigen or serum names are found when creating a map
shwilks and others added 12 commits March 12, 2022 10:05
Add antigen and sera attributes: `agLineage()`, `srLineage()`, `agReassortant()`, `srReassortant()`, `agStrings()`, `srStrings()`, `agContinent()`, `agNucleotideSequences()`, `srNucleotideSequences()`
Add antigen and sera attributes: `agLineage()`, `srLineage()`, `agReassortant()`, `srReassortant()`, `agStrings()`, `srStrings()`, `agContinent()`, `agNucleotideSequences()`, `srNucleotideSequences()`
Adding nucleotide sequence test & fix typo
Add additional antigen and sera attributes
Add documentation
… as the merged map. Also applies the plotspec.
@shwilks
Copy link
Member

shwilks commented Apr 11, 2022

Was looking at reviewing this and under files changed it has a bunch of changes and e.g. in DESCRIPTION it has stuff like 1.1.30 -> 1.1.35, but in the current version of master DESCRIPTION already has 1.1.35, so I'm wondering why it's listed as a change. Any idea what's going on, seems like it's comparing to some old version of master for some reason?

@davipatti
Copy link
Member Author

I rebased this branch with master, to incorporate all the recent changes.

Under 'Files changed' select 'Changes from' and select the top two commits (fe5a1cb and 9428a86) to see just the changes I made.

(Sorry for the extra confusion. I had thought that in rebasing I wouldn't end up with all the extra individual commits from master...)

@davipatti
Copy link
Member Author

(Lavanya had needed some of the new functionality (altering point transparency) as well as the optimize subset individually function.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants