Sponsored Content
Full Discussion: Merge rows in bid data file
Top Forums UNIX for Dummies Questions & Answers Merge rows in bid data file Post 302605940 by Ygor on Friday 9th of March 2012 06:38:57 AM
Old 03-09-2012
If your file is tab-delimited, as described, and records are grouped together in fours, then try...
Code:
$ cat file1
A_AA960715      leucine-rich repeat-containing protein  GO:0006952      defense response        P
A_AA960715      leucine-rich repeat-containing protein  GO:0008152      metabolic process       P
A_AA960715      leucine-rich repeat-containing protein  GO:0016491      oxidoreductase activity F
A_AA960715      leucine-rich repeat-containing protein  GO:0007165      signal transduction     P
A_AA960716      protein GO:0007075      defense response        P
A_AA960716      protein GO:0008082      metabolic process       P
A_AA960716      protein GO:0016583      oxidoreductase activity F
A_AA960716      protein GO:0009295      signal transduction     P

$ paste - - - - < file1 | awk -F \\t '{printf "%s | %-40s | %s %s %s %s | %s, %s, %s, %s | %s, %s, %s, %s \n", $1, $2, $3, $8, $13, $18, $4, $9, $14, $19, $5, $10, $15, $20}'
A_AA960715 | leucine-rich repeat-containing protein   | GO:0006952 GO:0008152 GO:0016491 GO:0007165 | defense response, metabolic process, oxidoreductase activity, signal transduction | P, P, F, P
A_AA960716 | protein                                  | GO:0007075 GO:0008082 GO:0016583 GO:0009295 | defense response, metabolic process, oxidoreductase activity, signal transduction | P, P, F, P
$

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

chop a data file into rows

A very naive question... I have a file which has many rows and many columns and I would like to chop off the rows and create a new file per row named after the first column of every row + 1. The data files look like: # Donades de la trajectoria de la particula 60001 # 1:T 2:Massa 3:Rx 4:Ry 5:Rz... (7 Replies)
Discussion started by: pau
7 Replies

2. Shell Programming and Scripting

How to merge rows into columns ????

Hi guz I want to merge multiple rows into a multiple columns based on the first column. The file has symbol // I want to break the symbool // and I nedd exactlynew column at that point the output will be like this please guyz help in this isssue!!!!! merging rows into columns ... (4 Replies)
Discussion started by: bogu0001
4 Replies

3. Shell Programming and Scripting

Merge two file data together based on specific pattern match

My input: File_1: 2000_t g1110.b1 abb.1 2001_t g1111.b1 abb.2 abb.2 g1112.b1 abb.3 2002_t . . File_2: 2000_t Ali england 135 abb.1 Zoe british 150 2001_t Ali england 305 g1111.b1 Lucy russia 126 (6 Replies)
Discussion started by: patrick87
6 Replies

4. Shell Programming and Scripting

merge similar rows

I have a large file (10M lines) that contains two columns: a frequency and a string, ex: 3 aaaaa 4 bbbbb 2 ccccc 5 aaaaa 1 ddddd 4 ccccc I need to merge the lines whose string part is the same, while updating the frequency. The output should look like this: 8 aaaaa 4 bbbbb 5 ccccc... (2 Replies)
Discussion started by: tootles564
2 Replies

5. UNIX for Advanced & Expert Users

merge two tab delimited file with exact same number of rows in unix/linux

Hi I have two tab delimited file with different number of columns but same number of rows. I need to combine these two files in such a way that row 1 in file 2 comes adjacent to row 1 in file 1. For example: The content of file1: field1 field2 field3 a1 a2 a3 b1 b2 b3... (2 Replies)
Discussion started by: mary271
2 Replies

6. Shell Programming and Scripting

Merge the data from two servers into a single file

Hi All, Need your inputs for the below. I have 2 different servers 611 & 610, where i would be running two scripts. And would would be running one script from 611 at every 4 hours to merge the data from the 2 servers into 2 files and send a mail. so below is the code snippet for 611: ... (3 Replies)
Discussion started by: ss_ss
3 Replies

7. Shell Programming and Scripting

Merge matching rows

Hello, I need this output. thank you very much. input: Code: ***table***wood ***snack***top ***table***garfield ***big***zen ***table***cars output: Code: ***table***wood2345garfield2345cars ***snack***top ***big***zen (7 Replies)
Discussion started by: tara123
7 Replies

8. Shell Programming and Scripting

How to merge the multiple data files as a single file?

Hi Experts, I have created multiple scripts and send the output to new file, getting this output to my mailbox on daily basis. I would like to send the all outputs to a single file, need to merge all file outputs on a single file. For example, Created script for df -h > df.doc grep... (7 Replies)
Discussion started by: seenuvasan1985
7 Replies

9. Shell Programming and Scripting

How to merge variable data from another file into specific place?

Hello, I'm trying to create multiple commands using a variable input from another file but am not getting any successful results. Basically, file1.txt contains multiple lines with single words: <file1.txt> yellow blue black white I want to create multiple echo commands with these... (8 Replies)
Discussion started by: demmel
8 Replies

10. Shell Programming and Scripting

Merge data in lines from same file

Need help figuring out how to merge data from a file. I have a large txt file with some data that needs to be merged from separate lines into one line. Doug.G|3/12/2011|817-555-5555|Portland Doug.G|3/12/2011|817-555-5522|Portland Steve.F|1/11/2007|817-555-5111|Portland... (5 Replies)
Discussion started by: cdubu2
5 Replies
PROBALIGN(1)							   User Commands						      PROBALIGN(1)

NAME
probalign - Align sequences in MFAFILE(s) and print result to standard output DESCRIPTION
PROBALIGN Version 1.4 (Nov 2010) aligns multiple protein sequences and prints to the standard output. Written by Satish Chikkagoudar and Usman Roshan using code from PROBCONS version 1.1 (written by Chuong Do) and based upon probA (written by Ulrike Muckstein). PROBALIGN 1.4 comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it under certain conditions. See the README file for details. Usage: probalign [OPTION]... [MFAFILE]... Description: Align sequences in MFAFILE(s) and print result to standard output -clustalw use CLUSTALW output format instead of MFA -v, --verbose report progress while aligning (default: off) -a, --alignment-order print sequences in alignment order rather than input order (default: off) -T, -temperature Sets the thermodynamic temperature parameter (default: 5 (for protein data mode), 1 ( for nucleotide data mode)). -score_matrix, --score_matrix Sets the type of scoring matrix used to calculate the posterior probabilities (default: gonnet_160, representing gonnet 160, refer README for details) -go, --gap-open This option can be used to specify the gap open parameter. The default for Gonnet 160 (protein) is 22 and nucleotide (simple matrix) is 4. -ge, --gap-extension This option can be used to specify the gap extension parameter. The default for Gonnet 160 (protein) is 1 and nucleotide (simple matrix) is 0.25. -nuc Specify this option to indicate that inputted sequences are nucleotide sequences -prot Specify this option to indicate that inputted sequences are protein sequences [DEFAULT] -showPP Outputs the posterior probabilities of alignment columns as a new sequence named Posterior Probabilities (The probability values are scaled to be between integers between 0 and 9). probalign 1.4 May 2011 PROBALIGN(1)
All times are GMT -4. The time now is 05:56 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy