本文整理汇总了Python中galaxy.datatypes.tabular.Tabular类的典型用法代码示例。如果您正苦于以下问题:Python Tabular类的具体用法?Python Tabular怎么用?Python Tabular使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Tabular类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: set_meta
def set_meta( self, dataset, overwrite = True, **kwd ):
"""Sets the metadata information for datasets previously determined to be in bed format."""
i = 0
if dataset.has_data():
for i, line in enumerate( file(dataset.file_name) ):
metadata_set = False
line = line.rstrip('\r\n')
if line and not line.startswith('#'):
elems = line.split('\t')
if len(elems) > 2:
for startswith in data.col1_startswith:
if line.lower().startswith( startswith ):
if len( elems ) > 3:
if overwrite or not dataset.metadata.element_is_set( 'nameCol' ):
dataset.metadata.nameCol = 4
if len(elems) < 6:
if overwrite or not dataset.metadata.element_is_set( 'strandCol' ):
dataset.metadata.strandCol = 0
else:
if overwrite or not dataset.metadata.element_is_set( 'strandCol' ):
dataset.metadata.strandCol = 6
metadata_set = True
break
if metadata_set: break
Tabular.set_meta( self, dataset, overwrite = overwrite, skip = i )
示例2: __init__
def __init__(self, **kwd):
"""Initialize CG_Var datatype"""
Tabular.__init__( self, **kwd )
self.column_names = ['locus', 'ploidy', 'allele', 'chromosome', 'begin', 'end',
'varType', 'reference', 'alleleSeq', 'varScoreVAF',
'varScoreEAF', 'varQuality', 'hapLink', 'xRef'
]
示例3: init_meta
def init_meta( self, dataset, copy_from=None ):
Tabular.init_meta( self, dataset, copy_from=copy_from )
self.column_names = ['DB', 'DB Object ID', 'DB Object Symbol', 'Qualifier', 'GO ID',
'DB:Reference (|DB:Reference)', 'Evidence Code', 'With (or) From',
'Aspect', 'DB Object', 'DB Object Synonym (|Synonym)', 'DB Object Type',
'Taxon(|taxon)', 'Date', 'Assigned By', 'Annotation Extension', 'Gene Product Form ID',
]
示例4: set_meta
def set_meta(self, dataset, **kwd):
Tabular.set_meta(self, dataset, **kwd)
dataset.metadata.markerCol = 1
header = open(dataset.file_name, 'r').readlines()[0].strip().split('\t')
dataset.metadata.columns = len(header)
t = ['numeric' for x in header]
t[0] = 'string'
dataset.metadata.column_types = t
return True
示例5: __init__
def __init__(self, **kwd):
Tabular.__init__(self, **kwd)
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?"]
示例6: set_meta
def set_meta(self, dataset, overwrite=True, skip=None, max_data_lines=None, **kwd):
Tabular.set_meta(self, dataset, overwrite, skip, max_data_lines)
tis_args = set()
try:
fh = open(dataset.file_name)
for line in fh:
fields = line.strip().split("\t")
try:
tis_args.add(fields[0])
except IndexError:
pass
dataset.metadata.args = []
dataset.metadata.args += tis_args
finally:
fh.close()
示例7: __init__
def __init__(self, **kwd):
Tabular.__init__(self, **kwd)
self.column_names = [
"ID",
"local_max",
"min_count_aTIS",
"R_aTis",
"min_count_5UTR",
"R_5UTR",
"min_count_CDS",
"R_CDS",
"min_count_3UTR",
"R_3UTR",
"min_count_no_trans",
"R_no_trans",
"SNP",
]
self.columns = 13
示例8: __init__
def __init__(self, **kwd):
"""Initialize datatype, by adding GBrowse display app"""
Tabular.__init__(self, **kwd)
self.add_display_app ('c_elegans', 'display in Wormbase', 'as_gbrowse_display_file', 'gbrowse_links' )
示例9: display_peek
def display_peek( self, dataset ):
"""Returns formated html of peek"""
return Tabular.make_html_table( self, dataset, skipchars=['track', '#'] )
示例10: __init__
def __init__( self, **kwd ):
Tabular.__init__( self, **kwd )
self.add_display_app( 'ucsc', 'display at UCSC', 'as_ucsc_display_file', 'ucsc_links' )
self.add_display_app( 'gbrowse', 'display in Gbrowse', 'as_gbrowse_display_file', 'gbrowse_links' )
示例11: __init__
def __init__(self, **kwd):
"""
Initialize gg datatype, by adding UCSC display apps
"""
Tabular.__init__(self, **kwd)
self.add_display_app('ucsc', 'Genome Graph', 'as_ucsc_display_file', 'ucsc_links')
示例12: make_html_table
def make_html_table( self, dataset ):
return Tabular.make_html_table( self, dataset, skipchars=['track', '#'] )
示例13: display_peek
def display_peek( self, dataset ):
return Tabular.make_html_table( self, dataset, column_names=self.column_names )
示例14: display_peek
def display_peek( self, dataset ):
"""Returns formated html of peek"""
return Tabular.make_html_table( self, dataset, column_names=self.column_names )
示例15: set_meta
def set_meta( self, dataset, **kwd ):
Tabular.set_meta( self, dataset, **kwd )