Perl Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming LanguagesPerl Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old August 10th, 2012, 12:19 AM
manigrover manigrover is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2012
Posts: 60 manigrover User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 10 h 42 m 3 sec
Reputation Power: 2
Word matching and write other data

Hi all,

I have 7 words


Code:

Quote:
CAD
CD
HT
RA
T1D
T2D
BD


Now I have 1 file which contain data in large number of rows and columns

from 2 nd column onwards it contain any of these 7 words or may be more than one words among above 7 words:


these 7 names are present in starting from 2nd column

means the file contain any of these 7 words in coulmns 2,3,4,5,6,7,89,10...

It's a big file in terms of columns not rows.

our input is


Code:

Quote:
CYP1B1 (PA27094) paclitaxel (PA450761) RA (PA27094) docetaxel (PA449383) RA (PA27094) RA (PA27094) capecitabine (PA448771);cisplatin (PA449014);docetaxel (PA449383);epirubicin (PA449476);gemcitabine (PA449748) RA (PA27094) capecitabine (PA448771);cisplatin (PA449014);docetaxel (PA449383);epirubicin (PA449476);gemcitabine (PA449748) RA
HLA-DRA (PA35071) T1D,T1D,T1D,T1D,T1D,T1D,T1D,T1D,T1D,T1D,T1D,RA,RA,RA,RA,RA,RA,RA,RA,RA,RA,RA,RA,RA
ESR1 (PA156) T2D,BD (PA156) conjugated estrogens (PA164754789);medroxyprogesterone (PA450344) T2D,BD (PA156) Alkylating Agents (PA164712331);cisplatin (PA449014) T2D,BD (PA156) tamoxifen (PA451581) T2D,BD
HTR1A (PA192) paroxetine (PA450801);sertraline (PA451333) CAD,CD (PA192) antidepressants (PA452229) CAD,CD (PA192) antidepressants (PA452229) CAD,CD
HTR1B (PA29549) paroxetine (PA450801) CD (PA29549) clomipramine (PA449048);liothyronine (PA164778866);Lithium (PA164712869);nefazodone (PA450603);venlafaxine (PA451866) CD
CHST3 (PA26503) docetaxel (PA449383);thalidomide (PA451644) T2D,T2D (PA26503) docetaxel (PA449383);thalidomide (PA451644) T2D,T2D (PA26503) docetaxel (PA449383);thalidomide (PA451644) T2D,T2D
HTR6 (PA29560) atorvastatin (PA448500);pravastatin (PA451089);simvastatin (PA451363) T1D
HTR7 (PA29561) atorvastatin (PA448500);pravastatin (PA451089);simvastatin (PA451363) HT,HT (PA29561) atorvastatin (PA448500);pravastatin (PA451089);simvastatin (PA451363) HT,HT (PA29561) atorvastatin (PA448500);pravastatin (PA451089);simvastatin (PA451363) HT,HT
ALDH3A1 (PA24697) carboplatin (PA448803);cyclophosphamide (PA449165);thiotepa (PA451668) BD,BD
ALDH3A2 (PA24698),SLC47A2 (PA162403847) BD,BD
DRD1 (PA147) bupropion (PA448687);nicotine (PA450626) HT,HT,HT,HT (PA147) HT,HT,HT,HT (PA147) HT,HT,HT,HT (PA147) drotrecogin alfa (PA131548935) HT,HT,HT,HT
NCF4 (PA31465) doxorubicin (PA449412) RA



I want the output shuld be 7 files with separate data for HT, T1D,T2D onwards

For eg RA file will surely contain in output


Code:

Quote:
CYP1B1 (PA27094) paclitaxel (PA450761) (PA27094) docetaxel (PA449383) capecitabine (PA448771);cisplatin (PA449014);docetaxel (PA449383);epirubicin (PA449476);gemcitabine (PA449748) capecitabine (PA448771);cisplatin (PA449014);docetaxel (PA449383);epirubicin (PA449476);gemcitabine (PA449748)



and other more entires in the same way for other 6 output files.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPerl Programming > Word matching and write other data

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap