indyslim Posted November 21, 2002 Posted November 21, 2002 Hi, As a disclaimer, I'm a Geneticist by training and my FM skills are not skills at all. I'm setting up a database in my lab for oligonucleotides (small stretches of DNA that contain A, G, T or C in random sequence). The length of the oligo is usually between 12 and 80 bases (characters) long. One of the key calculations in an oligo database is the melting temperature, which is directly affected by the number of G and C as opposed to A and T. In my database, I have an input text field that hold the sequence of the oligo. From this how do I calculate the number of A, T, G and C in the text string. For eg. a typical sequence is the following AATGGCGCGCTGGATCGATGCTTTAATTAG What functions can I call that will break this string and give the requires number of each base (character) ? I can subsequently use that amount with a standard mathematical calculation to arrive at the melting temperature. I checked around in the forums, and saw some examples of using the Substitute function, but that was way beyond me. Thanks for all the help Indy [color:"red"] [color:"#666666"]
kenneth2k1 Posted November 21, 2002 Posted November 21, 2002 Hmmm, how about this: Make a field that holds the base you want to count - I'll call it Base Make a field to hold the nucleotide string - I'll call it Oligo Make a calc field that counts the amount of character type specified in the Base field. Call it BaseCount. The calc is: PatternCount(Oligo, Base). Result should be number, do not store. This is a very interesting project it seems! Ken
indyslim Posted November 22, 2002 Author Posted November 22, 2002 Thanks Ken, That was all it took. Worked perfectly. I'm surprised as to how straightforward these functions are. Extremely helpful for a newbie like me. Thanks again
Vaughan Posted November 22, 2002 Posted November 22, 2002 Be aware that FMP has limits on its indexing, and this may affect your results. IIRC, the limits are 20 characters per word, where a word is a string of characters ending in a space or end-of-line or paragraph mark. The is also a limit to the number of words indexed, but the number escapes me at the moment. I know LiveOak is on-the-ball with this stuff! hopefully he'll take it from here...
kenneth2k1 Posted November 22, 2002 Posted November 22, 2002 That's true, I didn't even think about that. I just have indexing on the field Off. Might make it slower.
jasonwood Posted November 22, 2002 Posted November 22, 2002 How would lack of indexing create a problem here? Does "PatternCount()" require indexing?
Vaughan Posted November 22, 2002 Posted November 22, 2002 I dunno whether PatternCount requires indexing... I'm just flagging it as a potential problem.
kenneth2k1 Posted November 22, 2002 Posted November 22, 2002 Jason: Indexing is required on foreign keys. From my understanding, the limit is 60 characters including spaces. If the field BaseCount is going to be this key, it needs to be kept within these limitations. Indexing has its advantages, as it is referenced quicker but takes up file size. So since the field is counting the amount of times a certain letter comes up in a string of text, this would make the limit to this number 6 x 10 to the 59th, right? that should meet the initial request. Sound right Vaughan? Ken
jasonwood Posted November 22, 2002 Posted November 22, 2002 Ohhhkay I think I understand now! I've never really understood much about indexing and storage, even though it doesn't seem very complicated! BTW: I checked in FileMaker help and it says it will index the first (up to) 20 characters of any word (without spaces), up to a max of 60 characters in a field (with spaces).
djgogi Posted November 22, 2002 Posted November 22, 2002 Nop, 60 chars per line. Also PatternCount doesn't depend on string length (unless you've superated the 64k limit) Dj
Recommended Posts
This topic is 8108 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now