thibautjombart / apex

Phylogenetic Methods for Multiple Gene Data
5 stars 3 forks source link

Create and use accessors #31

Closed thibautjombart closed 9 years ago

thibautjombart commented 9 years ago

We need accessors for:

I would suggest getThisStuff() as a general form?

EricArcher commented 9 years ago

I've been making accessors for the <multidna> sequences slot in my new gtypes object in the new version of strataG (https://github.com/EricArcher/strataG.devel), so I'll tackle this today. Have patience with me, I'm still a GitHub newbie.

thibautjombart commented 9 years ago

Sounds great, thanks! =D

EricArcher commented 9 years ago

Do you mind if I change the names you have in the <accessors.R> file? For instance, it makes more sense to me to have <getSequences> return the actual sequences and something like <getLoci> return the locus names, and <getIndNames> to get the individual names for a locus.

thibautjombart commented 9 years ago

Not at all, it's actually best to change them. All the code is old stuff from adegenet but I never used it in apex. Feel free to delete all the commented code and start from a clean slate.

On Tue, May 5, 2015 at 6:03 PM, Eric Archer notifications@github.com wrote:

Do you mind if I change the names you have in the file? For instance, it makes more sense to me to have return the actual sequences and something like return the locus names, and

to get the individual names for a locus. — Reply to this email directly or view it on GitHub https://github.com/thibautjombart/apex/issues/31#issuecomment-99142111.
EricArcher commented 9 years ago

Roger that.

EricArcher commented 9 years ago

Is there always a sequence for every individual in each locus of the @dna slot (either filled with gaps or with actual sequence)? Or, are you planning on changing it so that each locus can have different individuals? I'm trying to workout if the return value for getSequenceNames should be a list with a character vector for each locus, or just a single character vector.

EricArcher commented 9 years ago

I've pushed (I think) accessors for multidna in accessors.R and added some functions to internal.R. getNumSequences has a gap.only argument, which when set to TRUE should duplicate the functionality of the nMissingSequences internal function, so you may want to get rid of that one. Let me know if I've borked anything.

thibautjombart commented 9 years ago

We've changed that bit in the devel. Used to be same individuals for every gene, with gap only sequences where needed. This is now optional, so you may have different numbers of sequences for each gene. I think a generic way to name sequences would be [gene].[individual] or something along these lines?

On Tue, May 5, 2015 at 9:52 PM, Eric Archer notifications@github.com wrote:

Is there always a sequence for every individual in each locus of the @dna slot (either filled with gaps or with actual sequence)? Or, are you planning on changing it so that each locus can have different individuals? I'm trying to workout if the return value for getSequenceNames should be a list with a character vector for each locus, or just a single character vector.

— Reply to this email directly or view it on GitHub https://github.com/thibautjombart/apex/issues/31#issuecomment-99218657.

thibautjombart commented 9 years ago

Awesome! I will check it ASAP. Got a meeting tomorrow all day, but will try to run a sneaky pull & check :) Cheers

On Tue, May 5, 2015 at 11:23 PM, Thibaut Jombart thibautjombart@gmail.com wrote:

We've changed that bit in the devel. Used to be same individuals for every gene, with gap only sequences where needed. This is now optional, so you may have different numbers of sequences for each gene. I think a generic way to name sequences would be [gene].[individual] or something along these lines?

On Tue, May 5, 2015 at 9:52 PM, Eric Archer notifications@github.com wrote:

Is there always a sequence for every individual in each locus of the @dna slot (either filled with gaps or with actual sequence)? Or, are you planning on changing it so that each locus can have different individuals? I'm trying to workout if the return value for getSequenceNames should be a list with a character vector for each locus, or just a single character vector.

— Reply to this email directly or view it on GitHub https://github.com/thibautjombart/apex/issues/31#issuecomment-99218657.

thibautjombart commented 9 years ago

Checked and it looks great, thanks!