Jump to content

Text Pattern and Calculation


This topic is 7823 days old. Please don't post here. Open a new topic instead.

Recommended Posts

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"]

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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...

Link to comment
Share on other sites

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

Link to comment
Share on other sites

Ohhhkay I think I understand now! I've never really understood much about indexing and storage, even though it doesn't seem very complicated! smile.gif

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).

Link to comment
Share on other sites

This topic is 7823 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.