[Babase] Samples/neighbors error when attempting to censor males
Lacey Maryott Roerish
lroerish4 at gmail.com
Wed Jan 20 10:51:44 EST 2010
We typically treat such data as errors, as in the team either putting in the
wrong sname, or simply having a typo. However, when it occurs this much, I
often talk with Susan about the possibility that he wasn't really gone, just
missed in a lot of censuses as a result of being left off the sheet.
At any rate, our protocol calls for just changing it to unk neighbor since
it is clear someone was the neighbor, just not the animal the team put in.
I will be out this afternoon with more appointments, but can start to fix
these tomorrow if need be.
As far as a view goes, we don't tend to use that data often, and when we do,
it is fairly simple to pull together with sample and point ids. It just
seems like a lot more than it is when presented in query format.
Lacey
On Wed, Jan 20, 2010 at 10:46 AM, Niki Learn <nlearn at princeton.edu> wrote:
> -----Original Message-----
> From: babase-bounces at eeblistserv.Princeton.EDU
> [mailto:babase-bounces at eeblistserv.Princeton.EDU] On Behalf Of Karl O.
> Pinc
> Sent: Tuesday, January 19, 2010 4:12 PM
> To: The Baboon Database Project
> Subject: Re: [Babase] Samples/neighbors error when attempting to censor
> males
>
> On 01/19/2010 01:11:55 PM, Niki Learn wrote:
>
> > ERROR: DIG: BIOGRAPH.Statdate cannot be less than SAMPLES.Date
> > unless
> > NEIGHBORS.Sname individual is alive
> >
> > ERROR: LUI: BIOGRAPH.Statdate cannot be less than SAMPLES.Date
> > unless
> > NEIGHBORS.Sname individual is alive
>
> > So I looked these guys up in samples and Luigi didn't even have an
> > entry.
> > Meanwhile Digit had many entries but his last entry was for 25 Aug
> > 2007,
> > which matches his last census entry and current statdate. I am
> > trying
> > to
> > change his statdate to a censordate of 27 Aug 2007, which is NOT less
> > than
> > the last samples date. Neighbors doesn't even have dates. I'm not
> > real
> > familiar with how those tables interact so I don't know where else to
> > look
> > for whatever is causing this error.
>
> The place to look is the social interactions ER diagram on page
> 10 of the pocket reference.
>
> DIG is a neighbor of DIB as of 2008-10-13, so you can't "stop his
> existance" after 27 Aug 2007, which is what setting his Statdate
> back would do, when his Status is not 0 (alive). I presume you're
> also changing his Status to 2 (censored).
>
> select samples.date, samples.sname, neighbors.sname, neighbors.ncode
> from samples, point_data, neighbors
> where neighbors.sname = 'DIG'
> and neighbors.pntid = point_data.pntid
> and point_data.sid = samples.sid
> order by samples.date desc, samples.stime desc;
>
> We could change the rules for Status = 2 (censored) but
> I don't think we really want to. (Right?)
>
> The error message is not the best. The key indicator
> is that it talks about NEIGHBORS.Sname as the problematic
> column. I'd be happy to come up with a better message
> but suspect this is a systemic problem. I'm
> (very likely) using the same error message you'd get
> if you messed around in the NEIGHBORS table
> and have probably written error messages in this
> fashion all over the system. Anyhow, suggestions
> are welcome.
>
> I didn't look at LUI but I suspect something similar.
> If he's still a problem let me know and please tell
> me exactly what it was you were trying to do when
> you got the error. (I know your brain is running
> on empty at times these days.)
>
> Karl <kop at meme.com>
> Free Software: "You don't pay back, you pay forward."
> -- Robert A. Heinlein
>
>
> NIKI WRITES:
> Okay - that's a lot of typing to find out who someone's neighbor is.
> Should
> we have a view for that or something?
>
> I'm still confused as to how DIG (or any others) could be listed as another
> baboon's neighbor after he has stopped showing up in the census. So Digit
> was last censused on 25 Aug 2007 but according to the output of Karl's code
> he was someone's neighbor 18 times after that in September 2007 and
> September and October 2008. How is this possible? And why isn't it
> reflected in his statdate?
>
> 2008-10-13 | DIB | DIG | 1
> 2008-10-13 | DIB | DIG | 1
> 2008-10-13 | DIB | DIG | 1
> 2008-09-18 | VIN | DIG | 1
> 2008-09-18 | VIN | DIG | 1
> 2008-09-18 | VIN | DIG | 1
> 2008-09-18 | VIN | DIG | 1
> 2008-09-18 | VIN | DIG | 1
> 2008-09-18 | RIS | DIG | 2
> 2008-09-06 | ROX | DIG | 1
> 2008-09-06 | ROX | DIG | 1
> 2008-09-06 | DIB | DIG | 3
> 2008-03-24 | YOK | DIG | 1
> 2008-03-24 | YOK | DIG | 1
> 2007-09-01 | VEB | DIG | 1
> 2007-09-01 | VEB | DIG | 1
> 2007-09-01 | VEB | DIG | 1
> 2007-09-01 | VEB | DIG | 2
> 2007-08-18 | DUN | DIG | A
> 2007-08-08 | IRI | DIG | 2
>
>
> _______________________________________________
> Babase mailing list
> Babase at www.eco.princeton.edu
> http://www.eco.princeton.edu/mailman/listinfo/babase
>
--
- -
Lacey K. Maryott Roerish
Alberts Lab
Department of Biology
Duke University
ph: 919-660-7306
fax: 919-660-7293
Lacey.Maryott at duke.edu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://eeblistserv.Princeton.EDU/pipermail/babase/attachments/20100120/d8baa2b2/attachment-0001.html
More information about the Babase
mailing list