annotate galaxyp_util.py @ 0:9156a440afed draft default tip

Improved some datatype handling
author galaxyp
date Thu, 20 Jun 2013 11:09:24 -0400
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
9156a440afed Improved some datatype handling
galaxyp
parents:
diff changeset
1 from galaxy.datatypes.tabular import Tabular
9156a440afed Improved some datatype handling
galaxyp
parents:
diff changeset
2 import logging
9156a440afed Improved some datatype handling
galaxyp
parents:
diff changeset
3
9156a440afed Improved some datatype handling
galaxyp
parents:
diff changeset
4 log = logging.getLogger(__name__)
9156a440afed Improved some datatype handling
galaxyp
parents:
diff changeset
5
9156a440afed Improved some datatype handling
galaxyp
parents:
diff changeset
6
9156a440afed Improved some datatype handling
galaxyp
parents:
diff changeset
7 class PepXmlReport(Tabular):
9156a440afed Improved some datatype handling
galaxyp
parents:
diff changeset
8 """pepxml converted to tabular report"""
9156a440afed Improved some datatype handling
galaxyp
parents:
diff changeset
9 file_ext = "tsv"
9156a440afed Improved some datatype handling
galaxyp
parents:
diff changeset
10
9156a440afed Improved some datatype handling
galaxyp
parents:
diff changeset
11 def __init__(self, **kwd):
9156a440afed Improved some datatype handling
galaxyp
parents:
diff changeset
12 Tabular.__init__( self, **kwd )
9156a440afed Improved some datatype handling
galaxyp
parents:
diff changeset
13 self.column_names = ['Protein', 'Peptide', 'Assumed Charge', 'Neutral Pep Mass (calculated)', 'Neutral Mass', 'Retention Time', 'Start Scan', 'End Scan', 'Search Engine', 'PeptideProphet Probability', 'Interprophet Probabaility']
9156a440afed Improved some datatype handling
galaxyp
parents:
diff changeset
14
9156a440afed Improved some datatype handling
galaxyp
parents:
diff changeset
15 def set_meta( self, dataset, **kwd ):
9156a440afed Improved some datatype handling
galaxyp
parents:
diff changeset
16 Tabular.set_meta( self, dataset, **kwd )
9156a440afed Improved some datatype handling
galaxyp
parents:
diff changeset
17
9156a440afed Improved some datatype handling
galaxyp
parents:
diff changeset
18 #def display_peek( self, dataset ):
9156a440afed Improved some datatype handling
galaxyp
parents:
diff changeset
19 # """Returns formated html of peek"""
9156a440afed Improved some datatype handling
galaxyp
parents:
diff changeset
20 # return Tabular.make_html_table( self, dataset, column_names=self.column_names )
9156a440afed Improved some datatype handling
galaxyp
parents:
diff changeset
21
9156a440afed Improved some datatype handling
galaxyp
parents:
diff changeset
22
9156a440afed Improved some datatype handling
galaxyp
parents:
diff changeset
23 class ProtXmlReport(Tabular):
9156a440afed Improved some datatype handling
galaxyp
parents:
diff changeset
24 """protxml converted to tabular report"""
9156a440afed Improved some datatype handling
galaxyp
parents:
diff changeset
25 file_ext = "tsv"
9156a440afed Improved some datatype handling
galaxyp
parents:
diff changeset
26 comment_lines = 1
9156a440afed Improved some datatype handling
galaxyp
parents:
diff changeset
27
9156a440afed Improved some datatype handling
galaxyp
parents:
diff changeset
28 def __init__(self, **kwd):
9156a440afed Improved some datatype handling
galaxyp
parents:
diff changeset
29 Tabular.__init__( self, **kwd )
9156a440afed Improved some datatype handling
galaxyp
parents:
diff changeset
30 self.column_names = ["Entry Number", "Group Probability", "Protein", "Protein Link", "Protein Probability", "Percent Coverage", "Number of Unique Peptides", "Total Independent Spectra", "Percent Share of Spectrum ID's", "Description", "Protein Molecular Weight", "Protein Length", "Is Nondegenerate Evidence", "Weight", "Precursor Ion Charge", "Peptide sequence", "Peptide Link", "NSP Adjusted Probability", "Initial Probability", "Number of Total Termini", "Number of Sibling Peptides Bin", "Number of Instances", "Peptide Group Designator", "Is Evidence?"]
9156a440afed Improved some datatype handling
galaxyp
parents:
diff changeset
31
9156a440afed Improved some datatype handling
galaxyp
parents:
diff changeset
32 def set_meta( self, dataset, **kwd ):
9156a440afed Improved some datatype handling
galaxyp
parents:
diff changeset
33 Tabular.set_meta( self, dataset, **kwd )
9156a440afed Improved some datatype handling
galaxyp
parents:
diff changeset
34
9156a440afed Improved some datatype handling
galaxyp
parents:
diff changeset
35 #def display_peek( self, dataset ):
9156a440afed Improved some datatype handling
galaxyp
parents:
diff changeset
36 # """Returns formated html of peek"""
9156a440afed Improved some datatype handling
galaxyp
parents:
diff changeset
37 # return Tabular.make_html_table( self, dataset, column_names=self.column_names )