Adding DisEMBL dependency Tisean executable
[jabaws.git] / binaries / src / disembl / Tisean_3.0.1 / source_f / choose.f
1 c===========================================================================
2 c
3 c   This file is part of TISEAN
4
5 c   Copyright (c) 1998-2007 Rainer Hegger, Holger Kantz, Thomas Schreiber
6
7 c   TISEAN is free software; you can redistribute it and/or modify
8 c   it under the terms of the GNU General Public License as published by
9 c   the Free Software Foundation; either version 2 of the License, or
10 c   (at your option) any later version.
11 c
12 c   TISEAN is distributed in the hope that it will be useful,
13 c   but WITHOUT ANY WARRANTY; without even the implied warranty of
14 c   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 c   GNU General Public License for more details.
16 c
17 c   You should have received a copy of the GNU General Public License
18 c   along with TISEAN; if not, write to the Free Software
19 c   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
20 c
21 c===========================================================================
22 c   choose.f
23 c   Choose columns and sub-sequences from a file
24 c   author T. Schreiber (1999)
25 c===========================================================================
26
27       parameter(nx=1000000,mx=5)
28       dimension x(nx,mx), icol(mx)
29       character*72 file, fout
30       data iverb/15/
31
32       call whatido("Choose columns and sub-sequences from a file",iverb)
33       nmax=ican("l",nx)
34       nexcl=ican("x",0)
35       mcmax=ican("m",0)
36       call columns(mc,mx,icol)
37       if(mcmax.eq.0) mcmax=max(1,mc)
38       isout=igetout(fout,iverb)
39
40       call nthstring(1,file)
41       call xreadfile(nmax,mcmax,nx,x,nexcl,icol,file,iverb)
42       if(file.eq."-") file="stdin"
43       if(isout.eq.1) call addsuff(fout,file,"_select")
44       call outfile(fout,iunit,iverb)
45       call xwritefile(nmax,mcmax,nx,x,fout,iverb)
46       end
47
48       subroutine usage()
49 c usage message
50
51       call whatineed(
52      .   "[-o outfile -l# -x# -m# -c#[,#] -V# -h] file")
53       call popt("l","number of values to be read (all)")
54       call popt("x","number of values to be skipped (0)")
55       call popt("m","number of columns to be read (1)")
56       call popt("c","columns to be read (1)")
57       call pout("file_select")
58       call pall()
59       stop
60       end