View on
MetaCPAN is shutting down
For details read Perl NOC. After June 25th this page will redirect to
Gavin Sherlock > GO-TermFinder-0.86 > GO::TermFinderReport::Html



Annotate this POD


New  4
Open  0
View/Report Bugs
Module Version: 0.12   Source  


GO::TermFinderReport::Html - prints an html table of the results of GO::TermFinder


This print() method of this Perl module receives a reference to an the array that is the return value from the findTerms method of GO::TermFinder, the aspect for which terms were found, the number of genes that were used to generate the terms, and the number of genes that were said to be in the genome. It will then generate an html table that summarizes those results. Optionally, filehandle, p-value cutoff, gene URL, and GOID URL arguments may also be passed in. Url links should have the string <REPLACE_THIS> to indicate where the gene name, or GOID should be put.


    use GO::TermFinder;
    use GO::TermFinderReport::Html;


    my @pvalues = $termFinder->findTerms(genes=>\@genes);

    my $report  = GO::TermFinderReport::Html->new();

    open (HTML, ">blah.html");

    print HTML "<html><body>";

    my $numRows = $report->print(pvalues  => \@pvalues,
                                 aspect   => $aspect,
                                 numGenes => scalar(@genes),
                                 totalNum => $totalNum,
                                 fh       => \*HTML,
                                 cutoff   => 0.01,
                                 geneUrl  => '<REPLACE_THIS>',
                                 goidUrl  => '<REPLACE_THIS>');

    print HTML "</body></html>";

    close HTML;


This is the constructor.


    my $report = GO::TermFinderReport::Html->new();

A GO::TermFinderReport::Html object is returned.


This method prints out the report, in the form of an html table. The table is ordered in ascending order of p-value (i.e. most significant first), and will print out the GO node, the frequency of use of that node within the selected group of genes, and the population as a whole, the corrected p-value of that, and a list of the genes annotated to that node. If the FDR was calculated, the FDR will also be printed. It returns the number of annotation rows in the table that exceed the provided p-value cutoff (which may even be zero, in which case nothing is printed).


    my $numRows = $report->print(pvalues      => \@pvalues,
                                 aspect       => $aspect,   # P, C, or F
                                 numGenes     => scalar(@genes),
                                 totalNum     => $totalNum,
                                 fh           => \*HTML,
                                 pvalueCutOff => 0.01,
                                 geneUrl      => '<REPLACE_THIS>',
                                 goidUrl      => '<REPLACE_THIS>');

Required arguments:

    pvalues   :  A reference to the array returned by the findTerms() method of GO::TermFinder

    aspect    :  The aspect of the Gene Ontology for which terms were found (C, F or P)

    numGenes  :  The number of genes that were in the list passed to the findTerms method

    totalNum  :  The total number of genes that were indicated to be in the genome for finding terms.

Optional arguments:

    fh       : A reference to a file handle to which the table should be
               printed.  Defaults to standard out.

    pvalueCutOff   : The p-value cutoff, above which p-values and associated
                     information will not be printed.  Default is no cutoff.

    geneUrl  : A url to which you want genes linked.  Must contain the
               text '<REPLACE_THIS>', which will be replaced with the
               gene name.

    goidUrl  : A url to which you want the GOIDs linked.  Must contain the
               text '<REPLACE_THIS>', which will be replaced with the


Gavin Sherlock

syntax highlighting: