debian/0000755000000000000000000000000012242436750007173 5ustar debian/control0000644000000000000000000000160112242433430010564 0ustar Source: coils Maintainer: Debian Med Packaging Team Uploaders: Andreas Tille , Laszlo Kajan Section: science Priority: optional Build-Depends: debhelper (>= 9), perl Standards-Version: 3.9.4 Vcs-Browser: http://anonscm.debian.org/viewvc/debian-med/trunk/packages/coils/trunk/ Vcs-Svn: svn://anonscm.debian.org/debian-med/trunk/packages/coils/trunk/ Homepage: http://www.russelllab.org/coils/ Package: ncoils Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Suggests: gnuplot Description: coiled coil secondary structure prediction The program predicts the coiled coil secondary structure predictions from protein sequences. The algorithm was published in Lupas, van Dyke & Stock, Predicting coiled coils from protein sequences Science, 252, 1162-1164, 1991. debian/install0000644000000000000000000000004612242434170010556 0ustar ncoils usr/bin *.mat usr/share/ncoils debian/rules0000755000000000000000000000171112242434601010244 0ustar #!/usr/bin/make -f # -*- makefile -*- # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 %: dh $@ %.1 : %.pod pod2man -c 'User Commands' -r "$(VERSION)" $< $@ override_dh_auto_build: $(CC) $(CFLAGS) -I. -o ncoils ncoils.c read_matrix.c -lm -D__PKGDATADIR__=\"/usr/share/ncoils\" $(LDFLAGS) overrice_dh_clean: dh_clean ncoils ncoils.1 coils-wrap.1 override_dh_install: dh_install sed -e 's|__pkgdatadir__|/usr/share/ncoils|g' coils-wrap.pl > $(CURDIR)/debian/ncoils/usr/bin/coils-wrap override_dh_installman: ncoils.1 coils-wrap.1 dh_installman ncoils.1 coils-wrap.1 d="../coils.upstream.tar.gz" VERSION=2002 get-orig-source: echo "Downloading to $(d)." ; \ wget -O "$(d)" http://www.russelllab.org/coils/coils.tar.gz ; \ cd `dirname $(d)` ; tar --exclude ncoils-linux -xzf `basename $(d)` cd `dirname $(d)` ; mv coils coils-$(VERSION) cd `dirname $(d)` ; tar --exclude ncoils-linux -czvf coils_$(VERSION).orig.tar.gz coils-$(VERSION) debian/upstream0000644000000000000000000000055312214301257010751 0ustar Homepage: http://www.russelllab.org/cgi-bin/coils/coils-svr.pl Name: Coils Reference: Author: Andrei Lupas and Marc Van Dyke and Jeff Stock Title: Predicting coiled coils from protein sequences Journal: Science Volume: 252 Pages: 1162-1164 Year: 1991 DOI: 10.1126/science.252.5009.1162 PMID: 2031185 URL: http://www.sciencemag.org/content/252/5009/1162 debian/copyright0000644000000000000000000000245712242436335011135 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Contact: Rob Russel Source: http://www.russelllab.org/coils/coils.tar.gz Files: * Copyright: (C) 2002 Robert B. Russel and its employing institute, the EMBL - European Molecular Biology Lab Meyerhofstrasse 1, 69917 Heidelberg, Germany License: GPLv2 License: GPLv2 This package 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; version 2 dated June, 1991. . This package 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, see . On Debian systems, the complete text of the GNU General Public License can be found in `/usr/share/common-licenses/GPL-2'. Files: debian/* Copyright: © 2005-2010 Steffen Moeller © 2011 Laszlo Kajan © 2011-2013 Andreas Tille License: GPLv2 debian/source/0000755000000000000000000000000011653062342010470 5ustar debian/source/format0000644000000000000000000000001411404735711011677 0ustar 3.0 (quilt) debian/README.Debian0000644000000000000000000000176011404735711011236 0ustar coils for Debian ---------------- The software has no version specified. It is said to be the same algorithm as published in Lupas, van Dyke & Stock Predicting coiled coils from protein sequences Science 252:1162-1164(1991) The web server is not prepared in this Debian package. A separate package will be prepared upon respective requests for the CGI. The perl scripts are distributed in /usr/share/doc/coils. The source was last modified in 2002, hence the version, as no other version information was found. Interest in this package raised again with the advent of the cloning tool GENtle in Debian, which (improvably) ships sources of ncoils with it. We will see how we can bring the two packages together. The files new.mat and old.mat are installed to /usr/share/ncoils, the ncoils binary should be informed explicitly via the environment variable COILSDIR of that location. Contact me if this shall be omittable. -- Steffen Moeller Sat, 12 Jun 2010 15:59:57 +0200 debian/changelog0000644000000000000000000000272312242436750011051 0ustar coils (2002-4) unstable; urgency=low * debian/upstream: - Added DOI + URL - Make author field BibTeX compliant * debian/control - cme fix dpkg-control - debhelper 9 - canonical Vcs fields * debian/copyright: DEP5 * debian/rules: dh * removed README.source in favour of adding DEP3 descriptions to patches -- Andreas Tille Mon, 18 Nov 2013 16:47:01 +0100 coils (2002-3) unstable; urgency=low * perl script coils-wrap.pl moved from doc to /usr/bin as 'coils-wrap' * improved man pages * updated upstream URL * removed requirement to define COILSDIR env var * Laszlo substitutes Steffen as a maintainer. -- Laszlo Kajan Thu, 27 Oct 2011 12:25:48 +0200 coils (2002-2) unstable; urgency=low * debian/control: - Team maintained in Debian Med team and added myself to uploaders - Removed '[biology]' from short description because we agreed not to use this any more - Fixed typo in Vcs-Browser field - Standards-Version: 3.9.1 (no changes needed) - Fixed homepage * Added debian/upstream-metadata.yaml -- Andreas Tille Mon, 24 Jan 2011 14:29:17 +0100 coils (2002-1) unstable; urgency=low * Initial Release (Closes: #299856). updated package from 2005 * lintian-clean * strcpy -> strncpy fixes * eliminated some compiler warnings * added rudimentary man page -- Steffen Moeller Sat, 12 Jun 2010 16:03:22 +0200 debian/patches/0000755000000000000000000000000012242436401010613 5ustar debian/patches/series0000644000000000000000000000003011652305446012031 0ustar strcpy.patch coils-wrap debian/patches/strcpy.patch0000644000000000000000000000350712242436401013165 0ustar Author: Steffen Moeller LastChanged: Sat, 12 Jun 2010 16:03:22 +0200 Description: strcpy -> strncpy fixes --- a/ncoils.c +++ b/ncoils.c @@ -35,7 +35,8 @@ main(int argc, char *argv[]) { int mode; int min_seg; - char heptfile[1000]; +#define HEPTFILELENGTH 1000 + char heptfile[HEPTFILELENGTH]; char *buff; static char *env; char *seq,*title,*ident; @@ -56,10 +57,12 @@ main(int argc, char *argv[]) { if((env=getenv("COILSDIR"))==NULL) { fprintf(stderr,"error: environment variable COILSDIR must be set\n"); + fprintf(stderr," Assuming /usr/share/ncoils\n"); + env=strdup("/usr/share/ncoils"); // a little leak, tolerated as singleton exit(-1); } - strcpy(&heptfile[0],env); + strncpy(&heptfile[0],env,HEPTFILELENGTH-1-8); // -1 for terminal 0, 8 for "/new.mat" strcpy(&heptfile[strlen(heptfile)],"/new.mat"); @@ -67,7 +70,7 @@ main(int argc, char *argv[]) { if(argv[i][0]!='-') exit_error(); if(strcmp(&argv[i][1],"m")==0) { if((i+1)>=argc) exit_error(); - strcpy(&heptfile[0],argv[i+1]); + strncpy(&heptfile[0],argv[i+1],HEPTFILELENGTH-1); i++; } else if(strcmp(&argv[i][1],"win")==0) { if((i+1)>=argc) exit_error(); @@ -159,6 +162,10 @@ main(int argc, char *argv[]) { } else { /* printf("Adding |%s| to |%s| = \n",buff,seq); */ seq=(char*)realloc(seq,(seqlen+strlen(buff)+1)*sizeof(char)); + if (NULL == seq) { + fprintf(stderr,"Could not allocate memory.\n"); + exit(-1); + } strcpy(&seq[seqlen],buff); seqlen=strlen(seq); /* printf(" |%s|\n",seq); */ --- a/ncoils.h +++ b/ncoils.h @@ -1,6 +1,7 @@ #include #include #include +#include #define AAs "A_CDEFGHI_KLMN_PQRST_VW_Y_" #define PI 3.1415 debian/patches/coils-wrap0000644000000000000000000004747312242436233012640 0ustar Author: Steffen Moeller LastChanged: Sat, 12 Jun 2010 16:03:22 +0200 Description: * coils-wrap now uses Getopt::Long * coils-wrap now also writes out raw prediction * coils-wrap input file format recognition improved * ncoils.c does not require the env var COILSDIR defined any more * -max_seq_len is not a cmd line argument any more * added coils-wrap.pod and ncoils.pod --- a/coils-wrap.pl +++ b/coils-wrap.pl @@ -1,6 +1,8 @@ -#!/usr/local/bin/perl - +#!/usr/bin/perl -w $|=1; +use Carp qw| cluck :DEFAULT |; +use Getopt::Long; +use File::Temp qw||; # Runs coils multiply to give you a three-window output @@ -9,42 +11,75 @@ $|=1; # You may need to change these, in addition # to the "/usr/local/bin/perl" above if necessary # -$ENV{"COILSDIR"} = "/data/ATG/coils/"; -$coils_root = "/data/ATG/coils/"; -$coils_exec = "/apps/ATG/bin/coils"; +#$ENV{"COILSDIR"} = "__MAKE_PREFIX__/usr/share/coiledcoils"; +$coils_root = "__pkgdatadir__"; +$coils_exec = "ncoils"; -$tmpdir = "/tmp/"; +$tmpdir = File::Temp::tempdir( CLEANUP => 1 ); undef($in_seq); undef($id); $mode = "threewin"; $weighted = ""; $matrix = "MTK"; -$win = "21"; +#$win = "21"; $extra = ""; -for($i=0; $i<=$#ARGV; ++$i) { - if($ARGV[$i] eq "-m") { # matrix file - if(($i+1)>($#ARGV)) { exit_error(); } - $matrix = uc($ARGV[$i+1]); - $i++; - } elsif($ARGV[$i] eq "-w") { # matrix file - $weighted = " -w "; - } elsif(!defined($fastafile)) { - $fastafile = $ARGV[$i]; - } else { - exit_error(); - } +$nameScr = $0; +$nameScr =~ s/.*\///g; + +$Lok = GetOptions ("m=s" => \$matrix, + "w!" => \$opt_weight, + "i=s" => \$fastafile, + "o=s" => \$outfile, + "r=s" => \$fileRaw, + "debug!" => \$dbg + #'help' => \$opt_help); + ); + + +if ( ! $Lok ) { + print STDERR + "Invalid arguments found, -h or --help for help\n", + "Usage: $nameScr [options] -i fastafile -o out_file -r raw_file\n", + " -m [matrix type] set matrix (MTK or MTIDK)\n", + " -w weight a&d = b,c,e,f&g\n", + "Try $nameScr --help for more information\n"; + + exit(1); +} + + +if ( ! $fastafile or ! $outfile ) { + print STDERR + "Usage: $nameScr [options] -i fastafile -o out_file -r raw_file\n", + " -m [matrix type] set matrix (MTK or MTIDK)\n", + " -w weight a&d = b,c,e,f&g\n", + "Try $nameScr --help for more information\n"; + exit(1); +} + +if ( ! -f $fastafile ) { + print STDERR + "input file '$fastafile' not found, exiting..\n"; + exit(1); +} + +$fileRaw = $outfile."_raw" if ( ! defined $fileRaw ); + +$matrix = uc($matrix); +if ( $opt_weight ) { + $weighted = " -w "; } sub exit_error { - print STDERR "coils-wrap.pl [options] [fasta file]\n"; + print STDERR "coils-wrap.pl [options] [fasta file] [output file]\n"; print STDERR " -m [matrix type] set matrix (MTK or MTIDK)\n"; print STDERR " -w weight a&d = b,c,e,f&g\n"; exit; } -@data = read_align($fastafile,$type); +@data = read_align($fastafile,\$type); if($type ne "f") { die "Error file must be in FASTA format\n"; } @@ -61,14 +96,14 @@ $seqfile = $tmpdir . "coils." . $$ . ".f $seqs = get_afasta(@data); -print "What should appear below is the result of running COILS three \n"; -print "times with windows of 14,21 & 28.\n`frame' denotes the predicted \n"; -print "position of the heptad repeat for the highest scoring window that \n"; -print "overlaps each position.\n`prob' gives a single integer value \n"; -print "representation of P (where 0-9 covers the range 0.0-1.0)\n"; -print "This will be repeated for each sequence \n\n\n"; +#print "What should appear below is the result of running COILS three \n"; +#print "times with windows of 14,21 & 28.\n`frame' denotes the predicted \n"; +#print "position of the heptad repeat for the highest scoring window that \n"; +#print "overlaps each position.\n`prob' gives a single integer value \n"; +#print "representation of P (where 0-9 covers the range 0.0-1.0)\n"; +#print "This will be repeated for each sequence \n\n\n"; -print "A total of $seqs->{nseq} sequences found in $seqfile\n\n\n"; +#print "A total of $seqs->{nseq} sequences found in $seqfile\n\n\n"; for($n=0; $n<$seqs->{nseq}; ++$n) { $id = $seqs->{list}[$n]; $in_seq = $seqs->{ids}{$id}{seq}; @@ -76,7 +111,8 @@ for($n=0; $n<$seqs->{nseq}; ++$n) { # print "ID $id seq $seq\n"; &write_fasta($seqfile,$id,$in_seq); - + @result = (); + push @result, ">$id\n\n"; if($mode eq "threewin") { # Runs threewin style mode # Three windows 14,21,28 @@ -94,7 +130,10 @@ for($n=0; $n<$seqs->{nseq}; ++$n) { for($i=14; $i<=28; $i+=7) { $j=($i-14)/7; $command = $coils_exec . $extra . " -win " . $i . " < " . $seqfile; -# print "Command is $command\n"; + if ( $i == 28 ) { + open (RAW,">$fileRaw") or die "cannot write to $fileRaw:$!"; + } + if($dbg){ cluck("Command is $command"); } open(IN,"$command|"); $fid = "frame-" . $i; @@ -107,7 +146,18 @@ for($n=0; $n<$seqs->{nseq}; ++$n) { $p=0; while() { - if(!/sequences/) { + if ( $i == 28 ) { # print the raw file if window is 28 + print RAW $_; + } + if ( /^\#/ ) { + chomp($result = $_); + $result =~ s/.*aas//; + $result =~ s/in coil\s*//g; + $result = "window size = $i ".$result." residues in coiled coil". + " domain\n"; + push @result, $result; + next; + } else { $_ =~ s/^ *//; @t=split(/ +/); $align->{ids}{$fid}{seq} .= $t[2]; @@ -118,18 +168,22 @@ for($n=0; $n<$seqs->{nseq}; ++$n) { else { $sP = substr($P,0,1); } if($sP eq "0") { $sP = "-"; } $align->{ids}{$pid}{seq} .= $sP; - } else { - print; } } close(IN); } - write_clustal($align,"-"); - } -} -#unlink $seqfile; + + + if ( defined($outfile)) { # Write output to file + write_clustal($align,\@result, $outfile); + } else { + write_clustal($align,\@result, "-"); + } + } +} +unlink $seqfile; -exit; +exit(0); sub write_fasta { my($fn,$id,$seq) = @_; @@ -139,7 +193,7 @@ sub write_fasta { while($i$outfile") || die "Error opening output file $outfile\n"; - - # print OUT "CLUSTAL W(1.60) multiple sequence alignment\n\n"; + + print OUT @$header; + print OUT "\n"; foreach $id (keys %{$align->{ids}}) { if(defined($align->{ids}{$id}{start})) { @@ -164,24 +220,44 @@ sub write_clustal { $align->{ids}{$id}{newid} .= $align->{ids}{$id}{ranges}; } } else { - $align->{ids}{$id}{newid} = $id; - } - } - $i=0; - while($i<$align->{alen}) { - for($k=0; $k<$align->{nseq}; ++$k) { - $id = $align->{list}[$k]; - printf(OUT "%-10s ",$align->{ids}{$id}{newid}); - for($j=0; $j<60; ++$j) { - last if(($i+$j)>=$align->{alen}); - print OUT substr($align->{ids}{$id}{seq},($i+$j),1); - } - printf(OUT "\n"); - } - $i+=60; - printf(OUT "\n"); + if ( $id !~ /frame/ and $id !~ /prob/) { + $align->{ids}{$id}{newid} = "seq"; + } else { + $align->{ids}{$id}{newid} = $id; + } + } # + } + # + $i=0; + + while($i<$align->{alen}) { + printf OUT "%-10s ", ' '; + for ($z = 1; $z <=50; $z++) { + if ($z == 50) { + print OUT ($i+50)/10 ; + } elsif ($z % 10 == 0) { + print OUT ":"; + } elsif ($z % 5 == 0) { + print OUT "."; + } else { + print OUT " "; + } + } + print OUT "\n"; + + for($k=0; $k<$align->{nseq}; ++$k) { + $id = $align->{list}[$k]; + printf(OUT "%-10s ",$align->{ids}{$id}{newid}); + for($j=0; $j<50; ++$j) { + last if(($i+$j)>=$align->{alen}); + print OUT substr($align->{ids}{$id}{seq},($i+$j),1); + } + print OUT "\n"; + } + $i+=50; } - close(OUT); + print OUT "// End\n\n"; + close OUT; } sub get_afasta { @@ -222,7 +298,7 @@ sub get_afasta { if(defined($align->{ids}{$label})) { $_ =~ s/-/ /g; $align->{ids}{$label}{seq} .= $_; - print "Adding $_ to $label\n"; +# print "Adding $_ to $label\n"; } } } @@ -233,6 +309,7 @@ sub get_afasta { } sub read_align { # Just read in text and modify format if necessary + #( $fastafile, \$type ) # # Likely format is determined by looking for signs of one format over another @@ -255,7 +332,7 @@ sub read_align { # Just read in text and my($file) = $_[0]; my(@data); my($i,$type); - my($winner,$highest); + my($winner,$highest) = ('x', 0); @data=(); @@ -268,18 +345,19 @@ sub read_align { # Just read in text and for($i=0; $i<=$#data; ++$i) { $_ = $data[$i]; - if(($i==0) && ($_ =~ / *[0-9]+ +[0-9]+ */)) { $votes{"y"}+=1000; } + if( $file =~ /\.fa(sta)?$/oi ){ $votes{"f"}+=1000; last; } + elsif(($i==0) && ($_ =~ / *[0-9]+ +[0-9]+ */)) { $votes{"y"}+=1000; } + elsif(($i==0) && ($_ =~ /^>/o) && $data[1] && $data[1] =~ /^[a-z]/io ) { $votes{"f"}+=10; } elsif(($_ =~ /^ *Name:/) || ($_ =~ /pileUp/) || ($_ =~ /MSF.*Check.*\.\./)) { $votes{"m"}++; last; } elsif($_ =~ /^CLUSTAL/) { $votes{"c"}+=10; last; } elsif($_ =~ /^>P1;/) { $votes{"p"}+=10; last; } - elsif($_ =~ /HMMER/) { $votes{"h"}+=10; last; } + elsif($_ =~ /HMMER/o && $data[0] !~ /^>/o) { $votes{"h"}+=10; last; } elsif(($_ =~ /^#=SQ/) || ($_ =~ /^#=RF/)) { $votes{"h"}++; } elsif($_ =~ /^>/) { $votes{"f"}++; $votes{"b"}++; } elsif($_ =~ /^ *\* iteration [0-9]*/) { $votes{"b"}++; $block_start++; } elsif($_ =~ /^ *\*/) { $votes{"b"}++; $block_end++; } elsif(($_ =~ /^ID /) || ($_ =~ /^CC /) || ($_ =~ /^AC /) || ($_ =~ /^SE /)) { $votes{"s"}++; } elsif(($_ =~ /^HSSP .*HOMOLOGY DERIVED SECONDARY STRUCTURE OF PROTEINS/)) { $votes{"e"}+=1000; } - } # Block and FASTA are quite hard to tell apart in a quick parse, @@ -289,14 +367,12 @@ sub read_align { # Just read in text and if($block_end==0) { $votes{"f"}++; } } - $winner = "x"; - $highest = 0; foreach $type (keys %votes) { # print $type," ", $votes{$type},"\n"; if($votes{$type}>$highest) { $winner = $type; $highest = $votes{$type}; } } -# print "File is apparently of type $winner\n"; - $_[1] = $winner; + if( $dbg ){ warn( "File is apparently of type $winner" ); } + ${$_[1]} = $winner; return @data; } sub get_print_string { @@ -311,3 +387,5 @@ sub get_print_string { } return $max_len; } + +# vim:et:ai: --- a/ncoils.c +++ b/ncoils.c @@ -1,4 +1,5 @@ #include +#include /* Copyright (c) 2002 Robert B. Russell * EMBL, Meyerhofstrasse 1, 69917 Heidelberg, Germany @@ -22,16 +23,19 @@ /* Rob Russell's attempt to make a COILS program */ +#ifndef __PKGDATADIR__ +#define __PKGDATADIR__ "" +#endif -main(int argc, char *argv[]) { +int main(int argc, char *argv[]) { - int i,j,k,l; + int i,j; int verb; int window,pt; int which,weighted; int nseq; int t,tc; - int seqlen; + int seqlen = 0; int mode; int min_seg; @@ -39,7 +43,8 @@ main(int argc, char *argv[]) { char heptfile[HEPTFILELENGTH]; char *buff; static char *env; - char *seq,*title,*ident; + char *seq = NULL; + char *title,*ident; float min_P; @@ -55,10 +60,10 @@ main(int argc, char *argv[]) { mode = 0; /* 0 = column mode, 1 = fasta, 2 = concise */ min_P = 0.5; - if((env=getenv("COILSDIR"))==NULL) { + if((env=getenv("COILSDIR"))==NULL) env = __PKGDATADIR__; + + if( env[0] == 0 ){ // empty string fprintf(stderr,"error: environment variable COILSDIR must be set\n"); - fprintf(stderr," Assuming /usr/share/ncoils\n"); - env=strdup("/usr/share/ncoils"); // a little leak, tolerated as singleton exit(-1); } @@ -67,19 +72,19 @@ main(int argc, char *argv[]) { for(i=1; i=argc) exit_error(); + if((i+1)>=argc) exit_error( env ); strncpy(&heptfile[0],argv[i+1],HEPTFILELENGTH-1); i++; } else if(strcmp(&argv[i][1],"win")==0) { - if((i+1)>=argc) exit_error(); + if((i+1)>=argc) exit_error( env ); sscanf(argv[i+1],"%d",&window); i++; } else if(strcmp(&argv[i][1],"c")==0) { mode=2; } else if(strcmp(&argv[i][1],"min_seg")==0) { - if((i+1)>=argc) exit_error(); + if((i+1)>=argc) exit_error( env ); sscanf(argv[i+1],"%d",&min_seg); i++; } else if(strcmp(&argv[i][1],"c")==0) { @@ -87,18 +92,18 @@ main(int argc, char *argv[]) { } else if((strcmp(&argv[i][1],"f")==0) || (strcmp(&argv[i][1],"fasta")==0)) { mode=1; } else if((strcmp(&argv[i][1],"min_P")==0)) { - if((i+1)>=argc) exit_error(); + if((i+1)>=argc) exit_error( env ); sscanf(argv[i+1],"%f",&min_P); i++; } else if(strcmp(&argv[i][1],"help")==0) { - exit_error(); + exit_error( env ); } else if(strcmp(&argv[i][1],"w")==0) { weighted=1; } else if(strcmp(&argv[i][1],"V")==0 || strcmp(&argv[i][1],"v")==0) { verb=1; } else { fprintf(stderr," can't understand flag/field %s\n",argv[i]); - exit_error(); + exit_error( env ); } } @@ -175,14 +180,14 @@ main(int argc, char *argv[]) { pred_coils(seq,ident,title,h,window,which,weighted,mode,min_P,&t,&tc,min_seg); free(seq); } - fprintf(stderr,"%8d sequences %8d aas %8d in coil\n",nseq,t,tc); + if( verb ) fprintf(stderr,"%8d sequences %8d aas %8d in coil\n",nseq,t,tc); free(title); free(ident); exit(0); } -void exit_error() { +void exit_error( const char* __coilsdir ) { fprintf(stderr,"format: ncoils [options] < [sequence file]\n"); fprintf(stderr," -f or -fasta [fasta output - coils as 'x', like '-x' in seg]\n"); fprintf(stderr," -c [concise mode - which sequences have any coils (and how many)]\n"); @@ -191,7 +196,7 @@ void exit_error() { fprintf(stderr," -win [window size; DEFAULT = 21]\n"); fprintf(stderr," -w [weight heptad positions a&d the same as b,c,e,f,g]\n"); fprintf(stderr," -v [verbose/debug mode - print extra junk]\n"); - fprintf(stderr," -max_seq_len [longest sequence tolerated; DEFAULT = 100 000]\n"); + fprintf(stderr,"Effective COILSDIR: %s\n", __coilsdir ); fprintf(stderr,"\n"); fprintf(stderr,"NCOILS, Rob Russell and Andrei Lupas, 1999\n"); fprintf(stderr," based on Lupas, Van Dyck & Stock (1991) Science 252,1162-1164\n"); @@ -206,7 +211,6 @@ void pred_coils(char *seq,char *ident,ch int i,j; int len,pos,aa_pt; - int pt; int total_coil_segments; int are_there_coils; --- /dev/null +++ b/coils-wrap.pod @@ -0,0 +1,77 @@ +=head1 NAME + +coils-wrap - runs ncoils three times to give you a three-window output + +=head1 SYNOPSIS + +coils-wrap [OPTION] + +=head1 DESCRIPTION + +coils-wrap runs ncoils three times to give you a three-window output. + +ncoils is a program that compares a sequence to a database of known parallel two-stranded coiled-coils and derives a similarity score. By comparing this score to the distribution of scores in globular and coiled-coil proteins, the program then calculates the probability that the sequence will adopt a coiled-coil conformation. + +=head1 OPTIONS + +=over + +=item -i + +input file in FASTA format + +=item -o + +output file + +=item -r + +raw output file, default: `_raw' + +=item -m + +matrix type; set matrix (MTK or MTIDK) + +=item -w + +weight a&d = b,c,e,f&g (boolean) + +=back + +=head1 EXAMPLES + +C + +C + +=head1 FILES + +=over + +=item F + +matrix data files + +=back + +=head1 AUTHOR + +R.B. Russell, A.N. Lupas, 1999 + +=head1 COPYRIGHT AND LICENSE + +GPL + +Based on Lupas, Van Dyck & Stock (1991) Science 252,1162-1164 + +=head1 SEE ALSO + +L, L, L + +=over + +=item A Lupas: Prediction and Analysis of Coiled-Coil Structures. Methods in Enzymology, 266, 513-525, 1996 + +=item A. Lupas, M. Van Dyke, and J. Stock: Predicting coiled coils from protein sequences. Science, 252, 1162-1164, 1991 + +=back --- /dev/null +++ b/ncoils.pod @@ -0,0 +1,89 @@ +=head1 NAME + +ncoils - prediction of coiled-coil secondary structure elements + +=head1 SYNOPSIS + +ncoils [OPTION] < [FASTA FILE] + +ncoils -f < /usr/share/doc/ncoils/1srya.fa + +=head1 DESCRIPTION + +ncoils is a program that compares a sequence to a database of known parallel two-stranded coiled-coils and derives a similarity score. By comparing this score to the distribution of scores in globular and coiled-coil proteins, the program then calculates the probability that the sequence will adopt a coiled-coil conformation. + +=head1 OPTIONS + +=over + +=item -f, -fasta + +fasta output - coils as 'x', like '-x' in seg + +=item -c + +concise mode - which sequences have any coils (and how many) + +=item -min_seg + +for concise mode - only report sequence if >= min coil segments + +=item -min_P + +minimum P to define coil segment; DEFAULT = 0.5 + +=item -win + +window size; DEFAULT = 21 + +=item -w + +weight heptad positions a&d the same as b,c,e,f,g + +=item -v + +verbose/debug mode - print extra junk + +=back + +=head1 EXAMPLES + +C + +C + +=head1 ENVIRONMENT + +COILSDIR - specifies the directory containing the file new.mat overriding the default F + +=head1 FILES + +=over + +=item F + +matrix data files + +=back + +=head1 AUTHOR + +R.B. Russell, A.N. Lupas + +=head1 COPYRIGHT AND LICENSE + +GPL + +Based on Lupas, Van Dyck & Stock (1991) Science 252,1162-1164 + +=head1 SEE ALSO + +L, L, L + +=over + +=item A Lupas: Prediction and Analysis of Coiled-Coil Structures. Methods in Enzymology, 266, 513-525, 1996 + +=item A. Lupas, M. Van Dyke, and J. Stock: Predicting coiled coils from protein sequences. Science, 252, 1162-1164, 1991 + +=back --- a/ncoils.h +++ b/ncoils.h @@ -1,7 +1,6 @@ #include #include #include -#include #define AAs "A_CDEFGHI_KLMN_PQRST_VW_Y_" #define PI 3.1415 --- a/read_matrix.c +++ b/read_matrix.c @@ -1,4 +1,5 @@ #include +#include /* Copyright (c) 2002 Robert B. Russell * EMBL, Meyerhofstrasse 1, 69917 Heidelberg, Germany debian/compat0000644000000000000000000000000212242433244010364 0ustar 9 debian/docs0000644000000000000000000000002012242434334010032 0ustar README 1srya.fa