My Writings. My Thoughts.
Quick Tip: Closing Pop-Up Windows in FileMaker
// January 9th, 2010 // No Comments » // FileMaker, code
I use pop-up windows in my FileMaker solutions to give the user a sense of the task they are about to perform is important. Whether it’s transactional data entry using global fields or entering data directly into a field, the task is entering or editing a very critical piece of data. All my pop-up windows are named using this convention: Verb – Object (e.g., Enter Start Date ). Once the action is performed (the user clicks a button to continue or cancel with the data entry/edit ) I close the pop-up window. How do we ensure that we’re closing the correct window? That’s easy!
The name of the window is set in a previous script using the “New Window” script step. A local variable is employed to capture the name of the window using the Get( New Window ) function. The user is given a binary decision in the form of two buttons “Continue” or “Cancel” in the pop-up window. Clicking on either will execute this code:
Script
Set Variable[ $_windowName ; Get( WindowName ) ]
// do something
Close Window [Name: $_windowName ; Current file ]
H1N1 PCR Diagnostic Tests to Use Local Biotech Company’s Oligos
// November 16th, 2009 // No Comments » // H1N1, PCR, diagnostic, oligo
Local Bay Area biotech company Biosearch Technologies has obtained a license from the CDC for the novel H1N1 Influenza signatures along with the Influenza A sub-typing panel signatures. This means that Biosearch Technologies’ oligonucleotides (oligos or primers) will be used in PCR diagnostic testing for detecting the H1N1 flu strain. The PCR diagnostic test has greater sensitivity, and therefore better accuracy, at detecting the pandemic strain (H1N1 type A) of the flu virus, than current rapid detection systems. Because of its sensitivity, the PCR test will also be able to detect if a person has had H1N1, if tested early enough (on or shortly after day 5).
FileMaker Custom Function for Creating Random DNA Sequences
// August 24th, 2009 // No Comments » // Custom Function, DNA, FileMaker
I am developing a small application to store short DNA sequences or oligos. One of the things that I need to test is the performance of the application for finding a unique sequence amongst thousands of sequences. I needed to come up with a quick way to generate random sequences of known length/size. Recursive custom functions in FileMaker came in handy once again to achieve the task.
cf_DNA_Polymerase ( size )
The parameter “size” is the number of bases that constitute the oligo.
Here is the custom function:
Let(
randomNum = Int ( Random * 100 ); // a randomly generated integer between 0 and 100
Case( size > 0 ;
Case(
randomNum ≥ 0 and randomNum < 25 ; “A” ;
randomNum ≥ 25 and randomNum < 50 ; “T” ;
randomNum ≥ 50 and randomNum < 75 ; “G” ;
randomNum ≥ 75 and randomNum ≤ 100; “C” ;
) // end Case& cf_DNA_Polymerase( size – 1 ); // decrement the “size” parameter by one after each recursion
“”
) // end Case
) // end Let
So using a parameter for 100 should return a sequence like this:
cf_DNA_Polymerase ( 100 )
AGACTAACCTTGTTCGCATTCCCTGCGGTAGTCAAGATTACTCCCTAGCTACTTCCTAAAA
GCGTTCGGTTCCGCAGATTGTACTCTACTCCAGAGGCAG
Compensation and 23andMe’s $99 DNA Sequencing Kit
// July 21st, 2009 // No Comments » // Sequencing, Web 2.0, biology
Last week Web 2.0 genetic analysis company 23andMe announced a “Research Edition” $99 genetic kit for analyzing your DNA. The cost of the kit is discounted from the regular price of $399 which is their Full Edition kit.
From the company’s perspective, one of the intentions for the discounted kit is to get enough people to submit samples. Quantitatively speaking, enough samples and data, would validate 23andMe’s business process for the scientific community and anyone who may partner with them for sequencing genomes in the future. I’m not entirely convinced that their current business model for achieving this will work. Customers have to pay the company to submit samples and retrieve data. Sure they are provided a service to better understand their ancestry, predisposition to diseases, genealogy, and inherited traits but is the service worth $99? Time will tell. 23andMe should take the approach biotech and pharmaceutical companies use for generating data on their experimental drugs and studies. This involves clinical trials, where patients are usually compensated monetarily, covering time and costs, for their participation. Following this model, 23andMe could obtain many more samples and data to achieve its goal. They could provide the service free of charge to customers in exchange for their samples until they received enough of them to validate their business model.
It’s not the inhibition of the HOX gene pathway!
// June 25th, 2009 // No Comments » // amphibian, biology
Dragonfly Nymph Bites Off Tadpole Hind Limb
Biology at work not pollutants.
FileMaker Custom Function for Translating a DNA Sequence to an Amino Acid Sequence
// May 29th, 2009 // No Comments » // Custom Function, FileMaker
Recursive custom functions in FileMaker Pro can be used in calculation fields for translating a DNA sequence into its amino acid sequence. In the example below, the custom function recursively works on a DNA sequence’s triplets (codons) translating each triplet into a single letter amino acid.
Here’s the custom function’s name and parameter:
cf_translate_DNA( sequence)
Here’s the code:
Let(
seq = Left( sequence; 3 );
Case(
Length ( sequence ) ;Case(
seq = “TTT”; “F”;
seq = “TTC”; “F”;
seq = “TTA”; “L”;
seq = “TTG”; “L”;seq =”TCT” ; “S”;
seq =”TCC” ; “S”;
seq =”TCA” ; “S”;
seq =”TCG” ; “S”;
seq =”TAT” ; “Y”;
seq =”TAC” ; “Y”;
seq =”TAA” ; “*”;
seq =”TAG” ; “*”;
seq =”TGT” ; “C”;
seq =”TGC” ; “C”;
seq =”TGA” ; “*”;
seq =”TGG” ; “W”;seq =”CTT” ; “L”;
seq =”CTC” ; “L”;
seq =”CTA” ; “L”;
seq =”CTG” ; “L”;seq =”CCT” ; “P”;
seq =”CCC” ; “P”;
seq =”CCA” ; “P”;
seq =”CCG” ; “P”;seq =”CAT” ; “H”;
seq =”CAC” ; “H”;
seq =”CAA” ; “Q”;
seq =”CAG” ; “Q”;seq =”CGT” ; “R”;
seq =”CGC” ; “R”;
seq =”CGA” ; “R”;
seq =”CGG” ; “R”;seq =”ATT” ; “I”;
seq =”ATC” ; “I”;
seq =”ATA” ; “I”;
seq =”ATG” ; “M”;seq =”ACT”; “T”;
seq =”ACC”; “T”;
seq =”ACA”; “T”;
seq =”ACG”; “T”;seq =”AAT”; “N”;
seq =”AAC”; “N”;
seq =”AAA”; “K”;
seq =”AAG”; “K”;seq =”AGT”; “S”;
seq =”AGC”; “S”;
seq =”AGA”; “R”;
seq =”AGG”; “R”;seq =”GTT” ; “V”;
seq =”GTC” ; “V”;
seq =”GTA”; “V”;
seq =”GTG”; “V”;seq =”GCT”; “A”;
seq =”GCC”; “A”;
seq =”GCA”; “A”;
seq =”GCG”; “A”;seq =”GAT”; “B”;
seq =”GAC”; “B”;
seq =”GAA”; “E”;
seq =”GAG”; “E”;seq =”GGT”; “G”;
seq =”GGC”; “G”;
seq =”GGA”; “G”;
seq =”GGG”; “G”;“”
) // end Case
& “ “& cf_translate_DNA ( Middle( sequence ; 4 ; Length( sequence ) ) );
“”
) // end Case
) // end Let
The custom function “cf_translate_DNA” reads through a sequence in triples until it gets to the end of the sequence. So if the sequence is:
AAATAGCCC
the first time the entire sequence gets passed through the function. The resulting amino acid is:
AAA = K
The sequence that gets passed through the second recursive loop is:
TAGCCC
this is because of this part of the function: cf_translate_DNA ( Middle ( sequence ; 4 ; Length( sequence ) ) );
The resulting amino acid for the second loop is:
TAG = *
and finally the function ends with
CCC = P
Resulting in an amino acid sequence of:
K * P
Remember the function only looks at the first triple (codon) and builds the amino acid sequence that way.
Recursive custom functions should always have a method for stopping the recursion. In the example above the first Case statement checks the length of the input parameter “sequence” . If there is no more sequence left ( which occurs after the last loop through the function ), then Length( sequence ) returns 0 and the recursion halts.
Refreshing a Filtered Portal Using Script Triggers in FileMaker Pro 10
// April 29th, 2009 // No Comments » // FileMaker, Filtered Portals, Script Triggers
Filtered Portals are a powerful technique used for displaying data in FileMaker Pro. A user experience issue in using filtered portals however, is the fact that after entering text into a filter portal key field, the user must manually commit the record in order to have the portal refresh. This usually involves clicking out of the field or committing records with a button. This is no longer the case thanks to FileMaker 10 and Script Triggers. Here’s the set up:

Australian Rainforest Frogs Filtered Portal
-
Create a relationship using a global key field on the left side and relate it to an indexed calculation key field on the right. Note: the calculation field uses a couple of recursive custom functions which decompose the data into its alphanumeric characters, creating a multi-tiered key. In this relationship we are relating the FRG__Frog table to itself using the filter key and the calculated text field.

A Relationship Between the Filter Key and an Indexed Calculation

Multi-tiered Recursive Calculation Decomposing Text Strings
-
Create a script using the “Set Field” script step, which sets the global filtered portal key field to itself.

-

Filtered Portal Script Trigger
Set the “OnObjectModify” Script Trigger events on the filter key field using the above script. This will fire off the script and refresh the portal every time the filter portal key field is modified.
Download the file.
U.S. State Abbreviations
// April 27th, 2009 // No Comments » // code
One thing I can never easily find on the web are abbreviated names of U.S. States; a simple list delimited by carriage returns- that’s all I want. So, here they are- thanks javaprogrammer
AL
AK
AZ
AR
CA
CO
CT
DE
FL
GA
HI
ID
IL
IN
IA
KS
KY
LA
ME
MD
MH
MA
MI
MN
MS
MO
MT
NE
NV
NH
NJ
NM
NY
NC
ND
OH
OK
OR
RI
SC
SD
TN
TX
UT
VT
VA
WA
WV
WI
WY
Hello World!
// April 10th, 2009 // No Comments » // Uncategorized
Hello World was the name of my first C program. The program was part of an assignment for an introductory programming course, which was offered at a local Junior College, during my first year working as a research associate in the Biotech industry. The course was very inspirational. After completing it, I knew what my future would hold: to develop software for the life sciences. I believe that’s why I’m writing about it in my first blog. I am truly excited about beginning this venture.






