Commits

Mathieu Lajoie committed 59d24ca Merge

merge?

  • Participants
  • Parent commits a503eb8, d3707c7

Comments (0)

Files changed (4)

 SOFT/obj/*
 red2
 *~
-find_code.pl
+find_code.pl

File SOFT/src/data_loader.h

   //cout<<nb_intersect<<ENDL; 
 
   if(nb_intersect == 0){
-    //cerr<<E<<"ERROR the intersection of the sequence set and the profile set is empty"<<ENDL;
-    //cerr<<E<<"Please ensure that the gene names in the sequence file and the expression file are identicals (case sensitive)"<<ENDL;
-
     (*ERROR)<<E<<"The intersection of the sequence set and the expression set is empty"<<ENDL;
     (*ERROR)<<E<<"Please ensure that the gene names in the sequence file and the expression file are identicals (case sensitive)"<<ENDL<<ENDL;
 
   }
 
   double ratio_inter = (double)nb_intersect/(min(nb_profiles,p.MAX_INTERSECTION));
-  //ratio_inter = (int) 100*ratio_inter;
+  
   if(ratio_inter<0.25){ 
 
     (*ERROR)<<E<<"Less than 25% of the genes in your expression file have a matching gene in the sequence set ("<<nb_intersect<< " / " << nb_profiles<<") "<<ENDL;
     return nb_intersect;
   }
 
+
+  if(nb_intersect < 500){
+    (*ERROR)<<E<<"RED2's input requires at least 500 genes (there are only "<<nb_profiles<<" recognized genes in your input)"<<ENDL;
+    (*ERROR)<<E<<"Be careful not to provide a selection of your genes, as RED2 is made for running on whole genome data !"<<ENDL<<ENDL;
+    return nb_intersect;
+  }
+
   double ratio_k = (double)nb_intersect/p.K_GLOB;
 
-  if(ratio_k<2){
-    //cerr<<E<<"ERROR the number of genes in the dataset is too small for the specified neighbourhood size (the min. ratio is 2)"<<ENDL;
-    //cerr<<E<<"Neighbourhood size = "<<p.K_GLOB<<" ; number of genes = "<<nb_intersect<<" ; ratio = "<<ratio<<ENDL;
-    //cerr<<E<<"Reduce the neighbourhood size in the advanced options or provide more data"<<ENDL;
- 
-    (*ERROR)<<E<<"The number of considered genes is too small for the specified neighbourhood size (the min. ratio is 2)"<<ENDL;
+  if(ratio_k<5){
+    (*ERROR)<<E<<"The number of considered genes is too small for the specified neighbourhood size (the min. ratio is 5)"<<ENDL;
     (*ERROR)<<E<<"Neighbourhood size = "<<p.K_GLOB<<" ; number of genes = "<<nb_intersect<<" ; ratio = "<<ratio_k<<ENDL;
     (*ERROR)<<E<<"Reduce the neighbourhood size in the advanced options or provide more data."<<ENDL<<ENDL;
     return nb_intersect;
   return seq_map_size;
 }
 
-//new version that support headers with synonyms
+//new version that support headers with synonyms (it will choose the name provided for the profile)
 int Data_loader::load_fasta(string filename,int min_seq_size, StringSet known_identifiers){
 
   ifstream seq_file(filename.data(), ifstream::in);
     else{
       string name; double value; Double1D v_vec;
       ss>>name;
+      //getline(ss, name, '\t');
 
       while(ss>>value){
 	value = max(value,-1e+200);

File SOFT/src/red2.h

 using namespace std;
 
 //const string VERSION = "1.0 (2012.9.5)";
-const string VERSION = "1.0";
+const string VERSION = "1.0.1";
 
 const string URL_WEBPAGE = "http://www.atgc-montpellier.fr/RED2/";
 const string URL_HELP = "http://www.atgc-montpellier.fr/RED2/usersguide.php";

File USERSGUIDE/usersguide.xhtml

     <h2>User's Guide</h2>
     <hr /> <a name="Input"></a>
     <h2>Input</h2>
+
+    RED2's input consists of <b>nucleic acid sequences</b> and <b>expression data</b>. Be careful not to provide a selection of your genes, as RED2 is made for running on whole genome data (<b>a minimum of 500 genes are required</b>).
+
     <ul>
       <li> <b>Sequences</b>: You can select one of the available species from
         the drop-down list or upload your own sequence file in FASTA-like
       <li> <b>Expression file</b> : Each line corresponds to an expression
         profile, i.e. a sequence name followed by one or more expression
         measurements, separated by <b>space or tab characters</b>. The first
-        not-commented line must contains the column labels. Missing values are
+        not-commented line must contains the column labels (<b>do not use spaces in your column labels</b>). Missing values are
         not allowed and all lines must have the same number of columns
         (conditions).
         <pre>   # Example expression file
     <hr />
     <h2>Output</h2>
       <br />
-    <tt><img width="888" height="310" src="red2_screenshot.png" alt="RED2-screenshot" /></tt><br />
-    <!--http://www.atgc-montpellier.fr/pictures/img_red2_userguide.png--><br />
+
+    <!--<tt><img width="888" height="310" src="red2_screenshot.png" alt="RED2-screenshot" />    
+    </tt><br />-->
+
+    <tt><img width="888" height="310" src="http://www.atgc-montpellier.fr/pictures/img_red2_userguide.png" alt="RED2-screenshot" />
+    </tt><br />
+
+
     <br />
     For each discovered motif, RED<sup>2</sup> outputs :
     <ul>