Class | Global |
Name | file |
Arguments | rename <file_name> <new_file_name> |
delete <file_name> [... <file_nameN>] | |
query <file_name> [... <file_nameN>] | |
cat <file_name> [... <file_nameN>] | |
head <file_name> [... <file_nameN>] | |
print [/<search string>/] [(<fortran format>)] [NR] [+ [+..]] [<column no> ... <col no N>] <file_name> | |
transpose <file_name> [... <file_nameN>] | |
inverse <file_name> [... <file_nameN>] | |
vcf <VCF_file_name> ([<start_position> [<end_position>]]) | ([<loc_nameN>... <loc_nameN>]) |
Performs a number of standard type operating system file manipulations.
The rename modifier renames the named file in the current directory to a new name.
The delete modifier deletes the named file(s) in the current directory.
The query modifier tests if the named files are present in the current directory.
The cat modifier sends the named file(s) in the current directory to the Sib-pair standard output.
The head modifier sends the first 10 lines of the named file(s) in the current directory to the Sib-pair standard output.
The print modifier prints selected columns from the named file to the Sib-pair standard output. If no columns are selected, then this has the same effect as cat. If the NR keyword is present, then the line is prefixed by the line number. If the first or second modifier keyword encountered is enclosed in brackets, this is taken to be a Fortran format statement to be used printing the columns. If the modifier is enclosed in forward slashes ("/"), this is taken to be a search string, so that only lines containing that string are printed. This may have to be protected by quotes. The + modifies the search so that the line following a line matching the search is printed (multiple + increase the number of lines to skip before printing).
The columns are read as strings, so the only allowable formats are X, I[<w>] for the line number, and A[<w>] for the actual data.
The transpose modifier swaps rows and columns of the input text file(s) writing the result to the Sib-pair standard output.
The inverse modifier inverts a symmetric numeric matrix represented in a file in a sparse format: each line of text contains the row and column indices followed by the element value. Output is in the same format.
The vcf modifier prints locus information from a VCF file. A subset of loci can be specified, either by map interval or a list of locus names. See read locus vcf for more details.
Example:
>> file delete bad.ped
Deleted file "bad.ped".
>> file print /ERROR:/ bad.out
>> out cleanhash.out
>> file print NR 2 5 hash.out
>> out
>> output mat1
>> echo 1 2 3 4 5 6 7 8
>> echo 1 2 3 4 5 6 7 8
>> output
>> output mat2
>> echo 1 2 3
>> echo 1 2 3 4
>> echo 1 2
>> echo 1
>> output
>> file transpose mat1 mat2
1 1
2 2
3 3
4 4
5 5
6 6
7 7
8 8
1 1 1 1
2 2 2 x
3 3 x x
x 4 x x
>> file delete mat1 mat2
>> file wc do22.out.gz
Field counts for "do22.out.gz":
L 1 Len 52 NFields 8: "|||| SIB-PAIR: A program for simple genetic analys"
L 2 Len 61 NFields 9: "|\/| Version : Version 1.00.b [64 bit] gfortran (0"
L 3 Len 42 NFields 8: "|/\| Author : David L Duffy (c) 1995-2011"
L 4 Len 63 NFields 10: "|||| Job run : Sat Jan 7 16:55:38 2012 (gb-r35n20"
L 5 Len 0 NFields 0: ""
L 6 Len 60 NFields 10: "Type "help" for help, "quit" to quit, "ctrl-C" to"
L 7 Len 0 NFields 0: ""
L 8 Len 30 NFields 4: "-> macro CHROM=22;inc probs.in"
L 9 Len 0 NFields 0: ""
Number of lines = 34019
Length of longest line = 80 chars
Total number of words = 305512
Maximum words per line = 12
Constant word count per line? = F
Changes in word count/line = 103
Counts changed at lines = 2 3 4 5 6 7 8 9 10 ...
See also:
dir | file listing for current directory |
pwd | print or change current directory |
<< (pwd) | Up to index | >> (clear) |