The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.
|
 |
|
Dev Shed Forums
> Programming Languages
> Perl Programming
|
Word matching and write other data
Discuss Word matching and write other data in the Perl Programming forum on Dev Shed. Word matching and write other data Perl Programming forum discussing coding in Perl, utilizing Perl modules, and other Perl-related topics. Perl, the Practical Extraction and Reporting Language, is the choice for many for parsing textual information.
|
|
 |
|
|
|
|

Dev Shed Forums Sponsor:
|
|
|

August 10th, 2012, 12:19 AM
|
|
Contributing User
|
|
Join Date: May 2012
Posts: 60
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:
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.
|
Developer Shed Advertisers and Affiliates
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|