Sponsored Content
Full Discussion: Fetch specific entries
Top Forums Shell Programming and Scripting Fetch specific entries Post 302742339 by rdcwayx on Tuesday 11th of December 2012 01:30:41 AM
Old 12-11-2012
Code:
awk -F "\t" '/UniProt/{id=$NF} /Drug\(/{$1=$2="";a[$3 FS $4]=$0;next} {if ($3 FS $4 in a) print id,a[$3 FS $4],$2}' infile

P11229   Pirenzepine DAP000492 Peptic ulcer disease Approved Antagonist
P11229   Glycopyrrolate DAP001116 Anesthetic Approved Antagonist
P11229   Clidinium DAP001117 Abdominal/stomach pain Approved Antagonist
P11229   Dicyclomine DAP001118 Irritable bowel syndrome Approved Antagonist
P11229   Ethopropazine DAP001119 Parkinson's disease Approved Antagonist
P11229   Benztropine DAP001121 Parkinson's disease Approved Antagonist
P11229   Trihexyphenidyl DAP001122 Parkinson's disease Approved Antagonist
P11229   Propantheline DAP001123 Excessive sweating (hyperhidrosis) Approved Antagonist
P11229   Oxyphenonium DAP001124 Spasm Approved Antagonist
P11229   Biperiden DAP001125 Parkinson's disease Approved Antagonist
P11229   Cycrimine DAP001120 Parkinson's disease Approved Binder
P11229   Revatropate DCL000957 Chronic obstructive pulmonary disease Discontinued in Phase I Antagonist
P11229   Talsaclidine isomer DCL000268 Alzheimer's disease Discontinued Agonist
P11229   Sabcomeline hydrochloride DCL000279 Cardiovascular diseases Phase IIa Agonist
P11229   Talsaclidine fumarate DCL000303 Alzheimer's disease Discontinued Agonist
P11229   Xanomeline tartrate DCL000328 Alzheimer's disease Phase II Agonist
P11229   GSK573719 DCL000381 Chronic Obstructive Pulmonary Disease (COPD) Phase II Agonist
P11229   GSK961081 DCL000397 Chronic Obstructive Pulmonary Disease (COPD) Phase II completed Agonist
P11229   GSK1034702 DCL000402 Schizophrenia, Dementia Phase I completed Agonist
P11229   Darotropium DCL000514 COPD Suspended in Phase II in GSK 2009 Report Agonist
P11229   Darotropium + 642444 DCL000515 COPD Phase III Agonist
P11229   GSK961081 DCL000397 Chronic Obstructive Pulmonary Disease (COPD) Phase II completed Multitarget
P11229   Revatropate DCL000957 Chronic obstructive pulmonary disease Discontinued in Phase I Multitarget

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

To fetch specific words from a file

Hi All, I have a file like this,(This is a sql output file) cat query_file 200000029 12345 10001 0.2 0 I want to fetch the values 200000029,10001,0.2 .I tried using the below code but i could get... (2 Replies)
Discussion started by: girish.raos
2 Replies

2. Shell Programming and Scripting

How to fetch a specific line from file

Hi, I have text file in the following strucher . The files contain hondreds of lines. value1;value2;value3;value4 I would like to get back the line with lowest date (values4 field). In this case its line number 3. groupa;Listener;1;20110120162018 groupb;Database;0;20110201122641... (4 Replies)
Discussion started by: yoavbe
4 Replies

3. Shell Programming and Scripting

fetch last line no form file which is match with specific pattern by grep command

Hi i have a file which have a pattern like this Nov 10 session closed Nov 10 Nov 9 08:14:27 EST5EDT 2010 on tty . Nov 10 Oct 19 02:14:21 EST5EDT 2010 on pts/tk . Nov 10 afrtetryytr Nov 10 session closed Nov 10 Nov 10 03:21:04 EST5EDT 2010 Dec 8 Nov 10 05:03:02 EST5EDT 2010 ... (13 Replies)
Discussion started by: Himanshu_soni
13 Replies

4. Shell Programming and Scripting

How to fetch specific fields

Dear Friends, Please provide some commands to fecth specific filed (data yellow color) from below data.. Input data 2648: 1;20120707;3591|4;20290107;90|5;20290107;3|9;20120705;0|10;20120705;0|16;20290113;15|29;20120705;0 2658: 1;20120722;0|4;20290422;1200|9;20120705;0|10;20120705;0 2646:... (4 Replies)
Discussion started by: suresh3566
4 Replies

5. Shell Programming and Scripting

Urgent request to consider:Search specific name in a file and fetch specific entries

Hi all, I have 2 files, One file contain data like this FHIT CS CHRM1 PDE3A PDE3B HSP90AA1 PTK2 HTR1A ESR1 PARP1 PLA2G1B These names are mentioned in the second file(Please see attached second file) as # Drug_Target_X_Gene_Name:(Where X can be any number (1-1000) (1 Reply)
Discussion started by: manigrover
1 Replies

6. Shell Programming and Scripting

Search specific name in a file and fetch specific entries

Hi all, I have 2 files, One file contain data like this FHIT CS CHRM1 PDE3A PDE3B HSP90AA1 PTK2 HTR1A ESR1 PARP1 PLA2G1B These names are mentioned in the second file(Please see attached second file) as (7 Replies)
Discussion started by: manigrover
7 Replies

7. Shell Programming and Scripting

Fetch entries in front of specific word till next word

Hi all I have following file which I have to edit for research purpose file:///tmp/moz-screenshot.png body, div, table, thead, tbody, tfoot, tr, th, td, p { font-family: "Liberation Sans"; font-size: x-small; } Drug: KRP-104 QD Drug: Placebo Drug: Metformin|Drug:... (15 Replies)
Discussion started by: Priyanka Chopra
15 Replies

8. Shell Programming and Scripting

Request to check:Fetch certain entries

Hi all. Kindly check it it's urgent!! I have one big file from which which I have to fetch certain data I have attached a small part of this file. from the attached file, I have to fetch and arrange data in 3 columns 1 Generic name 2. Brand names 3. Drug... (10 Replies)
Discussion started by: manigrover
10 Replies

9. Shell Programming and Scripting

Fetch entries with specific pattern

Hi all, I have following sample input file which is a part of big file: ID AINX_HUMAN Reviewed; 499 AA. AC Q16352; B1AQK0; Q9BRC5; DT 30-MAY-2000, integrated into UniProtKB/Swiss-Prot. DT 23-JAN-2002, sequence version 2. DT 28-NOV-2012, entry version 123.... (2 Replies)
Discussion started by: kareena
2 Replies

10. UNIX for Beginners Questions & Answers

How to fetch specific data from a file.?

Hi , I have a file which contains 2 days logs(here it is 24 and 25) I want to list data only for date 25 fron the file. please suggest me how should i get this. file content mentioned below 17-05-24 Name Succ Fail 00:00:29 ... (5 Replies)
Discussion started by: scriptor
5 Replies
mlib_SignalReSampleFIRInit_S16_S16(3MLIB)		    mediaLib Library Functions			 mlib_SignalReSampleFIRInit_S16_S16(3MLIB)

NAME
mlib_SignalReSampleFIRInit_S16_S16, mlib_SignalReSampleFIRInit_S16S_S16S, mlib_SignalReSampleFIRInit_F32_F32, mlib_SignalReSample- FIRInit_F32S_F32S - initialization for resampling with filtering SYNOPSIS
cc [ flag... ] file... -lmlib [ library... ] #include <mlib.h> mlib_status mlib_SignalReSampleFIRInit_S16_S16(void **state, const mlib_f32 *flt, mlib_s32 tap, mlib_s32 ufactor, mlib_s32 uphase, mlib_s32 dfactor, mlib_s32 dphase); mlib_status mlib_SignalReSampleFIRInit_S16S_S16S(void **state, const mlib_f32 *flt, mlib_s32 tap, mlib_s32 ufactor, mlib_s32 uphase, mlib_s32 dfactor, mlib_s32 dphase); mlib_status mlib_SignalReSampleFIRInit_F32_F32(void **state, const mlib_f32 *flt, mlib_s32 tap, mlib_s32 ufactor, mlib_s32 uphase, mlib_s32 dfactor, mlib_s32 dphase); mlib_status mlib_SignalReSampleFIRInit_F32S_F32S(void **state, const mlib_f32 *flt, mlib_s32 tap, mlib_s32 ufactor, mlib_s32 uphase, mlib_s32 dfactor, mlib_s32 dphase); DESCRIPTION
Each of these functions allocates memory for the internal state structure and converts the parameters into an internal representation for rational sample rate conversion with FIR filtering between upsampling and downsampling. PARAMETERS
Each of the functions takes the following arguments: state Internal state structure. flt Filter coefficient array, two-channel interleaved in the cases of stereo. tap Taps of the filter. ufactor Factor by which to upsample. uphase Phase in upsampling. 0 <= uphase < ufactor. dfactor Factor by which to downsample. dphase Phase in downsampling. 0 <= dphase < dfactor. RETURN VALUES
Each of the functions returns MLIB_SUCCESS if successful. Otherwise it returns MLIB_FAILURE. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Committed | +-----------------------------+-----------------------------+ |MT-Level |MT-Safe | +-----------------------------+-----------------------------+ SEE ALSO
mlib_SignalReSampleFIR_S16_S16_Sat(3MLIB), mlib_SignalReSampleFIR_F32_F32(3MLIB), mlib_SignalReSampleFIRFree_S16_S16(3MLIB), mlib_SignalRe- SampleFIRFree_F32_F32(3MLIB), attributes(5) SunOS 5.11 2 Mar 2007 mlib_SignalReSampleFIRInit_S16_S16(3MLIB)
All times are GMT -4. The time now is 01:55 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy