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

 

First page Previous page 1 2 Next page Last page  View All


manigrover
Novice

Sep 13, 2013, 8:54 AM

Post #1 of 42 (1614 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 (1607 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 (1601 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 (1592 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 (1587 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 (1586 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 (1584 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 (1576 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 (1574 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 (1569 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 (1564 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 (1547 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 (1545 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 (1536 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 (1533 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
Veteran / Moderator

Sep 15, 2013, 2:54 PM

Post #16 of 42 (1530 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 (1521 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 (1520 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 (1514 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 (1501 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 (1499 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 (1483 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 (1480 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 (1478 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 (1471 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

First page Previous page 1 2 Next page Last page  View All
 
 


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

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