diff -up EMBOSS-6.6.0/emboss/acd/epscan.acd.fixconflict EMBOSS-6.6.0/emboss/acd/epscan.acd --- EMBOSS-6.6.0/emboss/acd/epscan.acd.fixconflict 2015-10-30 09:50:32.562390934 -0400 +++ EMBOSS-6.6.0/emboss/acd/epscan.acd 2015-10-30 09:50:32.562390934 -0400 @@ -0,0 +1,63 @@ +application: epscan [ + documentation: "Scans protein sequence(s) with fingerprints from + the PRINTS database" + groups: "Protein:Motifs" + relations: "EDAM:0000158 topic Sequence motifs" + relations: "EDAM:0000382 operation Sequence motif recognition (protein)" + relations: "EDAM:0000347 operation Sequence database search + (by motif or pattern)" + relations: "EDAM:0000340 operation Protein secondary database search" +] + +section: input [ + information: "Input section" + type: "page" +] + + seqall: sequence [ + parameter: "Y" + type: "Protein" + relations: "EDAM:0002886 data Sequence record (protein)" + ] + +endsection: input + +section: required [ + information: "Required section" + type: "page" +] + + integer: emin [ + standard: "Y" + minimum: "1" + maximum: "20" + default: "2" + information: "Minimum number of elements per fingerprint" + relations: "EDAM:0002527 data Parameter or primitive" + ] + + integer: emax [ + standard: "Y" + minimum: "$(emin)" + maximum: "20" + failrange: "N" + trueminimum: "N" + default: "20" + information: "Maximum number of elements per fingerprint" + relations: "EDAM:0002527 data Parameter or primitive" + ] + +endsection: required + +section: output [ + information: "Output section" + type: "page" +] + + outfile: outfile [ + parameter: "Y" + knowntype: "pscan output" + relations: "EDAM:0001420 data Sequence-profile alignment (fingerprint)" + ] + +endsection: output diff -up EMBOSS-6.6.0/emboss/acd/Makefile.am.fixconflict EMBOSS-6.6.0/emboss/acd/Makefile.am --- EMBOSS-6.6.0/emboss/acd/Makefile.am.fixconflict 2013-07-15 17:25:46.000000000 -0400 +++ EMBOSS-6.6.0/emboss/acd/Makefile.am 2015-10-30 09:50:32.562390934 -0400 @@ -264,7 +264,7 @@ profit.acd \ prophecy.acd \ prophet.acd \ prosextract.acd \ -pscan.acd \ +epscan.acd \ psiphi.acd \ rebaseextract.acd \ recoder.acd \ diff -up EMBOSS-6.6.0/emboss/acd/Makefile.in.fixconflict EMBOSS-6.6.0/emboss/acd/Makefile.in --- EMBOSS-6.6.0/emboss/acd/Makefile.in.fixconflict 2013-07-15 17:27:30.000000000 -0400 +++ EMBOSS-6.6.0/emboss/acd/Makefile.in 2015-10-30 09:50:32.562390934 -0400 @@ -532,7 +532,7 @@ profit.acd \ prophecy.acd \ prophet.acd \ prosextract.acd \ -pscan.acd \ +epscan.acd \ psiphi.acd \ rebaseextract.acd \ recoder.acd \ diff -up EMBOSS-6.6.0/emboss/acd/printsextract.acd.fixconflict EMBOSS-6.6.0/emboss/acd/printsextract.acd --- EMBOSS-6.6.0/emboss/acd/printsextract.acd.fixconflict 2012-03-12 13:46:17.000000000 -0400 +++ EMBOSS-6.6.0/emboss/acd/printsextract.acd 2015-10-30 09:50:32.562390934 -0400 @@ -1,5 +1,5 @@ application: printsextract [ - documentation: "Extract data from PRINTS database for use by pscan" + documentation: "Extract data from PRINTS database for use by epscan" groups: "Utils:Database creation" gui: "no" batch: "no" diff -up EMBOSS-6.6.0/emboss/data/edamtoacd.dat.fixconflict EMBOSS-6.6.0/emboss/data/edamtoacd.dat --- EMBOSS-6.6.0/emboss/data/edamtoacd.dat.fixconflict 2009-09-30 12:53:21.000000000 -0400 +++ EMBOSS-6.6.0/emboss/data/edamtoacd.dat 2015-10-30 09:50:32.563390927 -0400 @@ -159,7 +159,7 @@ outfile | "EDAM:Primer report" outfile | "EDAM:Primer report" | knowntype:"primersearch output" outfile | "EDAM:Sequence-profile alignment report" | knowntype:"profit output" outfile | "EDAM:Sequence profile record" | knowntype:"prophecy output" -outfile | "EDAM:Fingerprint alignment report" | knowntype:"pscan output" +outfile | "EDAM:Fingerprint alignment report" | knowntype:"epscan output" outfile | "EDAM:Restriction enzyme report" | knowntype:"redata output" outfile | "EDAM:Restriction map report" | knowntype:"remap output" outfile | "EDAM:EMBOSS restover recognition site report" | knowntype:"restover output" diff -up EMBOSS-6.6.0/emboss/epscan.c.fixconflict EMBOSS-6.6.0/emboss/epscan.c --- EMBOSS-6.6.0/emboss/epscan.c.fixconflict 2015-10-30 09:50:32.563390927 -0400 +++ EMBOSS-6.6.0/emboss/epscan.c 2015-10-30 09:50:32.563390927 -0400 @@ -0,0 +1,481 @@ +/* @source pscan application +** +** Reports fingerprints in a protein sequence +** @author Copyright (C) Alan Bleasby (ableasby@hgmp.mrc.ac.uk) +** @@ +** +** This program is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License +** as published by the Free Software Foundation; either version 2 +** of the License, or (at your option) any later version. +** +** This program is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +** GNU General Public License for more details. +** +** You should have received a copy of the GNU General Public License +** along with this program; if not, write to the Free Software +** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +******************************************************************************/ + +#include "emboss.h" + + + + +static void pscan_print_hits(AjPFile outf, AjPList l, ajuint nmotifs, + ajuint begin); + + + + +/* @prog pscan **************************************************************** +** +** Scans proteins using PRINTS +** +******************************************************************************/ + +int main(int argc, char **argv) +{ + AjPSeqall seqall; + AjPSeq seq = NULL; + AjPFile outf = NULL; + ajint begin; + ajint end; + ajuint emin; + ajuint emax; + + AjPFile mfile = NULL; + EmbPMatPrints s = NULL; + AjPList l = NULL; + AjPStr strand = NULL; + AjPStr substr = NULL; + AjPStr name = NULL; + + AjBool all; + AjBool ordered; + + ajint hits; + ajint nmotifs; + + embInit("pscan", argc, argv); + + seqall = ajAcdGetSeqall("sequence"); + outf = ajAcdGetOutfile("outfile"); + emin = ajAcdGetInt("emin"); + emax = ajAcdGetInt("emax"); + + substr = ajStrNew(); + name = ajStrNew(); + + all = ordered = ajTrue; + + + + while(ajSeqallNext(seqall, &seq)) + { + begin = ajSeqallGetseqBegin(seqall); + end = ajSeqallGetseqEnd(seqall); + + ajStrAssignC(&name,ajSeqGetNameC(seq)); + strand = ajSeqGetSeqCopyS(seq); + + ajStrAssignSubC(&substr,ajStrGetPtr(strand),begin-1,end-1); + + nmotifs = 0; + ajDebug("pscan sequence '%S'\n", ajSeqGetNameS(seq)); + embMatPrintsInit(&mfile); + ajDebug("pscan prints file '%F'\n", mfile); + l = ajListNew(); + while((s = embMatProtReadInt(mfile))) + { + ajDebug("pscan file '%F' read\n", mfile); + if(s->n >= emin && s->n <= emax) + { + hits=embMatProtScanInt(substr,name,s,&l,&all,&ordered, + 1); + if(hits) + ++nmotifs; + } + embMatProtDelInt(&s); + } + + pscan_print_hits(outf, l, nmotifs, begin); + ajListFree(&l); + + + ajStrDel(&strand); + ajFileClose(&mfile); + } + + ajStrDel(&substr); + ajStrDel(&name); + + ajSeqallDel(&seqall); + ajSeqDel(&seq); + ajFileClose(&outf); + + embExit(); + + return 0; +} + + + + +/* @funcstatic pscan_print_hits *********************************************** +** +** Undocumented. +** +** @param [u] outf [AjPFile] outfile +** @param [u] l [AjPList] hits +** @param [r] nmotifs [ajuint] number of hits +** @param [r] begin [ajuint] start position +** @@ +******************************************************************************/ + +static void pscan_print_hits(AjPFile outf, AjPList l, ajuint nmotifs, + ajuint begin) +{ + EmbPMatMatch mm; + ajuint i; + ajuint j; + AjBool found; + ajuint nleft; + ajuint maxelem = 0; + ajuint maxhpm; + ajuint hpm = 0; + + nleft = nmotifs; + + + ajFmtPrintF(outf,"\n\nCLASS 1\n"); + ajFmtPrintF(outf,"Fingerprints with all elements in order\n\n"); + + + found = ajTrue; + + while(found && nleft) + { + found = ajFalse; + maxelem = 0; + for(i=0;iall && mm->ordered) + { + maxelem = AJMAX(maxelem,mm->n); + found = ajTrue; + } + hpm = mm->hpm; + + ajListPushAppend(l,(void *)mm); + for(j=1;jhpm; + + if(mm->all && mm->ordered && maxelem==mm->n) + break; + ajListPushAppend(l,(void *)mm); + + for(j=1;jall && mm->ordered && maxelem==mm->n) + { + ajFmtPrintF(outf,"Fingerprint %s Elements %d\n", + ajStrGetPtr(mm->cod),mm->n); + ajFmtPrintF(outf," Accession number %s\n", + ajStrGetPtr(mm->acc)); + ajFmtPrintF(outf," %s\n",ajStrGetPtr(mm->tit)); + ajFmtPrintF(outf," Element %d Threshold %d%% Score %d%%\n", + mm->element+1, mm->thresh, mm->score); + ajFmtPrintF(outf," Start position %d Length %d\n", + mm->start+begin,mm->len); + + embMatMatchDel(&mm); + } + + for(i=1;ielement+1, mm->thresh, mm->score); + ajFmtPrintF(outf," Start position %d Length %d\n", + mm->start+begin,mm->len); + + embMatMatchDel(&mm); + } + + --nleft; + } + + } + + ajFmtPrintF(outf,"\n\nCLASS 2\n"); + ajFmtPrintF(outf,"All elements match but not all in the " + "correct order\n\n"); + + found = ajTrue; + + while(found && nleft) + { + found = ajFalse; + maxelem = 0; + + for(i=0;iall) + { + maxelem = AJMAX(maxelem,mm->n); + found = ajTrue; + } + hpm = mm->hpm; + ajListPushAppend(l,(void *)mm); + + for(j=1;jhpm; + if(mm->all && maxelem==mm->n) + break; + ajListPushAppend(l,(void *)mm); + + for(j=1;jall && maxelem==mm->n) + { + ajFmtPrintF(outf,"Fingerprint %s Elements %d\n", + ajStrGetPtr(mm->cod),mm->n); + ajFmtPrintF(outf," Accession number %s\n", + ajStrGetPtr(mm->acc)); + ajFmtPrintF(outf," %s\n",ajStrGetPtr(mm->tit)); + ajFmtPrintF(outf," Element %d Threshold %d%% Score %d%%\n", + mm->element+1, mm->thresh, mm->score); + ajFmtPrintF(outf," Start position %d Length %d\n", + mm->start+begin,mm->len); + + embMatMatchDel(&mm); + } + + for(i=1;ielement+1, mm->thresh, mm->score); + ajFmtPrintF(outf," Start position %d Length %d\n", + mm->start+begin,mm->len); + + embMatMatchDel(&mm); + } + + --nleft; + } + + } + + + + + ajFmtPrintF(outf,"\n\nCLASS 3\n"); + ajFmtPrintF(outf, + "Not all elements match but those that do are in order\n\n"); + + found = ajTrue; + + while(found && nleft) + { + found = ajFalse; + maxhpm = 0; + for(i=0;iordered) + { + maxhpm = AJMAX(maxelem,mm->hpm); + found = ajTrue; + } + hpm = mm->hpm; + ajListPushAppend(l,(void *)mm); + + for(j=1;jhpm; + + if(mm->ordered && maxhpm==mm->hpm) + break; + ajListPushAppend(l,(void *)mm); + + for(j=1;jordered && maxhpm==mm->hpm) + { + ajFmtPrintF(outf,"Fingerprint %s Elements %d\n", + ajStrGetPtr(mm->cod),mm->n); + ajFmtPrintF(outf," Accession number %s\n", + ajStrGetPtr(mm->acc)); + ajFmtPrintF(outf," %s\n",ajStrGetPtr(mm->tit)); + ajFmtPrintF(outf," Element %d Threshold %d%% Score %d%%\n", + mm->element+1, mm->thresh, mm->score); + ajFmtPrintF(outf," Start position %d Length %d\n", + mm->start+begin,mm->len); + + + embMatMatchDel(&mm); + } + + for(i=1;ielement+1, mm->thresh, mm->score); + ajFmtPrintF(outf," Start position %d Length %d\n", + mm->start+begin,mm->len); + + embMatMatchDel(&mm); + } + + --nleft; + } + + } + + + + + ajFmtPrintF(outf,"\n\nCLASS 4\n"); + ajFmtPrintF(outf, + "Remaining partial matches\n\n"); + + found = ajTrue; + + while(found && nleft) + { + found = ajFalse; + maxhpm = 0; + + for(i=0;ihpm); + found = ajTrue; + + hpm = mm->hpm; + ajListPushAppend(l,(void *)mm); + for(j=1;jhpm; + + if(maxhpm==mm->hpm) + break; + ajListPushAppend(l,(void *)mm); + + for(j=1;jhpm) + { + ajFmtPrintF(outf,"Fingerprint %s Elements %d\n", + ajStrGetPtr(mm->cod),mm->n); + ajFmtPrintF(outf," Accession number %s\n", + ajStrGetPtr(mm->acc)); + ajFmtPrintF(outf," %s\n",ajStrGetPtr(mm->tit)); + ajFmtPrintF(outf," Element %d Threshold %d%% Score %d%%\n", + mm->element+1, mm->thresh, mm->score); + ajFmtPrintF(outf," Start position %d Length %d\n", + mm->start+begin,mm->len); + + + embMatMatchDel(&mm); + } + + for(i=1;ielement+1, mm->thresh, mm->score); + ajFmtPrintF(outf," Start position %d Length %d\n", + mm->start+begin,mm->len); + + embMatMatchDel(&mm); + } + + --nleft; + } + + } + + + while(ajListPop(l,(void **)&mm)) + if(mm) + embMatMatchDel(&mm); + + return; +} diff -up EMBOSS-6.6.0/emboss/Makefile.am.fixconflict EMBOSS-6.6.0/emboss/Makefile.am --- EMBOSS-6.6.0/emboss/Makefile.am.fixconflict 2015-10-30 09:50:32.554390990 -0400 +++ EMBOSS-6.6.0/emboss/Makefile.am 2015-10-30 09:51:26.065016794 -0400 @@ -309,7 +309,7 @@ profit \ prophecy \ prophet \ prosextract \ -pscan \ +epscan \ psiphi \ rebaseextract \ recoder \ @@ -587,7 +587,7 @@ profit_SOURCES = profit.c prophecy_SOURCES = prophecy.c prophet_SOURCES = prophet.c prosextract_SOURCES = prosextract.c -pscan_SOURCES = pscan.c +epscan_SOURCES = epscan.c psiphi_SOURCES = psiphi.c rebaseextract_SOURCES = rebaseextract.c recoder_SOURCES = recoder.c diff -up EMBOSS-6.6.0/emboss/Makefile.in.fixconflict EMBOSS-6.6.0/emboss/Makefile.in --- EMBOSS-6.6.0/emboss/Makefile.in.fixconflict 2013-07-15 17:27:30.000000000 -0400 +++ EMBOSS-6.6.0/emboss/Makefile.in 2015-10-30 09:50:32.565390913 -0400 @@ -142,7 +142,7 @@ bin_PROGRAMS = aaindexextract$(EXEEXT) a plotorf$(EXEEXT) polydot$(EXEEXT) preg$(EXEEXT) \ prettyplot$(EXEEXT) prettyseq$(EXEEXT) primersearch$(EXEEXT) \ printsextract$(EXEEXT) profit$(EXEEXT) prophecy$(EXEEXT) \ - prophet$(EXEEXT) prosextract$(EXEEXT) pscan$(EXEEXT) \ + prophet$(EXEEXT) prosextract$(EXEEXT) epscan$(EXEEXT) \ psiphi$(EXEEXT) rebaseextract$(EXEEXT) recoder$(EXEEXT) \ redata$(EXEEXT) refseqget$(EXEEXT) remap$(EXEEXT) \ restover$(EXEEXT) restrict$(EXEEXT) revseq$(EXEEXT) \ @@ -1993,10 +1993,10 @@ prosextract_DEPENDENCIES = ../nucleus/li ../ajax/core/libajax.la $(am__append_3) \ ../ajax/pcre/libepcre.la ../plplot/libeplplot.la \ $(am__DEPENDENCIES_1) -am_pscan_OBJECTS = pscan.$(OBJEXT) -pscan_OBJECTS = $(am_pscan_OBJECTS) -pscan_LDADD = $(LDADD) -pscan_DEPENDENCIES = ../nucleus/libnucleus.la ../ajax/acd/libacd.la \ +am_epscan_OBJECTS = epscan.$(OBJEXT) +epscan_OBJECTS = $(am_epscan_OBJECTS) +epscan_LDADD = $(LDADD) +epscan_DEPENDENCIES = ../nucleus/libnucleus.la ../ajax/acd/libacd.la \ ../ajax/ajaxdb/libajaxdb.la ../ajax/ensembl/libensembl.la \ ../ajax/graphics/libajaxg.la ../ajax/core/libajax.la \ $(am__append_3) ../ajax/pcre/libepcre.la \ @@ -2821,7 +2821,7 @@ SOURCES = $(aaindexextract_SOURCES) $(ab $(preg_SOURCES) $(prettyplot_SOURCES) $(prettyseq_SOURCES) \ $(prima_SOURCES) $(primers_SOURCES) $(primersearch_SOURCES) \ $(printsextract_SOURCES) $(profit_SOURCES) $(prophecy_SOURCES) \ - $(prophet_SOURCES) $(prosextract_SOURCES) $(pscan_SOURCES) \ + $(prophet_SOURCES) $(prosextract_SOURCES) $(epscan_SOURCES) \ $(psiphi_SOURCES) $(rebaseextract_SOURCES) $(recoder_SOURCES) \ $(redata_SOURCES) $(refseqget_SOURCES) $(remap_SOURCES) \ $(restover_SOURCES) $(restrict_SOURCES) $(revseq_SOURCES) \ @@ -2934,7 +2934,7 @@ DIST_SOURCES = $(aaindexextract_SOURCES) $(preg_SOURCES) $(prettyplot_SOURCES) $(prettyseq_SOURCES) \ $(prima_SOURCES) $(primers_SOURCES) $(primersearch_SOURCES) \ $(printsextract_SOURCES) $(profit_SOURCES) $(prophecy_SOURCES) \ - $(prophet_SOURCES) $(prosextract_SOURCES) $(pscan_SOURCES) \ + $(prophet_SOURCES) $(prosextract_SOURCES) $(epscan_SOURCES) \ $(psiphi_SOURCES) $(rebaseextract_SOURCES) $(recoder_SOURCES) \ $(redata_SOURCES) $(refseqget_SOURCES) $(remap_SOURCES) \ $(restover_SOURCES) $(restrict_SOURCES) $(revseq_SOURCES) \ @@ -3414,7 +3414,7 @@ profit_SOURCES = profit.c prophecy_SOURCES = prophecy.c prophet_SOURCES = prophet.c prosextract_SOURCES = prosextract.c -pscan_SOURCES = pscan.c +epscan_SOURCES = epscan.c psiphi_SOURCES = psiphi.c rebaseextract_SOURCES = rebaseextract.c recoder_SOURCES = recoder.c @@ -4266,9 +4266,9 @@ prophet$(EXEEXT): $(prophet_OBJECTS) $(p prosextract$(EXEEXT): $(prosextract_OBJECTS) $(prosextract_DEPENDENCIES) $(EXTRA_prosextract_DEPENDENCIES) @rm -f prosextract$(EXEEXT) $(LINK) $(prosextract_OBJECTS) $(prosextract_LDADD) $(LIBS) -pscan$(EXEEXT): $(pscan_OBJECTS) $(pscan_DEPENDENCIES) $(EXTRA_pscan_DEPENDENCIES) - @rm -f pscan$(EXEEXT) - $(LINK) $(pscan_OBJECTS) $(pscan_LDADD) $(LIBS) +epscan$(EXEEXT): $(epscan_OBJECTS) $(epscan_DEPENDENCIES) $(EXTRA_epscan_DEPENDENCIES) + @rm -f epscan$(EXEEXT) + $(LINK) $(epscan_OBJECTS) $(epscan_LDADD) $(LIBS) psiphi$(EXEEXT): $(psiphi_OBJECTS) $(psiphi_DEPENDENCIES) $(EXTRA_psiphi_DEPENDENCIES) @rm -f psiphi$(EXEEXT) $(LINK) $(psiphi_OBJECTS) $(psiphi_LDADD) $(LIBS) @@ -4748,7 +4748,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prophecy.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prophet.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prosextract.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pscan.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/epscan.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/psiphi.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rebaseextract.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/recoder.Po@am__quote@