예제 #1
0
 def getToolDescription():
     from proto.hyperbrowser.HtmlCore import HtmlCore
     core = HtmlCore()
     core.paragraph('Extract occurrences of a given k-mer in a specified region along the selected genome. K-mer occurrence track is extracted as a BED file.')
     core.divider()
     core.highlight('K-mer')
     core.paragraph('A string based on only the following characters: a, c, g, t, A, C, G, T. Eventual use of case has no effect.')
     core.divider()
     core.highlight('Region of the genome')
     core.paragraph('Region specification as in UCSC Genome browser. * means whole genome. k and m denotes thousand and million bps, respectively. E.g chr1:1-20m')
     return str(core)
 def getToolDescription():
     from proto.hyperbrowser.HtmlCore import HtmlCore
     core = HtmlCore()
     core.paragraph(
         'Analyze occurrences of a given k-mer along the genome, either in itself or in relation to other genomic tracks.'
     )
     core.divider()
     core.paragraph(
         'First, select a genome and k-mer of interest. Then a full analysis specification page appears, where one can directly start a basic analysis or specify further details on the analysis of interest.'
     )
     core.divider()
     core.highlight('K-mer')
     core.paragraph(
         'A string based on only the following characters: a, c, g, t, A, C, G, T. Eventual use of case has no effect.'
     )
     return str(core)
 def getToolDescription():
     from proto.hyperbrowser.HtmlCore import HtmlCore
     core = HtmlCore()
     core.paragraph(
         'Inspect the frequency variation of occurrences of a given k-mer in a specified region along the selected genome. The tool tries to determine appropriate binning of the specified region, and outputs the number of k-mer occurrences per bin as a plot and as underlying textual data.'
     )
     core.divider()
     core.highlight('K-mer')
     core.paragraph(
         'A string based on only the following characters: a, c, g, t, A, C, G, T. Eventual use of case has no effect.'
     )
     core.divider()
     core.highlight('Region of the genome')
     core.paragraph(
         'Region specification as in UCSC Genome browser. * means whole genome. k and m denotes thousand and million bps, respectively. E.g chr1:1-20m'
     )
     return str(core)
                        "Error: genome elements are overlapping while header variable 'no overlapping elements' is True."
                    )

                core.append('Done')
                valid = True
        except Exception, e:
            core.append(str(e))
            valid = False

        core.styleInfoEnd()

        core.divider()
        core.header('Conclusion:')
        core.styleInfoBegin(
            styleClass='donemessage' if valid else 'errormessage')
        core.highlight('The GTrack file has %s syntax' %
                       ('valid' if valid else 'invalid'))
        core.styleInfoEnd()

        core.end()
        print str(core)

    @staticmethod
    def validateAndReturnErrors(choices):
        '''
        Should validate the selected input parameters. If the parameters are not valid,
        an error text explaining the problem should be returned. The GUI then shows this text
        to the user (if not empty) and greys out the execute button (even if the text is empty).
        If all parameters are valid, the method should return None, which enables the execute button.
        '''

        genome = choices[1] if choices[0] == 'Yes' else None