/*
Ce fichier contient toutes les fonctions JavaScript permettant de dÃ©crire
sommairement chaque egalement du formulaire de STAN
*/

function help_reset(){
	document.getElementById('help').innerHTML="A quick help appears here each time you enter a value.";
}

function help_mail(){
	document.getElementById('help').innerHTML="If  filled, the results will be send to this address";
}

function help_pattern(){
	var message;
	message="<b>Enter your pattern in SVG format.</b><br /><br />"
	message=message+"Tokens are separated by '-'<br /><br />";
	message=message+"<b>Succession of amino acids :</b><br /><br />ABCD with A , B , C and D differents amino acids.<br /><br />";
	message=message+"<b>Disjunction of bases :</b><br /><br /> [AC] with A and C differents sets of bases, it seams that at this position we can find A or C.\n<br /><br />";
	message=message+"<b>Disjunction of words :</b><br /><br /> [A|B|C] with A , B and C differents sets of amino acid, it seams that at this position we can find A or B or C.\n<br /><br />";
	message=message+"<b>GAP with fixed size :</b><br /><br />x(num) , with num the size of the gap.\n<br /><br />";
	message=message+"<b>GAP with variable size :</b><br /><br />x(num1,num2) , num1 the minimum size of the gap and num2 the maximum size of the gap.\n<br /><br />";
 	message=message+"<b>Pattern with deletion :</b><br /><br />deletion(pattern,min,max) , with pattern a succession of amino acids , the research of this pattern tolerates a loss between min and max amino acids.\n<br /><br />"; 
/*	message=message+"<b>Pattern with deletion and substitution errors:</b><br /><br />deletion(pattern:num,min,max) , with pattern a succession of amino acids , the research of this pattern tolerates a loss between min and max amino acids, and num substitution errors\n<br /><br />"; */
	message=message+"<b>Pattern with insertion :</b><br /><br />insert(pattern,min,max) , with pattern an succession of amino acids , the research of the pattern tolerates an insert of min to max amino acids.\n<br /><br />";
	message=message+"<b>Pattern with insertion and substitution errors:</b><br /><br />insert(pattern:num,min,max) , with pattern an succession of amino acids , the research of the pattern tolerates an insert of min to max amino acids, and num substution errors\n<br /><br />"; 
	message=message+"<b>Pattern with deletion and insertion :</b><br /><br />indel(pattern,minins,maxins,mindel,maxdel) , with pattern an succession of amino acids , the research of the pattern tolerates an insert of minins to maxins amino acids or a loss between mindel and maxdel amino acids\n<br /><br />";
/*	message=message+"<b>Pattern with deletion, insertion and substitution errors :</b><br /><br />indel(pattern:num,minins,maxins,mindel,maxdel) , with pattern an succession of amino acids , the research of the pattern tolerates an insert of minins to maxins amino acids, or a loss between mindel and maxdel amino acids and num substitution errors\n<br /><br />"; */
	message=message+"<b>Pattern with subtitution error :</b><br /><br />pattern:num , with pattern a succession of amino acids and num is the number of subtitution error tolerated. You can use substitution errors with SVG.\n<br /><br />";
	message=message+"<b>Pattern with SVG :</b><br /><br />X:[num] or X:[min,max], following by X in the pattern or ~X for X palimdrom\n<br /><br />";
/*	message=message+"<b>Pattern with SVG and subtitution error :</b><br /><br />X:[num] or X:[min,max], following by X:n in the pattern with n the number of substitution errors\n<br /><br />"; */
	
	document.getElementById('help').innerHTML=message;
}

function help_sequence_name(){
	document.getElementById('help').innerHTML="Please provide the file of  DNA sequences to be organized (Fasta format).";
}

function help_minimal_domain_size(){
	document.getElementById('help').innerHTML="Minimal size of  domains that will be considered during the analysis (default value 20 nucleic acids). Use a higher value if you want larger domains.";
}

function help_overlap_filter(){
	document.getElementById('help').innerHTML="When patterns containing gap are overlapping, this filter keep only the largest occurence.";
}

function help_maximal_domain_size(){
	document.getElementById('help').innerHTML="Maximal percentage of substitution or indel errors in an occurrence of a given domain in a sequence during the segmentation phase (default value 10). Use a higher value if you want less domains.";
}

function help_sequences(){
	document.getElementById('help').innerHTML="Select your own sequences in which DomainOrganizer will extract domains";
}

function help_organism(){
	document.getElementById('help').innerHTML="Select the organism to scan.";
}

function help_align_sequences(){
	document.getElementById('help').innerHTML="If you have already aligned your sequences, please provide the alignment file.";
}

function help_align_sequences_clustalW(){
        document.getElementById('help').innerHTML="Your sequences will be aligned using ClustalW and the parameters define below.";
}

function help_align_sequences_dialign(){
        document.getElementById('help').innerHTML="Your sequences will be aligned using Dialign.";
}

function help_sequences_file(){
	document.getElementById('help').ennerHTML="Upload the file containing your sequences in fasta format. This sequences will be use to look for domains.";
}

function help_all_occurences(){
	document.getElementById('help').innerHTML="Check this box to search for every domain occurences in this genome.";
}

function help_gap_cost(){
	document.getElementById('help').innerHTML="ClustalW specific option.<br />You can adjust the penalty cost used by ClustalW to open a new gap (default value 20). Use a lower value if you want a finer distinction of domains between sequences. ";
}

function help_gap_extension(){
	document.getElementById('help').innerHTML="ClustalW specific option.<br />You can adjust the penalty cost used by ClustalW to extend a  gap (default value 0.01). Use a lower value if you want a greater variation of domains size between sequences. ";
}

function help_error(){
	document.getElementById('help').ennerHTML="Maximal error between domains"
}

function help_affichage_erreur(message){
	var erreur= new String;
	message=message.replace(/undefined/i,"");
	if(message!=""){
		erreur="<h2>Syntax errors</h2><font color='red'size='+1'>"+message+"</font>";
	}
	document.getElementById('message_erreur').innerHTML=erreur;
}

function help_error_hmmer(){
        document.getElementById('help').innerHTML="Maximal significant threshold for HMM hits are built for each domains. This parameter adjusts in HMMsearch  the  recognition of an occurrence of the model in a sequence. <br />Use a lower value if you want a finer distinction of domains in all sequences. ";
}

function help_chavl(){
        document.getElementById('help').innerHTML = "Sequences will be classified on the basis of their content in domains. <br />A hierarchical classification is produced by the software Chavl. <br />CHAVL (Classification Hiérarchique par Analyse de la Vraissemblance des Liens) is based on a very general method of classification called LLA (Likelihood Linkage Analysis), considering the likelihood of observed similarities. "
}

