"); win_doc.write("Restriction Enzyme and Number of cuts:
"); for(var i=0; i"); } win_doc.write("
Hosted by www.Geocities.ws

"); } //////////////////////////////////////////////////////// ///// END DNA READING FUNCTIONS ///// //////////////////////////////////////////////////////// //////////////////////////////////////////////////////// ///// MAIN FUNCTION ///// //////////////////////////////////////////////////////// //this function will take the dna passed to it and the restriction enzyme //passed to it and cut the sequence as often as the enzyme is able //it calls: - clean(dna_sequence) // - which calls the isValid(dna) function, // - count_cutter(dna_sequence, RE_rec_site) // - dna_fragments(dna_sequence, RE_rec_site, num_cuts) function digest_dna(dna, enzyme) { //first check to make sure dna sequence is there and that a restriction enzyme has been chosen if( dna.value.length == 0 ) { alert("No DNA sequence has been loaded"); return 0; } if( enzyme.value == "" ) { alert("No restriction enzyme picked"); return 0; } //this variable will hold the rec-site of the enzyme var rec_site = eval(enzyme.value); //this will get a cleaned up version of the dna (get rid of numbers and such) var clean_dna = clean( dna.value.toUpperCase() ); //create an array with the elements being the pieces of dna cut //split the dna sequence at each recognition site var dna_array = clean_dna.split(rec_site); //this variable will hold the sizes of the dna fragments var dna_sizes = new Array(dna_array.length); //add back in the rec_site to each piece, except one (here, the last one) //at the same time, create a new array containing the sizes of all the fragments generated for( i=0; i"); win_doc.write(""); win_doc.write("Digest of DNA with " +enzyme.value+ ""); win_doc.write(" "); win_doc.write("DNA fragments were of size:
"); //this sorts the numbers in numberic order dna_sizes.sort(numberorder); //print each of the dna fragment sizes, in order for( i=0; i"); } win_doc.write("
Hosted by www.Geocities.ws

"); win_doc.focus(); } //////////////////////////////////////////////////////// ///// END MAIN FUNCTION ///// //////////////////////////////////////////////////////// //////////////////////////////////////////////////////// ///// END OF JAVASCRIPT ///// //////////////////////////////////////////////////////// // -->

DNA Digesting, whole genomes or small pieces :)



List of things to do:
Load a text file to the text area. (COMPLETED: 1/31/04)
Get a list of restriction enzymes and their recognition sequences (Loaded 2/2/04).
Pass the DNA sequence through functions which will:
- concatenate the sequence into one variable, (done: 2/2/04)
- run through the sequence cutting the sequence into N pieces, (done: 2/2/04)
- count the number of pieces and their lengths (done: 2/2/04)
- list the lengths and cut sites (done: 2/2/04)
- One major thing I haven't gotten to yet is searching for the odd bases (i.e., those which aren't designated A,G,C,T)...
- Also, I need to check for the reverse complement of non-palindromic recognition sites...
- At the current moment, the DNA is not considered circular, I'll work on this soon...
- I also need to get rid of the incoming FASTA notation at the top of the text...
- anything else to display/calculate? (I've got a couple ideas....)

File to read:
                       Restriction Enzyme to digest with:

                                                                                
Hosted by www.Geocities.ws

1