CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner:
Request to change Perl code according to desired output

 



manigrover
Novice

Sep 13, 2013, 8:54 AM

Post #1 of 42 (964 views)
Request to change Perl code according to desired output Can't Post

Hi all,

I have an input file like this (it;s a small part of huge file)

Quote:
TTDS00002 UniProt ID P11229
TTDS00002 Name Muscarinic acetylcholine receptor M1
TTDS00002 Type of target Successful target
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 MNTSAPPAVSPNITVLAPGKGPWQVAFIGITTGLLSLATVTGNLLVLISFKVNTELKTVNNYFLLSLACADLIIGTFSMNLYTTYLLMGHWALGTLACDL WLALDYVASNASVMNLLLISFDRYFSVTRPLSYRAKRTPRRAALMIGLAWLVSFVLWAPAILFWQYLVGERTVLAGQCYIQFLSQPIITFGTAMAAFYLP VTVMCTLYWRIYRETENRARELAALQGSETPGKGGGSSSSSERSQPGAEGSPETPPGRCCRCCRAPRLLQAYSWKEEEEEDEGSMESLTSSEGEEPGSEV VIKMPMVDPEAQAPTKQPPRSSPNTVKRPTKKGRDRAGKGQKPRGKEQLAKRKTFSLVKEKKAARTLSAILLAFILTWTPYNIMVLVSTFCKDCVPETLW ELGYWLCYVNSTINPMCYALCNKAFRDTFRLLLLCRWDKRRWRKIPKRPGSVHRTPSRQC
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
TTDS00003 UniProt ID P08172
TTDS00003 Name Muscarinic acetylcholine receptor M2
TTDS00003 Type of target Successful target


My expected out put is :

Quote:
P11229 Pirenzepine DAP000492 Peptic ulcer disease Approved
P11229 Glycopyrrolate DAP001116 Anesthetic Approved
P11229 Clidinium DAP001117 Abdominal stomach pain Approved
P11229 Dicyclomine DAP001118 Irritable bowel syndrome Approved
P11229 Ethopropazine DAP001119 Parkinson's disease Approved
P11229 Cycrimine DAP001120 Parkinson's disease Approved
P11229 Benztropine DAP001121 Parkinson's disease Approved
P11229 Trihexyphenidyl DAP001122 Parkinson's disease Approved
P11229 Propantheline DAP001123 Excessive sweating (hyperhidrosis) Approved
P11229 Oxyphenonium DAP001124 Spasm Approved
P11229 Biperiden DAP001125 Parkinson's disease Approved
P11229 Talsaclidine isomer DCL000268 Alzheimer's disease Discontinued
P11229 Sabcomeline hydrochloride DCL000279 Cardiovascular diseases Phase IIa
P11229 Talsaclidine fumarate DCL000303 Alzheimer's disease Discontinued
P11229 Xanomeline tartrate DCL000328 Alzheimer's disease Phase II
P11229 GSK573719 DCL000381 Chronic Obstructive Pulmonary Disease (COPD) Phase II
P11229 GSK961081 DCL000397 Chronic Obstructive Pulmonary Disease (COPD) Phase II completed
P11229 GSK1034702 DCL000402 Schizophrenia, Dementia Phase I completed
P11229 Darotropium DCL000514 COPD Suspended in Phase II in GSK 2009 Report
P11229 Darotropium + 642444 DCL000515 COPD Phase III
P11229 Revatropate DCL000957 Chronic obstructive pulmonary disease Discontinued in Phase I
P11229 Trospium DAP000342
P11229 Hyoscyamine DAP001108
P11229 Methantheline DAP001109
P11229 Procyclidine DAP001110
P11229 Cyclopentolate DAP001111
P11229 Ipratropium DAP001112
P11229 Flavoxate DAP001114
P11229 Mepenzolate DAP001115
P11229 Ispaghula DAP001486
P11229 Mebeverine DAP001494
P11229 Trihexyphenidyl HCl DAP001532
P11229 Bethanechol DAP000263
P11229 Pilocarpine DAP001113
P11229 Oxyphencyclimine DAP000835
P11229 Tridihexethyl DAP000836
P11229 Anisotropine Methylbromide DAP000837
P11229 Aclidinium bromide DCL000677 Chronic obstructive pulmonary disease Phase III
P11229 CHF 5407 DCL000750 Chronic obstructive pulmonary disease Phase I
P11229 GSK233705 DCL000823 Chronic obstructive pulmonary disease Phase II completed
P11229 NVA237 DCL000901 Chronic obstructive pulmonary disease Phase III
P11229 Org-23366 DCL000911 Schizophrenia No development reported
P11229 OrM3 DCL000913 Chronic obstructive pulmonary disease Phase IIb
P11229 Aclidinium bromide DCL000677
P11229 CHF 5407 DCL000750
P11229 GSK233705 DCL000823
P11229 NVA237 DCL000901
P11229 Org-23366 DCL000911
P11229 OrM3 DCL000913
P11229 Org-23366 DCL000911
P11229 Aprophen DNC000245
P11229 Benactyzine DNC000293
P11229 Hyoscine DNC000757
P11229 Hyoscyamine sulfate DNC000758
P11229 Ipratropium bromide DNC000806
P11229 Muscarine DNC000970
P11229 RS 86 DNC001236



I am using this perl script

Quote:
#!/usr/bin/perl -w

use strict;

if ($#ARGV < 1) {
print "Usage: $0 input_file output_file\n";
exit 0;
}

my $input_file = $ARGV[0];
my $output_file = $ARGV[1];

my $prev_ttds_num = '';
my @diseases = ();
my $drug_name = '';

open my $IFH, '<', $input_file or die "$!\n";
open my $OFH, '>', $output_file or die "$!\n";

while (my $line = <$IFH>) {
chomp $line;
next if $line eq '';
my @array = split /\t/, $line;

my $ttds_num = shift @array;
my $rec_type = shift @array;

if ($ttds_num ne $prev_ttds_num) {
if ($prev_ttds_num ne '') {
dump_data($OFH, $drug_name, \@diseases);
}
$prev_ttds_num = $ttds_num;
@diseases = ();
$drug_name = '';
}

if ($rec_type eq 'Name') {
$drug_name = shift @array;
}
elsif ($rec_type eq 'Drug(s)') {
my $part_record = join("\t", @array);
push @diseases, $part_record;
}
}

dump_data($OFH, $drug_name, \@diseases);
close $OFH;
close $IFH;

print "Done\n";
exit 0;

######################################################################
# #
# S U B R O U T I N E S #
# #
######################################################################

##
# @brief Routine to dump out multiple records
# @param FH - A file handle to write data out
# @param drug_name - The name of the drug
# @param disease_ref - An array references to list of disease data
# @return undef
#
sub dump_data {
my ($FH, $drug_name, $disease_ref) = @_;
return if ($drug_name eq '');

foreach my $disease (@{ $disease_ref }) {
print ${FH} "$drug_name\t$disease\n";
}

return;
}


But my output is

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



Kindly help regarding changes in perl script to get desired output.

Mani

Quote


Quote


FishMonger
Veteran / Moderator

Sep 13, 2013, 9:41 AM

Post #2 of 42 (957 views)
Re: [manigrover] Request to change Perl code according to desired output [In reply to] Can't Post

You have a number of items in your desired output which are not in your sample input, so it's difficult for me to determine which sections need to be extracted.

Please provide more details on your parsing algorithm so I can help you with the perl code to handle that algorithm.


(This post was edited by FishMonger on Sep 13, 2013, 9:42 AM)


manigrover
Novice

Sep 13, 2013, 10:10 AM

Post #3 of 42 (951 views)
Re: [FishMonger] Request to change Perl code according to desired output [In reply to] Can't Post

Thanks for reply.

Sorry, I changed my desired output now, it was having some
extra details. my DESIRED OUT PUT IS FOLLOWING

P11229 Pirenzepine DAP000492 Peptic ulcer disease Approved
P11229 Glycopyrrolate DAP001116 Anesthetic Approved
P11229 Clidinium DAP001117 Abdominal stomach pain Approved
P11229 Dicyclomine DAP001118 Irritable bowel syndrome Approved
P11229 Ethopropazine DAP001119 Parkinson's disease Approved
P11229 Cycrimine DAP001120 Parkinson's disease Approved
P11229 Benztropine DAP001121 Parkinson's disease Approved
P11229 Trihexyphenidyl DAP001122 Parkinson's disease Approved
P11229 Propantheline DAP001123 Excessive sweating (hyperhidrosis) Approved
P11229 Oxyphenonium DAP001124 Spasm Approved
P11229 Biperiden DAP001125 Parkinson's disease Approved
P11229 Pirenzepine DAP000492
P11229 Glycopyrrolate DAP001116
P11229 Clidinium DAP001117
P11229 Dicyclomine DAP001118
P11229 Ethopropazine DAP001119
P11229 Benztropine DAP001121
P11229 Trihexyphenidyl DAP001122
P11229 Propantheline DAP001123
P11229 Oxyphenonium DAP001124
P11229 Biperiden DAP001125
P11229 Cycrimine DAP001120
P11229 Talsaclidine isomer DCL000268 Alzheimer's disease Discontinued
P11229 Sabcomeline hydrochloride DCL000279 Cardiovascular diseases Phase IIa
P11229 Talsaclidine fumarate DCL000303 Alzheimer's disease Discontinued
P11229 Xanomeline tartrate DCL000328 Alzheimer's disease Phase II
P11229 GSK573719 DCL000381 Chronic Obstructive Pulmonary Disease (COPD) Phase II
P11229 GSK961081 DCL000397 Chronic Obstructive Pulmonary Disease (COPD) Phase II completed
P11229 GSK1034702 DCL000402 Schizophrenia, Dementia Phase I completed
P11229 Darotropium DCL000514 COPD Suspended in Phase II in GSK 2009 Report
P11229 Darotropium + 642444 DCL000515 COPD Phase III
P11229 Revatropate DCL000957 Chronic obstructive pulmonary disease Discontinued in Phase I
P11229 Revatropate DCL000957
P11229 Talsaclidine isomer DCL000268
P11229 Sabcomeline hydrochloride DCL000279
P11229 Talsaclidine fumarate DCL000303
P11229 Xanomeline tartrate DCL000328
P11229 GSK573719 DCL000381
P11229 GSK961081 DCL000397
P11229 GSK1034702 DCL000402
P11229 Darotropium DCL000514
P11229 Darotropium + 642444 DCL000515
P11229 GSK961081 DCL000397
P11229 Revatropate DCL000957
P11229 77-LH-28-1 DNC000099
P11229 AC-260584 DNC000137
P11229 AC-42 DNC000138
P11229 AF150(S) DNC000165
P11229 AF267B DNC000166
P11229 LY-593039 DNC000910
P11229 NGX-267 DNC001012
P11229 Sabcomeline DNC001264
P11229 WAY-132983 DNC001510
P11229 Arecoline DNC002508
P11229 Acetic acid 8-aza-bicyclo[3.2.1]oct-6-yl ester DNC003640
P11229 Benzoic acid 8-aza-bicyclo[3.2.1]oct-6-yl ester DNC003654
P11229 Propionic acid 8-aza-bicyclo[3.2.1]oct-6-yl ester DNC003659
P11229 3-Methyl-7-pyrrolidin-1-yl-hept-5-yn-2-one DNC004147
P11229 2-Methyl-6-pyrrolidin-1-yl-hex-4-ynal oxime DNC004159
P11229 ISOCLOZAPINE DNC004166
P11229 SB-202026 DNC004272
P11229 HIMBACINE DNC004995
P11229 RR(17)PZ DNC005944
P11229 Bo(15)PZ DNC005945
P11229 DIFLUOROBENZTROPINE DNC005986
P11229 BI-1356 DNC007901
P11229 FM1-10 DNC008187
P11229 FM1-43 DNC008188
P11229 A-987306 DNC008996
P11229 GNF-PF-5618 DNC009476
P11229 CREMASTRINE DNC009504
P11229 1,1-diphenyl-2-(3-tropanyl)ethanol DNC009866
P11229 R-dimethindene DNC009877
P11229 Tiotropium Bromide DNC009882
P11229 XANOMELINE DNC011170
P11229 4-(4-butylpiperidin-1-yl)-1-o-tolylbutan-1-one DNC011171
P11229 1-Methyl-1-(4-pyrrolidin-1-yl-but-2-ynyl)-urea DNC011427
P11229 ISOLOXAPINE DNC011498
P11229 1'-Benzyl-3-phenyl-[3,4']bipiperidinyl-2,6-dione DNC011500
P11229 CARAMIPEN DNC011755
P11229 FLUMEZAPINE DNC011857
P11229 AMINOBENZTROPINE DNC011950
P11229 2-(4-Diethylamino-but-2-ynyl)-isoindole-1,3-dione DNC012005
P11229 3-Tetrazol-2-yl-1-aza-bicyclo[2.2.2]octane DNC012098
P11229 SULFOARECOLINE DNC012122
P11229 6-Dimethylamino-2-methyl-hex-4-ynal oxime DNC012306
P11229 7-Pyrrolidin-1-yl-hept-5-yn-2-one DNC012322
P11229 7-Dimethylamino-3-methyl-hept-5-yn-2-one DNC012323
P11229 7-Pyrrolidin-1-yl-hept-5-yn-2-one oxime DNC012330
P11229 7-Dimethylamino-hept-5-yn-2-one DNC012350
P11229 7-Dimethylamino-hept-5-yn-2-one oxime DNC012351
P11229 N-(4-Dimethylamino-but-2-ynyl)-N-methyl-acetamide DNC012363
P11229 ACECLIDINE DNC012502
P11229 N-methoxyquinuclidine-3-carboximidoyl fluoride DNC012588
P11229 BRL-55473 DNC012594
P11229 N-methoxyquinuclidine-3-carboximidoyl chloride DNC012616
P11229 2,8-Dimethyl-1-oxa-8-aza-spiro[4.5]decan-3-one DNC012765
P11229 3alpha-(bis-chloro-phenylmethoxy)tropane DNC013136
P11229 3-(3-benzylamino)-piperidin-2-one DNC013219

Quote

I have to extract all drugs including agonist, antagonist, inhibitor along with the disease named mentioned on the right hand side, if it is there.

Let me know if you need any information.


FishMonger
Veteran / Moderator

Sep 13, 2013, 11:36 AM

Post #4 of 42 (942 views)
Re: [manigrover] Request to change Perl code according to desired output [In reply to] Can't Post

Please edit your posts and surround your data with the "code" tags so that the tab separated field formatting is retained.

Am I correct in assuming that each group of data sets starts with the "UniProt ID" line and ends with the "Target Validation" line and that you only want lines matching Drug(s), Agonist, Antagonist, or Inhibitor in the second field?

What should happen when there are multiple matches, such as with:
TTDS00002 Drug(s) Sabcomeline hydrochloride DCL000279 Cardiovascular diseases Phase IIa
TTDS00002 Agonist Sabcomeline hydrochloride DCL000279
TTDS00002 Agonist Sabcomeline DNC001264


manigrover
Novice

Sep 13, 2013, 1:34 PM

Post #5 of 42 (937 views)
Re: [FishMonger] Request to change Perl code according to desired output [In reply to] Can't Post

Hi

Thanks for reply.

If there are multiple matches like this

TTDS00002 Drug(s) Sabcomeline hydrochloride DCL000279 Cardiovascular diseases Phase IIa
TTDS00002 Agonist Sabcomeline hydrochloride DCL000279
TTDS00002 Agonist Sabcomeline DNC001264

Quote

The desired output is

P11229 Sabcomeline hydrochloride DCL000279 Cardiovascular diseases Phase IIa
P11229 Sabcomeline DNC001264


which is because of the fact that ID on the right hand side DCL 000279 is same.


manigrover
Novice

Sep 13, 2013, 1:37 PM

Post #6 of 42 (936 views)
Re: [manigrover] Request to change Perl code according to desired output [In reply to] Can't Post

But I didn't include it in my desired output so that it will not create more trouble. Laugh


FishMonger
Veteran / Moderator

Sep 13, 2013, 2:18 PM

Post #7 of 42 (934 views)
Re: [manigrover] Request to change Perl code according to desired output [In reply to] Can't Post

Try this:

Code
#!/usr/bin/perl 

use strict;
use warnings;

my $wanted = qr/Drug\(s\)|Antagonist|Agonist|Inhibitor/;
my $ID;
while (my $line = <DATA>) {
if ($line =~ /UniProt ID (\w+)/) {
$ID = $1;
}

next unless $line =~ $wanted;
my ($drug, $diseases) = (split /\s+/, $line, 4)[2,3];
print "$ID $drug $diseases";
}



__DATA__
TTDS00002 UniProt ID P11229
TTDS00002 Name Muscarinic acetylcholine receptor M1
TTDS00002 Type of target Successful target
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 MNTSAPPAVSPNITVLAPGKGPWQVAFIGITTGLLSLATVTGNLLVLISFKVNTELKTVNNYFLLSLACADLIIGTFSMNLYTTYLLMGHWALGTLACDL WLALDYVASNASVMNLLLISFDRYFSVTRPLSYRAKRTPRRAALMIGLAWLVSFVLWAPAILFWQYLVGERTVLAGQCYIQFLSQPIITFGTAMAAFYLP VTVMCTLYWRIYRETENRARELAALQGSETPGKGGGSSSSSERSQPGAEGSPETPPGRCCRCCRAPRLLQAYSWKEEEEEDEGSMESLTSSEGEEPGSEV VIKMPMVDPEAQAPTKQPPRSSPNTVKRPTKKGRDRAGKGQKPRGKEQLAKRKTFSLVKEKKAARTLSAILLAFILTWTPYNIMVLVSTFCKDCVPETLW ELGYWLCYVNSTINPMCYALCNKAFRDTFRLLLLCRWDKRRWRKIPKRPGSVHRTPSRQC
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
TTDS00003 UniProt ID P08172
TTDS00003 Name Muscarinic acetylcholine receptor M2
TTDS00003 Type of target Successful target



manigrover
Novice

Sep 13, 2013, 2:53 PM

Post #8 of 42 (926 views)
Re: [FishMonger] Request to change Perl code according to desired output [In reply to] Can't Post

Hi

I am getting following error

bash-4.1$ perl ttd.pl
Name "main::DATA" used only once: possible typo at ttd.pl line 8.
readline() on unopened filehandle DATA at ttd.pl line 8.

Quote

I am not sure about this. I have created new file named DATA with sample input and my perl file ttd.pl contain described code. But I am getting above error.


FishMonger
Veteran / Moderator

Sep 13, 2013, 3:06 PM

Post #9 of 42 (924 views)
Re: [manigrover] Request to change Perl code according to desired output [In reply to] Can't Post

You don't need to create a DATA file. You need to copy the entire code I posted to your test script, which includes the __DATA__ line and everything below it.

If the results of running that test script gives you what you want, we can then make the slight adjustment it needs to read the data from your actual data file.


manigrover
Novice

Sep 13, 2013, 3:37 PM

Post #10 of 42 (919 views)
Re: [FishMonger] Request to change Perl code according to desired output [In reply to] Can't Post

Thanks for your help. Yes, it is working good. But, matches are still present e.g.

TTDS00002 Drug(s) Sabcomeline hydrochloride DCL000279 Cardiovascular diseases Phase IIa
TTDS00002 Agonist Sabcomeline hydrochloride DCL000279
TTDS00002 Agonist Sabcomeline DNC001264

Quote

is expected as

TTDS00002 Drug(s) Sabcomeline hydrochloride DCL000279 Cardiovascular diseases Phase IIa
TTDS00002 Agonist Sabcomeline DNC001264


And, its showing error while working on actual file.


FishMonger
Veteran / Moderator

Sep 13, 2013, 4:32 PM

Post #11 of 42 (914 views)
Re: [manigrover] Request to change Perl code according to desired output [In reply to] Can't Post

What error is it showing?

Please fix your post as I previously asked you to do so that I can clearly see the field separations.

In order to not output the "TTDS00002 Agonist Sabcomeline hydrochloride DCL000279" line or similar duplicated lines, we'll need to build up a proper data structure and output it after all lines (for that record) are processed. If you have enough RAM, you could process the entire file before outputting the data. Otherwise, you could process the file in chunks and output the data at the end of each chunk/record.


manigrover
Novice

Sep 14, 2013, 10:52 PM

Post #12 of 42 (897 views)
Re: [FishMonger] Request to change Perl code according to desired output [In reply to] Can't Post

Thanks for reply.

I have attached a small part of my actual file. Because actual file is around 4 MB.

Kindly check it.


manigrover
Novice

Sep 14, 2013, 11:00 PM

Post #13 of 42 (895 views)
Re: [manigrover] Request to change Perl code according to desired output [In reply to] Can't Post

Thanks for reply.

I have attached a small part of my actual file. Because actual file is around 4 MB.

Kindly check it.
Attachments: xab.txt.txt (234 KB)


manigrover
Novice

Sep 15, 2013, 10:16 AM

Post #14 of 42 (886 views)
Re: [manigrover] Request to change Perl code according to desired output [In reply to] Can't Post

Kindly help me out about attached file.

In Reply To


manigrover
Novice

Sep 15, 2013, 11:39 AM

Post #15 of 42 (883 views)
Re: [manigrover] Request to change Perl code according to desired output [In reply to] Can't Post

Hi

I have tried to change my code according to the requirement

but its shows following error even on small part of files

Use of uninitialized value $ID in concatenation (.) or string at xaa.pl line 15, <DATA> line 457.
Use of uninitialized value $ID in concatenation (.) or string at xaa.pl line 15, <DATA> line 458.
Use of uninitialized value $ID in concatenation (.) or string at xaa.pl line 15, <DATA> line 459.
Use of uninitialized value $ID in concatenation (.) or string at xaa.pl line 15, <DATA> line 460.
Use of uninitialized value $ID in concatenation (.) or string at xaa.pl line 15, <DATA> line 461.
Use of uninitialized value $ID in concatenation (.) or string at xaa.pl line 15, <DATA> line 462.
Use of uninitialized value $ID in concatenation (.) or string at xaa.pl line 15, <DATA> line 463.
Use of uninitialized value $ID in concatenation (.) or string at xaa.pl line 15, <DATA> line 464.
Use of uninitialized value $ID in concatenation (.) or string at xaa.pl line 15, <DATA> line 465.
Use of uninitialized value $ID in concatenation (.) or string at xaa.pl line 15, <DATA> line 466.

My changed code is:

#!/usr/bin/perl

use strict;
use warnings;

my $wanted = qr/Drug\(s\)|Antagonist|Agonist||Binder|Multitarget|Modulator|Blocker|Inhibitor|Blocker|Antisense/;
my $ID;
while (my $line = <DATA>) {
if ($line =~ /UniProt ID (\w+)/) {
$ID = $1;
}

next unless $line =~ $wanted;
my ($drug, $diseases) = (split /\s+/, $line, 4)[2,3];
print "$ID $drug $diseases";
}


Quote


Kindly guide


Laurent_R
Enthusiast / Moderator

Sep 15, 2013, 2:54 PM

Post #16 of 42 (880 views)
Re: [manigrover] Request to change Perl code according to desired output [In reply to] Can't Post

Hmm, line 15 of your code seems to be this:


Code
print "$ID $drug $diseases";


So one of the three variables $ID, $drug or $diseases has been given no value. Looking at your printed output should tell you which one(s) of the three is (are) missing.

It could be $ID, if /UniProt ID (\w+)/ did not match anything, or it could be $drug or more probably $disease (or both) if this (split /\s+/, $line, 4)[2,3] returned not enough fields. But again, your output should tell you what.

An additional question: do you get these warnings only for the lines shown in your post, or did you just copy a small part of a longer list of warnings?


manigrover
Novice

Sep 15, 2013, 7:26 PM

Post #17 of 42 (871 views)
Re: [Laurent_R] Request to change Perl code according to desired output [In reply to] Can't Post

Thanks fir reply.

I m receiving long list of warnings.

It is ID which is mussing in output.

Kindly advise.

Mani


BillKSmith
Veteran

Sep 15, 2013, 8:14 PM

Post #18 of 42 (870 views)
Re: [manigrover] Request to change Perl code according to desired output [In reply to] Can't Post

Your immediate problem is that your regex for Uniprot does not match anything! It does not specify enough whitespace after ID.

This is probably the least of your problems. You cannot parse this data by splitting on whitespace because many fields contain whitespace. You cannot assume fixed columns because there are many exceptions. We can help with the perl code, but I doubt that we can offer much help in specifying the structure of your data.
Good Luck,
Bill


manigrover
Novice

Sep 15, 2013, 10:00 PM

Post #19 of 42 (864 views)
Re: [BillKSmith] Request to change Perl code according to desired output [In reply to] Can't Post

Thansk for message.

I wanted to know whether any changes are possible in my previous code to add infromation regarding agonist,antagonist, inhibitor etc. as it was extracting only Drug(s) [mentioned in the file]
My previous code is:

Quote:
#!/usr/bin/perl -w

use strict;

if ($#ARGV < 1) {
print "Usage: $0 input_file output_file\n";
exit 0;
}

my $input_file = $ARGV[0];
my $output_file = $ARGV[1];

my $prev_ttds_num = '';
my @diseases = ();
my $drug_name = '';

open my $IFH, '<', $input_file or die "$!\n";
open my $OFH, '>', $output_file or die "$!\n";

while (my $line = <$IFH>) {
chomp $line;
next if $line eq '';
my @array = split /\t/, $line;

my $ttds_num = shift @array;
my $rec_type = shift @array;

if ($ttds_num ne $prev_ttds_num) {
if ($prev_ttds_num ne '') {
dump_data($OFH, $drug_name, \@diseases);
}
$prev_ttds_num = $ttds_num;
@diseases = ();
$drug_name = '';
}

if ($rec_type eq 'Name') {
$drug_name = shift @array;
}
elsif ($rec_type eq 'Drug(s)') {
my $part_record = join("\t", @array);
push @diseases, $part_record;
}
}

dump_data($OFH, $drug_name, \@diseases);
close $OFH;
close $IFH;

print "Done\n";
exit 0;

######################################################################
# #
# S U B R O U T I N E S #
# #
######################################################################

##
# @brief Routine to dump out multiple records
# @param FH - A file handle to write data out
# @param drug_name - The name of the drug
# @param disease_ref - An array references to list of disease data
# @return undef
#
sub dump_data {
my ($FH, $drug_name, $disease_ref) = @_;
return if ($drug_name eq '');

foreach my $disease (@{ $disease_ref }) {
print ${FH} "$drug_name\t$disease\n";
}

return;
}

Quote


BillKSmith
Veteran

Sep 16, 2013, 4:47 AM

Post #20 of 42 (851 views)
Re: [manigrover] Request to change Perl code according to desired output [In reply to] Can't Post

My comments may be in error because I did not find any tabs in your data file. Could you post a copy of your data file with all the tab characters converted to "At" (@) signs.
Good Luck,
Bill


manigrover
Novice

Sep 16, 2013, 5:43 AM

Post #21 of 42 (849 views)
Re: [BillKSmith] Request to change Perl code according to desired output [In reply to] Can't Post

I was able to convert all tab spaces to blank space

Here is example rom my data file after conversion

TTDS00002 UniProt ID P11229
TTDS00002 Name Muscarinic acetylcholine receptor M1
TTDS00002 Type of target Successful target
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
TTDS00003 UniProt ID P08172
TTDS00003 Name Muscarinic acetylcholine receptor M2
TTDS00003 Type of target Successful target
TTDS00003 Synonyms M2 receptor
TTDS00003 Disease Alzheimer's disease
TTDS00003 Disease Analgesics
TTDS00003 Disease Autoimmune cardiomyopathy
TTDS00003 Disease Bronchoconstriction (cold air-induced)
TTDS00003 Disease Chronic obstructive pulmonary disease, unspecified
TTDS00003 Disease Hypothermia
TTDS00003 Disease Neurogenic bladder
TTDS00003 Disease Pain, unspecified
TTDS00003 Disease Tremor, unspecified
TTDS00003 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.
TTDS00003 Sequence MNNSTNSSNNSLALTSPYKTFEVVFIVLVAGSLSLVTIIGNILVMVSIKVNRHLQTVNNYFLFSLACADLIIGVFSMNLYTLYTVIGYWPLGPVVCDLWLALDYVVSNASVMNLLIISFDRYFCVTKPLTYPVKRTTKMAGMMIAAAWVLSFILWAPAILFWQFIVGVRTVEDGECYIQFFSNAAVTFGTAIAAFYLPVIIMTVLYWHISRASKSRIKKDKKEPVANQDPVSPSLVQGRIVKPNNNNMPSSDDGLEHNKIQNGKAPRDPVTENCVQGEEKESSNDSTSVSAVASNMRDDEITQDENTVSTSLGHSKDENSKQTCIRIGTKTPKSDSCTPTNTTVEVVGSSGQNGDEKQNIVARKIVKMTKQPAKKKPPPSREKKVTRTILAILLAFIITWAPYNVMVLINTFCAPCIPNTVWTIGYWLCYINSTINPACYALCNATFKKTFKHLLMCHYKNIGATR
TTDS00003 PDB Structure 1LUB
TTDS00003 BioChemical Class G-protein coupled receptor (rhodopsin family)
TTDS00003 Pathway Calcium signaling pathway
TTDS00003 Pathway Neuroactive ligand-receptor interaction
TTDS00003 Pathway Regulation of actin cytoskeleton
TTDS00003 Related US Patent 6,288,068
TTDS00003 Related US Patent 6,294,554
TTDS00003 Related US Patent 6,498,168
TTDS00003 Related US Patent 6,500,822
TTDS00003 Related US Patent 6,627,644
TTDS00003 Related US Patent 6,635,658
TTDS00003 Related US Patent 6,645,958
TTDS00003 Related US Patent 6,667,301
TTDS00003 Drug(s) Scopolamine DAP000343 Nausea and Addiction Approved
TTDS00003 Drug(s) Methylscopolamine DAP001126 Peptic ulcer disease Approved
TTDS00003 Drug(s) Gallamine Triethiodide DAP001127 Stabilize muscle contractions Approved
TTDS00003 Antagonist Scopolamine DAP000343
TTDS00003 Antagonist Methylscopolamine DAP001126
TTDS00003 Antagonist Gallamine Triethiodide DAP001127
TTDS00003 Antagonist (R)-4-[2-[3-(4-methoxy-benzoylamino)-benzyl]-piperidin-1-ylmethyl]piperidine-1-carboxylic acid amide (Ro-320-6206) DNC000011
TTDS00003 Antagonist AF-DX116 DNC000167
TTDS00003 Agonist CMI-1145 DNC000455

Quote

Let me know if it helps or I have to do something else


BillKSmith
Veteran

Sep 16, 2013, 9:31 AM

Post #22 of 42 (833 views)
Re: [manigrover] Request to change Perl code according to desired output [In reply to] Can't Post

Blanks do not help. In fact, that is what I already had. I recommended @ because it is not used in the file and would not be altered automatically by anything.


Your sample does not appear to contain any of the special cases such as drug names that contain whitespace. Attach a copy of your previous attachment with the tabs replaced by '@'s.
Good Luck,
Bill

(This post was edited by BillKSmith on Sep 16, 2013, 9:41 AM)


manigrover
Novice

Sep 16, 2013, 9:38 AM

Post #23 of 42 (830 views)
Re: [BillKSmith] Request to change Perl code according to desired output [In reply to] Can't Post

Thanks for help.

Could you suggest which command I should use as I never did this. I never replaced tab with characters.

Mani


manigrover
Novice

Sep 16, 2013, 9:53 AM

Post #24 of 42 (828 views)
Re: [manigrover] Request to change Perl code according to desired output [In reply to] Can't Post

I tried many command including this one

sed 's/\t/@/g' input_file

But it's not working

can there be any issue ?



BillKSmith
Veteran

Sep 16, 2013, 11:36 AM

Post #25 of 42 (821 views)
Re: [manigrover] Request to change Perl code according to desired output [In reply to] Can't Post

I would expect that to work. Are you certain that you really have tabs in your file? How do you know?

Use gvim with :set LIST command to view tabs. I am sure you could do the edits here, but I do not know how to specify the tab.

Try the conversion with perl

Code
perl -pe'tr/\t/@/' source_file >dest_file

Good Luck,
Bill


manigrover
Novice

Sep 17, 2013, 7:01 AM

Post #26 of 42 (656 views)
Re: [BillKSmith] Request to change Perl code according to desired output [In reply to] Can't Post

I expect there are tab spaces in my file therefore, I am able to convert tab spaces to blank space as described previously.

And I tried this code but it's still not replacing tab with @

perl -pe'tr/\t/@/' source_file >dest_file

Quote

Mani


BillKSmith
Veteran

Sep 17, 2013, 8:53 AM

Post #27 of 42 (652 views)
Re: [manigrover] Request to change Perl code according to desired output [In reply to] Can't Post

You have demonstrated that the copy of the data file that you are using does not contain any tab characters. If this simple perl program cannot find them your script cannot either. Without unique field separators, your task may be impossible.

It is possible that the tool that you used to extract a sample of the data expanded the tabs. Find a copy of the original file. Back it up! Try the perl one-liner on it. If tabs convert, you can safely edit the converted file.
Good Luck,
Bill


FishMonger
Veteran / Moderator

Sep 17, 2013, 3:14 PM

Post #28 of 42 (642 views)
Re: [BillKSmith] Request to change Perl code according to desired output [In reply to] Can't Post

Converting tabs to @ just so you can then split in the @ char instead of the \t char doesn't make any sense to me.

There are not tab characters in the posted sample data. If you need/want to confirm if your actual source data file is tab separated, then simply use a program that can view it properly.

The od command is very useful in this case.

For example, here's the first 10 lines from the sample xab.txt file that was posted. However, I do see a pattern of 7 spaces, which may have been where tab chars wher converted to spaces.

D:\test>od -c xab.txt

Code
0000000   T   T   D   S   0   0   1   5   0 
0000020 D r u g ( s ) D a l f a m p r
0000040 i d i n e D A P 0 0 1 5 5
0000060 1 I m p r o v i n
0000100 g w a l k i n g i n p a t
0000120 i e n t s w i t h m u l t i
0000140 p l e s c l e r o s i s
0000160 A p p r o v e d \n T T D S 0 0 1
0000200 5 0 B l o c k e r
0000220 G l i b e n c l a m i d e
0000240 D A P 0 0 0 0 3 7 \n T T D S 0
0000260 0 1 5 0 B l o c k
0000300 e r D a l f a m p r i d i n e
0000320 D A P 0 0 1 5 5 1 \n T T D
0000340 S 0 0 1 5 0 A c t
0000360 i v a t o r C r o
0000400 m a k a l i m D N C
0000420 0 0 0 4 8 3 \n T T D S 0 0 1 5 0
0000440 A c t i v a t o r
0000460 L e v c r o m a k
0000500 a l i m D N C 0 0 0 8 7 4
0000520 \n T T D S 0 0 1 5 0
0000540 T a r g e t V a l i d a t i
0000560 o n T T D S 0 0 1
0000600 5 0 \n T T D S 0 0 1 5 3
0000620 U n i P r o t I D
0000640 P 5 5 0 1 1 \n T T D S 0 0
0000660 1 5 3 N a m e
0000700 N a - K - 2 C l c o t r a
0000720 n s p o r t e r \n T T D S 0 0 1
0000740 5 3 T y p e o f
0000760 t a r g e t S u c c e s s
0001000 f u l t a r g e t \n T T D S 0
0001020 0 1 5 3 S y n o n
0001040 y m s B a s o l
0001060 a t e r a l N a - K - C l s
0001100 y m p o r t e r \n
0001111


As you can see, there are no \t (tab) characters in any of those lines.


BillKSmith
Veteran

Sep 17, 2013, 4:13 PM

Post #29 of 42 (639 views)
Re: [FishMonger] Request to change Perl code according to desired output [In reply to] Can't Post

FishMonger,

I suspected that the tabs were expanded either by the OP's editor or network software. Changing them to a printable character would by-pass that problem and allow us to work on his real problem. Of course, a solution would be better, but the workaround still seems reasonable to me.
Good Luck,
Bill


manigrover
Novice

Sep 18, 2013, 12:10 AM

Post #30 of 42 (634 views)
Re: [BillKSmith] Request to change Perl code according to desired output [In reply to] Can't Post

Hi all

I was able to convert tab spaces to @ sign in my actual data file, I got following result ( small part of result file)

TTDS00001 Type of target Successful target@@@@@@@@@
TTDS00001 Synonyms (m)AChR@@@@@@@@@
TTDS00001 Synonyms MAChR@@@@@@@@@
TTDS00001 Disease Alzheimer's disease@@@@@@@@@
TTDS00001 Disease Bronchospasm (histamine induced)@@@@@@@@@
TTDS00001 Disease Glaucoma@@@@@@@@@
TTDS00001 Disease Motion sickness@@@@@@@@@
TTDS00001 Disease Obstructive airway disease@@@@@@@@@
TTDS00001 Disease Organophosphate poisoning@@@@@@@@@
TTDS00001 Disease Schizophrenia@@@@@@@@@
TTDS00001 Disease Urinary incontinence@@@@@@@@@
TTDS00001 Disease Xerostomia@@@@@@@@@
TTDS00001 BioChemical Class G-protein coupled receptor (rhodopsin family)@@@@@@@@@
TTDS00001 Pathway Calcium signaling pathway@@@@@@@@@
TTDS00001 Pathway Neuroactive ligand-receptor interaction@@@@@@@@@
TTDS00001 Pathway Regulation of actin cytoskeleton@@@@@@@@@
TTDS00001 Related US Patent 6@204@@@@@@@@
TTDS00001 Related US Patent 6@194@@@@@@@@
TTDS00001 Related US Patent 6@81@@@@@@@@
TTDS00001 Related US Patent 6@675@@@@@@@@
TTDS00001 Related US Patent 6@842@@@@@@@@
TTDS00001 Related US Patent 6@797@@@@@@@@
TTDS00001 Related US Patent 6@552@@@@@@@@
TTDS00001 Related US Patent 6@812@@@@@@@@
TTDS00001 Related US Patent 6@550@@@@@@@@
TTDS00001 Related US Patent 6@891@@@@@@@@
TTDS00001 Drug(s) Bethanechol DAP000263 Urinary retention Approved@@@@@@@@@
TTDS00001 Drug(s) Trospium DAP000342 Spasm Approved@@@@@@@@@
TTDS00001 Drug(s) Oxyphencyclimine DAP000835 Gastrointestinal disorders Approved@@@@@@@@@
TTDS00001 Drug(s) Tridihexethyl DAP000836 Acquired nystagmus Approved@@@@@@@@@
TTDS00001 Drug(s) Anisotropine Methylbromide DAP000837 Peptic ulcer disease Approved@@@@@@@@@
TTDS00001 Drug(s) Hyoscyamine DAP001108 Gastrointestinal disorders Approved@@@@@@@@@
TTDS00001 Drug(s) Methantheline DAP001109 Irritable bowel syndrome Approved@@@@@@@@@
TTDS00001 Drug(s) Procyclidine DAP001110 Parkinson's disease Approved@@@@@@@@@
TTDS00001 Drug(s) Cyclopentolate DAP001111 Pediatric eye examinations Approved@@@@@@@@@
TTDS00001 Drug(s) Ipratropium DAP001112 Obstructive lung diseases Approved@@@@@@@@@
TTDS00001 Drug(s) Pilocarpine DAP001113 Glaucoma Approved@@@@@@@@@
TTDS00001 Drug(s) Flavoxate DAP001114 Muscle Relaxant Approved@@@@@@@@@
TTDS00001 Drug(s) Mepenzolate DAP001115 Peptic ulcer disease Approved@@@@@@@@@
TTDS00001 Drug(s) Ispaghula DAP001486 Irritable bowel syndrome Approved@@@@@@@@@
TTDS00001 Drug(s) Mebeverine DAP001494 Irritable bowel syndrome Approved@@@@@@@@@
TTDS00001 Drug(s) Trihexyphenidyl HCl DAP001532 Parkinson's Disease Approved@@@@@@@@@
TTDS00001 Antagonist Trospium DAP000342@@@@@@@@@
TTDS00001 Antagonist Hyoscyamine DAP001108@@@@@@@@@
TTDS00001 Antagonist Methantheline DAP001109@@@@@@@@@
TTDS00001 Antagonist Procyclidine DAP001110@@@@@@@@@
TTDS00001 Antagonist Cyclopentolate DAP001111@@@@@@@@@
TTDS00001 Antagonist Ipratropium DAP001112@@@@@@@@@
TTDS00001 Antagonist Flavoxate DAP001114@@@@@@@@@
TTDS00001 Antagonist Mepenzolate DAP001115@@@@@@@@@
TTDS00001 Antagonist Ispaghula DAP001486@@@@@@@@@
TTDS00001 Antagonist Mebeverine DAP001494@@@@@@@@@
TTDS00001 Antagonist Trihexyphenidyl HCl DAP001532@@@@@@@@@
TTDS00001 Agonist Bethanechol DAP000263@@@@@@@@@
TTDS00001 Agonist Pilocarpine DAP001113@@@@@@@@@
TTDS00001 Binder Oxyphencyclimine DAP000835@@@@@@@@@
TTDS00001 Binder Tridihexethyl DAP000836@@@@@@@@@
TTDS00001 Binder Anisotropine Methylbromide DAP000837@@@@@@@@@
TTDS00001 Drug(s) Aclidinium bromide DCL000677 Chronic obstructive pulmonary disease Phase III@@@@@@@@@
TTDS00001 Drug(s) CHF 5407 DCL000750 Chronic obstructive pulmonary disease Phase I@@@@@@@@@
TTDS00001 Drug(s) GSK233705 DCL000823 Chronic obstructive pulmonary disease Phase II completed@@@@@@@@@
TTDS00001 Drug(s) NVA237 DCL000901 Chronic obstructive pulmonary disease Phase III@@@@@@@@@
TTDS00001 Drug(s) Org-23366 DCL000911 Schizophrenia No development reported@@@@@@@@@
TTDS00001 Drug(s) OrM3 DCL000913 Chronic obstructive pulmonary disease Phase IIb@@@@@@@@@
TTDS00001 Antagonist Aclidinium bromide DCL000677@@@@@@@@@
TTDS00001 Antagonist CHF 5407 DCL000750@@@@@@@@@
TTDS00001 Antagonist GSK233705 DCL000823@@@@@@@@@
TTDS00001 Antagonist NVA237 DCL000901@@@@@@@@@
TTDS00001 Antagonist Org-23366 DCL000911@@@@@@@@@
TTDS00001 Antagonist OrM3 DCL000913@@@@@@@@@
TTDS00001 Multitarget Org-23366 DCL000911@@@@@@@@@
TTDS00001 Antagonist Aprophen DNC000245@@@@@@@@@
TTDS00001 Antagonist Benactyzine DNC000293@@@@@@@@@
TTDS00001 Antagonist Hyoscine DNC000757@@@@@@@@@
TTDS00001 Antagonist Hyoscyamine sulfate DNC000758@@@@@@@@@
TTDS00001 Antagonist Ipratropium bromide DNC000806@@@@@@@@@
TTDS00001 Agonist Muscarine DNC000970@@@@@@@@@
TTDS00001 Agonist RS 86 DNC001236@@@@@@@@@
TTDS00001 Target Validation TTDS00001@@@@@@@@@
TTDS00002 UniProt ID P11229@@@@@@@@@
TTDS00002 Name Muscarinic acetylcholine receptor M1@@@@@@@@@
TTDS00002 Type of target Successful target@@@@@@@@@
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@ 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@68@@@@@@@@
TTDS00002 Related US Patent 6@554@@@@@@@@
TTDS00002 Related US Patent 6@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@@@@@@@@@
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@@@@@@@@@
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@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@@@@@@@@@
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@@@@@@@@@
TTDS00002 Inhibitor 3alpha-(bis-chloro-phenylmethoxy)tropane DNC013136@@@@@@@@@
TTDS00002 Inhibitor 3-(3-benzylamino)-piperidin-2-one DNC013219@@@@@@@@@
TTDS00002 Target Validation TTDS00002@@@@@@@@@
TTDS00003 UniProt ID P08172@@@@@@@@@
TTDS00003 Name Muscarinic acetylcholine receptor M2@@@@@@@@@
TTDS00003 Type of target Successful target@@@@@@@@@
TTDS00003 Synonyms M2 receptor@@@@@@@@@
TTDS00003 Disease Alzheimer's disease@@@@@@@@@
TTDS00003 Disease Analgesics@@@@@@@@@
TTDS00003 Disease Autoimmune cardiomyopathy@@@@@@@@@
TTDS00003 Disease Bronchoconstriction (cold air-induced)@@@@@@@@@
TTDS00003 Disease Chronic obstructive pulmonary disease@@@@@@@@@
TTDS00003 Disease Hypothermia@@@@@@@@@
TTDS00003 Disease Neurogenic bladder@@@@@@@@@
TTDS00003 Disease Pain@@@@@@@@@
TTDS00003 Disease Tremor@@@@@@@@@
TTDS00003 Function The muscarinic acetylcholine receptor mediates various cellular responses@ breakdown of phosphoinositides and modulation of potassium channels through the action of G proteins.@@@@@@@@
TTDS00003 Sequence MNNSTNSSNNSLALTSPYKTFEVVFIVLVAGSLSLVTIIGNILVMVSIKVNRHLQTVNNYFLFSLACADLIIGVFSMNLYTLYTVIGYWPLGPVVCDLWLALDYVVSNASVMNLLIISFDRYFCVTKPLTYPVKRTTKMAGMMIAAAWVLSFILWAPAILFWQFIVGVRTVEDGECYIQFFSNAAVTFGTAIAAFYLPVIIMTVLYWHISRASKSRIKKDKKEPVANQDPVSPSLVQGRIVKPNNNNMPSSDDGLEHNKIQNGKAPRDPVTENCVQGEEKESSNDSTSVSAVASNMRDDEITQDENTVSTSLGHSKDENSKQTCIRIGTKTPKSDSCTPTNTTVEVVGSSGQNGDEKQNIVARKIVKMTKQPAKKKPPPSREKKVTRTILAILLAFIITWAPYNVMVLINTFCAPCIPNTVWTIGYWLCYINSTINPACYALCNATFKKTFKHLLMCHYKNIGATR@@@@@@@@@
TTDS00003 PDB Structure 1LUB@@@@@@@@@
TTDS00003 BioChemical Class G-protein coupled receptor (rhodopsin family)@@@@@@@@@
TTDS00003 Pathway Calcium signaling pathway@@@@@@@@@
TTDS00003 Pathway Neuroactive ligand-receptor interaction@@@@@@@@@
TTDS00003 Pathway Regulation of actin cytoskeleton@@@@@@@@@
TTDS00003 Related US Patent 6@68@@@@@@@@
TTDS00003 Related US Patent 6@554@@@@@@@@
TTDS00003 Related US Patent 6@168@@@@@@@@
TTDS00003 Related US Patent 6@822@@@@@@@@
TTDS00003 Related US Patent 6@644@@@@@@@@
TTDS00003 Related US Patent 6@658@@@@@@@@
TTDS00003 Related US Patent 6@958@@@@@@@@
TTDS00003 Related US Patent 6@301@@@@@@@@
TTDS00003 Drug(s) Scopolamine DAP000343 Nausea and Addiction Approved@@@@@@@@@
TTDS00003 Drug(s) Methylscopolamine DAP001126 Peptic ulcer disease Approved@@@@@@@@@
TTDS00003 Drug(s) Gallamine Triethiodide DAP001127 Stabilize muscle contractions Approved@@@@@@@@@
TTDS00003 Antagonist Scopolamine DAP000343@@@@@@@@@
TTDS00003 Antagonist Methylscopolamine DAP001126@@@@@@@@@
TTDS00003 Antagonist Gallamine Triethiodide DAP001127@@@@@@@@@
TTDS00003 Antagonist (R)-4-[2-[3-(4-methoxy-benzoylamino)-benzyl]-piperidin-1-ylmethyl]piperidine-1-carboxylic acid amide (Ro-320-6206) DNC000011@@@@@@@@@
TTDS00003 Antagonist AF-DX116 DNC000167@@@@@@@@@
TTDS00003 Agonist CMI-1145 DNC000455@@@@@@@@@
TTDS00003 Agonist CMI-936 DNC000456@@@@@@@@@
TTDS00003 Antagonist Otenzepad DNC001068@@@@@@@@@
TTDS00003 Agonist Oxotremorine DNC001081@@@@@@@@@
TTDS00003 Agonist PTAC DNC001161@@@@@@@@@
TTDS00003 Inhibitor Acetic acid 8-aza-bicyclo[3.2.1]oct-6-yl ester DNC003640@@@@@@@@@
TTDS00003 Inhibitor Benzoic acid 8-aza-bicyclo[3.2.1]oct-6-yl ester DNC003654@@@@@@@@@
TTDS00003 Inhibitor Propionic acid 8-aza-bicyclo[3.2.1]oct-6-yl ester DNC003659@@@@@@@@@
TTDS00003 Inhibitor 3-Methyl-7-pyrrolidin-1-yl-hept-5-yn-2-one DNC004147@@@@@@@@@
TTDS00003 Inhibitor 2-Methyl-6-pyrrolidin-1-yl-hex-4-ynal oxime DNC004159@@@@@@@@@
TTDS00003 Inhibitor ISOCLOZAPINE DNC004166@@@@@@@@@
TTDS00003 Inhibitor N-DESMETHYLCLOZAPINE DNC004426@@@@@@@@@
TTDS00003 Inhibitor SCH-211803 DNC004557@@@@@@@@@
TTDS00003 Inhibitor METHACHOLINE DNC004591@@@@@@@@@
TTDS00003 Inhibitor HIMBACINE DNC004995@@@@@@@@@
TTDS00003 Inhibitor METHOCTRAMINE DNC005816@@@@@@@@@
TTDS00003 Inhibitor METHOCTRAMINE HYDROCHLORIDE DNC007831@@@@@@@@@
TTDS00003 Inhibitor FM1-10 DNC008187@@@@@@@@@
TTDS00003 Inhibitor FM1-43 DNC008188@@@@@@@@@
TTDS00003 Inhibitor A-987306 DNC008996@@@@@@@@@
TTDS00003 Inhibitor GNF-PF-5618 DNC009476@@@@@@@@@
TTDS00003 Inhibitor 1@@@@@@@@@
TTDS00003 Inhibitor Tiotropium Bromide DNC009882@@@@@@@@@
TTDS00003 Inhibitor XANOMELINE DNC011170@@@@@@@@@
TTDS00003 Inhibitor 4-(4-butylpiperidin-1-yl)-1-o-tolylbutan-1-one DNC011171@@@@@@@@@
TTDS00003 Inhibitor 1-Methyl-1-(4-pyrrolidin-1-yl-but-2-ynyl)-urea DNC011427@@@@@@@@@
TTDS00003 Inhibitor ISOLOXAPINE DNC011498@@@@@@@@@
TTDS00003 Inhibitor 1'-Benzyl-3-phenyl-[3@6-dione DNC011500@@@@@@@@
TTDS00003 Inhibitor CARAMIPEN DNC011755@@@@@@@@@
TTDS00003 Inhibitor FLUMEZAPINE DNC011857@@@@@@@@@
TTDS00003 Inhibitor 2-(4-Diethylamino-but-2-ynyl)-isoindole-1@@@@@@@@@
TTDS00003 Inhibitor 3-Tetrazol-2-yl-1-aza-bicyclo[2.2.2]octane DNC012098@@@@@@@@@
TTDS00003 Inhibitor SULFOARECOLINE DNC012122@@@@@@@@@

Quote


I have performed this in a very simple way by replacing tab character withs @ sign in MS word itself.

Mani


FishMonger
Veteran / Moderator

Sep 18, 2013, 7:31 AM

Post #31 of 42 (611 views)
Re: [manigrover] Request to change Perl code according to desired output [In reply to] Can't Post


Quote
I have performed this in a very simple way by replacing tab character withs @ sign in MS word itself.

Using MS Word for this task is a big mistake. You should use be using a plain text editor, not a word processor.

I doubt that your source data file has 9 tab characters in each line and all of them at the end of the line instead of separating the fields. You must have done something wrong with your tab to @ conversion.

If I'm wrong and all of the tabs are only at the end of the lines, then they can't be used in the parsing of your data fields.


BillKSmith
Veteran

Sep 18, 2013, 8:13 AM

Post #32 of 42 (607 views)
Re: [manigrover] Request to change Perl code according to desired output [In reply to] Can't Post

I agree with Fishmonger that we are still not able to parse this data. Is your original data in a special format such as word or excel? If so, save a small sample in native format and attach it to your post. Tell us what program (and version) that you know will read it correctly. Download the attachment yourself. Verify that you can still separate the fields.
Good Luck,
Bill


manigrover
Novice

Sep 18, 2013, 8:24 AM

Post #33 of 42 (605 views)
Re: [BillKSmith] Request to change Perl code according to desired output [In reply to] Can't Post

Hi all,

My original file is in text format only

Now, I am pretty sure that there are not at ll any tab characters after replacing the above @ with spaces

My file only contain white space, there are no tab characters

TTDS00001 Type of target Successful target

TTDS00001 Synonyms (m)AChR

TTDS00001 Synonyms MAChR

TTDS00001 Disease Alzheimer's disease

TTDS00001 Disease Bronchospasm (histamine induced)

TTDS00001 Disease Glaucoma

TTDS00001 Disease Motion sickness

TTDS00001 Disease Obstructive airway disease

TTDS00001 Disease Organophosphate poisoning

TTDS00001 Disease Schizophrenia

TTDS00001 Disease Urinary incontinence

TTDS00001 Disease Xerostomia

TTDS00001 BioChemical Class G-protein coupled receptor (rhodopsin family)

TTDS00001 Pathway Calcium signaling pathway

TTDS00001 Pathway Neuroactive ligand-receptor interaction

TTDS00001 Pathway Regulation of actin cytoskeleton

TTDS00001 Related US Patent 6204

TTDS00001 Related US Patent 6194

TTDS00001 Related US Patent 681

TTDS00001 Related US Patent 6675

TTDS00001 Related US Patent 6842

TTDS00001 Related US Patent 6797

TTDS00001 Related US Patent 6552

TTDS00001 Related US Patent 6812

TTDS00001 Related US Patent 6550

TTDS00001 Related US Patent 6891

TTDS00001 Drug(s) Bethanechol DAP000263 Urinary retention Approved

TTDS00001 Drug(s) Trospium DAP000342 Spasm Approved

TTDS00001 Drug(s) Oxyphencyclimine DAP000835 Gastrointestinal disorders Approved

TTDS00001 Drug(s) Tridihexethyl DAP000836 Acquired nystagmus Approved

TTDS00001 Drug(s) Anisotropine Methylbromide DAP000837 Peptic ulcer disease Approved

TTDS00001 Drug(s) Hyoscyamine DAP001108 Gastrointestinal disorders Approved

TTDS00001 Drug(s) Methantheline DAP001109 Irritable bowel syndrome Approved

TTDS00001 Drug(s) Procyclidine DAP001110 Parkinson's disease Approved

TTDS00001 Drug(s) Cyclopentolate DAP001111 Pediatric eye examinations Approved

TTDS00001 Drug(s) Ipratropium DAP001112 Obstructive lung diseases Approved

TTDS00001 Drug(s) Pilocarpine DAP001113 Glaucoma Approved

TTDS00001 Drug(s) Flavoxate DAP001114 Muscle Relaxant Approved

TTDS00001 Drug(s) Mepenzolate DAP001115 Peptic ulcer disease Approved

TTDS00001 Drug(s) Ispaghula DAP001486 Irritable bowel syndrome Approved

TTDS00001 Drug(s) Mebeverine DAP001494 Irritable bowel syndrome Approved

TTDS00001 Drug(s) Trihexyphenidyl HCl DAP001532 Parkinson's Disease Approved

TTDS00001 Antagonist Trospium DAP000342

TTDS00001 Antagonist Hyoscyamine DAP001108

TTDS00001 Antagonist Methantheline DAP001109

TTDS00001 Antagonist Procyclidine DAP001110

TTDS00001 Antagonist Cyclopentolate DAP001111

TTDS00001 Antagonist Ipratropium DAP001112

TTDS00001 Antagonist Flavoxate DAP001114

TTDS00001 Antagonist Mepenzolate DAP001115

TTDS00001 Antagonist Ispaghula DAP001486

TTDS00001 Antagonist Mebeverine DAP001494

TTDS00001 Antagonist Trihexyphenidyl HCl DAP001532

TTDS00001 Agonist Bethanechol DAP000263

TTDS00001 Agonist Pilocarpine DAP001113

TTDS00001 Binder Oxyphencyclimine DAP000835

TTDS00001 Binder Tridihexethyl DAP000836

TTDS00001 Binder Anisotropine Methylbromide DAP000837

TTDS00001 Drug(s) Aclidinium bromide DCL000677 Chronic obstructive pulmonary disease Phase III

TTDS00001 Drug(s) CHF 5407 DCL000750 Chronic obstructive pulmonary disease Phase I

TTDS00001 Drug(s) GSK233705 DCL000823 Chronic obstructive pulmonary disease Phase II completed

TTDS00001 Drug(s) NVA237 DCL000901 Chronic obstructive pulmonary disease Phase III

TTDS00001 Drug(s) Org-23366 DCL000911 Schizophrenia No development reported

TTDS00001 Drug(s) OrM3 DCL000913 Chronic obstructive pulmonary disease Phase IIb

TTDS00001 Antagonist Aclidinium bromide DCL000677

TTDS00001 Antagonist CHF 5407 DCL000750

TTDS00001 Antagonist GSK233705 DCL000823

TTDS00001 Antagonist NVA237 DCL000901

TTDS00001 Antagonist Org-23366 DCL000911

TTDS00001 Antagonist OrM3 DCL000913

TTDS00001 Multitarget Org-23366 DCL000911

TTDS00001 Antagonist Aprophen DNC000245

TTDS00001 Antagonist Benactyzine DNC000293

TTDS00001 Antagonist Hyoscine DNC000757

TTDS00001 Antagonist Hyoscyamine sulfate DNC000758

TTDS00001 Antagonist Ipratropium bromide DNC000806

TTDS00001 Agonist Muscarine DNC000970

TTDS00001 Agonist RS 86 DNC001236

TTDS00001 Target Validation TTDS00001

TTDS00002 UniProt ID P11229

TTDS00002 Name Muscarinic acetylcholine receptor M1

TTDS00002 Type of target Successful target

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 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 668

TTDS00002 Related US Patent 6554

TTDS00002 Related US Patent 6645

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

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

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-[36-dione DNC011500

TTDS00002 Inhibitor CARAMIPEN DNC011755

TTDS00002 Inhibitor FLUMEZAPINE DNC011857

TTDS00002 Inhibitor AMINOBENZTROPINE DNC011950

TTDS00002 Inhibitor 2-(4-Diethylamino-but-2-ynyl)-isoindole-1

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

TTDS00002 Inhibitor 3alpha-(bis-chloro-phenylmethoxy)tropane DNC013136

TTDS00002 Inhibitor 3-(3-benzylamino)-piperidin-2-one DNC013219

TTDS00002 Target Validation TTDS00002

TTDS00003 UniProt ID P08172

TTDS00003 Name Muscarinic acetylcholine receptor M2

TTDS00003 Type of target Successful target

TTDS00003 Synonyms M2 receptor

TTDS00003 Disease Alzheimer's disease

TTDS00003 Disease Analgesics

TTDS00003 Disease Autoimmune cardiomyopathy

TTDS00003 Disease Bronchoconstriction (cold air-induced)

TTDS00003 Disease Chronic obstructive pulmonary disease

TTDS00003 Disease Hypothermia

TTDS00003 Disease Neurogenic bladder

TTDS00003 Disease Pain

TTDS00003 Disease Tremor

TTDS00003 Function The muscarinic acetylcholine receptor mediates various cellular responses breakdown of phosphoinositides and modulation of potassium channels through the action of G proteins.

TTDS00003 Sequence MNNSTNSSNNSLALTSPYKTFEVVFIVLVAGSLSLVTIIGNILVMVSIKVNRHLQTVNNYFLFSLACADLIIGVFSMNLYTLYTVIGYWPLGPVVCDLWLALDYVVSNASVMNLLIISFDRYFCVTKPLTYPVKRTTKMAGMMIAAAWVLSFILWAPAILFWQFIVGVRTVEDGECYIQFFSNAAVTFGTAIAAFYLPVIIMTVLYWHISRASKSRIKKDKKEPVANQDPVSPSLVQGRIVKPNNNNMPSSDDGLEHNKIQNGKAPRDPVTENCVQGEEKESSNDSTSVSAVASNMRDDEITQDENTVSTSLGHSKDENSKQTCIRIGTKTPKSDSCTPTNTTVEVVGSSGQNGDEKQNIVARKIVKMTKQPAKKKPPPSREKKVTRTILAILLAFIITWAPYNVMVLINTFCAPCIPNTVWTIGYWLCYINSTINPACYALCNATFKKTFKHLLMCHYKNIGATR

TTDS00003 PDB Structure 1LUB

TTDS00003 BioChemical Class G-protein coupled receptor (rhodopsin family)

TTDS00003 Pathway Calcium signaling pathway

TTDS00003 Pathway Neuroactive ligand-receptor interaction

TTDS00003 Pathway Regulation of actin cytoskeleton

TTDS00003 Related US Patent 668

TTDS00003 Related US Patent 6554

TTDS00003 Related US Patent 6168

TTDS00003 Related US Patent 6822

TTDS00003 Related US Patent 6644

TTDS00003 Related US Patent 6658

TTDS00003 Related US Patent 6958

TTDS00003 Related US Patent 6301

TTDS00003 Drug(s) Scopolamine DAP000343 Nausea and Addiction Approved

TTDS00003 Drug(s) Methylscopolamine DAP001126 Peptic ulcer disease Approved

TTDS00003 Drug(s) Gallamine Triethiodide DAP001127 Stabilize muscle contractions Approved

TTDS00003 Antagonist Scopolamine DAP000343

TTDS00003 Antagonist Methylscopolamine DAP001126

TTDS00003 Antagonist Gallamine Triethiodide DAP001127

TTDS00003 Antagonist (R)-4-[2-[3-(4-methoxy-benzoylamino)-benzyl]-piperidin-1-ylmethyl]piperidine-1-carboxylic acid amide (Ro-320-6206) DNC000011

TTDS00003 Antagonist AF-DX116 DNC000167

TTDS00003 Agonist CMI-1145 DNC000455

TTDS00003 Agonist CMI-936 DNC000456

TTDS00003 Antagonist Otenzepad DNC001068

TTDS00003 Agonist Oxotremorine DNC001081

TTDS00003 Agonist PTAC DNC001161

TTDS00003 Inhibitor Acetic acid 8-aza-bicyclo[3.2.1]oct-6-yl ester DNC003640

TTDS00003 Inhibitor Benzoic acid 8-aza-bicyclo[3.2.1]oct-6-yl ester DNC003654

TTDS00003 Inhibitor Propionic acid 8-aza-bicyclo[3.2.1]oct-6-yl ester DNC003659

TTDS00003 Inhibitor 3-Methyl-7-pyrrolidin-1-yl-hept-5-yn-2-one DNC004147

TTDS00003 Inhibitor 2-Methyl-6-pyrrolidin-1-yl-hex-4-ynal oxime DNC004159

TTDS00003 Inhibitor ISOCLOZAPINE DNC004166

TTDS00003 Inhibitor N-DESMETHYLCLOZAPINE DNC004426

TTDS00003 Inhibitor SCH-211803 DNC004557

TTDS00003 Inhibitor METHACHOLINE DNC004591

TTDS00003 Inhibitor HIMBACINE DNC004995

TTDS00003 Inhibitor METHOCTRAMINE DNC005816

TTDS00003 Inhibitor METHOCTRAMINE HYDROCHLORIDE DNC007831

TTDS00003 Inhibitor FM1-10 DNC008187

TTDS00003 Inhibitor FM1-43 DNC008188

TTDS00003 Inhibitor A-987306 DNC008996

TTDS00003 Inhibitor GNF-PF-5618 DNC009476

TTDS00003 Inhibitor 1

TTDS00003 Inhibitor Tiotropium Bromide DNC009882

TTDS00003 Inhibitor XANOMELINE DNC011170

TTDS00003 Inhibitor 4-(4-butylpiperidin-1-yl)-1-o-tolylbutan-1-one DNC011171

TTDS00003 Inhibitor 1-Methyl-1-(4-pyrrolidin-1-yl-but-2-ynyl)-urea DNC011427

TTDS00003 Inhibitor ISOLOXAPINE DNC011498

TTDS00003 Inhibitor 1'-Benzyl-3-phenyl-[36-dione DNC011500

TTDS00003 Inhibitor CARAMIPEN DNC011755

TTDS00003 Inhibitor FLUMEZAPINE DNC011857

TTDS00003 Inhibitor 2-(4-Diethylamino-but-2-ynyl)-isoindole-1

TTDS00003 Inhibitor 3-Tetrazol-2-yl-1-aza-bicyclo[2.2.2]octane DNC012098

TTDS00003 Inhibitor SULFOARECOLINE DNC012122

TTDS00003 Inhibitor 6-Dimethylamino-2-methyl-hex-4-ynal oxime DNC012306

TTDS00003 Inhibitor 7-Pyrrolidin-1-yl-hept-5-yn-2-one DNC012322

TTDS00003 Inhibitor 7-Dimethylamino-3-methyl-hept-5-yn-2-one DNC012323

TTDS00003 Inhibitor 7-Pyrrolidin-1-yl-hept-5-yn-2-one oxime DNC012330

TTDS00003 Inhibitor 7-Dimethylamino-hept-5-yn-2-one DNC012350

TTDS00003 Inhibitor 7-Dimethylamino-hept-5-yn-2-one oxime DNC012351

TTDS00003 Inhibitor N-(4-Dimethylamino-but-2-ynyl)-N-methyl-acetamide DNC012363

TTDS00003 Inhibitor ACECLIDINE DNC012502

TTDS00003 Inhibitor N-methoxyquinuclidine-3-carboximidoyl fluoride DNC012588

TTDS00003 Inhibitor BRL-55473 DNC012594

TTDS00003 Inhibitor N-methoxyquinuclidine-3-carboximidoyl chloride DNC012616

TTDS00003 Inhibitor 2

TTDS00003 Inhibitor 3-(3-benzylamino)-piperidin-2-one DNC013219

TTDS00003 Target Validation TTDS00003

TTDS00004 UniProt ID P20309

TTDS00004 Name Muscarinic acetylcholine receptor M3

TTDS00004 Type of target Successful target

TTDS00004 Synonyms M3 receptor

TTDS00004 Disease Airway hyperreactivity

TTDS00004 Disease Urge incontinence

TTDS00004 Function The muscarinic acetylcholine receptor mediates various cellular responses breakdown of phosphoinositides and modulation of potassium channels through the action of G proteins.

TTDS00004 Sequence MTLHNNSTTSPLFPNISSSWIHSPSDAGLPPGTVTHFGSYNVSRAAGNFSSPDGTTDDPLGGHTVWQVVFIAFLTGILALVTIIGNILVIVSFKVNKQLKTVNNYFLLSLACADLIIGVISMNLFTTYIIMNRWALGNLACDLWLAIDYVASNASVMNLLVISFDRYFSITRPLTYRAKRTTKRAGVMIGLAWVISFVLWAPAILFWQYFVGKRTVPPGECFIQFLSEPTITFGTAIAAFYMPVTIMTILYWRIYKETEKRTKELAGLQASGTEAETENFVHPTGSSRSCSSYELQQQSMKRSNRRKYGRCHFWFTTKSWKPSSEQMDQDHSSSDSWNNNDAAASLENSASSDEEDIGSETRAIYSIVLKLPGHSTILNSTKLPSSDNLQVPEEELGMVDLERKADKLQAQKSVDDGGSFPKSFSKLPIQLESAVDTAKTSDVNSSVGKSTATLPLSFKEATLAKRFALKTRSQITKRKRMSLVKEKKAAQTLSAILLAFIITWTPYNIMVLVNTFCDSCIPKTFWNLGYWLCYINSTVNPVCYALCNKTFRTTFKMLLLCQCDKKKRRKQQYQQRQSVIFHKRAPEQAL

TTDS00004 PDB Structure 2CSA

TTDS00004 BioChemical Class G-protein coupled receptor (rhodopsin family)

TTDS00004 Pathway Calcium signaling pathway

TTDS00004 Pathway Neuroactive ligand-receptor interaction

TTDS00004 Pathway Regulation of actin cytoskeleton

TTDS00004 Related US Patent 6822

TTDS00004 Related US Patent 6644

TTDS00004 Related US Patent 6658

TTDS00004 Related US Patent 6958

TTDS00004 Related US Patent 6301

Quote


manigrover
Novice

Sep 18, 2013, 8:27 AM

Post #34 of 42 (604 views)
Re: [BillKSmith] Request to change Perl code according to desired output [In reply to] Can't Post

I am trying all command but my files as it is becasue it does not contain tab characters at all now.

Mani


manigrover
Novice

Sep 18, 2013, 8:31 AM

Post #35 of 42 (603 views)
Re: [manigrover] Request to change Perl code according to desired output [In reply to] Can't Post

I have attached the small sample of original data

Mani
Attachments: sample.txt (22.7 KB)


BillKSmith
Veteran

Sep 18, 2013, 1:20 PM

Post #36 of 42 (598 views)
Re: [manigrover] Request to change Perl code according to desired output [In reply to] Can't Post

If this truly is a sample of the data you will be using, you have a HUGE problem.

I cannot help you without a clear specification of the fields. Do a few hundred lines by hand to gain a better understanding of what is required. I suspect that you will be recording the names of drugs and diseases that you recognize. A program could do it this way if it had a complete list of each, but how would you ever know that your lists were complete? What about those numbers that mark data that you want to omit. It seems like they are not always at the end of the line. Can there be more than one drug or disease on a line? How do you report that? Your program has to handle every special case. It is a good bet that your sample does not include every one. You may very well be fixing new special cases for years to come.

If processing this input is an ongoing task, you really must negotiate with your data supplier to change the data to a standard format such as .csv or excel. Get help to make certain that the new format is specified correctly.
Good Luck,
Bill


manigrover
Novice

Sep 21, 2013, 2:02 AM

Post #37 of 42 (566 views)
Re: [BillKSmith] Request to change Perl code according to desired output [In reply to] Can't Post

Hi,

Thanks for reply.

I understand the fact that it's quite complicated.

I just wanted to know that something can be done to change in this previous code, becuase its working fine but its retreiving only those names which are after "Drug(s)" and I want those names as well which are after antagonist, inhibitor, binder,agonist, antisense as well

So , can we just add these names at appropirate places to fetch the dat ausing exisitng code which is below

#!/usr/bin/perl -w

use strict;

if ($#ARGV < 1) {
print "Usage: $0 input_file output_file\n";
exit 0;
}

my $input_file = $ARGV[0];
my $output_file = $ARGV[1];

my $prev_ttds_num = '';
my @diseases = ();
my $drug_name = '';

open my $IFH, '<', $input_file or die "$!\n";
open my $OFH, '>', $output_file or die "$!\n";

while (my $line = <$IFH>) {
chomp $line;
next if $line eq '';
my @array = split /\t/, $line;

my $ttds_num = shift @array;
my $rec_type = shift @array;

if ($ttds_num ne $prev_ttds_num) {
if ($prev_ttds_num ne '') {
dump_data($OFH, $drug_name, \@diseases);
}
$prev_ttds_num = $ttds_num;
@diseases = ();
$drug_name = '';
}

if ($rec_type eq 'Name') {
$drug_name = shift @array;
}
elsif ($rec_type eq 'Drug(s)') {
my $part_record = join("\t", @array);
push @diseases, $part_record;
}
}

dump_data($OFH, $drug_name, \@diseases);
close $OFH;
close $IFH;

print "Done\n";
exit 0;

######################################################################
# #
# S U B R O U T I N E S #
# #
######################################################################

##
# @brief Routine to dump out multiple records
# @param FH - A file handle to write data out
# @param drug_name - The name of the drug
# @param disease_ref - An array references to list of disease data
# @return undef
#
sub dump_data {
my ($FH, $drug_name, $disease_ref) = @_;
return if ($drug_name eq '');

foreach my $disease (@{ $disease_ref }) {
print ${FH} "$drug_name\t$disease\n";
}

return;
}

Quote


BillKSmith
Veteran

Sep 21, 2013, 4:21 AM

Post #38 of 42 (563 views)
Re: [manigrover] Request to change Perl code according to desired output [In reply to] Can't Post

This code will NOT "work" with any of the data that you have posted.Frown It requires tabs as field separators. We cannot help you if we cannot run your code with your data and get the same results that you do. Sorry, I have wasted too much time already.
Good Luck,
Bill


manigrover
Novice

Sep 21, 2013, 5:28 AM

Post #39 of 42 (560 views)
Re: [BillKSmith] Request to change Perl code according to desired output [In reply to] Can't Post

Hi


Using the above code I am able to get following results:

In which rather than Unirpot ID there is "Name" decribed -

Muscarinic acetylcholine receptor Bethanechol DAP000263 Urinary retention Approved
Muscarinic acetylcholine receptor Trospium DAP000342 Spasm Approved
Muscarinic acetylcholine receptor Oxyphencyclimine DAP000835 Gastrointestinal disorders Approved
Muscarinic acetylcholine receptor Tridihexethyl DAP000836 Acquired nystagmus Approved
Muscarinic acetylcholine receptor Anisotropine Methylbromide DAP000837 Peptic ulcer disease Approved
Muscarinic acetylcholine receptor Hyoscyamine DAP001108 Gastrointestinal disorders Approved
Muscarinic acetylcholine receptor Methantheline DAP001109 Irritable bowel syndrome Approved
Muscarinic acetylcholine receptor Procyclidine DAP001110 Parkinson's disease Approved
Muscarinic acetylcholine receptor Cyclopentolate DAP001111 Pediatric eye examinations Approved
Muscarinic acetylcholine receptor Ipratropium DAP001112 Obstructive lung diseases Approved
Muscarinic acetylcholine receptor Pilocarpine DAP001113 Glaucoma Approved
Muscarinic acetylcholine receptor Flavoxate DAP001114 Muscle Relaxant Approved
Muscarinic acetylcholine receptor Mepenzolate DAP001115 Peptic ulcer disease Approved
Muscarinic acetylcholine receptor Ispaghula DAP001486 Irritable bowel syndrome Approved
Muscarinic acetylcholine receptor Mebeverine DAP001494 Irritable bowel syndrome Approved
Muscarinic acetylcholine receptor Trihexyphenidyl HCl DAP001532 Parkinson's Disease Approved
Muscarinic acetylcholine receptor Aclidinium bromide DCL000677 Chronic obstructive pulmonary disease Phase III
Muscarinic acetylcholine receptor CHF 5407 DCL000750 Chronic obstructive pulmonary disease Phase I
Muscarinic acetylcholine receptor GSK233705 DCL000823 Chronic obstructive pulmonary disease Phase II completed
Muscarinic acetylcholine receptor NVA237 DCL000901 Chronic obstructive pulmonary disease Phase III
Muscarinic acetylcholine receptor Org-23366 DCL000911 Schizophrenia No development reported
Muscarinic acetylcholine receptor OrM3 DCL000913 Chronic obstructive pulmonary disease Phase IIb
Muscarinic acetylcholine receptor M1 Pirenzepine DAP000492 Peptic ulcer disease Approved
Muscarinic acetylcholine receptor M1 Glycopyrrolate DAP001116 Anesthetic Approved
Muscarinic acetylcholine receptor M1 Clidinium DAP001117 Abdominal/stomach pain Approved
Muscarinic acetylcholine receptor M1 Dicyclomine DAP001118 Irritable bowel syndrome Approved
Muscarinic acetylcholine receptor M1 Ethopropazine DAP001119 Parkinson's disease Approved
Muscarinic acetylcholine receptor M1 Cycrimine DAP001120 Parkinson's disease Approved
Muscarinic acetylcholine receptor M1 Benztropine DAP001121 Parkinson's disease Approved
Muscarinic acetylcholine receptor M1 Trihexyphenidyl DAP001122 Parkinson's disease Approved
Muscarinic acetylcholine receptor M1 Propantheline DAP001123 Excessive sweating (hyperhidrosis) Approved
Muscarinic acetylcholine receptor M1 Oxyphenonium DAP001124 Spasm Approved
Muscarinic acetylcholine receptor M1 Biperiden DAP001125 Parkinson's disease Approved
Muscarinic acetylcholine receptor M1 Talsaclidine isomer DCL000268 Alzheimer's disease Discontinued
Muscarinic acetylcholine receptor M1 Sabcomeline hydrochloride DCL000279 Cardiovascular diseases Phase IIa
Muscarinic acetylcholine receptor M1 Talsaclidine fumarate DCL000303 Alzheimer's disease Discontinued
Muscarinic acetylcholine receptor M1 Xanomeline tartrate DCL000328 Alzheimer's disease Phase II
Muscarinic acetylcholine receptor M1 GSK573719 DCL000381 Chronic Obstructive Pulmonary Disease (COPD) Phase II
Muscarinic acetylcholine receptor M1 GSK961081 DCL000397 Chronic Obstructive Pulmonary Disease (COPD) Phase II completed
Muscarinic acetylcholine receptor M1 GSK1034702 DCL000402 Schizophrenia, Dementia Phase I completed
Muscarinic acetylcholine receptor M1 Darotropium DCL000514 COPD Suspended in Phase II in GSK 2009 Report
Muscarinic acetylcholine receptor M1 Darotropium + 642444 DCL000515 COPD Phase III
Muscarinic acetylcholine receptor M1 Revatropate DCL000957 Chronic obstructive pulmonary disease Discontinued in Phase I
Muscarinic acetylcholine receptor M2 Scopolamine DAP000343 Nausea and Addiction Approved
Muscarinic acetylcholine receptor M2 Methylscopolamine DAP001126 Peptic ulcer disease Approved

Quote


BillKSmith
Veteran

Sep 21, 2013, 12:16 PM

Post #40 of 42 (542 views)
Re: [manigrover] Request to change Perl code according to desired output [In reply to] Can't Post


Quote
My file only contain white space, there are no tab characters


In your code, I find:

Code
my @array = split /\t/, $line;


What kind of magic allows you to split a line on the tabs that are not there????? Do you not know that within a regular expression, /\t/ matches a tab and nothing else?????

No one can help you until you learn to post code and data that work together to produce the output in your post. We do not do magic. I strongly suggest that in the future you download material that you post and verify that it works as you claim. Perhaps someone else will help you after you get your act together.
Good Luck,
Bill


manigrover
Novice

Sep 21, 2013, 1:04 PM

Post #41 of 42 (539 views)
Re: [BillKSmith] Request to change Perl code according to desired output [In reply to] Can't Post

HI

Thanks for reply. I checked regarding this error.Sorry, This is because I converted my all tab characters to white space and I am using that file since long time.

My original file used initially contain TAB characters which I have converted to @ sign as u advised earlier, it looks like this

TTDS00001@Name@Muscarinic acetylcholine receptor
TTDS00001@Type of target@Successful target
TTDS00001@Synonyms@(m)AChR
TTDS00001@Synonyms@MAChR
TTDS00001@Disease@Alzheimer's disease
TTDS00001@Disease@Bronchospasm (histamine induced)
TTDS00001@Disease@Glaucoma
TTDS00001@Disease@Motion sickness
TTDS00001@Disease@Obstructive airway disease
TTDS00001@Disease@Organophosphate poisoning
TTDS00001@Disease@Schizophrenia
TTDS00001@Disease@Urinary incontinence
TTDS00001@Disease@Xerostomia
TTDS00001@BioChemical Class@G-protein coupled receptor (rhodopsin family)
TTDS00001@Pathway@Calcium signaling pathway
TTDS00001@Pathway@Neuroactive ligand-receptor interaction
TTDS00001@Pathway@Regulation of actin cytoskeleton
TTDS00001@Related US Patent@6,211,204
TTDS00001@Related US Patent@6,323,194
TTDS00001@Related US Patent@6,369,081
TTDS00001@Related US Patent@6,376,675
TTDS00001@Related US Patent@6,423,842
TTDS00001@Related US Patent@6,451,797
TTDS00001@Related US Patent@6,455,552
TTDS00001@Related US Patent@6,458,812
TTDS00001@Related US Patent@6,555,550
TTDS00001@Related US Patent@6,602,891
TTDS00001@Drug(s)@Bethanechol@DAP000263@Urinary retention@Approved
TTDS00001@Drug(s)@Trospium@DAP000342@Spasm@Approved
TTDS00001@Drug(s)@Oxyphencyclimine@DAP000835@Gastrointestinal disorders@Approved
TTDS00001@Drug(s)@Tridihexethyl@DAP000836@Acquired nystagmus@Approved
TTDS00001@Drug(s)@Anisotropine Methylbromide@DAP000837@Peptic ulcer disease@Approved
TTDS00001@Drug(s)@Hyoscyamine@DAP001108@Gastrointestinal disorders@Approved
TTDS00001@Drug(s)@Methantheline@DAP001109@Irritable bowel syndrome@Approved
TTDS00001@Drug(s)@Procyclidine@DAP001110@Parkinson's disease@Approved
TTDS00001@Drug(s)@Cyclopentolate@DAP001111@Pediatric eye examinations@Approved
TTDS00001@Drug(s)@Ipratropium@DAP001112@Obstructive lung diseases@Approved
TTDS00001@Drug(s)@Pilocarpine@DAP001113@Glaucoma@Approved
TTDS00001@Drug(s)@Flavoxate@DAP001114@Muscle Relaxant@Approved
TTDS00001@Drug(s)@Mepenzolate@DAP001115@Peptic ulcer disease@Approved
TTDS00001@Drug(s)@Ispaghula@DAP001486@Irritable bowel syndrome@Approved
TTDS00001@Drug(s)@Mebeverine@DAP001494@Irritable bowel syndrome@Approved
TTDS00001@Drug(s)@Trihexyphenidyl HCl@DAP001532@Parkinson's Disease@Approved
TTDS00001@Antagonist@Trospium@DAP000342
TTDS00001@Antagonist@Hyoscyamine@DAP001108
TTDS00001@Antagonist@Methantheline@DAP001109
TTDS00001@Antagonist@Procyclidine@DAP001110
TTDS00001@Antagonist@Cyclopentolate@DAP001111
TTDS00001@Antagonist@Ipratropium@DAP001112
TTDS00001@Antagonist@Flavoxate@DAP001114
TTDS00001@Antagonist@Mepenzolate@DAP001115
TTDS00001@Antagonist@Ispaghula@DAP001486
TTDS00001@Antagonist@Mebeverine@DAP001494
TTDS00001@Antagonist@Trihexyphenidyl HCl@DAP001532
TTDS00001@Agonist@Bethanechol@DAP000263
TTDS00001@Agonist@Pilocarpine@DAP001113
TTDS00001@Binder@Oxyphencyclimine@DAP000835
TTDS00001@Binder@Tridihexethyl@DAP000836
TTDS00001@Binder@Anisotropine Methylbromide@DAP000837
TTDS00001@Drug(s)@Aclidinium bromide@DCL000677@Chronic obstructive pulmonary disease@Phase III
TTDS00001@Drug(s)@CHF 5407@DCL000750@Chronic obstructive pulmonary disease@Phase I
TTDS00001@Drug(s)@GSK233705@DCL000823@Chronic obstructive pulmonary disease@Phase II completed
TTDS00001@Drug(s)@NVA237@DCL000901@Chronic obstructive pulmonary disease@Phase III
TTDS00001@Drug(s)@Org-23366@DCL000911@Schizophrenia@No development reported
TTDS00001@Drug(s)@OrM3@DCL000913@Chronic obstructive pulmonary disease@Phase IIb
TTDS00001@Antagonist@Aclidinium bromide@DCL000677
TTDS00001@Antagonist@CHF 5407@DCL000750
TTDS00001@Antagonist@GSK233705@DCL000823
TTDS00001@Antagonist@NVA237@DCL000901
TTDS00001@Antagonist@Org-23366@DCL000911
TTDS00001@Antagonist@OrM3@DCL000913
TTDS00001@Multitarget@Org-23366@DCL000911
TTDS00001@Antagonist@Aprophen@DNC000245
TTDS00001@Antagonist@Benactyzine@DNC000293
TTDS00001@Antagonist@Hyoscine@DNC000757
TTDS00001@Antagonist@Hyoscyamine sulfate@DNC000758
TTDS00001@Antagonist@Ipratropium bromide@DNC000806
TTDS00001@Agonist@Muscarine@DNC000970
TTDS00001@Agonist@RS 86@DNC001236
TTDS00001@Target Validation@TTDS00001
TTDS00002@UniProt ID@P11229
TTDS00002@Name@Muscarinic acetylcholine receptor M1
TTDS00002@Type of target@Successful target
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

Quote

I am attaching sample also here
Attachments: sample2.txt (39.4 KB)


BillKSmith
Veteran

Sep 21, 2013, 9:28 PM

Post #42 of 42 (524 views)
Re: [manigrover] Request to change Perl code according to desired output [In reply to] Can't Post

The data in your post would be useful, but it does not contain an example of a duplicate ID number. You had a requirement to ignore such lines.

Quote
.....which is because of the fact that ID on the right hand side DCL 000279 is same.

The code you posted ignores this issue.

Why did you attach more useless data???
Do not bother to answer. I am no longer reading your posts.
Good Luck,
Bill

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives