Commit c6c63a98 authored by Marc Duez's avatar Marc Duez
Browse files

Merge branch 'master' of git+ssh://scm.gforge.inria.fr//gitroot/vidjil/vidjil into cdr3

parents 9c865ae5 0cf35de8
......@@ -520,6 +520,9 @@ FineSegmenter::FineSegmenter(Sequence seq, Germline *germline, Cost segment_c)
Dend=0;
segment_cost=segment_c;
CDR3start = -1;
CDR3end = -1;
// TODO: factoriser tout cela, peut-etre en lancant deux segmenteurs, un +, un -, puis un qui chapote
// Strand +
......@@ -671,7 +674,6 @@ FineSegmenter::FineSegmenter(Sequence seq, Germline *germline, Cost segment_c)
info = string_of_int(Vend + FIRST_POS) + " " + string_of_int(Jstart + FIRST_POS) ;
findCDR3();
finishSegmentation();
}
......@@ -820,8 +822,8 @@ void FineSegmenter::findCDR3(){
}
}
CDR3start = 0;
CDR3end = 0;
CDR3start = -1;
CDR3end = -1;
std::list<int>::const_iterator it1;
for (it1 = p_start.begin(); it1 != p_start.end(); ++it1) {
......@@ -861,15 +863,15 @@ JsonList FineSegmenter::toJsonList(Germline *germline){
seg.add("3", germline->rep_3.label(best_J));
seg.add("3start", Jstart);
seg.add("3", germline->rep_3.label(best_J));
seg.add("3start", Jstart);
if (CDR3start >= 0)
{
JsonList *json_cdr;
json_cdr=new JsonList();
json_cdr->add("start", CDR3start);
json_cdr->add("stop", CDR3end);
seg.add("cdr3", *json_cdr);
}
result.add("seg", seg);
}
......
......@@ -190,6 +190,7 @@ void usage(char *progname)
<< "Fine segmentation options (second pass, see warning in doc/algo.org)" << endl
<< " -f <string> use custom Cost for fine segmenter : format \"match, subst, indels, homo, del_end\" (default "<<VDJ<<" )"<< endl
<< " -3 CDR3 detection (experimental)" << endl
<< endl
<< "Additional clustering" << endl
......@@ -262,7 +263,7 @@ int main (int argc, char **argv)
int minPts = DEFAULT_MINPTS ;
Cost cluster_cost = DEFAULT_CLUSTER_COST ;
Cost segment_cost = DEFAULT_SEGMENT_COST ;
bool detect_CDR3 = false;
int save_comp = 0;
int load_comp = 0;
......@@ -304,7 +305,7 @@ int main (int argc, char **argv)
//$$ options: getopt
while ((c = getopt(argc, argv, "AhaiIg:G:V:D:J:k:r:vw:e:C:f:l:c:m:M:N:s:b:Sn:o:L%:y:z:uU")) != EOF)
while ((c = getopt(argc, argv, "AhaiIg:G:V:D:J:k:r:vw:e:C:f:l:c:m:M:N:s:b:Sn:o:L%:y:z:uU3")) != EOF)
switch (c)
{
......@@ -494,7 +495,10 @@ int main (int argc, char **argv)
break;
// Fine segmentation
case '3':
detect_CDR3 = true;
break;
case 'f':
segment_cost=strToCost(optarg, VDJ);
break;
......@@ -1120,7 +1124,11 @@ int main (int argc, char **argv)
if (segmented_germline->rep_4.size())
seg.FineSegmentD(segmented_germline);
if (detect_CDR3)
seg.findCDR3();
// Output representative, possibly segmented...
// to stdout, CLONES_FILENAME, and CLONE_FILENAME-*
cout << seg << endl ;
......@@ -1362,6 +1370,10 @@ int main (int argc, char **argv)
{
if (germline->rep_4.size())
s.FineSegmentD(germline);
if (detect_CDR3)
s.findCDR3();
cout << s << endl;
segmented = true ;
break ;
......
......@@ -142,7 +142,7 @@ def custom():
query = query.find(lambda row : ( vidjil_utils.filter(row.string,request.vars["filter"]) or row.checked) )
if config :
query = query.find(lambda row : ( row.results_file.config_id==str(config_id) or (str(row.results_file.id) in request.vars["custom_list"])) )
query = query.find(lambda row : ( row.results_file.config_id==config_id or (str(row.results_file.id) in request.vars["custom_list"])) )
res = {"message": "custom (%s)" % config_name}
log.info(res)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment