From: William P. <wil...@ya...> - 2010-03-04 04:21:23
|
On Mar 3, 2010, at 10:56 PM, Vladimir Gapeyev wrote: > I removed this columnless matrix. It turned to be associated (via taxonlabels) with the notorious Submission 22, so it should be junk indeed. > > Unfortunately, this did not solve the problem with SetMatrixNChar. I'd need to dig deeper, but I have been stuck on this thing for too long already So, I am going to move with the remaining migration steps: studies metadata, taxon intelligence and citations. I hope I am not wrong in my understanding that they are independent from whatever SetMatrixNChar is supposed to do. > > Meanwhile, if someone can explain, in terms of the data, what is the function of SetMatrixNChar is expected to be, maybe it would be possible to reimplement it in SQL instead of searching for the data point on which it breaks? It appears, the end result is just setting fields nchar and ntax in Matrix. Should I just set them to the number of associated records in the MatrixColumn and MatrixRow tables, respectively? (Another apparent thing actually confuses me: It appears that the resetting code should work only for character matrices, while all matrices present in the DB have matrixtype='S', which stands for "standard" matrix.) I'm confused by the meaning of standard vs character matrices. In NEXUS vernacular, a standard matrix is one that uses discrete characters where the symbols are arbitrary -- i.e. no assumptions about the meaning of symbols (by contrast, a nucleotide matrix is one where A, C, G, T, N, and IUPAC are the assumed symbols). For me, the most logical way to divide up types of matrices is the following: 1. distance (= taxa x taxa) vs character (= taxa x character) 2. and of the character ones: continuous (= floating point) vs discrete (= integers) 3. and of the discrete ones: standard (= arbitrary symbols) vs nucleotide (= a, c, g, t + N and IUPAC) vs amino acid (= 20 letters + X) ... but evidently that not happening here. I don't understand the distinction between character matrix and standard matrix -- sounds like they are synonymous. I agree with you that it certainly sounds like SetMatrixNChar functions to count the number of characters in a matrix. An UPDATE SQL statement should be able to do this too -- just a matter of counting the number of matrixcolumn records for each matrix_id. But that's just a guess -- I would think that nchar would be passed to the database from headless Mesquite to the database anyway... bp |