Retreive data with arrangement


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Retreive data with arrangement
# 1  
Old 01-25-2013
Retreive data with arrangement

Hi all


I have following part of a big file

Code:
TTDS00002	Synonyms	M1 receptor
TTDS00002	Disease	Alzheimer's disease
TTDS00002	Disease	Bronchospasm (histamine induced)
TTDS00002	Disease	Cognitive deficits
TTDS00002	Disease	Schizophrenia
TTDS00002	Function	The muscarinic acetylcholine receptor mediates various cellular responses, including inhibition of adenylate cyclase, breakdown of phosphoinositides and modulation of potassium channels through the action of G proteins.
TTDS00002	Sequence	MNTSAPPAVSPNITVLAPGKGPWQVAFIGITTGLLSLATVTGNLLVLISFKVNTELKTVNNYFLLSLACADLIIGTFSMNLYTTYLLMGHWALGTLACDLWLALDYVASNASVMNLLLISFDRYFSVTRPLSYRAKRTPRRAALMIGLAWLVSFVLWAPAILFWQYLVGERTVLAGQCYIQFLSQPIITFGTAMAAFYLPVTVMCTLYWRIYRETENRARELAALQGSETPGKGGGSSSSSERSQPGAEGSPETPPGRCCRCCRAPRLLQAYSWKEEEEEDEGSMESLTSSEGEEPGSEVVIKMPMVDPEAQAPTKQPPRSSPNTVKRPTKKGRDRAGKGQKPRGKEQLAKRKTFSLVKEKKAARTLSAILLAFILTWTPYNIMVLVSTFCKDCVPETLWELGYWLCYVNSTINPMCYALCNKAFRDTFRLLLLCRWDKRRWRKIPKRPGSVHRTPSRQC
TTDS00002	BioChemical Class	G-protein coupled receptor (rhodopsin family)
TTDS00002	Pathway	Calcium signaling pathway
TTDS00002	Pathway	Neuroactive ligand-receptor interaction
TTDS00002	Pathway	Regulation of actin cytoskeleton
TTDS00002	Related US Patent	6,288,068
TTDS00002	Related US Patent	6,294,554
TTDS00002	Related US Patent	6,627,645
TTDS00002	Drug(s)	Pirenzepine	DAP000492	Peptic ulcer disease	Approved
TTDS00002	Drug(s)	Glycopyrrolate	DAP001116	Anesthetic	Approved
TTDS00002	Drug(s)	Clidinium	DAP001117	Abdominal/stomach pain	Approved
TTDS00002	Drug(s)	Dicyclomine	DAP001118	Irritable bowel syndrome	Approved
TTDS00002	Drug(s)	Ethopropazine	DAP001119	Parkinson's disease	Approved
TTDS00002	Drug(s)	Cycrimine	DAP001120	Parkinson's disease	Approved
TTDS00002	Drug(s)	Benztropine	DAP001121	Parkinson's disease	Approved
TTDS00002	Drug(s)	Trihexyphenidyl	DAP001122	Parkinson's disease	Approved
TTDS00002	Drug(s)	Propantheline	DAP001123	Excessive sweating (hyperhidrosis)	Approved
TTDS00002	Drug(s)	Oxyphenonium	DAP001124	Spasm	Approved
TTDS00002	Drug(s)	Biperiden	DAP001125	Parkinson's disease	Approved
TTDS00002	Antagonist	Pirenzepine	DAP000492
TTDS00002	Antagonist	Glycopyrrolate	DAP001116
TTDS00002	Antagonist	Clidinium	DAP001117
TTDS00002	Antagonist	Dicyclomine	DAP001118
TTDS00002	Antagonist	Ethopropazine	DAP001119
TTDS00002	Antagonist	Benztropine	DAP001121
TTDS00002	Antagonist	Trihexyphenidyl	DAP001122
TTDS00002	Antagonist	Propantheline	DAP001123
TTDS00002	Antagonist	Oxyphenonium	DAP001124
TTDS00002	Antagonist	Biperiden	DAP001125
TTDS00002	Binder	Cycrimine	DAP001120
TTDS00002	Drug(s)	Talsaclidine isomer	DCL000268	Alzheimer's disease	Discontinued
TTDS00002	Drug(s)	Sabcomeline hydrochloride	DCL000279	Cardiovascular diseases	Phase IIa
TTDS00002	Drug(s)	Talsaclidine fumarate	DCL000303	Alzheimer's disease	Discontinued
TTDS00002	Drug(s)	Xanomeline tartrate	DCL000328	Alzheimer's disease	Phase II
TTDS00002	Drug(s)	GSK573719	DCL000381	Chronic Obstructive Pulmonary Disease (COPD)	Phase II
TTDS00002	Drug(s)	GSK961081	DCL000397	Chronic Obstructive Pulmonary Disease (COPD)	Phase II completed
TTDS00002	Drug(s)	GSK1034702	DCL000402	Schizophrenia, Dementia	Phase I completed
TTDS00002	Drug(s)	Darotropium	DCL000514	COPD	Suspended in Phase II in GSK 2009 Report
TTDS00002	Drug(s)	Darotropium + 642444	DCL000515	COPD	Phase III
TTDS00002	Drug(s)	Revatropate	DCL000957	Chronic obstructive pulmonary disease	Discontinued in Phase I
TTDS00002	Antagonist	Revatropate	DCL000957
TTDS00002	Agonist	Talsaclidine isomer	DCL000268
TTDS00002	Agonist	Sabcomeline hydrochloride	DCL000279
TTDS00002	Agonist	Talsaclidine fumarate	DCL000303
TTDS00002	Agonist	Xanomeline tartrate	DCL000328
TTDS00002	Agonist	GSK573719	DCL000381
TTDS00002	Agonist	GSK961081	DCL000397
TTDS00002	Agonist	GSK1034702	DCL000402
TTDS00002	Agonist	Darotropium	DCL000514
TTDS00002	Agonist	Darotropium + 642444	DCL000515
TTDS00002	Multitarget	GSK961081	DCL000397
TTDS00002	Multitarget	Revatropate	DCL000957
TTDS00002	Agonist	77-LH-28-1	DNC000099
TTDS00002	Agonist	AC-260584	DNC000137
TTDS00002	Agonist	AC-42	DNC000138
TTDS00002	Agonist	AF150(S)	DNC000165
TTDS00002	Agonist	AF267B	DNC000166
TTDS00002	Agonist	LY-593039	DNC000910
TTDS00002	Agonist	NGX-267	DNC001012
TTDS00002	Agonist	Sabcomeline	DNC001264
TTDS00002	Agonist	WAY-132983	DNC001510
TTDS00002	Inhibitor	Arecoline	DNC002508
TTDS00002	Inhibitor	Acetic acid 8-aza-bicyclo[3.2.1]oct-6-yl ester	DNC003640
TTDS00002	Inhibitor	Benzoic acid 8-aza-bicyclo[3.2.1]oct-6-yl ester	DNC003654
TTDS00002	Inhibitor	Propionic acid 8-aza-bicyclo[3.2.1]oct-6-yl ester	DNC003659
TTDS00002	Inhibitor	3-Methyl-7-pyrrolidin-1-yl-hept-5-yn-2-one	DNC004147
TTDS00002	Inhibitor	2-Methyl-6-pyrrolidin-1-yl-hex-4-ynal oxime	DNC004159
TTDS00002	Inhibitor	ISOCLOZAPINE	DNC004166
TTDS00002	Inhibitor	SB-202026	DNC004272
TTDS00002	Inhibitor	HIMBACINE	DNC004995
TTDS00002	Inhibitor	RR(17)PZ	DNC005944
TTDS00002	Inhibitor	Bo(15)PZ	DNC005945
TTDS00002	Inhibitor	DIFLUOROBENZTROPINE	DNC005986
TTDS00002	Inhibitor	BI-1356	DNC007901
TTDS00002	Inhibitor	FM1-10	DNC008187
TTDS00002	Inhibitor	FM1-43	DNC008188
TTDS00002	Inhibitor	A-987306	DNC008996
TTDS00002	Inhibitor	GNF-PF-5618	DNC009476
TTDS00002	Inhibitor	CREMASTRINE	DNC009504
TTDS00002	Inhibitor	1,1-diphenyl-2-(3-tropanyl)ethanol	DNC009866
TTDS00002	Inhibitor	R-dimethindene	DNC009877
TTDS00002	Inhibitor	Tiotropium Bromide	DNC009882
TTDS00002	Inhibitor	XANOMELINE	DNC011170
TTDS00002	Inhibitor	4-(4-butylpiperidin-1-yl)-1-o-tolylbutan-1-one	DNC011171
TTDS00002	Inhibitor	1-Methyl-1-(4-pyrrolidin-1-yl-but-2-ynyl)-urea	DNC011427
TTDS00002	Inhibitor	ISOLOXAPINE	DNC011498
TTDS00002	Inhibitor	1'-Benzyl-3-phenyl-[3,4']bipiperidinyl-2,6-dione	DNC011500
TTDS00002	Inhibitor	CARAMIPEN	DNC011755
TTDS00002	Inhibitor	FLUMEZAPINE	DNC011857
TTDS00002	Inhibitor	AMINOBENZTROPINE	DNC011950
TTDS00002	Inhibitor	2-(4-Diethylamino-but-2-ynyl)-isoindole-1,3-dione	DNC012005
TTDS00002	Inhibitor	3-Tetrazol-2-yl-1-aza-bicyclo[2.2.2]octane	DNC012098
TTDS00002	Inhibitor	SULFOARECOLINE	DNC012122
TTDS00002	Inhibitor	6-Dimethylamino-2-methyl-hex-4-ynal oxime	DNC012306
TTDS00002	Inhibitor	7-Pyrrolidin-1-yl-hept-5-yn-2-one	DNC012322
TTDS00002	Inhibitor	7-Dimethylamino-3-methyl-hept-5-yn-2-one	DNC012323
TTDS00002	Inhibitor	7-Pyrrolidin-1-yl-hept-5-yn-2-one oxime	DNC012330
TTDS00002	Inhibitor	7-Dimethylamino-hept-5-yn-2-one	DNC012350
TTDS00002	Inhibitor	7-Dimethylamino-hept-5-yn-2-one oxime	DNC012351
TTDS00002	Inhibitor	N-(4-Dimethylamino-but-2-ynyl)-N-methyl-acetamide	DNC012363
TTDS00002	Inhibitor	ACECLIDINE	DNC012502
TTDS00002	Inhibitor	N-methoxyquinuclidine-3-carboximidoyl fluoride	DNC012588
TTDS00002	Inhibitor	BRL-55473	DNC012594
TTDS00002	Inhibitor	N-methoxyquinuclidine-3-carboximidoyl chloride	DNC012616
TTDS00002	Inhibitor	2,8-Dimethyl-1-oxa-8-aza-spiro[4.5]decan-3-one	DNC012765
TTDS00002	Inhibitor	3alpha-(bis-chloro-phenylmethoxy)tropane	DNC013136
TTDS00002	Inhibitor	3-(3-benzylamino)-piperidin-2-one	DNC013219
TTDS00002	Target Validation	TTDS00002

I have to retreive following data and arrange in following columns
Code:
Target               Drug                 Drug ID          Disease                  Action
M1 receptor     Pirenzepine       DAP000492   Peptic ulcer disease   Antagonist

and if disease name is not given it should be blank like this:
Code:
M1 receptor    ISOCLOZAPINE    DNC004166                               Antagonist

Kindly let me know the scripting regarding this.
# 2  
Old 01-25-2013
I do not see how this information are connected together.
Hot do you read the file and how to select the parameters.
# 3  
Old 01-25-2013
welcome back Manigrover and Priyanka_Chopra.. so this is your new id'a ?

https://www.unix.com/shell-programmin...rent-file.html

https://www.unix.com/shell-programmin...c-entries.html
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Data re-arrangement

Hi I have a huge problem to solve ASAP. Can someone please help!!! My format is arranged in this format: It has three columns. LOGIN ALIAS REC_ID A BB1 0 A ... (1 Reply)
Discussion started by: Mapilo
1 Replies

2. Shell Programming and Scripting

Help with data re-arrangement problem facing

Input file: <symbol>Q9Y8G1</symbol> <name>Q9Y8G1_EMENI</name> <symbol>Q6V953</symbol> <symbol>Q5B8K1</symbol> <name>Q6V953_EMENI</name> <symbol>G1A416</symbol> <name>G1A416_9FUNG</name> <symbol>D4N894</symbol> <name>D4N894_PLEER</name> <symbol>B0FFU4</symbol>... (13 Replies)
Discussion started by: cpp_beginner
13 Replies

3. Shell Programming and Scripting

Help to data re-arrangement problem

Input file <data id>="1">\ </data>\ <data id>="2">\ </data>\ <code>="1" target="2">\ </code>\ <data id>="1">\ </data>\ <data id>="2">\ </data>\ <code>="1" target="2">\ </code>\ <data id>="1">\ </data>\ <data id>="2">\ </data>\ <code>="1" target="2">\ </code>\ (2 Replies)
Discussion started by: cpp_beginner
2 Replies

4. Shell Programming and Scripting

Re-arrangement of data

Dear Frineds, I have a flat file as follows ABCD ABDCWQE POIERAS ADSGASGFG GHJKFHD XBDFGHFGDH POIU IJPFG AFGJFPGOU A;DGUPGU SFSDFDSDFHDSF SDFGHSFDH I want this column to be converted into row like follows ABCD, ABDCWQE, POIERAS, ADSGASGFG, GHJKFHD, XBDFGHFGDH (6 Replies)
Discussion started by: anushree.a
6 Replies

5. Shell Programming and Scripting

how to retreive a block of data from the file

Hi I am running a 'grep' command to retrieve a line from the file. The problem is that I also need 21 lines which go right after the line I just 'grep'(ed) Is there a way to retrieve this block of data? Thanks -A (4 Replies)
Discussion started by: aoussenko
4 Replies

6. Shell Programming and Scripting

how to retreive a block of data from the file

Hi I have a several thousands lines text file. Is there any command(s), which would allow me to retreive a block of data between two specified lines of this file? Thanks a lot -A (2 Replies)
Discussion started by: aoussenko
2 Replies

7. UNIX for Dummies Questions & Answers

Help on file arrangement

Can anyone help me on this. I have a file that looks like this: color red green blue color pink yellow number one two gender male gender female The output would look like this: color red green blue pink yellow number one two gender male female I have over 5000 rows and i dont want... (5 Replies)
Discussion started by: kharen11
5 Replies

8. UNIX for Dummies Questions & Answers

Data arrangement

10 2 1 2 3 4 5 6 7 8 20 3 2 1 3 2 9 8 2 1 Need the data to be arranged: 10 2 1 5 2 6 3 7 4 8 20 3 2 1 1 2 3 8 2 9 please help! (6 Replies)
Discussion started by: bobo
6 Replies

9. UNIX for Dummies Questions & Answers

Cell arrangement

I have a data file with hundreds of lines: I want to place a YES right below the line that say mydata....can someone please help! on the left is my the original data on the right the data format need to be: left > Right mydata > mydata yes > yesno > no mydata > mydata... (12 Replies)
Discussion started by: bobo
12 Replies

10. UNIX for Dummies Questions & Answers

Data arrangement

I have these following data: Home Tom Member List 100 Yes 200 No Home Tom Member List 1 No 2 Yes Home Tome Member List 3 No 400 Yes I want my data to be consistants like this: (4 Replies)
Discussion started by: bobo
4 Replies
Login or Register to Ask a Question

Featured Tech Videos