diff --git a/.gitignore b/.gitignore index d397e87..0c5c919 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,4 @@ -synfull -run +synder README.pdf diff --git a/Doxyfile b/Doxyfile index 18795af..b6c5d6a 100644 --- a/Doxyfile +++ b/Doxyfile @@ -4,7 +4,7 @@ # Project related configuration options #--------------------------------------------------------------------------- DOXYFILE_ENCODING = UTF-8 -PROJECT_NAME = "Fagin" +PROJECT_NAME = "Synder" PROJECT_NUMBER = PROJECT_BRIEF = PROJECT_LOGO = diff --git a/Makefile b/Makefile index bff08ca..a05d878 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -TARGET=run +TARGET=synder all: cd src && ${MAKE} diff --git a/README.md b/README.md index ba6f493..e26c1f2 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Manual stub #Contiguous Set Use -./run -i GFF -s DB -c contig +./synder -i GFF -s DB -c contig output is like -c map with additon of flag SEQNAME TARGETNAME SEARCH_INTERVAL_START SEARCH_INTERVAL_STOP FLAG @@ -60,8 +60,8 @@ of the syntenic blocks, will always be considered "syntenically scrambled". # TODO list for version 1 - - [ ] Implement the query context to contiguous function - - [ ] Implement the contiguous set to search interval function + - [x] Implement the query context to contiguous function + - [x] Implement the contiguous set to search interval function - [ ] Clean up the CLI user interface - [ ] Specify the synteny class (A-F) of the output search intervals diff --git a/src/Makefile b/src/Makefile index 2e2b72a..aeb7ef9 100644 --- a/src/Makefile +++ b/src/Makefile @@ -1,6 +1,6 @@ CFLAGS=-Wall -g -O2 CC=gcc -TARGET=run +TARGET=synder OBJECTS=main.o test.o io.o genome.o analysis.o contig.o interval.o itree.o search.o ia.o iv.o block.o synmap.o ui.o contiguous.o ${TARGET}: ${OBJECTS} diff --git a/src/main.c b/src/main.c index 75746ce..958e308 100644 --- a/src/main.c +++ b/src/main.c @@ -65,7 +65,7 @@ int main(int argc, char * argv[]){ else if(strcmp(args.cmd, "map") == 0){ analysis_map(syn, args.intfile); } - else if(strcmp(args.cmd, "contig") ==0){ + else if(strcmp(args.cmd, "search") ==0){ contiguous_query(syn, args.intfile); } else{ diff --git a/src/ui.c b/src/ui.c index 37f90cf..3281464 100644 --- a/src/ui.c +++ b/src/ui.c @@ -34,12 +34,13 @@ void close_Arguments(Arguments arg){ fclose(arg.hitfile); if(arg.db_filename) free(arg.db_filename); - if(arg.pos) + if(arg.pos){ for(int i = 0; i < 3; i++){ if(arg.pos[i]) free(arg.pos[i]); } free(arg.pos); + } if(arg.cmd) free(arg.cmd); } @@ -57,19 +58,21 @@ void check_file(FILE * fp, char * name){ void print_help(){ printf( - "USAGE: synfull -d SYNTENY_FILE QUERY TARGET DEST_DIR\n" - "USAGE: synfull -i GFF_FILE -s SYNTENY_DB\n" + "USAGE\n" + " synder -d SYNTENY_FILE QUERY TARGET DB_DIR\n" + " synder [OPTIONS] -s SYNTENY_DB -c COMMAND\n" "COMMANDS\n" - "map - print target intervals overlapping each query interval\n" - "count - like map but prints only the number that overlap\n" - "filter - print query-to-target links consistent with the synteny map\n" - "pred - predict target search spaces for each query interval\n" - "EXAMPLES:\n" - "$ synfull -d at-al.tab at al db\n" - "$ synfull -i at.gff -s db/at_al.txt -c count\n" - "$ synfull -i at.gff -s db/at_al.txt -c map\n" - "$ synfull -f hits.syn -s db/at_al.txt -c filter\n" - "$ synfull test\n" + " map - print target intervals overlapping each query interval\n" + " count - like map but prints only the number that overlap\n" + " search - find target search spaces for each query interval\n" + " filter - print query-to-target links consistent with the synteny map\n" + "EXAMPLES\n" + " synder -d at-al.tab at al db\n" + " synder -i at.gff -s db/at_al.txt -c map\n" + " synder -i at.gff -s db/at_al.txt -c count\n" + " synder -i at.syn -s db/at_al.txt -c search\n" + " synder -f hits.syn -s db/at_al.txt -c filter\n" + " synder test\n" ); exit(EXIT_SUCCESS); }