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.<div>
<br></div><div>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.</div><div><br></div><div>I will be out this afternoon with more appointments, but can start to fix these tomorrow if need be.</div>
<div><br></div><div>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.</div>
<div><br></div><div>Lacey<br><br><div class="gmail_quote">On Wed, Jan 20, 2010 at 10:46 AM, Niki Learn <span dir="ltr"><<a href="mailto:nlearn@princeton.edu">nlearn@princeton.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div><div></div><div class="h5">-----Original Message-----<br>
From: <a href="mailto:babase-bounces@eeblistserv.Princeton.EDU">babase-bounces@eeblistserv.Princeton.EDU</a><br>
[mailto:<a href="mailto:babase-bounces@eeblistserv.Princeton.EDU">babase-bounces@eeblistserv.Princeton.EDU</a>] On Behalf Of Karl O. Pinc<br>
Sent: Tuesday, January 19, 2010 4:12 PM<br>
To: The Baboon Database Project<br>
Subject: Re: [Babase] Samples/neighbors error when attempting to censor<br>
males<br>
<br>
On 01/19/2010 01:11:55 PM, Niki Learn wrote:<br>
<br>
> ERROR: DIG: BIOGRAPH.Statdate cannot be less than SAMPLES.Date<br>
> unless<br>
> NEIGHBORS.Sname individual is alive<br>
><br>
> ERROR: LUI: BIOGRAPH.Statdate cannot be less than SAMPLES.Date<br>
> unless<br>
> NEIGHBORS.Sname individual is alive<br>
<br>
> So I looked these guys up in samples and Luigi didn't even have an<br>
> entry.<br>
> Meanwhile Digit had many entries but his last entry was for 25 Aug<br>
> 2007,<br>
> which matches his last census entry and current statdate. I am<br>
> trying<br>
> to<br>
> change his statdate to a censordate of 27 Aug 2007, which is NOT less<br>
> than<br>
> the last samples date. Neighbors doesn't even have dates. I'm not<br>
> real<br>
> familiar with how those tables interact so I don't know where else to<br>
> look<br>
> for whatever is causing this error.<br>
<br>
The place to look is the social interactions ER diagram on page<br>
10 of the pocket reference.<br>
<br>
DIG is a neighbor of DIB as of 2008-10-13, so you can't "stop his<br>
existance" after 27 Aug 2007, which is what setting his Statdate<br>
back would do, when his Status is not 0 (alive). I presume you're<br>
also changing his Status to 2 (censored).<br>
<br>
select samples.date, samples.sname, neighbors.sname, neighbors.ncode<br>
from samples, point_data, neighbors<br>
where neighbors.sname = 'DIG'<br>
and neighbors.pntid = point_data.pntid<br>
and point_data.sid = samples.sid<br>
order by samples.date desc, samples.stime desc;<br>
<br>
We could change the rules for Status = 2 (censored) but<br>
I don't think we really want to. (Right?)<br>
<br>
The error message is not the best. The key indicator<br>
is that it talks about NEIGHBORS.Sname as the problematic<br>
column. I'd be happy to come up with a better message<br>
but suspect this is a systemic problem. I'm<br>
(very likely) using the same error message you'd get<br>
if you messed around in the NEIGHBORS table<br>
and have probably written error messages in this<br>
fashion all over the system. Anyhow, suggestions<br>
are welcome.<br>
<br>
I didn't look at LUI but I suspect something similar.<br>
If he's still a problem let me know and please tell<br>
me exactly what it was you were trying to do when<br>
you got the error. (I know your brain is running<br>
on empty at times these days.)<br>
<br>
Karl <<a href="mailto:kop@meme.com">kop@meme.com</a>><br>
Free Software: "You don't pay back, you pay forward."<br>
-- Robert A. Heinlein<br>
<br>
<br>
</div></div>NIKI WRITES:<br>
Okay - that's a lot of typing to find out who someone's neighbor is. Should<br>
we have a view for that or something?<br>
<br>
I'm still confused as to how DIG (or any others) could be listed as another<br>
baboon's neighbor after he has stopped showing up in the census. So Digit<br>
was last censused on 25 Aug 2007 but according to the output of Karl's code<br>
he was someone's neighbor 18 times after that in September 2007 and<br>
September and October 2008. How is this possible? And why isn't it<br>
reflected in his statdate?<br>
<br>
2008-10-13 | DIB | DIG | 1<br>
2008-10-13 | DIB | DIG | 1<br>
2008-10-13 | DIB | DIG | 1<br>
2008-09-18 | VIN | DIG | 1<br>
2008-09-18 | VIN | DIG | 1<br>
2008-09-18 | VIN | DIG | 1<br>
2008-09-18 | VIN | DIG | 1<br>
2008-09-18 | VIN | DIG | 1<br>
2008-09-18 | RIS | DIG | 2<br>
2008-09-06 | ROX | DIG | 1<br>
2008-09-06 | ROX | DIG | 1<br>
2008-09-06 | DIB | DIG | 3<br>
2008-03-24 | YOK | DIG | 1<br>
2008-03-24 | YOK | DIG | 1<br>
2007-09-01 | VEB | DIG | 1<br>
2007-09-01 | VEB | DIG | 1<br>
2007-09-01 | VEB | DIG | 1<br>
2007-09-01 | VEB | DIG | 2<br>
2007-08-18 | DUN | DIG | A<br>
2007-08-08 | IRI | DIG | 2<br>
<div><div></div><div class="h5"><br>
<br>
_______________________________________________<br>
Babase mailing list<br>
<a href="mailto:Babase@www.eco.princeton.edu">Babase@www.eco.princeton.edu</a><br>
<a href="http://www.eco.princeton.edu/mailman/listinfo/babase" target="_blank">http://www.eco.princeton.edu/mailman/listinfo/babase</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>- -<br>Lacey K. Maryott Roerish<br>Alberts Lab<br>Department of Biology<br>Duke University<br>ph: 919-660-7306<br>fax: 919-660-7293<br><a href="mailto:Lacey.Maryott@duke.edu">Lacey.Maryott@duke.edu</a><br>
</div>