Sponsored Content
Top Forums Shell Programming and Scripting How to place Record in a row as a column name? Post 302966796 by sidnow on Tuesday 16th of February 2016 03:04:49 PM
Old 02-16-2016
Thanks for the reply guys, however forgot to mention, the number of columns are dynamic. As in it will not be Name, Age, School always. It can Name, Age, School, some other field etc.

How can I dynamically assign the odd numbered fields as the column name for the even numbered fields?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Changing the column for a row in a text file and adding another row

Hi, I want to write a shell script which increments a particular column in a row from a text file and then adds another row below the current row with the incremented value . For Eg . if the input file has a row : abc xyz lmn 89 lm nk o p I would like the script to create something like... (9 Replies)
Discussion started by: aYankeeFan
9 Replies

2. Shell Programming and Scripting

Split a record ( in a row) and make it as new row

Hi All, The following is the scenario id name -------------- 1 William;Johnson 2 Azim;Abdul 3 Grasim . . etc.... I need the following output id name -------------- 1 William 1 Johnson 2 Azim (2 Replies)
Discussion started by: kottursamy
2 Replies

3. Shell Programming and Scripting

Moving data from a specified column/row to another column/row

Hello, I have an input file like the following: 11_3_4 2_1_35 3_15__ _16989 Where '_' is a space. The data is in a table. Is there a way for the program to prompt the user for x1,y1 and x2,y2, where x1,y1 is the desired number (for example x=6 y=4 is a value of 4) and move to a desired spot... (2 Replies)
Discussion started by: jl487
2 Replies

4. Shell Programming and Scripting

Subtracting each row from the first row in a single column file using awk

Hi Friends, I have a single column data like below. 1 2 3 4 5 I need the output like below. 0 1 2 3 4 where each row (including first row) subtracting from first row and the result should print below like the way shown in output file. Thanks Sid (11 Replies)
Discussion started by: ks_reddy
11 Replies

5. UNIX for Dummies Questions & Answers

awk to print first row with forth column and last row with fifth column in each file

file with this content awk 'NR==1 {print $4} && NR==2 {print $5}' file The error is shown with syntax error; what can be done (4 Replies)
Discussion started by: cdfd123
4 Replies

6. Shell Programming and Scripting

Print row on 4th column to all row

Dear All, I have input : SEG901 5173 9005 5740 SEG902 5227 5284 SEG903 5284 5346 SEG904 5346 9010 SEG905 5400 5456 SEG906 5456 5511 SEG907 5511 9011 SEG908 5572 9015 SEG909 5622 9020 SEG910 5678 5739 SEG911 5739 5796 SEG912 5796 9025 ... (3 Replies)
Discussion started by: attila
3 Replies

7. UNIX for Dummies Questions & Answers

Match sum of values in each column with the corresponding column value present in trailer record

Hi All, I have a requirement where I need to find sum of values from column D through O present in a CSV file and check whether the sum of each Individual column matches with the value present for that corresponding column present in the trailer record. For example, let's assume for column D... (9 Replies)
Discussion started by: tpk
9 Replies

8. Shell Programming and Scripting

Split column data if the table has n number of column's with some record

Split column data if the table has n number of column's with some record then how to split n number of colmn's line by line with records Table --------- Col1 col2 col3 col4 ....................col20 1 2 3 4 .................... 20 a b c d .................... v ... (11 Replies)
Discussion started by: Priti2277
11 Replies

9. Shell Programming and Scripting

Print first row of column a, last row of column b if column a has the same value

I have a table with this structure: cola colb colc 1 19 lemon 20 31 lemon 32 100 lemon 159 205 cherries 210 500 cherries and need to parse it into this format: cola colb colc 1 100 lemon 159 500 cherries So I need the first row of cola and the last row of colb if colc has the... (3 Replies)
Discussion started by: coppuca
3 Replies

10. Shell Programming and Scripting

Modifying text file records, find data in one place in the record and print it elsewhere

Hello, I have some text data that is in the form of multi-line records. Each record ends with the string $$$$ and the next record starts on the next line. RDKit 2D 15 14 0 0 0 0 0 0 0 0999 V2000 5.4596 2.1267 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 ... (5 Replies)
Discussion started by: LMHmedchem
5 Replies
compstruct(1)							  Biosquid Manual						     compstruct(1)

NAME
compstruct - calculate accuracy of RNA secondary structure predictions SYNOPSIS
compstruct [options] trusted_file test_file DESCRIPTION
compstruct evaluates the accuracy of RNA secondary structure predictions, at the on a per-base-pair basis. The trusted_file contains one or more sequences with trusted (known) RNA secondary structure annotation. The test_file contains the same sequences, in the same order, with predicted RNA secondary structure annotation. compstruct reads the structures and compares them, and calculates both the sensitivity (the number of true base pairs that are correctly predicted) and the specificity (positive predictive value, the number of predicted base pairs that are true). Results are reported for each individual sequence, and in summary for all sequences together. Both files must contain secondary structure annotation in WUSS notation. Only SELEX and Stockholm formats support structure markup at present. The default definition of a correctly predicted base pair is that a true pair (i,j) must exactly match a predicted pair (i,j). Mathews, Zuker, Turner and colleagues (see: Mathews et al., JMB 288:911-940, 1999) use a more relaxed definition. Mathews defines "correct" as follows: a true pair (i,j) is correctly predicted if any of the following pairs are predicted: (i,j), (i+1,j), (i-1,j), (i,j+1), or (i,j-1). This rule allows for "slipped helices" off by one base. The -m option activates this rule for both sensitivity and for speci- ficity. For specificity, the rule is reversed: predicted pair (i,j) is considered to be true if the true structure contains one of the five pairs (i,j), (i+1,j), (i-1,j), (i,j+1), or (i,j-1). OPTIONS
-h Print brief help; includes version number and summary of all options, including expert options. -m Use the Mathews relaxed accuracy rule (see above), instead of requiring exact prediction of base pairs. -p Count pseudoknotted base pairs towards the accuracy, in either trusted or predicted structures. By default, pseudoknots are ignored. Normally, only the trusted_file would have pseudoknot annotation, since most RNA secondary structure prediction programs do not pre- dict pseudoknots. Using the -p option allows you to penalize the prediction program for not predicting known pseudoknots. In a case where both the trusted_file and the test_file have pseudoknot annotation, the -p option lets you count pseudoknots in evaluating the prediction accuracy. Beware, however, the case where you use a pseudoknot-capable prediction program to generate the test_file, but the trusted_file does not have pseudoknot annotation; in this case, -p will penalize any predicted pseudoknots when it calcu- lates specificity, even if they're right, because they don't appear in the trusted annotation; this is probably not what you'd want to do. EXPERT OPTIONS
--informat <s> Specify that the two sequence files are in format <s>. In this case, both files must be in the same format. The default is to autodetect the file formats, in which case they could be different (one SELEX, one Stockholm). --quiet Don't print any verbose header information. SEE ALSO
afetch(1), alistat(1), compalign(1), revcomp(1), seqsplit(1), seqstat(1), sfetch(1), shuffle(1), sindex(1), sreformat(1), stranslate(1), weight(1). AUTHOR
Biosquid and its documentation are Copyright (C) 1992-2003 HHMI/Washington University School of Medicine Freely distributed under the GNU General Public License (GPL) See COPYING in the source code distribution for more details, or contact me. 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 Biosquid 1.9g January 2003 compstruct(1)
All times are GMT -4. The time now is 07:19 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy