[Bio] / FigWebServices / aliases_to_pubmed.cgi Repository:
ViewVC logotype

Annotation of /FigWebServices/aliases_to_pubmed.cgi

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (view) (download)

1 : hwang 1.1
2 :     #/usr/bin/perl
3 :     use FIG;
4 :     use strict;
5 :     use CGI;
6 :     use FigWebServices::SeedComponents::PubMed;
7 :    
8 :     my $cgi = new CGI;
9 :     my $fig = new FIG;
10 :     print $cgi->header;
11 :     print $cgi->start_html( -title=>'PubMed for peg',
12 :     -style=>{ -src => 'Html/dnd.css'},
13 :     -script=> {-language => 'JAVASCRIPT',
14 :     -src => 'Html/drag_and_drop.js'
15 :     }
16 :    
17 :     );
18 :    
19 :    
20 :     my $id_string = $cgi->param("ids");
21 :     my $peg = $cgi->param("peg");
22 :    
23 :     if (!$id_string) {
24 :     print "PubMed journals found for this peg were not specific to this peg<p>";
25 :     exit;
26 :     }
27 :    
28 :    
29 :     print "<table>";
30 :     print "<tr><td bgcolor=#6666FF>Peg</td><td> $peg</td></tr>";
31 :     my $role = $fig->function_of($peg);
32 :     print "<tr><td bgcolor=#6666FF>Functional Role</td><td> $role</td></tr></table>";
33 :    
34 :     print $cgi->hr();
35 :     print "<I>PubMed journals for $id_string ...</I><p>";
36 :    
37 :     my $pmid_output = &FIG::run_gathering_output("$FIG_Config::bin/get_pubmed_journals", $id_string);
38 :    
39 :     my @journals_list = split(/ /, $pmid_output);
40 :     my @new_journals = &FigWebServices::SeedComponents::PubMed::sort_journals(\@journals_list);
41 :     my $journal_htmltable = &FigWebServices::SeedComponents::PubMed::journals_as_htmltable(\@new_journals);
42 :    
43 :     #Put journals as a string to be passed the next cgi
44 :    
45 :     my $journal_info;
46 :    
47 :     foreach (@new_journals) {
48 :    
49 :     my($pmid, $year,$month,$date,$title) = split(/\t/,$_);
50 :     my $j = "$pmid|$title";
51 :     $journal_info .= $j.";";
52 :     }
53 :    
54 :    
55 :    
56 :     my $count=1;
57 :     my $journal_div;
58 :     foreach (@journals_list) {
59 :    
60 :     $journal_div .= "<li id=\"$_\">$_</li>";
61 :     $count++;
62 :     }
63 :    
64 :     print $journal_htmltable;
65 :    
66 :     if (!$pmid_output) {
67 :     print "PubMed journals found for this peg were not specific to this functional role<p>";
68 :     return;
69 :     }
70 :    
71 :    
72 :     print $cgi->hr();
73 :    
74 :     print "
75 :    
76 :     If you believe that the articles are relevant or not relevant, drag and drop the
77 :     PMID to the appropriate containers (Relevant Journal(s)/ Not Relevant Journal(s)). <p>
78 :     <p> You may add your own journals for this peg.
79 :    
80 :     <div id=\"submit_line\">
81 :     <form name=\"myForm\" method=\"post\" action=\"save_to_attributes.cgi\" onsubmit=\"saveDragDropNodes()\">
82 :     <input type=\"hidden\" name=\"listOfItems\" value=\"\">
83 :     <input type=\"hidden\" name=\"all_journals\" value=\"$journal_info\">
84 :     <input type=\"hidden\" name=\"peg\" value=\"$peg\">
85 :     <input type=\"textbox\" name=\"PMID\" value=\"\"> Journal Identifier (ie PMID)
86 :     <p><input type=\"textbox\" name=\"date\" value=\"\"> Publication Date: Year Month Day
87 :     <p><input type=\"textbox\" name=\"title\" value=\"\"> Title of the Journal Article
88 :     <p><input type=\"textbox\" name=\"url\" value=\"\"> URL of the Journal
89 :     <p><input type=\"textbox\" name=\"master\" value=\"Name\">
90 :     <p> You may only curate the journals on the annotator's master machine and please specify your name.
91 :     <p><input type=\"submit\" value=\"Save to attributes\" name=\"save\">
92 :     </form>
93 :     </div>
94 :    
95 :     <div id=\"dhtmlgoodies_dragDropContainer\">
96 :     <div id=\"topBar\">
97 :     </div>
98 :     <div id=\"dhtmlgoodies_listOfItems\">
99 :     <div><p>All Journals </p><ul id=\"Not_Curated_PUBMED\">$journal_div</ul></div>
100 :     </div>
101 :     <div id=\"dhtmlgoodies_mainContainer\">
102 :     <div><p>Relevant Journal(s)</p><ul id=\"Curated_Relevant_PUBMED\"></ul></div>
103 :     <div><p>Not Relevant Journal(s)</p><ul id=\"Curated_NotRelevant_PUBMED\"></ul></div>
104 :     </div>
105 :     </div>
106 :     <ul id=\"dragContent\"></ul>
107 :     <div id=\"dragDropIndicator\"><img src=\"images/insert.gif\"></div>
108 :     <div id=\"saveContent\"><div>
109 :     ";

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3