10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Judi # cat File1
judi /export/home 76
judi /usr 83
judi #
judi # cat File2
judi /export/home 79
judi /usr 82
judi #
if COLUMN3 of File2 is greater that COLUMN3 of File1, then print File2's lines
juid /export/home 79
Code tags please (2 Replies)
Discussion started by: judi
2 Replies
2. Shell Programming and Scripting
hello everybody
I have 2 files the
file1 has 10 columns and the form:
...
110103 0802 1.16 38 20.16 22 1.21 8.77 0.00 20
120103 0832 23.40 38 22.10 21 46.35 10.17 0.00 28
120103 1413 45.00 38 24.50 21 48.85 7.89 0.00 38
130103 1112 23.40 38 22.10 21 48.85 ... (5 Replies)
Discussion started by: phaethon
5 Replies
3. Shell Programming and Scripting
Dear Unix experts,
I have got a file where I would like to compare the values of second column if first column is same in such a way that the difference between the values is >50. If not, I would like to discard both values.
For example, my input file looks like -
comp275_c0_seq2 73... (7 Replies)
Discussion started by: utritala
7 Replies
4. Shell Programming and Scripting
Hi,
I want to compare two columns from file1 with another two column of file2 and print matched and unmatched column like this
File1
1 rs1 abc
3 rs4 xyz
1 rs3 stu
File2
1 kkk rs1 AA 10
1 aaa rs2 DD 20
1 ccc ... (2 Replies)
Discussion started by: justinjj
2 Replies
5. Shell Programming and Scripting
- I have two files (File 1 and File 2) and the contents of the files are mentioned below.
- I am trying to compare the values of Column1 of File1 with Column1 of File2. If a match is found, print the corresponding value from Column2 of File1 in Column5 of File2.
- I tried to modify and use... (10 Replies)
Discussion started by: Santoshbn
10 Replies
6. Shell Programming and Scripting
I would like to compare the values of 2nd column of consecutive lines of same file in such a way so that if the difference between first value and second value is more than 100 it should print complete line else ignore line.
Input File
==========
PDB 2500
RTDB 123
RTDB-EAGLE 122
VSCCP 2565... (4 Replies)
Discussion started by: manuswami
4 Replies
7. Shell Programming and Scripting
Hi,
I want to compare the columns of two files excluding column 2 from both the files. I tried this awk command.
awk -F":" 'NR==FNR{++a;next} !(a)' file1.txt file2.txt
.
Example: File1.txt
123:09-15-2011:abc:123456
123:09-15-2011:abc:234567
123:09-15-2011:abc:345678
... (5 Replies)
Discussion started by: shell_newbie
5 Replies
8. UNIX for Dummies Questions & Answers
I have a text file that has three columns. But at the end of the text file, there are trailing lines that have missing second and third columns:
4 0.04972604 KLHL28
4 0.0497332 CSTB
4 0.04979822 AIF1
4 0.04983331 DECR2
4 0.04990344 KATNB1
4
4
4
4
How can I remove the trailing... (3 Replies)
Discussion started by: evelibertine
3 Replies
9. Shell Programming and Scripting
Hello. I have two files. FILE1 was extracted from FILE2 and modified thanks to help from this post. Now I need to replace the extracted, modified lines into the original file (FILE2) to produce the FILE3.
FILE1
1466 55.27433 14.72050 -2.52E+03 3.00E-01 1.05E+04 2.57E+04
1467 55.27433... (1 Reply)
Discussion started by: jm4smtddd
1 Replies
10. Shell Programming and Scripting
Hi all
I am trying to scan a file that has 3 columns:
red blue 123351
red blue 848655
red blue 126354
red blue 023158
black white 654896
red blue 650884
I want an output that sums the rows that have matching columns 1 and 2 :wall:
red blue has 5 entries
black white has 1 entry
... (4 Replies)
Discussion started by: reno
4 Replies
COMPALIGN(1) General Commands Manual COMPALIGN(1)
NAME
compalign - compare two multiple alignments
SYNOPSIS
compalign [-options] <trusted-alignment> <test-alignment>
DESCRIPTION
compalign calculates the fractional "identity" between the trusted alignment and the test alignment. The two files must contain exactly the
same sequences, in exactly the same order.
The identity of the multiple sequence alignments is defined as the averaged identity over all N(N-1)/2 pairwise alignments.
The fractional identity of two sets of pairwise alignments is in turn defined as follows (for aligned known sequences k1 and k2, and
aligned test sequences t1 and t2):
matched columns / total columns
where total columns = the total number of columns in which there is
a valid (nongap) symbol in k1 or k2;
matched columns = the number of columns in which one of the
following is true:
k1 and k2 both have valid symbols at a given column; t1 and t2
have the same symbols aligned in a column of the t1/t2
alignment;
k1 has a symbol aligned to a gap in k2; that symbol in t1 is
also aligned to a gap;
k2 has a symbol aligned to a gap in k1; that symbol in t2 is
also aligned to a gap.
Because scores for all possible pairs are calculated, the algorithm is of order (N^2)L for N sequences of length L; large sequence sets
will take a while.
OPTIONS
Available options:
-h Print short help and usage info.
-c Only compare under marked #=CS consensus structure.
--informat <s>
Specify that both alignments are in format <s> (MSF, for instance).
--quiet
Suppress verbose header (used in regression testing).
SEE ALSO
afetch(1), alistat(1), compstruct(1), revcomp(1), seqsplit(1), seqstat(1), sfetch(1), shuffle(1), sindex(1), sreformat(1), stranslate(1),
weight(1).
AUTHOR
Sean Eddy
HHMI/Department of Genetics
Washington University School of Medicine
4444 Forest Park Blvd., Box 8510
St Louis, MO 63108 USA
Phone: 1-314-362-7666
FAX : 1-314-362-2157
Email: eddy@genetics.wustl.edu
This manual page was written by Nelson A. de Oliveira <naoliv@gmail.com>,
for the Debian project (but may be used by others).
Mon, 01 Aug 2005 15:28:08 -0300 COMPALIGN(1)