galaxy.datatypes package

Subpackages

Submodules

galaxy.datatypes.annotation module

class galaxy.datatypes.annotation.SnapHmm(**kwd)[source]

Bases: galaxy.datatypes.data.Text

file_ext = 'snaphmm'
edam_data = 'data_1364'
set_peek(dataset, is_multi_byte=False)[source]
display_peek(dataset)[source]
sniff_prefix(file_prefix)[source]

SNAP model files start with zoeHMM

metadata_spec = {'data_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f723f278>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d4a8>}
sniff(filename)
class galaxy.datatypes.annotation.Augustus(**kwd)[source]

Bases: galaxy.datatypes.binary.CompressedArchive

Class describing an Augustus prediction model

file_ext = 'augustus'
edam_data = 'data_0950'
compressed = True
set_peek(dataset, is_multi_byte=False)[source]
display_peek(dataset)[source]
sniff(filename)[source]

Augustus archives always contain the same files

metadata_spec = {'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f7224780>}

galaxy.datatypes.anvio module

Datatypes for Anvi’o https://github.com/merenlab/anvio

class galaxy.datatypes.anvio.AnvioComposite(**kwd)[source]

Bases: galaxy.datatypes.text.Html

Base class to use for Anvi’o composite datatypes. Generally consist of a sqlite database, plus optional additional files

file_ext = 'anvio_composite'
composite_type = 'auto_primary_file'
generate_primary_file(dataset=None)[source]

This is called only at upload to write the html file cannot rename the datasets here - they come with the default unfortunately

get_mime()[source]

Returns the mime type of the datatype

set_peek(dataset, is_multi_byte=False)[source]

Set the peek and blurb text

display_peek(dataset)[source]

Create HTML content, used for displaying peek.

metadata_spec = {'data_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f53b9438>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d4a8>}
class galaxy.datatypes.anvio.AnvioDB(*args, **kwd)[source]

Bases: galaxy.datatypes.anvio.AnvioComposite

Class for AnvioDB database files.

file_ext = 'anvio_db'
composite_type = 'auto_primary_file'
allow_datatype_change = False
__init__(*args, **kwd)[source]
set_meta(dataset, **kwd)[source]

Set the anvio_basename based upon actual extra_files_path contents.

metadata_spec = {'anvio_basename': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f53b7668>, 'data_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f53b9438>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d4a8>}
class galaxy.datatypes.anvio.AnvioStructureDB(*args, **kwd)[source]

Bases: galaxy.datatypes.anvio.AnvioDB

Class for Anvio Structure DB database files.

file_ext = 'anvio_structure_db'
composite_type = 'auto_primary_file'
allow_datatype_change = False
metadata_spec = {'anvio_basename': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f53b7358>, 'data_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f53b9438>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d4a8>}
class galaxy.datatypes.anvio.AnvioGenomesDB(*args, **kwd)[source]

Bases: galaxy.datatypes.anvio.AnvioDB

Class for Anvio Genomes DB database files.

file_ext = 'anvio_genomes_db'
composite_type = 'auto_primary_file'
allow_datatype_change = False
metadata_spec = {'anvio_basename': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f53b7c88>, 'data_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f53b9438>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d4a8>}
class galaxy.datatypes.anvio.AnvioContigsDB(*args, **kwd)[source]

Bases: galaxy.datatypes.anvio.AnvioDB

Class for Anvio Contigs DB database files.

file_ext = 'anvio_contigs_db'
composite_type = 'auto_primary_file'
allow_datatype_change = False
__init__(*args, **kwd)[source]
metadata_spec = {'anvio_basename': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f721d908>, 'data_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f53b9438>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d4a8>}
class galaxy.datatypes.anvio.AnvioProfileDB(*args, **kwd)[source]

Bases: galaxy.datatypes.anvio.AnvioDB

Class for Anvio Profile DB database files.

file_ext = 'anvio_profile_db'
composite_type = 'auto_primary_file'
allow_datatype_change = False
__init__(*args, **kwd)[source]
metadata_spec = {'anvio_basename': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f721dc18>, 'data_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f53b9438>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d4a8>}
class galaxy.datatypes.anvio.AnvioPanDB(*args, **kwd)[source]

Bases: galaxy.datatypes.anvio.AnvioDB

Class for Anvio Pan DB database files.

file_ext = 'anvio_pan_db'
composite_type = 'auto_primary_file'
allow_datatype_change = False
metadata_spec = {'anvio_basename': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f721d978>, 'data_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f53b9438>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d4a8>}
class galaxy.datatypes.anvio.AnvioSamplesDB(*args, **kwd)[source]

Bases: galaxy.datatypes.anvio.AnvioDB

Class for Anvio Samples DB database files.

file_ext = 'anvio_samples_db'
composite_type = 'auto_primary_file'
allow_datatype_change = False
metadata_spec = {'anvio_basename': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f721d6d8>, 'data_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f53b9438>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d4a8>}

galaxy.datatypes.assembly module

velvet datatypes James E Johnson - University of Minnesota for velvet assembler tool in galaxy

class galaxy.datatypes.assembly.Amos(**kwd)[source]

Bases: galaxy.datatypes.data.Text

Class describing the AMOS assembly file

edam_data = 'data_0925'
edam_format = 'format_3582'
file_ext = 'afg'
sniff_prefix(file_prefix)[source]

Determines whether the file is an amos assembly file format Example:

{CTG
iid:1
eid:1
seq:
CCTCTCCTGTAGAGTTCAACCGA-GCCGGTAGAGTTTTATCA
.
qlt:
DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD
.
{TLE
src:1027
off:0
clr:618,0
gap:
250 612
.
}
}
metadata_spec = {'data_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f6a5f518>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d4a8>}
sniff(filename)
class galaxy.datatypes.assembly.Sequences(**kwd)[source]

Bases: galaxy.datatypes.sequence.Fasta

Class describing the Sequences file generated by velveth

edam_data = 'data_0925'
file_ext = 'sequences'
sniff_prefix(file_prefix)[source]

Determines whether the file is a velveth produced fasta format The id line has 3 fields separated by tabs: sequence_name sequence_index category:

>SEQUENCE_0_length_35   1       1
GGATATAGGGCCAACCCAACTCAACGGCCTGTCTT
>SEQUENCE_1_length_35   2       1
CGACGAATGACAGGTCACGAATTTGGCGGGGATTA
metadata_spec = {'data_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d780>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d4a8>, 'sequences': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f6a83128>}
sniff(filename)
class galaxy.datatypes.assembly.Roadmaps(**kwd)[source]

Bases: galaxy.datatypes.data.Text

Class describing the Sequences file generated by velveth

edam_format = 'format_2561'
file_ext = 'roadmaps'
sniff_prefix(file_prefix)[source]
Determines whether the file is a velveth produced RoadMap::
142858 21 1 ROADMAP 1 ROADMAP 2 …
metadata_spec = {'data_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f63618d0>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d4a8>}
sniff(filename)
class galaxy.datatypes.assembly.Velvet(**kwd)[source]

Bases: galaxy.datatypes.text.Html

composite_type = 'auto_primary_file'
allow_datatype_change = False
file_ext = 'velvet'
__init__(**kwd)[source]
generate_primary_file(dataset=None)[source]
regenerate_primary_file(dataset)[source]

cannot do this until we are setting metadata

set_meta(dataset, **kwd)[source]
metadata_spec = {'base_name': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f6361a90>, 'data_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f53974e0>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d4a8>, 'long_reads': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f6361b70>, 'paired_end_reads': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f6361b00>, 'short2_reads': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f6361be0>}

galaxy.datatypes.binary module

Binary classes

class galaxy.datatypes.binary.Binary(**kwd)[source]

Bases: galaxy.datatypes.data.Data

Binary data

edam_format = 'format_2333'
static register_sniffable_binary_format(data_type, ext, type_class)[source]

Deprecated method.

static register_unsniffable_binary_ext(ext)[source]

Deprecated method.

set_peek(dataset, is_multi_byte=False)[source]

Set the peek and blurb text

get_mime()[source]

Returns the mime type of the datatype

metadata_spec = {'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1132fa278>}
class galaxy.datatypes.binary.Ab1(**kwd)[source]

Bases: galaxy.datatypes.binary.Binary

Class describing an ab1 binary sequence file

file_ext = 'ab1'
edam_format = 'format_3000'
edam_data = 'data_0924'
set_peek(dataset, is_multi_byte=False)[source]
display_peek(dataset)[source]
metadata_spec = {'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1132fa358>}
class galaxy.datatypes.binary.Idat(**kwd)[source]

Bases: galaxy.datatypes.binary.Binary

Binary data in idat format

file_ext = 'idat'
edam_format = 'format_2058'
edam_data = 'data_2603'
sniff(filename)[source]
metadata_spec = {'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1132fa4a8>}
class galaxy.datatypes.binary.Cel(**kwd)[source]

Bases: galaxy.datatypes.binary.Binary

Cel File format described at: http://media.affymetrix.com/support/developer/powertools/changelog/gcos-agcc/cel.html

file_ext = 'cel'
edam_format = 'format_1638'
edam_data = 'data_3110'
sniff(filename)[source]

Try to guess if the file is a Cel file. >>> from galaxy.datatypes.sniff import get_test_fname >>> fname = get_test_fname(‘affy_v_agcc.cel’) >>> Cel().sniff(fname) True >>> fname = get_test_fname(‘affy_v_3.cel’) >>> Cel().sniff(fname) True >>> fname = get_test_fname(‘affy_v_4.cel’) >>> Cel().sniff(fname) True >>> fname = get_test_fname(‘test.gal’) >>> Cel().sniff(fname) False

set_meta(dataset, **kwd)[source]

Set metadata for Cel file.

set_peek(dataset, is_multi_byte=False)[source]
metadata_spec = {'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1132fa278>, 'version': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1132fa6a0>}
class galaxy.datatypes.binary.MashSketch(**kwd)[source]

Bases: galaxy.datatypes.binary.Binary

Mash Sketch file. Sketches are used by the MinHash algorithm to allow fast distance estimations with low storage and memory requirements. To make a sketch, each k-mer in a sequence is hashed, which creates a pseudo-random identifier. By sorting these identifiers (hashes), a small subset from the top of the sorted list can represent the entire sequence (these are min-hashes). The more similar another sequence is, the more min-hashes it is likely to share.

file_ext = 'msh'
metadata_spec = {'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1132fa898>}
class galaxy.datatypes.binary.CompressedArchive(**kwd)[source]

Bases: galaxy.datatypes.binary.Binary

Class describing an compressed binary file This class can be sublass’ed to implement archive filetypes that will not be unpacked by upload.py.

file_ext = 'compressed_archive'
compressed = True
set_peek(dataset, is_multi_byte=False)[source]
display_peek(dataset)[source]
metadata_spec = {'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1132faa90>}
class galaxy.datatypes.binary.DynamicCompressedArchive(**kwd)[source]

Bases: galaxy.datatypes.binary.CompressedArchive

matches_any(target_datatypes)[source]

Treat two aspects of compressed datatypes separately.

metadata_spec = {'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1132fac88>}
class galaxy.datatypes.binary.GzDynamicCompressedArchive(**kwd)[source]

Bases: galaxy.datatypes.binary.DynamicCompressedArchive

compressed_format = 'gzip'
metadata_spec = {'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1132fae80>}
class galaxy.datatypes.binary.Bz2DynamicCompressedArchive(**kwd)[source]

Bases: galaxy.datatypes.binary.DynamicCompressedArchive

compressed_format = 'bz2'
metadata_spec = {'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1133040b8>}
class galaxy.datatypes.binary.CompressedZipArchive(**kwd)[source]

Bases: galaxy.datatypes.binary.CompressedArchive

Class describing an compressed binary file This class can be sublass’ed to implement archive filetypes that will not be unpacked by upload.py.

file_ext = 'zip'
set_peek(dataset, is_multi_byte=False)[source]
display_peek(dataset)[source]
metadata_spec = {'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1133042b0>}
class galaxy.datatypes.binary.GenericAsn1Binary(**kwd)[source]

Bases: galaxy.datatypes.binary.Binary

Class for generic ASN.1 binary format

file_ext = 'asn1-binary'
edam_format = 'format_1966'
edam_data = 'data_0849'
metadata_spec = {'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1133044a8>}
class galaxy.datatypes.binary.BamNative(**kwd)[source]

Bases: galaxy.datatypes.binary.CompressedArchive

Class describing a BAM binary file that is not necessarily sorted

edam_format = 'format_2572'
edam_data = 'data_0863'
file_ext = 'unsorted.bam'
sort_flag = None
static merge(split_files, output_file)[source]

Merges BAM files

Parameters:
  • split_files – List of bam file paths to merge
  • output_file – Write merged bam file to this location
init_meta(dataset, copy_from=None)[source]
sniff(filename)[source]
classmethod is_bam(filename)[source]
set_meta(dataset, overwrite=True, **kwd)[source]
set_peek(dataset, is_multi_byte=False)[source]
display_peek(dataset)[source]
to_archive(trans, dataset, name='')[source]
groom_dataset_content(file_name)[source]

Ensures that the BAM file contents are coordinate-sorted. This function is called on an output dataset after the content is initially generated.

get_chunk(trans, dataset, offset=0, ck_size=None)[source]
display_data(trans, dataset, preview=False, filename=None, to_ext=None, offset=None, ck_size=None, **kwd)[source]
validate(dataset, **kwd)[source]
metadata_spec = {'bam_header': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd113304978>, 'bam_version': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd113304748>, 'column_names': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd113304ac8>, 'column_types': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd113304a58>, 'columns': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1133049e8>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1132faa90>, 'read_groups': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd113304828>, 'reference_lengths': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd113304908>, 'reference_names': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd113304898>, 'sort_order': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1133047b8>}
class galaxy.datatypes.binary.Bam(**kwd)[source]

Bases: galaxy.datatypes.binary.BamNative

Class describing a BAM binary file

edam_format = 'format_2572'
edam_data = 'data_0863'
file_ext = 'bam'
track_type = 'ReadTrack'
data_sources = {'data': 'bai', 'index': 'bigwig'}
dataset_content_needs_grooming(file_name)[source]

Check if file_name is a coordinate-sorted BAM file

set_meta(dataset, overwrite=True, **kwd)[source]
sniff(file_name)[source]
line_dataprovider(dataset, **settings)[source]
regex_line_dataprovider(dataset, **settings)[source]
column_dataprovider(dataset, **settings)[source]
dict_dataprovider(dataset, **settings)[source]
header_dataprovider(dataset, **settings)[source]
id_seq_qual_dataprovider(dataset, **settings)[source]
genomic_region_dataprovider(dataset, **settings)[source]
genomic_region_dict_dataprovider(dataset, **settings)[source]
samtools_dataprovider(dataset, **settings)[source]

Generic samtools interface - all options available through settings.

dataproviders = {'base': <function Data.base_dataprovider at 0x7fd116622048>, 'chunk': <function Data.chunk_dataprovider at 0x7fd1166221e0>, 'chunk64': <function Data.chunk64_dataprovider at 0x7fd116622378>, 'column': <function Bam.column_dataprovider at 0x7fd113307950>, 'dict': <function Bam.dict_dataprovider at 0x7fd113307ae8>, 'genomic-region': <function Bam.genomic_region_dataprovider at 0x7fd11330a048>, 'genomic-region-dict': <function Bam.genomic_region_dict_dataprovider at 0x7fd11330a1e0>, 'header': <function Bam.header_dataprovider at 0x7fd113307c80>, 'id-seq-qual': <function Bam.id_seq_qual_dataprovider at 0x7fd113307e18>, 'line': <function Bam.line_dataprovider at 0x7fd113307620>, 'regex-line': <function Bam.regex_line_dataprovider at 0x7fd1133077b8>, 'samtools': <function Bam.samtools_dataprovider at 0x7fd11330a378>}
metadata_spec = {'bam_header': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd113304978>, 'bam_index': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11330c160>, 'bam_version': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd113304748>, 'column_names': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd113304ac8>, 'column_types': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd113304a58>, 'columns': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1133049e8>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1132faa90>, 'read_groups': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd113304828>, 'reference_lengths': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd113304908>, 'reference_names': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd113304898>, 'sort_order': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1133047b8>}
class galaxy.datatypes.binary.ProBam(**kwd)[source]

Bases: galaxy.datatypes.binary.Bam

Class describing a BAM binary file - extended for proteomics data

edam_format = 'format_3826'
edam_data = 'data_0863'
file_ext = 'probam'
metadata_spec = {'bam_header': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd113304978>, 'bam_index': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11330c358>, 'bam_version': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd113304748>, 'column_names': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd113304ac8>, 'column_types': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd113304a58>, 'columns': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1133049e8>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1132faa90>, 'read_groups': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd113304828>, 'reference_lengths': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd113304908>, 'reference_names': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd113304898>, 'sort_order': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1133047b8>}
class galaxy.datatypes.binary.BamInputSorted(**kwd)[source]

Bases: galaxy.datatypes.binary.BamNative

sort_flag = '-n'
file_ext = 'qname_input_sorted.bam'

A class for BAM files that can formally be unsorted or queryname sorted. Alignments are either ordered based on the order with which the queries appear when producing the alignment, or ordered by their queryname. This notaby keeps alignments produced by paired end sequencing adjacent.

sniff(file_name)[source]
dataset_content_needs_grooming(file_name)[source]

Groom if the file is coordinate sorted

metadata_spec = {'bam_header': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11330c780>, 'bam_version': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11330c550>, 'column_names': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11330c8d0>, 'column_types': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11330c860>, 'columns': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11330c7f0>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1132faa90>, 'read_groups': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11330c630>, 'reference_lengths': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11330c710>, 'reference_names': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11330c6a0>, 'sort_order': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11330c5c0>}
class galaxy.datatypes.binary.BamQuerynameSorted(**kwd)[source]

Bases: galaxy.datatypes.binary.BamInputSorted

A class for queryname sorted BAM files.

sort_flag = '-n'
file_ext = 'qname_sorted.bam'
sniff(file_name)[source]
dataset_content_needs_grooming(file_name)[source]

Check if file_name is a queryname-sorted BAM file

metadata_spec = {'bam_header': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11330ccf8>, 'bam_version': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11330cac8>, 'column_names': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11330ce48>, 'column_types': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11330cdd8>, 'columns': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11330cd68>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1132faa90>, 'read_groups': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11330cba8>, 'reference_lengths': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11330cc88>, 'reference_names': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11330cc18>, 'sort_order': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11330cb38>}
class galaxy.datatypes.binary.CRAM(**kwd)[source]

Bases: galaxy.datatypes.binary.Binary

file_ext = 'cram'
edam_format = 'format_3462'
edam_data = 'format_0863'
set_meta(dataset, overwrite=True, **kwd)[source]
get_cram_version(filename)[source]
set_index_file(dataset, index_file)[source]
set_peek(dataset, is_multi_byte=False)[source]
sniff(filename)[source]
metadata_spec = {'cram_index': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1133100f0>, 'cram_version': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd113310080>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1132fa278>}
class galaxy.datatypes.binary.BaseBcf(**kwd)[source]

Bases: galaxy.datatypes.binary.CompressedArchive

edam_format = 'format_3020'
edam_data = 'data_3498'
metadata_spec = {'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1133102e8>}
class galaxy.datatypes.binary.Bcf(**kwd)[source]

Bases: galaxy.datatypes.binary.BaseBcf

Class describing a (BGZF-compressed) BCF file

file_ext = 'bcf'
sniff(filename)[source]
set_meta(dataset, overwrite=True, **kwd)[source]

Creates the index for the BCF file.

metadata_spec = {'bcf_index': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1133104e0>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1133102e8>}
class galaxy.datatypes.binary.BcfUncompressed(**kwd)[source]

Bases: galaxy.datatypes.binary.BaseBcf

Class describing an uncompressed BCF file

>>> from galaxy.datatypes.sniff import get_test_fname
>>> fname = get_test_fname('1.bcf_uncompressed')
>>> BcfUncompressed().sniff(fname)
True
>>> fname = get_test_fname('1.bcf')
>>> BcfUncompressed().sniff(fname)
False
file_ext = 'bcf_uncompressed'
sniff(filename)[source]
metadata_spec = {'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1133106d8>}
class galaxy.datatypes.binary.H5(**kwd)[source]

Bases: galaxy.datatypes.binary.Binary

Class describing an HDF5 file

>>> from galaxy.datatypes.sniff import get_test_fname
>>> fname = get_test_fname('test.mz5')
>>> H5().sniff(fname)
True
>>> fname = get_test_fname('interval.interval')
>>> H5().sniff(fname)
False
file_ext = 'h5'
edam_format = 'format_3590'
__init__(**kwd)[source]
sniff(filename)[source]
set_peek(dataset, is_multi_byte=False)[source]
display_peek(dataset)[source]
metadata_spec = {'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1133108d0>}
class galaxy.datatypes.binary.Loom(**kwd)[source]

Bases: galaxy.datatypes.binary.H5

Class describing a Loom file: http://loompy.org/

>>> from galaxy.datatypes.sniff import get_test_fname
>>> fname = get_test_fname('test.loom')
>>> Loom().sniff(fname)
True
>>> fname = get_test_fname('test.mz5')
>>> Loom().sniff(fname)
False
file_ext = 'loom'
edam_format = 'format_3590'
sniff(filename)[source]
set_peek(dataset, is_multi_byte=False)[source]
display_peek(dataset)[source]
set_meta(dataset, overwrite=True, **kwd)[source]
metadata_spec = {'col_attrs_count': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11329b080>, 'col_attrs_names': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11329b0f0>, 'col_graphs_count': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11329b160>, 'col_graphs_names': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11329b1d0>, 'creation_date': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd113310d68>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1133108d0>, 'description': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd113310ba8>, 'doi': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd113310c88>, 'layers_count': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd113310e48>, 'layers_names': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd113310eb8>, 'loom_spec_version': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd113310cf8>, 'row_attrs_count': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd113310f60>, 'row_attrs_names': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd113310fd0>, 'row_graphs_count': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11329b240>, 'row_graphs_names': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11329b2b0>, 'shape': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd113310dd8>, 'title': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd113310b38>, 'url': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd113310c18>}
class galaxy.datatypes.binary.Anndata(**kwd)[source]

Bases: galaxy.datatypes.binary.H5

Class describing an HDF5 anndata files: http://anndata.rtfd.io >>> from galaxy.datatypes.sniff import get_test_fname >>> Anndata().sniff(get_test_fname(‘pbmc3k_tiny.h5ad’)) True >>> Anndata().sniff(get_test_fname(‘test.mz5’)) False

file_ext = 'h5ad'
sniff(filename)[source]
metadata_spec = {'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11329b4a8>}
class galaxy.datatypes.binary.GmxBinary(**kwd)[source]

Bases: galaxy.datatypes.binary.Binary

Base class for GROMACS binary files - xtc, trr, cpt

magic_number = None
file_ext = ''
sniff(filename)[source]
set_peek(dataset, is_multi_byte=False)[source]
display_peek(dataset)[source]
metadata_spec = {'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11329b6a0>}
class galaxy.datatypes.binary.Trr(**kwd)[source]

Bases: galaxy.datatypes.binary.GmxBinary

Class describing an trr file from the GROMACS suite

>>> from galaxy.datatypes.sniff import get_test_fname
>>> fname = get_test_fname('md.trr')
>>> Trr().sniff(fname)
True
>>> fname = get_test_fname('interval.interval')
>>> Trr().sniff(fname)
False
file_ext = 'trr'
magic_number = 1993
metadata_spec = {'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11329b898>}
class galaxy.datatypes.binary.Cpt(**kwd)[source]

Bases: galaxy.datatypes.binary.GmxBinary

Class describing a checkpoint (.cpt) file from the GROMACS suite

>>> from galaxy.datatypes.sniff import get_test_fname
>>> fname = get_test_fname('md.cpt')
>>> Cpt().sniff(fname)
True
>>> fname = get_test_fname('md.trr')
>>> Cpt().sniff(fname)
False
file_ext = 'cpt'
magic_number = 171817
metadata_spec = {'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11329ba90>}
class galaxy.datatypes.binary.Xtc(**kwd)[source]

Bases: galaxy.datatypes.binary.GmxBinary

Class describing an xtc file from the GROMACS suite

>>> from galaxy.datatypes.sniff import get_test_fname
>>> fname = get_test_fname('md.xtc')
>>> Xtc().sniff(fname)
True
>>> fname = get_test_fname('md.trr')
>>> Xtc().sniff(fname)
False
file_ext = 'xtc'
magic_number = 1995
metadata_spec = {'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11329bc88>}
class galaxy.datatypes.binary.Edr(**kwd)[source]

Bases: galaxy.datatypes.binary.GmxBinary

Class describing an edr file from the GROMACS suite

>>> from galaxy.datatypes.sniff import get_test_fname
>>> fname = get_test_fname('md.edr')
>>> Edr().sniff(fname)
True
>>> fname = get_test_fname('md.trr')
>>> Edr().sniff(fname)
False
file_ext = 'edr'
magic_number = -55555
metadata_spec = {'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11329be80>}
class galaxy.datatypes.binary.Biom2(**kwd)[source]

Bases: galaxy.datatypes.binary.H5

Class describing a biom2 file (http://biom-format.org/documentation/biom_format.html)

file_ext = 'biom2'
edam_format = 'format_3746'
sniff(filename)[source]
>>> from galaxy.datatypes.sniff import get_test_fname
>>> fname = get_test_fname('biom2_sparse_otu_table_hdf5.biom2')
>>> Biom2().sniff(fname)
True
>>> fname = get_test_fname('test.mz5')
>>> Biom2().sniff(fname)
False
>>> fname = get_test_fname('wiggle.wig')
>>> Biom2().sniff(fname)
False
set_meta(dataset, overwrite=True, **kwd)[source]
set_peek(dataset, is_multi_byte=False)[source]
display_peek(dataset)[source]
metadata_spec = {'creation_date': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1132a23c8>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1133108d0>, 'format': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1132a2278>, 'format_url': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1132a2198>, 'format_version': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1132a2208>, 'generated_by': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1132a2358>, 'id': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1132a2128>, 'nnz': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1132a2438>, 'shape': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1132a24a8>, 'type': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1132a22e8>}
class galaxy.datatypes.binary.Cool(**kwd)[source]

Bases: galaxy.datatypes.binary.H5

Class describing the cool format (https://github.com/mirnylab/cooler)

file_ext = 'cool'
sniff(filename)[source]
>>> from galaxy.datatypes.sniff import get_test_fname
>>> fname = get_test_fname('matrix.cool')
>>> Cool().sniff(fname)
True
>>> fname = get_test_fname('test.mz5')
>>> Cool().sniff(fname)
False
>>> fname = get_test_fname('wiggle.wig')
>>> Cool().sniff(fname)
False
>>> fname = get_test_fname('biom2_sparse_otu_table_hdf5.biom2')
>>> Cool().sniff(fname)
False
set_peek(dataset, is_multi_byte=False)[source]
display_peek(dataset)[source]
metadata_spec = {'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1132a26d8>}
class galaxy.datatypes.binary.MCool(**kwd)[source]

Bases: galaxy.datatypes.binary.H5

Class describing the multi-resolution cool format (https://github.com/mirnylab/cooler)

file_ext = 'mcool'
sniff(filename)[source]
>>> from galaxy.datatypes.sniff import get_test_fname
>>> fname = get_test_fname('matrix.mcool')
>>> MCool().sniff(fname)
True
>>> fname = get_test_fname('matrix.cool')
>>> MCool().sniff(fname)
False
>>> fname = get_test_fname('test.mz5')
>>> MCool().sniff(fname)
False
>>> fname = get_test_fname('wiggle.wig')
>>> MCool().sniff(fname)
False
>>> fname = get_test_fname('biom2_sparse_otu_table_hdf5.biom2')
>>> MCool().sniff(fname)
False
set_peek(dataset, is_multi_byte=False)[source]
display_peek(dataset)[source]
metadata_spec = {'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1132a2908>}
class galaxy.datatypes.binary.Scf(**kwd)[source]

Bases: galaxy.datatypes.binary.Binary

Class describing an scf binary sequence file

edam_format = 'format_1632'
edam_data = 'data_0924'
file_ext = 'scf'
set_peek(dataset, is_multi_byte=False)[source]
display_peek(dataset)[source]
metadata_spec = {'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1132a2b00>}
class galaxy.datatypes.binary.Sff(**kwd)[source]

Bases: galaxy.datatypes.binary.Binary

Standard Flowgram Format (SFF)

edam_format = 'format_3284'
edam_data = 'data_0924'
file_ext = 'sff'
sniff(filename)[source]
set_peek(dataset, is_multi_byte=False)[source]
display_peek(dataset)[source]
metadata_spec = {'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1132a2cf8>}
class galaxy.datatypes.binary.BigWig(**kwd)[source]

Bases: galaxy.datatypes.binary.Binary

Accessing binary BigWig files from UCSC. The supplemental info in the paper has the binary details: http://bioinformatics.oxfordjournals.org/cgi/content/abstract/btq351v1

edam_format = 'format_3006'
edam_data = 'data_3002'
file_ext = 'bigwig'
track_type = 'LineTrack'
data_sources = {'data_standalone': 'bigwig'}
__init__(**kwd)[source]
sniff(filename)[source]
set_peek(dataset, is_multi_byte=False)[source]
display_peek(dataset)[source]
metadata_spec = {'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1132a2ef0>}
class galaxy.datatypes.binary.BigBed(**kwd)[source]

Bases: galaxy.datatypes.binary.BigWig

BigBed support from UCSC.

edam_format = 'format_3004'
edam_data = 'data_3002'
file_ext = 'bigbed'
data_sources = {'data_standalone': 'bigbed'}
__init__(**kwd)[source]
metadata_spec = {'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1132a8128>}
class galaxy.datatypes.binary.TwoBit(**kwd)[source]

Bases: galaxy.datatypes.binary.Binary

Class describing a TwoBit format nucleotide file

edam_format = 'format_3009'
edam_data = 'data_0848'
file_ext = 'twobit'
sniff(filename)[source]
set_peek(dataset, is_multi_byte=False)[source]
display_peek(dataset)[source]
metadata_spec = {'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1132a8390>}
class galaxy.datatypes.binary.SQlite(**kwd)[source]

Bases: galaxy.datatypes.binary.Binary

Class describing a Sqlite database

file_ext = 'sqlite'
edam_format = 'format_3621'
init_meta(dataset, copy_from=None)[source]
set_meta(dataset, overwrite=True, **kwd)[source]
sniff(filename)[source]
sniff_table_names(filename, table_names)[source]
set_peek(dataset, is_multi_byte=False)[source]
display_peek(dataset)[source]
sqlite_dataprovider(dataset, **settings)[source]
sqlite_datatableprovider(dataset, **settings)[source]
sqlite_datadictprovider(dataset, **settings)[source]
dataproviders = {'base': <function Data.base_dataprovider at 0x7fd116622048>, 'chunk': <function Data.chunk_dataprovider at 0x7fd1166221e0>, 'chunk64': <function Data.chunk64_dataprovider at 0x7fd116622378>, 'sqlite': <function SQlite.sqlite_dataprovider at 0x7fd1132a97b8>, 'sqlite-dict': <function SQlite.sqlite_datadictprovider at 0x7fd1132a9ae8>, 'sqlite-table': <function SQlite.sqlite_datatableprovider at 0x7fd1132a9950>}
metadata_spec = {'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1132fa278>, 'table_columns': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1132a8748>, 'table_row_count': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1132a87b8>, 'tables': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1132a86d8>}
class galaxy.datatypes.binary.GeminiSQLite(**kwd)[source]

Bases: galaxy.datatypes.binary.SQlite

Class describing a Gemini Sqlite database

file_ext = 'gemini.sqlite'
edam_format = 'format_3622'
edam_data = 'data_3498'
set_meta(dataset, overwrite=True, **kwd)[source]
sniff(filename)[source]
set_peek(dataset, is_multi_byte=False)[source]
display_peek(dataset)[source]
metadata_spec = {'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1132fa278>, 'gemini_version': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1132a8a20>, 'table_columns': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1132a8748>, 'table_row_count': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1132a87b8>, 'tables': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1132a86d8>}
class galaxy.datatypes.binary.CuffDiffSQlite(**kwd)[source]

Bases: galaxy.datatypes.binary.SQlite

Class describing a CuffDiff SQLite database

file_ext = 'cuffdiff.sqlite'
edam_format = 'format_3621'
set_meta(dataset, overwrite=True, **kwd)[source]
sniff(filename)[source]
set_peek(dataset, is_multi_byte=False)[source]
display_peek(dataset)[source]
metadata_spec = {'cuffdiff_version': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1132a8c88>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1132fa278>, 'genes': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1132a8cf8>, 'samples': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1132a8d68>, 'table_columns': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1132a8748>, 'table_row_count': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1132a87b8>, 'tables': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1132a86d8>}
class galaxy.datatypes.binary.MzSQlite(**kwd)[source]

Bases: galaxy.datatypes.binary.SQlite

Class describing a Proteomics Sqlite database

file_ext = 'mz.sqlite'
set_meta(dataset, overwrite=True, **kwd)[source]
sniff(filename)[source]
metadata_spec = {'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1132fa278>, 'table_columns': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1132b0080>, 'table_row_count': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1132b00f0>, 'tables': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1132a8fd0>}
class galaxy.datatypes.binary.BlibSQlite(**kwd)[source]

Bases: galaxy.datatypes.binary.SQlite

Class describing a Proteomics Spectral Library Sqlite database

file_ext = 'blib'
set_meta(dataset, overwrite=True, **kwd)[source]
sniff(filename)[source]
metadata_spec = {'blib_version': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1132b0358>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1132fa278>, 'table_columns': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1132a8748>, 'table_row_count': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1132a87b8>, 'tables': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1132a86d8>}
class galaxy.datatypes.binary.DlibSQlite(**kwd)[source]

Bases: galaxy.datatypes.binary.SQlite

Class describing a Proteomics Spectral Library Sqlite database DLIBs only have the “entries”, “metadata”, and “peptidetoprotein” tables populated. ELIBs have the rest of the tables populated too, such as “peptidequants” or “peptidescores”.

>>> from galaxy.datatypes.sniff import get_test_fname
>>> fname = get_test_fname('test.dlib')
>>> DlibSQlite().sniff(fname)
True
>>> fname = get_test_fname('interval.interval')
>>> DlibSQlite().sniff(fname)
False
file_ext = 'dlib'
set_meta(dataset, overwrite=True, **kwd)[source]
sniff(filename)[source]
metadata_spec = {'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1132fa278>, 'dlib_version': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1132b05c0>, 'table_columns': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1132a8748>, 'table_row_count': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1132a87b8>, 'tables': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1132a86d8>}
class galaxy.datatypes.binary.ElibSQlite(**kwd)[source]

Bases: galaxy.datatypes.binary.SQlite

Class describing a Proteomics Chromatagram Library Sqlite database DLIBs only have the “entries”, “metadata”, and “peptidetoprotein” tables populated. ELIBs have the rest of the tables populated too, such as “peptidequants” or “peptidescores”.

>>> from galaxy.datatypes.sniff import get_test_fname
>>> fname = get_test_fname('test.elib')
>>> ElibSQlite().sniff(fname)
True
>>> fname = get_test_fname('test.dlib')
>>> ElibSQlite().sniff(fname)
False
file_ext = 'elib'
set_meta(dataset, overwrite=True, **kwd)[source]
sniff(filename)[source]
metadata_spec = {'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1132fa278>, 'table_columns': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1132a8748>, 'table_row_count': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1132a87b8>, 'tables': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1132a86d8>, 'version': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1132b0828>}
class galaxy.datatypes.binary.IdpDB(**kwd)[source]

Bases: galaxy.datatypes.binary.SQlite

Class describing an IDPicker 3 idpDB (sqlite) database

>>> from galaxy.datatypes.sniff import get_test_fname
>>> fname = get_test_fname('test.idpdb')
>>> IdpDB().sniff(fname)
True
>>> fname = get_test_fname('interval.interval')
>>> IdpDB().sniff(fname)
False
file_ext = 'idpdb'
set_meta(dataset, overwrite=True, **kwd)[source]
sniff(filename)[source]
set_peek(dataset, is_multi_byte=False)[source]
display_peek(dataset)[source]
metadata_spec = {'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1132fa278>, 'table_columns': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1132b0b00>, 'table_row_count': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1132b0b70>, 'tables': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1132b0a90>}
class galaxy.datatypes.binary.GAFASQLite(**kwd)[source]

Bases: galaxy.datatypes.binary.SQlite

Class describing a GAFA SQLite database

file_ext = 'gafa.sqlite'
set_meta(dataset, overwrite=True, **kwd)[source]
sniff(filename)[source]
metadata_spec = {'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1132fa278>, 'gafa_schema_version': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1132b0dd8>, 'table_columns': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1132a8748>, 'table_row_count': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1132a87b8>, 'tables': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1132a86d8>}
class galaxy.datatypes.binary.Xlsx(**kwd)[source]

Bases: galaxy.datatypes.binary.Binary

Class for Excel 2007 (xlsx) files

file_ext = 'xlsx'
compressed = True
sniff(filename)[source]
metadata_spec = {'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1132b0fd0>}
class galaxy.datatypes.binary.ExcelXls(**kwd)[source]

Bases: galaxy.datatypes.binary.Binary

Class describing an Excel (xls) file

file_ext = 'excel.xls'
edam_format = 'format_3468'
sniff(filename)[source]
get_mime()[source]

Returns the mime type of the datatype

set_peek(dataset, is_multi_byte=False)[source]
display_peek(dataset)[source]
metadata_spec = {'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1132b7208>}
class galaxy.datatypes.binary.Sra(**kwd)[source]

Bases: galaxy.datatypes.binary.Binary

Sequence Read Archive (SRA) datatype originally from mdshw5/sra-tools-galaxy

file_ext = 'sra'
sniff(filename)[source]

The first 8 bytes of any NCBI sra file is ‘NCBI.sra’, and the file is binary. For details about the format, see http://www.ncbi.nlm.nih.gov/books/n/helpsra/SRA_Overview_BK/#SRA_Overview_BK.4_SRA_Data_Structure

set_peek(dataset, is_multi_byte=False)[source]
display_peek(dataset)[source]
metadata_spec = {'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1132b7400>}
class galaxy.datatypes.binary.RData(**kwd)[source]

Bases: galaxy.datatypes.binary.Binary

Generic R Data file datatype implementation

file_ext = 'rdata'
sniff(filename)[source]
metadata_spec = {'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1132b75f8>}
class galaxy.datatypes.binary.OxliBinary(**kwd)[source]

Bases: galaxy.datatypes.binary.Binary

metadata_spec = {'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1132b7828>}
class galaxy.datatypes.binary.OxliCountGraph(**kwd)[source]

Bases: galaxy.datatypes.binary.OxliBinary

OxliCountGraph starts with “OXLI” + one byte version number + 8-bit binary ‘1’ Test file generated via:

load-into-counting.py --n_tables 1 --max-tablesize 1 \
    oxli_countgraph.oxlicg khmer/tests/test-data/100-reads.fq.bz2

using khmer 2.0

>>> from galaxy.datatypes.sniff import get_test_fname
>>> fname = get_test_fname('sequence.csfasta')
>>> OxliCountGraph().sniff(fname)
False
>>> fname = get_test_fname("oxli_countgraph.oxlicg")
>>> OxliCountGraph().sniff(fname)
True
file_ext = 'oxlicg'
sniff(filename)[source]
metadata_spec = {'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1132b7a20>}
class galaxy.datatypes.binary.OxliNodeGraph(**kwd)[source]

Bases: galaxy.datatypes.binary.OxliBinary

OxliNodeGraph starts with “OXLI” + one byte version number + 8-bit binary ‘2’ Test file generated via:

load-graph.py --n_tables 1 --max-tablesize 1 oxli_nodegraph.oxling \
    khmer/tests/test-data/100-reads.fq.bz2

using khmer 2.0

>>> from galaxy.datatypes.sniff import get_test_fname
>>> fname = get_test_fname('sequence.csfasta')
>>> OxliNodeGraph().sniff(fname)
False
>>> fname = get_test_fname("oxli_nodegraph.oxling")
>>> OxliNodeGraph().sniff(fname)
True
file_ext = 'oxling'
sniff(filename)[source]
metadata_spec = {'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1132b7c18>}
class galaxy.datatypes.binary.OxliTagSet(**kwd)[source]

Bases: galaxy.datatypes.binary.OxliBinary

OxliTagSet starts with “OXLI” + one byte version number + 8-bit binary ‘3’ Test file generated via:

load-graph.py --n_tables 1 --max-tablesize 1 oxli_nodegraph.oxling \
    khmer/tests/test-data/100-reads.fq.bz2;
mv oxli_nodegraph.oxling.tagset oxli_tagset.oxlits

using khmer 2.0

>>> from galaxy.datatypes.sniff import get_test_fname
>>> fname = get_test_fname('sequence.csfasta')
>>> OxliTagSet().sniff(fname)
False
>>> fname = get_test_fname("oxli_tagset.oxlits")
>>> OxliTagSet().sniff(fname)
True
file_ext = 'oxlits'
sniff(filename)[source]
metadata_spec = {'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1132b7e10>}
class galaxy.datatypes.binary.OxliStopTags(**kwd)[source]

Bases: galaxy.datatypes.binary.OxliBinary

OxliStopTags starts with “OXLI” + one byte version number + 8-bit binary ‘4’ Test file adapted from khmer 2.0’s “khmer/tests/test-data/goodversion-k32.stoptags”

>>> from galaxy.datatypes.sniff import get_test_fname
>>> fname = get_test_fname('sequence.csfasta')
>>> OxliStopTags().sniff(fname)
False
>>> fname = get_test_fname("oxli_stoptags.oxlist")
>>> OxliStopTags().sniff(fname)
True
file_ext = 'oxlist'
sniff(filename)[source]
metadata_spec = {'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1132bf048>}
class galaxy.datatypes.binary.OxliSubset(**kwd)[source]

Bases: galaxy.datatypes.binary.OxliBinary

OxliSubset starts with “OXLI” + one byte version number + 8-bit binary ‘5’ Test file generated via:

load-graph.py -k 20 example tests/test-data/random-20-a.fa;
partition-graph.py example;
mv example.subset.0.pmap oxli_subset.oxliss

using khmer 2.0

>>> from galaxy.datatypes.sniff import get_test_fname
>>> fname = get_test_fname('sequence.csfasta')
>>> OxliSubset().sniff(fname)
False
>>> fname = get_test_fname("oxli_subset.oxliss")
>>> OxliSubset().sniff(fname)
True
file_ext = 'oxliss'
sniff(filename)[source]
metadata_spec = {'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1132bf240>}
class galaxy.datatypes.binary.OxliGraphLabels(**kwd)[source]

Bases: galaxy.datatypes.binary.OxliBinary

OxliGraphLabels starts with “OXLI” + one byte version number + 8-bit binary ‘6’ Test file generated via:

python -c "from khmer import GraphLabels; \
    gl = GraphLabels(20, 1e7, 4); \
    gl.consume_fasta_and_tag_with_labels('tests/test-data/test-labels.fa'); \
    gl.save_labels_and_tags('oxli_graphlabels.oxligl')"

using khmer 2.0

>>> from galaxy.datatypes.sniff import get_test_fname
>>> fname = get_test_fname('sequence.csfasta')
>>> OxliGraphLabels().sniff(fname)
False
>>> fname = get_test_fname("oxli_graphlabels.oxligl")
>>> OxliGraphLabels().sniff(fname)
True
file_ext = 'oxligl'
sniff(filename)[source]
metadata_spec = {'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1132bf438>}
class galaxy.datatypes.binary.PostgresqlArchive(**kwd)[source]

Bases: galaxy.datatypes.binary.CompressedArchive

Class describing a Postgresql database packed into a tar archive

>>> from galaxy.datatypes.sniff import get_test_fname
>>> fname = get_test_fname('postgresql_fake.tar.bz2')
>>> PostgresqlArchive().sniff(fname)
True
>>> fname = get_test_fname('test.fast5.tar')
>>> PostgresqlArchive().sniff(fname)
False
file_ext = 'postgresql'
set_meta(dataset, overwrite=True, **kwd)[source]
sniff(filename)[source]
set_peek(dataset, is_multi_byte=False)[source]
display_peek(dataset)[source]
metadata_spec = {'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1132faa90>, 'version': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1132bf668>}
class galaxy.datatypes.binary.Fast5Archive(**kwd)[source]

Bases: galaxy.datatypes.binary.CompressedArchive

Class describing a FAST5 archive

>>> from galaxy.datatypes.sniff import get_test_fname
>>> fname = get_test_fname('test.fast5.tar')
>>> Fast5Archive().sniff(fname)
True
file_ext = 'fast5.tar'
set_meta(dataset, overwrite=True, **kwd)[source]
sniff(filename)[source]
set_peek(dataset, is_multi_byte=False)[source]
display_peek(dataset)[source]
metadata_spec = {'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1132faa90>, 'fast5_count': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1132bf898>}
class galaxy.datatypes.binary.Fast5ArchiveGz(**kwd)[source]

Bases: galaxy.datatypes.binary.Fast5Archive

Class describing a gzip-compressed FAST5 archive

>>> from galaxy.datatypes.sniff import get_test_fname
>>> fname = get_test_fname('test.fast5.tar.gz')
>>> Fast5ArchiveGz().sniff(fname)
True
>>> fname = get_test_fname('test.fast5.tar.bz2')
>>> Fast5ArchiveGz().sniff(fname)
False
>>> fname = get_test_fname('test.fast5.tar')
>>> Fast5ArchiveGz().sniff(fname)
False
file_ext = 'fast5.tar.gz'
sniff(filename)[source]
metadata_spec = {'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1132faa90>, 'fast5_count': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1132bfa90>}
class galaxy.datatypes.binary.Fast5ArchiveBz2(**kwd)[source]

Bases: galaxy.datatypes.binary.Fast5Archive

Class describing a bzip2-compressed FAST5 archive

>>> from galaxy.datatypes.sniff import get_test_fname
>>> fname = get_test_fname('test.fast5.tar.bz2')
>>> Fast5ArchiveBz2().sniff(fname)
True
>>> fname = get_test_fname('test.fast5.tar.gz')
>>> Fast5ArchiveBz2().sniff(fname)
False
>>> fname = get_test_fname('test.fast5.tar')
>>> Fast5ArchiveBz2().sniff(fname)
False
file_ext = 'fast5.tar.bz2'
sniff(filename)[source]
metadata_spec = {'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1132faa90>, 'fast5_count': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1132bfc88>}
class galaxy.datatypes.binary.SearchGuiArchive(**kwd)[source]

Bases: galaxy.datatypes.binary.CompressedArchive

Class describing a SearchGUI archive

file_ext = 'searchgui_archive'
set_meta(dataset, overwrite=True, **kwd)[source]
sniff(filename)[source]
set_peek(dataset, is_multi_byte=False)[source]
display_peek(dataset)[source]
metadata_spec = {'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1132faa90>, 'searchgui_major_version': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1132bff28>, 'searchgui_version': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1132bfeb8>}
class galaxy.datatypes.binary.NetCDF(**kwd)[source]

Bases: galaxy.datatypes.binary.Binary

Binary data in netCDF format

file_ext = 'netcdf'
edam_format = 'format_3650'
edam_data = 'data_0943'
set_peek(dataset, is_multi_byte=False)[source]
display_peek(dataset)[source]
sniff(filename)[source]
metadata_spec = {'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1132c8160>}
class galaxy.datatypes.binary.Dcd(**kwd)[source]

Bases: galaxy.datatypes.binary.Binary

Class describing a dcd file from the CHARMM molecular simulation program

>>> from galaxy.datatypes.sniff import get_test_fname
>>> fname = get_test_fname('test_glucose_vacuum.dcd')
>>> Dcd().sniff(fname)
True
>>> fname = get_test_fname('interval.interval')
>>> Dcd().sniff(fname)
False
file_ext = 'dcd'
edam_data = 'data_3842'
__init__(**kwd)[source]
sniff(filename)[source]
set_peek(dataset, is_multi_byte=False)[source]
display_peek(dataset)[source]
metadata_spec = {'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1132c8358>}
class galaxy.datatypes.binary.Vel(**kwd)[source]

Bases: galaxy.datatypes.binary.Binary

Class describing a velocity file from the CHARMM molecular simulation program

>>> from galaxy.datatypes.sniff import get_test_fname
>>> fname = get_test_fname('test_charmm.vel')
>>> Vel().sniff(fname)
True
>>> fname = get_test_fname('interval.interval')
>>> Vel().sniff(fname)
False
file_ext = 'vel'
__init__(**kwd)[source]
sniff(filename)[source]
set_peek(dataset, is_multi_byte=False)[source]
display_peek(dataset)[source]
metadata_spec = {'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1132c8550>}
class galaxy.datatypes.binary.DAA(**kwd)[source]

Bases: galaxy.datatypes.binary.Binary

Class describing an DAA (diamond alignment archive) file >>> from galaxy.datatypes.sniff import get_test_fname >>> fname = get_test_fname(‘diamond.daa’) >>> DAA().sniff(fname) True >>> fname = get_test_fname(‘interval.interval’) >>> DAA().sniff(fname) False

file_ext = 'daa'
__init__(**kwd)[source]
sniff(filename)[source]
metadata_spec = {'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1132c8748>}
class galaxy.datatypes.binary.RMA6(**kwd)[source]

Bases: galaxy.datatypes.binary.Binary

Class describing an RMA6 (MEGAN6 read-match archive) file >>> from galaxy.datatypes.sniff import get_test_fname >>> fname = get_test_fname(‘diamond.rma6’) >>> RMA6().sniff(fname) True >>> fname = get_test_fname(‘interval.interval’) >>> RMA6().sniff(fname) False

file_ext = 'rma6'
__init__(**kwd)[source]
sniff(filename)[source]
metadata_spec = {'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1132c8940>}
class galaxy.datatypes.binary.DMND(**kwd)[source]

Bases: galaxy.datatypes.binary.Binary

Class describing an DMND file >>> from galaxy.datatypes.sniff import get_test_fname >>> fname = get_test_fname(‘diamond_db.dmnd’) >>> DMND().sniff(fname) True >>> fname = get_test_fname(‘interval.interval’) >>> DMND().sniff(fname) False

file_ext = 'dmnd'
__init__(**kwd)[source]
sniff(filename)[source]
metadata_spec = {'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1132c8b38>}
class galaxy.datatypes.binary.ICM(**kwd)[source]

Bases: galaxy.datatypes.binary.Binary

Class describing an ICM (interpolated context model) file, used by Glimmer

file_ext = 'icm'
edam_data = 'data_0950'
set_peek(dataset, is_multi_byte=False)[source]
sniff(dataset)[source]
metadata_spec = {'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1132c8d30>}
class galaxy.datatypes.binary.BafTar(**kwd)[source]

Bases: galaxy.datatypes.binary.CompressedArchive

Base class for common behavior of tar files of directory-based raw file formats >>> from galaxy.datatypes.sniff import get_test_fname >>> fname = get_test_fname(‘brukerbaf.d.tar’) >>> BafTar().sniff(fname) True >>> fname = get_test_fname(‘test.fast5.tar’) >>> BafTar().sniff(fname) False

edam_data = 'data_2536'
edam_format = 'format_3712'
file_ext = 'brukerbaf.d.tar'
get_signature_file()[source]
sniff(filename)[source]
get_type()[source]
set_peek(dataset, is_multi_byte=False)[source]
display_peek(dataset)[source]
metadata_spec = {'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1132c8f28>}
class galaxy.datatypes.binary.YepTar(**kwd)[source]

Bases: galaxy.datatypes.binary.BafTar

A tar’d up .d directory containing Agilent/Bruker YEP format data

file_ext = 'agilentbrukeryep.d.tar'
get_signature_file()[source]
get_type()[source]
metadata_spec = {'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1132d1160>}
class galaxy.datatypes.binary.TdfTar(**kwd)[source]

Bases: galaxy.datatypes.binary.BafTar

A tar’d up .d directory containing Bruker TDF format data

file_ext = 'brukertdf.d.tar'
get_signature_file()[source]
get_type()[source]
metadata_spec = {'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1132d1358>}
class galaxy.datatypes.binary.MassHunterTar(**kwd)[source]

Bases: galaxy.datatypes.binary.BafTar

A tar’d up .d directory containing Agilent MassHunter format data

file_ext = 'agilentmasshunter.d.tar'
get_signature_file()[source]
get_type()[source]
metadata_spec = {'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1132d1550>}
class galaxy.datatypes.binary.MassLynxTar(**kwd)[source]

Bases: galaxy.datatypes.binary.BafTar

A tar’d up .d directory containing Waters MassLynx format data

file_ext = 'watersmasslynx.raw.tar'
get_signature_file()[source]
get_type()[source]
metadata_spec = {'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1132d1748>}
class galaxy.datatypes.binary.WiffTar(**kwd)[source]

Bases: galaxy.datatypes.binary.BafTar

A tar’d up .wiff/.scan pair containing Sciex WIFF format data >>> from galaxy.datatypes.sniff import get_test_fname >>> fname = get_test_fname(‘some.wiff.tar’) >>> WiffTar().sniff(fname) True >>> fname = get_test_fname(‘brukerbaf.d.tar’) >>> WiffTar().sniff(fname) False >>> fname = get_test_fname(‘test.fast5.tar’) >>> WiffTar().sniff(fname) False

file_ext = 'wiff.tar'
sniff(filename)[source]
get_type()[source]
metadata_spec = {'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1132d1940>}

galaxy.datatypes.blast module

NCBI BLAST datatypes.

Covers the blastxml format and the BLAST databases.

class galaxy.datatypes.blast.BlastXml(**kwd)[source]

Bases: galaxy.datatypes.xml.GenericXml

NCBI Blast XML Output data

file_ext = 'blastxml'
edam_format = 'format_3331'
edam_data = 'data_0857'
set_peek(dataset, is_multi_byte=False)[source]

Set the peek and blurb text

sniff_prefix(file_prefix)[source]

Determines whether the file is blastxml

>>> from galaxy.datatypes.sniff import get_test_fname
>>> fname = get_test_fname('megablast_xml_parser_test1.blastxml')
>>> BlastXml().sniff(fname)
True
>>> fname = get_test_fname('tblastn_four_human_vs_rhodopsin.blastxml')
>>> BlastXml().sniff(fname)
True
>>> fname = get_test_fname('interval.interval')
>>> BlastXml().sniff(fname)
False
static merge(split_files, output_file)[source]

Merging multiple XML files is non-trivial and must be done in subclasses.

metadata_spec = {'data_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f30623c8>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d4a8>}
sniff(filename)
class galaxy.datatypes.blast.BlastNucDb(**kwd)[source]

Bases: galaxy.datatypes.blast._BlastDb, galaxy.datatypes.data.Data

Class for nucleotide BLAST database files.

file_ext = 'blastdbn'
allow_datatype_change = False
composite_type = 'basic'
__init__(**kwd)[source]
metadata_spec = {'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f3076080>}
class galaxy.datatypes.blast.BlastProtDb(**kwd)[source]

Bases: galaxy.datatypes.blast._BlastDb, galaxy.datatypes.data.Data

Class for protein BLAST database files.

file_ext = 'blastdbp'
allow_datatype_change = False
composite_type = 'basic'
__init__(**kwd)[source]
metadata_spec = {'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f3076198>}
class galaxy.datatypes.blast.BlastDomainDb(**kwd)[source]

Bases: galaxy.datatypes.blast._BlastDb, galaxy.datatypes.data.Data

Class for domain BLAST database files.

file_ext = 'blastdbd'
allow_datatype_change = False
composite_type = 'basic'
__init__(**kwd)[source]
metadata_spec = {'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f3076208>}

galaxy.datatypes.checkers module

Module proxies galaxy.util.checkers for backward compatibility.

External datatypes may make use of these functions.

galaxy.datatypes.checkers.check_binary(name, file_path=True)[source]
galaxy.datatypes.checkers.check_bz2(file_path, check_content=True)[source]
galaxy.datatypes.checkers.check_gzip(file_path, check_content=True)[source]
galaxy.datatypes.checkers.check_html(file_path, chunk=None)[source]
galaxy.datatypes.checkers.check_image(file_path)[source]

Simple wrapper around image_type to yield a True/False verdict

galaxy.datatypes.checkers.check_zip(file_path, check_content=True, files=1)[source]
galaxy.datatypes.checkers.is_gzip(file_path)[source]
galaxy.datatypes.checkers.is_bz2(file_path)[source]

galaxy.datatypes.chrominfo module

class galaxy.datatypes.chrominfo.ChromInfo(**kwd)[source]

Bases: galaxy.datatypes.tabular.Tabular

file_ext = 'len'
metadata_spec = {'chrom': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f2e75978>, 'column_names': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd113204198>, 'column_types': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1131fbeb8>, 'columns': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1131fb5f8>, 'comment_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1131fb240>, 'data_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1131fb400>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d4a8>, 'delimiter': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd113204470>, 'length': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f2e8eeb8>}

galaxy.datatypes.constructive_solid_geometry module

Constructive Solid Geometry file formats.

class galaxy.datatypes.constructive_solid_geometry.Ply(**kwd)[source]

Bases: object

The PLY format describes an object as a collection of vertices, faces and other elements, along with properties such as color and normal direction that can be attached to these elements. A PLY file contains the description of exactly one object.

subtype = ''
__init__(**kwd)[source]
sniff_prefix(file_prefix)[source]

The structure of a typical PLY file: Header, Vertex List, Face List, (lists of other elements)

set_meta(dataset, **kwd)[source]
set_peek(dataset, is_multi_byte=False)[source]
display_peek(dataset)[source]
sniff(filename)
class galaxy.datatypes.constructive_solid_geometry.PlyAscii(**kwd)[source]

Bases: galaxy.datatypes.constructive_solid_geometry.Ply, galaxy.datatypes.data.Text

file_ext = 'plyascii'
subtype = 'ascii'
__init__(**kwd)[source]
metadata_spec = {'data_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d780>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d4a8>, 'face': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f2f01dd8>, 'file_format': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f3049390>, 'other_elements': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f2f01a90>, 'vertex': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f2f01a20>}
class galaxy.datatypes.constructive_solid_geometry.PlyBinary(**kwd)[source]

Bases: galaxy.datatypes.constructive_solid_geometry.Ply, galaxy.datatypes.binary.Binary

file_ext = 'plybinary'
subtype = 'binary'
__init__(**kwd)[source]
metadata_spec = {'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1132fa278>, 'face': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f2e8a4a8>, 'file_format': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f2e8acc0>, 'other_elements': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f2e8ab38>, 'vertex': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f2e8a860>}
class galaxy.datatypes.constructive_solid_geometry.Vtk(**kwd)[source]

Bases: object

The Visualization Toolkit provides a number of source and writer objects to read and write popular data file formats. The Visualization Toolkit also provides some of its own file formats.

There are two different styles of file formats available in VTK. The simplest are the legacy, serial formats that are easy to read and write either by hand or programmatically. However, these formats are less flexible than the XML based file formats which support random access, parallel I/O, and portable data compression and are preferred to the serial VTK file formats whenever possible.

All keyword phrases are written in ASCII form whether the file is binary or ASCII. The binary section of the file (if in binary form) is the data proper; i.e., the numbers that define points coordinates, scalars, cell indices, and so forth.

Binary data must be placed into the file immediately after the newline (‘\n’) character from the previous ASCII keyword and parameter sequence.

TODO: only legacy formats are currently supported and support for XML formats should be added.

subtype = ''
__init__(**kwd)[source]
sniff_prefix(file_prefix)[source]

VTK files can be either ASCII or binary, with two different styles of file formats: legacy or XML. We’ll assume if the file contains a valid VTK header, then it is a valid VTK file.

set_meta(dataset, **kwd)[source]
set_initial_metadata(i, line, dataset)[source]
set_structure_metadata(line, dataset, dataset_type)[source]

The fourth part of legacy VTK files is the dataset structure. The geometry part describes the geometry and topology of the dataset. This part begins with a line containing the keyword DATASET followed by a keyword describing the type of dataset. Then, depending upon the type of dataset, other keyword/ data combinations define the actual data.

get_blurb(dataset)[source]
set_peek(dataset, is_multi_byte=False)[source]
display_peek(dataset)[source]
sniff(filename)
class galaxy.datatypes.constructive_solid_geometry.VtkAscii(**kwd)[source]

Bases: galaxy.datatypes.constructive_solid_geometry.Vtk, galaxy.datatypes.data.Text

file_ext = 'vtkascii'
subtype = 'ASCII'
__init__(**kwd)[source]
metadata_spec = {'cells': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f2dd9898>, 'data_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d780>, 'dataset_type': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f2e4ac50>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d4a8>, 'dimensions': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f2dd9518>, 'field_components': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f2dd9978>, 'field_names': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f2dd9908>, 'file_format': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f2e4ada0>, 'lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f2dd9748>, 'origin': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f2dd9588>, 'points': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f2dd9668>, 'polygons': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f2dd97b8>, 'spacing': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f2dd95f8>, 'triangle_strips': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f2dd9828>, 'vertices': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f2dd96d8>, 'vtk_version': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f2e4af28>}
class galaxy.datatypes.constructive_solid_geometry.VtkBinary(**kwd)[source]

Bases: galaxy.datatypes.constructive_solid_geometry.Vtk, galaxy.datatypes.binary.Binary

file_ext = 'vtkbinary'
subtype = 'BINARY'
__init__(**kwd)[source]
metadata_spec = {'cells': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f2de2048>, 'dataset_type': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f2dd9c18>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1132fa278>, 'dimensions': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f2dd9c88>, 'field_components': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f2de2128>, 'field_names': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f2de20b8>, 'file_format': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f2dd9ba8>, 'lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f2dd9eb8>, 'origin': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f2dd9cf8>, 'points': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f2dd9dd8>, 'polygons': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f2dd9f28>, 'spacing': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f2dd9d68>, 'triangle_strips': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f2dd9f98>, 'vertices': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f2dd9e48>, 'vtk_version': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f2dd9b38>}
class galaxy.datatypes.constructive_solid_geometry.STL(**kwd)[source]

Bases: galaxy.datatypes.data.Data

file_ext = 'stl'
metadata_spec = {'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f2de22e8>}
galaxy.datatypes.constructive_solid_geometry.get_next_line(fh)[source]

galaxy.datatypes.coverage module

Coverage datatypes

class galaxy.datatypes.coverage.LastzCoverage(**kwd)[source]

Bases: galaxy.datatypes.tabular.Tabular

file_ext = 'coverage'
get_track_resolution(dataset, start, end)[source]
metadata_spec = {'chromCol': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f2b1b550>, 'column_names': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd113204198>, 'column_types': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1131fbeb8>, 'columns': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f2b98da0>, 'comment_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1131fb240>, 'data_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1131fb400>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d4a8>, 'delimiter': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd113204470>, 'forwardCol': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f2b1b438>, 'positionCol': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f2b1b4a8>, 'reverseCol': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f2b98c88>}

galaxy.datatypes.data module

class galaxy.datatypes.data.DatatypeValidation(state, message)[source]

Bases: object

__init__(state, message)[source]
static validated()[source]
static invalid(message)[source]
static unvalidated()[source]
galaxy.datatypes.data.validate(dataset_instance)[source]
class galaxy.datatypes.data.DataMeta(name, bases, dict_)[source]

Bases: abc.ABCMeta

Metaclass for Data class. Sets up metadata spec.

__init__(name, bases, dict_)[source]
class galaxy.datatypes.data.Data(**kwd)[source]

Bases: object

Base class for all datatypes. Implements basic interfaces as well as class methods for metadata.

>>> class DataTest( Data ):
...     MetadataElement( name="test" )
...
>>> DataTest.metadata_spec.test.name
'test'
>>> DataTest.metadata_spec.test.desc
'test'
>>> type( DataTest.metadata_spec.test.param )
<class 'galaxy.model.metadata.MetadataParameter'>
edam_data = 'data_0006'
edam_format = 'format_1915'
file_ext = 'data'
CHUNKABLE = False
metadata_spec = {'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d4a8>}

Dictionary of metadata fields for this datatype

copy_safe_peek = True
is_binary = True
allow_datatype_change = True
composite_type = None
primary_file_name = 'index'
track_type = None
data_sources = {}
__init__(**kwd)[source]

Initialize the datatype

supported_display_apps = {}
composite_files = {}
get_raw_data(dataset)[source]

Returns the full data. To stream it open the file_name and read/write as needed

dataset_content_needs_grooming(file_name)[source]

This function is called on an output dataset file after the content is initially generated.

groom_dataset_content(file_name)[source]

This function is called on an output dataset file if dataset_content_needs_grooming returns True.

init_meta(dataset, copy_from=None)[source]
set_meta(dataset, overwrite=True, **kwd)[source]

Unimplemented method, allows guessing of metadata from contents of file

missing_meta(dataset, check=[], skip=[])[source]

Checks for empty metadata values, Returns True if non-optional metadata is missing Specifying a list of ‘check’ values will only check those names provided; when used, optionality is ignored Specifying a list of ‘skip’ items will return True even when a named metadata value is missing

set_max_optional_metadata_filesize(max_value)[source]
get_max_optional_metadata_filesize()[source]
max_optional_metadata_filesize
set_peek(dataset, is_multi_byte=False)[source]

Set the peek and blurb text

Parameters:is_multi_byte (bool) – deprecated
display_peek(dataset)[source]

Create HTML table, used for displaying peek

to_archive(trans, dataset, name='')[source]

Collect archive paths and file handles that need to be exported when archiving dataset.

Parameters:
  • dataset – HistoryDatasetAssociation
  • name – archive name, in collection context corresponds to collection name(s) and element_identifier, joined by ‘/’, e.g ‘fastq_collection/sample1/forward’
display_data(trans, data, preview=False, filename=None, to_ext=None, **kwd)[source]

Displays data in central pane if preview is True, else handles download.

Datatypes should be very careful if overridding this method and this interface between datatypes and Galaxy will likely change.

TOOD: Document alternatives to overridding this method (data providers?).

display_as_markdown(dataset_instance, markdown_format_helpers)[source]

Prepare for embedding dataset into a basic Markdown document.

This is a somewhat experimental interface and should not be implemented on datatypes not tightly tied to a Galaxy version (e.g. datatypes in the Tool Shed).

Speaking very losely - the datatype should should load a bounded amount of data from the supplied dataset instance and prepare for embedding it into Markdown. This should be relatively vanilla Markdown - the result of this is bleached and it should not contain nested Galaxy Markdown directives.

If the data cannot reasonably be displayed, just indicate this and do not throw an exception.

display_name(dataset)[source]

Returns formatted html of dataset name

display_info(dataset)[source]

Returns formatted html of dataset info

repair_methods(dataset)[source]

Unimplemented method, returns dict with method/option for repairing errors

get_mime()[source]

Returns the mime type of the datatype

add_display_app(app_id, label, file_function, links_function)[source]

Adds a display app to the datatype. app_id is a unique id label is the primary display label, e.g., display at ‘UCSC’ file_function is a string containing the name of the function that returns a properly formatted display links_function is a string containing the name of the function that returns a list of (link_name,link)

remove_display_app(app_id)[source]

Removes a display app from the datatype

clear_display_apps()[source]
add_display_application(display_application)[source]

New style display applications

get_display_application(key, default=None)[source]
get_display_applications_by_dataset(dataset, trans)[source]
get_display_types()[source]

Returns display types available

get_display_label(type)[source]

Returns primary label for display app

as_display_type(dataset, type, **kwd)[source]

Returns modified file contents for a particular display type

Returns a list of tuples of (name, link) for a particular display type. No check on ‘access’ permissions is done here - if you can view the dataset, you can also save it or send it to a destination outside of Galaxy, so Galaxy security restrictions do not apply anyway.

get_converter_types(original_dataset, datatypes_registry)[source]

Returns available converters by type for this dataset

find_conversion_destination(dataset, accepted_formats, datatypes_registry, **kwd)[source]

Returns ( target_ext, existing converted dataset )

convert_dataset(trans, original_dataset, target_type, return_output=False, visible=True, deps=None, target_context=None, history=None)[source]

This function adds a job to the queue to convert a dataset to another type. Returns a message about success/failure.

after_setting_metadata(dataset)[source]

This function is called on the dataset after metadata is set.

before_setting_metadata(dataset)[source]

This function is called on the dataset before metadata is set.

add_composite_file(name, **kwds)[source]
writable_files
get_composite_files(dataset=None)[source]
generate_primary_file(dataset=None)[source]
has_resolution
matches_any(target_datatypes)[source]

Check if this datatype is of any of the target_datatypes or is a subtype thereof.

static merge(split_files, output_file)[source]

Merge files with copy.copyfileobj() will not hit the max argument limitation of cat. gz and bz2 files are also working.

get_visualizations(dataset)[source]

Returns a list of visualizations for datatype.

has_dataprovider(data_format)[source]

Returns True if data_format is available in dataproviders.

dataprovider(dataset, data_format, **settings)[source]

Base dataprovider factory for all datatypes that returns the proper provider for the given data_format or raises a NoProviderAvailable.

validate(dataset, **kwd)[source]
base_dataprovider(dataset, **settings)[source]
chunk_dataprovider(dataset, **settings)[source]
chunk64_dataprovider(dataset, **settings)[source]
dataproviders = {'base': <function Data.base_dataprovider at 0x7fd116622048>, 'chunk': <function Data.chunk_dataprovider at 0x7fd1166221e0>, 'chunk64': <function Data.chunk64_dataprovider at 0x7fd116622378>}
class galaxy.datatypes.data.Text(**kwd)[source]

Bases: galaxy.datatypes.data.Data

edam_format = 'format_2330'
file_ext = 'txt'
line_class = 'line'
is_binary = False
get_mime()[source]

Returns the mime type of the datatype

set_meta(dataset, **kwd)[source]

Set the number of lines of data in dataset.

estimate_file_lines(dataset)[source]

Perform a rough estimate by extrapolating number of lines from a small read.

count_data_lines(dataset)[source]

Count the number of lines of data in dataset, skipping all blank lines and comments.

set_peek(dataset, line_count=None, is_multi_byte=False, WIDTH=256, skipchars=None, line_wrap=True)[source]

Set the peek. This method is used by various subclasses of Text.

classmethod split(input_datasets, subdir_generator_function, split_params)[source]

Split the input files by line.

line_dataprovider(dataset, **settings)[source]

Returns an iterator over the dataset’s lines (that have been stripped) optionally excluding blank lines and lines that start with a comment character.

regex_line_dataprovider(dataset, **settings)[source]

Returns an iterator over the dataset’s lines optionally including/excluding lines that match one or more regex filters.

dataproviders = {'base': <function Data.base_dataprovider at 0x7fd116622048>, 'chunk': <function Data.chunk_dataprovider at 0x7fd1166221e0>, 'chunk64': <function Data.chunk64_dataprovider at 0x7fd116622378>, 'line': <function Text.line_dataprovider at 0x7fd116622a60>, 'regex-line': <function Text.regex_line_dataprovider at 0x7fd116622bf8>}
metadata_spec = {'data_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d780>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d4a8>}
class galaxy.datatypes.data.Directory(**kwd)[source]

Bases: galaxy.datatypes.data.Data

Class representing a directory of files.

metadata_spec = {'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d978>}
class galaxy.datatypes.data.GenericAsn1(**kwd)[source]

Bases: galaxy.datatypes.data.Text

Class for generic ASN.1 text format

edam_data = 'data_0849'
edam_format = 'format_1966'
file_ext = 'asn1'
metadata_spec = {'data_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661db70>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d4a8>}
class galaxy.datatypes.data.LineCount(**kwd)[source]

Bases: galaxy.datatypes.data.Text

Dataset contains a single line with a single integer that denotes the line count for a related dataset. Used for custom builds.

metadata_spec = {'data_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661dd68>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d4a8>}
class galaxy.datatypes.data.Newick(**kwd)[source]

Bases: galaxy.datatypes.data.Text

New Hampshire/Newick Format

edam_data = 'data_0872'
edam_format = 'format_1910'
file_ext = 'newick'
__init__(**kwd)[source]

Initialize foobar datatype

init_meta(dataset, copy_from=None)[source]
sniff(filename)[source]

Returning false as the newick format is too general and cannot be sniffed.

get_visualizations(dataset)[source]

Returns a list of visualizations for datatype.

metadata_spec = {'data_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661df60>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d4a8>}
class galaxy.datatypes.data.Nexus(**kwd)[source]

Bases: galaxy.datatypes.data.Text

Nexus format as used By Paup, Mr Bayes, etc

edam_data = 'data_0872'
edam_format = 'format_1912'
file_ext = 'nex'
__init__(**kwd)[source]

Initialize foobar datatype

init_meta(dataset, copy_from=None)[source]
sniff_prefix(file_prefix)[source]

All Nexus Files Simply puts a ‘#NEXUS’ in its first line

get_visualizations(dataset)[source]

Returns a list of visualizations for datatype.

metadata_spec = {'data_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd116626198>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d4a8>}
sniff(filename)
galaxy.datatypes.data.get_test_fname(fname)[source]

Returns test data filename

galaxy.datatypes.data.get_file_peek(file_name, is_multi_byte=False, WIDTH=256, LINE_COUNT=5, skipchars=None, line_wrap=True)[source]

Returns the first LINE_COUNT lines wrapped to WIDTH.

Parameters:is_multi_byte (bool) – deprecated
>>> def assert_peek_is(file_name, expected, *args, **kwd):
...     path = get_test_fname(file_name)
...     peek = get_file_peek(path, *args, **kwd)
...     assert peek == expected, "%s != %s" % (peek, expected)
>>> assert_peek_is('0_nonewline', u'0')
>>> assert_peek_is('0.txt', u'0\n')
>>> assert_peek_is('4.bed', u'chr22\t30128507\t31828507\tuc003bnx.1_cds_2_0_chr22_29227_f\t0\t+\n', LINE_COUNT=1)
>>> assert_peek_is('1.bed', u'chr1\t147962192\t147962580\tCCDS989.1_cds_0_0_chr1_147962193_r\t0\t-\nchr1\t147984545\t147984630\tCCDS990.1_cds_0_0_chr1_147984546_f\t0\t+\n', LINE_COUNT=2)

galaxy.datatypes.genetics module

rgenetics datatypes Use at your peril Ross Lazarus for the rgenetics and galaxy projects

genome graphs datatypes derived from Interval datatypes genome graphs datasets have a header row with appropriate columnames The first column is always the marker - eg columname = rs, first row= rs12345 if the rows are snps subsequent row values are all numeric ! Will fail if any non numeric (eg ‘+’ or ‘NA’) values ross lazarus for rgenetics august 20 2007

class galaxy.datatypes.genetics.GenomeGraphs(**kwd)[source]

Bases: galaxy.datatypes.tabular.Tabular

Tab delimited data containing a marker id and any number of numeric values

file_ext = 'gg'
__init__(**kwd)[source]

Initialize gg datatype, by adding UCSC display apps

set_meta(dataset, **kwd)[source]
as_ucsc_display_file(dataset, **kwd)[source]

Returns file

from the ever-helpful angie hinrichs angie@soe.ucsc.edu a genome graphs call looks like this

http://genome.ucsc.edu/cgi-bin/hgGenome?clade=mammal&org=Human&db=hg18&hgGenome_dataSetName=dname &hgGenome_dataSetDescription=test&hgGenome_formatType=best%20guess&hgGenome_markerType=best%20guess &hgGenome_columnLabels=best%20guess&hgGenome_maxVal=&hgGenome_labelVals= &hgGenome_maxGapToFill=25000000&hgGenome_uploadFile=http://galaxy.esphealth.org/datasets/333/display/index &hgGenome_doSubmitUpload=submit

Galaxy gives this for an interval file

http://genome.ucsc.edu/cgi-bin/hgTracks?db=hg18&position=chr1:1-1000&hgt.customText= http%3A%2F%2Fgalaxy.esphealth.org%2Fdisplay_as%3Fid%3D339%26display_app%3Ducsc

make_html_table(dataset, skipchars=[])[source]

Create HTML table, used for displaying peek

validate(dataset, **kwd)[source]

Validate a gg file - all numeric after header row

sniff_prefix(file_prefix)[source]

Determines whether the file is in gg format

>>> from galaxy.datatypes.sniff import get_test_fname
>>> fname = get_test_fname( 'test_space.txt' )
>>> GenomeGraphs().sniff( fname )
False
>>> fname = get_test_fname( '1.gg' )
>>> GenomeGraphs().sniff( fname )
True
get_mime()[source]

Returns the mime type of the datatype

metadata_spec = {'column_names': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd113204198>, 'column_types': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f35d4390>, 'columns': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f35d4c50>, 'comment_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1131fb240>, 'data_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1131fb400>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d4a8>, 'delimiter': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd113204470>, 'markerCol': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f6cbe550>}
sniff(filename)
class galaxy.datatypes.genetics.rgTabList(**kwd)[source]

Bases: galaxy.datatypes.tabular.Tabular

for sampleid and for featureid lists of exclusions or inclusions in the clean tool featureid subsets on statistical criteria -> specialized display such as gg

file_ext = 'rgTList'
__init__(**kwd)[source]

Initialize featurelistt datatype

display_peek(dataset)[source]

Returns formated html of peek

get_mime()[source]

Returns the mime type of the datatype

metadata_spec = {'column_names': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f42ed5c0>, 'column_types': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f6bb46d8>, 'columns': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f42eabe0>, 'comment_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f35d4e80>, 'data_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f5d4e710>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d4a8>, 'delimiter': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f36cf4e0>}
class galaxy.datatypes.genetics.rgSampleList(**kwd)[source]

Bases: galaxy.datatypes.genetics.rgTabList

for sampleid exclusions or inclusions in the clean tool output from QC eg excess het, gender error, ibd pair member,eigen outlier,excess mendel errors,… since they can be uploaded, should be flexible but they are persistent at least same infrastructure for expression?

file_ext = 'rgSList'
__init__(**kwd)[source]

Initialize samplelist datatype

metadata_spec = {'column_names': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f36099b0>, 'column_types': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f3609940>, 'columns': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f3609a58>, 'comment_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f3609978>, 'data_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f3609be0>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d4a8>, 'delimiter': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f3609780>}
class galaxy.datatypes.genetics.rgFeatureList(**kwd)[source]

Bases: galaxy.datatypes.genetics.rgTabList

for featureid lists of exclusions or inclusions in the clean tool output from QC eg low maf, high missingness, bad hwe in controls, excess mendel errors,… featureid subsets on statistical criteria -> specialized display such as gg same infrastructure for expression?

file_ext = 'rgFList'
__init__(**kwd)[source]

Initialize featurelist datatype

metadata_spec = {'column_names': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f402db00>, 'column_types': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f402de10>, 'columns': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f402dcf8>, 'comment_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f402d9e8>, 'data_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f402dc18>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d4a8>, 'delimiter': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f402d6a0>}
class galaxy.datatypes.genetics.Rgenetics(**kwd)[source]

Bases: galaxy.datatypes.text.Html

base class to use for rgenetics datatypes derived from html - composite datatype elements stored in extra files path

composite_type = 'auto_primary_file'
allow_datatype_change = False
file_ext = 'rgenetics'
generate_primary_file(dataset=None)[source]
regenerate_primary_file(dataset)[source]

cannot do this until we are setting metadata

get_mime()[source]

Returns the mime type of the datatype

set_meta(dataset, **kwd)[source]

for lped/pbed eg

metadata_spec = {'base_name': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f402d3c8>, 'data_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f53974e0>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d4a8>}
class galaxy.datatypes.genetics.SNPMatrix(**kwd)[source]

Bases: galaxy.datatypes.genetics.Rgenetics

BioC SNPMatrix Rgenetics data collections

file_ext = 'snpmatrix'
set_peek(dataset, **kwd)[source]
sniff(filename)[source]

need to check the file header hex code

metadata_spec = {'base_name': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f402d400>, 'data_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f53974e0>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d4a8>}
class galaxy.datatypes.genetics.Lped(**kwd)[source]

Bases: galaxy.datatypes.genetics.Rgenetics

linkage pedigree (ped,map) Rgenetics data collections

file_ext = 'lped'
__init__(**kwd)[source]
metadata_spec = {'base_name': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f5612390>, 'data_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f53974e0>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d4a8>}
class galaxy.datatypes.genetics.Pphe(**kwd)[source]

Bases: galaxy.datatypes.genetics.Rgenetics

Plink phenotype file - header must have FID IID… Rgenetics data collections

file_ext = 'pphe'
__init__(**kwd)[source]
metadata_spec = {'base_name': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f5612400>, 'data_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f53974e0>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d4a8>}
class galaxy.datatypes.genetics.Fphe(**kwd)[source]

Bases: galaxy.datatypes.genetics.Rgenetics

fbat pedigree file - mad format with ! as first char on header row Rgenetics data collections

file_ext = 'fphe'
__init__(**kwd)[source]
metadata_spec = {'base_name': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f5612128>, 'data_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f53974e0>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d4a8>}
class galaxy.datatypes.genetics.Phe(**kwd)[source]

Bases: galaxy.datatypes.genetics.Rgenetics

Phenotype file

file_ext = 'phe'
__init__(**kwd)[source]
metadata_spec = {'base_name': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f35eb208>, 'data_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f53974e0>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d4a8>}
class galaxy.datatypes.genetics.Fped(**kwd)[source]

Bases: galaxy.datatypes.genetics.Rgenetics

FBAT pedigree format - single file, map is header row of rs numbers. Strange. Rgenetics data collections

file_ext = 'fped'
__init__(**kwd)[source]
metadata_spec = {'base_name': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f36d6588>, 'data_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f53974e0>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d4a8>}
class galaxy.datatypes.genetics.Pbed(**kwd)[source]

Bases: galaxy.datatypes.genetics.Rgenetics

Plink Binary compressed 2bit/geno Rgenetics data collections

file_ext = 'pbed'
__init__(**kwd)[source]
metadata_spec = {'base_name': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f5612668>, 'data_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f53974e0>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d4a8>}
class galaxy.datatypes.genetics.ldIndep(**kwd)[source]

Bases: galaxy.datatypes.genetics.Rgenetics

LD (a good measure of redundancy of information) depleted Plink Binary compressed 2bit/geno This is really a plink binary, but some tools work better with less redundancy so are constrained to these files

file_ext = 'ldreduced'
__init__(**kwd)[source]
metadata_spec = {'base_name': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f5612a20>, 'data_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f53974e0>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d4a8>}
class galaxy.datatypes.genetics.Eigenstratgeno(**kwd)[source]

Bases: galaxy.datatypes.genetics.Rgenetics

Eigenstrat format - may be able to get rid of this if we move to shellfish Rgenetics data collections

file_ext = 'eigenstratgeno'
__init__(**kwd)[source]
metadata_spec = {'base_name': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f5612588>, 'data_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f53974e0>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d4a8>}
class galaxy.datatypes.genetics.Eigenstratpca(**kwd)[source]

Bases: galaxy.datatypes.genetics.Rgenetics

Eigenstrat PCA file for case control adjustment Rgenetics data collections

file_ext = 'eigenstratpca'
__init__(**kwd)[source]
metadata_spec = {'base_name': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f5612be0>, 'data_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f53974e0>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d4a8>}
class galaxy.datatypes.genetics.Snptest(**kwd)[source]

Bases: galaxy.datatypes.genetics.Rgenetics

BioC snptest Rgenetics data collections

file_ext = 'snptest'
metadata_spec = {'base_name': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f5612748>, 'data_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f53974e0>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d4a8>}
class galaxy.datatypes.genetics.IdeasPre(**kwd)[source]

Bases: galaxy.datatypes.text.Html

This datatype defines the input format required by IDEAS: https://academic.oup.com/nar/article/44/14/6721/2468150 The IDEAS preprocessor tool produces an output using this format. The extra_files_path of the primary input dataset contains the following files and directories. - chromosome_windows.txt (optional) - chromosomes.bed (optional) - IDEAS_input_config.txt - compressed archived tmp directory containing a number of compressed bed files.

composite_type = 'auto_primary_file'
allow_datatype_change = False
file_ext = 'ideaspre'
__init__(**kwd)[source]
set_meta(dataset, **kwd)[source]
generate_primary_file(dataset=None)[source]
regenerate_primary_file(dataset)[source]
metadata_spec = {'base_name': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f4422fd0>, 'chrom_bed': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f4422f98>, 'chrom_windows': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f4422710>, 'data_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f53974e0>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d4a8>, 'input_config': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f44229e8>, 'tmp_archive': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f4422860>}
class galaxy.datatypes.genetics.Pheno(**kwd)[source]

Bases: galaxy.datatypes.tabular.Tabular

base class for pheno files

file_ext = 'pheno'
metadata_spec = {'column_names': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f4422400>, 'column_types': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f4422b70>, 'columns': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f4422e48>, 'comment_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f4422be0>, 'data_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f44224a8>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d4a8>, 'delimiter': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f4422f60>}
class galaxy.datatypes.genetics.RexpBase(**kwd)[source]

Bases: galaxy.datatypes.text.Html

base class for BioC data structures in Galaxy must be constructed with the pheno data in place since that goes into the metadata for each instance

file_ext = 'rexpbase'
html_table = None
composite_type = 'auto_primary_file'
allow_datatype_change = False
__init__(**kwd)[source]
generate_primary_file(dataset=None)[source]

This is called only at upload to write the html file cannot rename the datasets here - they come with the default unfortunately

get_mime()[source]

Returns the mime type of the datatype

get_phecols(phenolist=[], maxConc=20)[source]

sept 2009: cannot use whitespace to split - make a more complex structure here and adjust the methods that rely on this structure return interesting phenotype column names for an rexpression eset or affybatch to use in array subsetting and so on. Returns a data structure for a dynamic Galaxy select parameter. A column with only 1 value doesn’t change, so is not interesting for analysis. A column with a different value in every row is equivalent to a unique identifier so is also not interesting for anova or limma analysis - both these are removed after the concordance (count of unique terms) is constructed for each column. Then a complication - each remaining pair of columns is tested for redundancy - if two columns are always paired, then only one is needed :)

get_pheno(dataset)[source]

expects a .pheno file in the extra_files_dir - ugh note that R is wierd and adds the row.name in the header so the columns are all wrong - unless you tell it not to. A file can be written as write.table(file=’foo.pheno’,pData(foo),sep=’ ‘,quote=F,row.names=F)

set_peek(dataset, **kwd)[source]

expects a .pheno file in the extra_files_dir - ugh note that R is weird and does not include the row.name in the header. why?

get_peek(dataset)[source]

expects a .pheno file in the extra_files_dir - ugh

get_file_peek(filename)[source]

can’t really peek at a filename - need the extra_files_path and such?

regenerate_primary_file(dataset)[source]

cannot do this until we are setting metadata

init_meta(dataset, copy_from=None)[source]
set_meta(dataset, **kwd)[source]

NOTE we apply the tabular machinary to the phenodata extracted from a BioC eSet or affybatch.

make_html_table(pp='nothing supplied from peek\n')[source]

Create HTML table, used for displaying peek

display_peek(dataset)[source]

Returns formatted html of peek

metadata_spec = {'base_name': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f4422cc0>, 'column_names': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f4422748>, 'columns': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f44224e0>, 'data_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f53974e0>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d4a8>, 'pheCols': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f4422940>, 'pheno_path': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f4422080>}
class galaxy.datatypes.genetics.Affybatch(**kwd)[source]

Bases: galaxy.datatypes.genetics.RexpBase

derived class for BioC data structures in Galaxy

file_ext = 'affybatch'
__init__(**kwd)[source]
metadata_spec = {'base_name': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f4422550>, 'column_names': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f4422a58>, 'columns': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f4422278>, 'data_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f53974e0>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d4a8>, 'pheCols': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f44222e8>, 'pheno_path': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f4422208>}
class galaxy.datatypes.genetics.Eset(**kwd)[source]

Bases: galaxy.datatypes.genetics.RexpBase

derived class for BioC data structures in Galaxy

file_ext = 'eset'
__init__(**kwd)[source]
metadata_spec = {'base_name': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f352ee10>, 'column_names': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f638ef28>, 'columns': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f638ee48>, 'data_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f53974e0>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d4a8>, 'pheCols': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f352e828>, 'pheno_path': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f352ecc0>}
class galaxy.datatypes.genetics.MAlist(**kwd)[source]

Bases: galaxy.datatypes.genetics.RexpBase

derived class for BioC data structures in Galaxy

file_ext = 'malist'
__init__(**kwd)[source]
metadata_spec = {'base_name': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f352eef0>, 'column_names': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f352e4e0>, 'columns': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f352ed68>, 'data_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f53974e0>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d4a8>, 'pheCols': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f352e8d0>, 'pheno_path': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f352ed30>}
class galaxy.datatypes.genetics.LinkageStudies(**kwd)[source]

Bases: galaxy.datatypes.data.Text

superclass for classical linkage analysis suites

test_files = ['linkstudies.allegro_fparam', 'linkstudies.alohomora_gts', 'linkstudies.linkage_datain', 'linkstudies.linkage_map']
__init__(**kwd)[source]
metadata_spec = {'data_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f352e1d0>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d4a8>}
class galaxy.datatypes.genetics.GenotypeMatrix(**kwd)[source]

Bases: galaxy.datatypes.genetics.LinkageStudies

Sample matrix of genotypes - GTs as columns

file_ext = 'alohomora_gts'
__init__(**kwd)[source]
header_check(fio)[source]
sniff_prefix(file_prefix)[source]
>>> classname = GenotypeMatrix
>>> from galaxy.datatypes.sniff import get_test_fname
>>> extn_true = classname().file_ext
>>> file_true = get_test_fname("linkstudies." + extn_true)
>>> classname().sniff(file_true)
True
>>> false_files = list(LinkageStudies.test_files)
>>> false_files.remove("linkstudies." + extn_true)
>>> result_true = []
>>> for fname in false_files:
...     file_false = get_test_fname(fname)
...     res = classname().sniff(file_false)
...     if res:
...         result_true.append(fname)
>>>
>>> result_true
[]
metadata_spec = {'data_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f352e588>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d4a8>}
sniff(filename)
class galaxy.datatypes.genetics.MarkerMap(**kwd)[source]

Bases: galaxy.datatypes.genetics.LinkageStudies

Map of genetic markers including physical and genetic distance Common input format for linkage programs

chrom, genetic pos, markername, physical pos, Nr

file_ext = 'linkage_map'
header_check(fio)[source]
sniff_prefix(file_prefix)[source]
>>> classname = MarkerMap
>>> from galaxy.datatypes.sniff import get_test_fname
>>> extn_true = classname().file_ext
>>> file_true = get_test_fname("linkstudies." + extn_true)
>>> classname().sniff(file_true)
True
>>> false_files = list(LinkageStudies.test_files)
>>> false_files.remove("linkstudies." + extn_true)
>>> result_true = []
>>> for fname in false_files:
...     file_false = get_test_fname(fname)
...     res = classname().sniff(file_false)
...     if res:
...         result_true.append(fname)
>>>
>>> result_true
[]
metadata_spec = {'data_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f352e160>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d4a8>}
sniff(filename)
class galaxy.datatypes.genetics.DataIn(**kwd)[source]

Bases: galaxy.datatypes.genetics.LinkageStudies

Common linkage input file for intermarker distances and recombination rates

file_ext = 'linkage_datain'
__init__(**kwd)[source]
sniff_prefix(file_prefix)[source]
>>> classname = DataIn
>>> from galaxy.datatypes.sniff import get_test_fname
>>> extn_true = classname().file_ext
>>> file_true = get_test_fname("linkstudies." + extn_true)
>>> classname().sniff(file_true)
True
>>> false_files = list(LinkageStudies.test_files)
>>> false_files.remove("linkstudies." + extn_true)
>>> result_true = []
>>> for fname in false_files:
...     file_false = get_test_fname(fname)
...     res = classname().sniff(file_false)
...     if res:
...         result_true.append(fname)
>>>
>>> result_true
[]
metadata_spec = {'data_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f352e940>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d4a8>}
sniff(filename)
class galaxy.datatypes.genetics.AllegroLOD(**kwd)[source]

Bases: galaxy.datatypes.genetics.LinkageStudies

Allegro output format for LOD scores

file_ext = 'allegro_fparam'
header_check(fio)[source]
sniff_prefix(file_prefix)[source]
>>> classname = AllegroLOD
>>> from galaxy.datatypes.sniff import get_test_fname
>>> extn_true = classname().file_ext
>>> file_true = get_test_fname("linkstudies." + extn_true)
>>> classname().sniff(file_true)
True
>>> false_files = list(LinkageStudies.test_files)
>>> false_files.remove("linkstudies." + extn_true)
>>> result_true = []
>>> for fname in false_files:
...     file_false = get_test_fname(fname)
...     res = classname().sniff(file_false)
...     if res:
...         result_true.append(fname)
>>>
>>> result_true
[]
metadata_spec = {'data_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f352e978>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d4a8>}
sniff(filename)

galaxy.datatypes.gis module

GIS classes

class galaxy.datatypes.gis.Shapefile(**kwd)[source]

Bases: galaxy.datatypes.binary.Binary

The Shapefile data format: For more information please see http://en.wikipedia.org/wiki/Shapefile

composite_type = 'auto_primary_file'
file_ext = 'shp'
allow_datatype_change = False
__init__(**kwd)[source]
generate_primary_file(dataset=None)[source]
set_peek(dataset, is_multi_byte=False)[source]

Set the peek and blurb text.

display_peek(dataset)[source]

Create HTML content, used for displaying peek.

metadata_spec = {'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f313c710>}

galaxy.datatypes.graph module

Graph content classes.

class galaxy.datatypes.graph.Xgmml(**kwd)[source]

Bases: galaxy.datatypes.xml.GenericXml

XGMML graph format (http://wiki.cytoscape.org/Cytoscape_User_Manual/Network_Formats).

file_ext = 'xgmml'
set_peek(dataset, is_multi_byte=False)[source]

Set the peek and blurb text

sniff(filename)[source]

Returns false and the user must manually set.

static merge(split_files, output_file)[source]

Merging multiple XML files is non-trivial and must be done in subclasses.

node_edge_dataprovider(dataset, **settings)[source]
dataproviders = {'base': <function Data.base_dataprovider at 0x7fd116622048>, 'chunk': <function Data.chunk_dataprovider at 0x7fd1166221e0>, 'chunk64': <function Data.chunk64_dataprovider at 0x7fd116622378>, 'line': <function Text.line_dataprovider at 0x7fd116622a60>, 'node-edge': <function Xgmml.node_edge_dataprovider at 0x7fd0f2c65d08>, 'regex-line': <function Text.regex_line_dataprovider at 0x7fd116622bf8>, 'xml': <function GenericXml.xml_dataprovider at 0x7fd0f7c8e730>}
metadata_spec = {'data_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f2fb57b8>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d4a8>}
class galaxy.datatypes.graph.Sif(**kwd)[source]

Bases: galaxy.datatypes.tabular.Tabular

SIF graph format (http://wiki.cytoscape.org/Cytoscape_User_Manual/Network_Formats).

First column: node id Second column: relationship type Third to Nth column: target ids for link

file_ext = 'sif'
set_peek(dataset, is_multi_byte=False)[source]

Set the peek and blurb text

sniff(filename)[source]

Returns false and the user must manually set.

static merge(split_files, output_file)[source]
node_edge_dataprovider(dataset, **settings)[source]
dataproviders = {'base': <function Data.base_dataprovider at 0x7fd116622048>, 'chunk': <function Data.chunk_dataprovider at 0x7fd1166221e0>, 'chunk64': <function Data.chunk64_dataprovider at 0x7fd116622378>, 'column': <function TabularData.column_dataprovider at 0x7fd1132ad488>, 'dataset-column': <function TabularData.dataset_column_dataprovider at 0x7fd1132ad620>, 'dataset-dict': <function TabularData.dataset_dict_dataprovider at 0x7fd1132ad950>, 'dict': <function TabularData.dict_dataprovider at 0x7fd1132ad7b8>, 'line': <function Text.line_dataprovider at 0x7fd116622a60>, 'node-edge': <function Sif.node_edge_dataprovider at 0x7fd0f312c2f0>, 'regex-line': <function Text.regex_line_dataprovider at 0x7fd116622bf8>}
metadata_spec = {'column_names': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f2d22cf8>, 'column_types': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f2d221d0>, 'columns': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f2d22240>, 'comment_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f4057198>, 'data_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f2d3f5c0>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d4a8>, 'delimiter': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f315eb70>}
class galaxy.datatypes.graph.XGMMLGraphDataProvider(source, selector=None, max_depth=None, **kwargs)[source]

Bases: galaxy.datatypes.dataproviders.hierarchy.XMLDataProvider

Provide two lists: nodes, edges:

'nodes': contains objects of the form:
    { 'id' : <some string id>, 'data': <any extra data> }
'edges': contains objects of the form:
    { 'source' : <an index into nodes>, 'target': <an index into nodes>, 'data': <any extra data> }
settings = {'limit': 'int', 'max_depth': 'int', 'offset': 'int', 'selector': 'str'}
class galaxy.datatypes.graph.SIFGraphDataProvider(source, indeces=None, column_count=None, column_types=None, parsers=None, parse_columns=True, deliminator='t', filters=None, **kwargs)[source]

Bases: galaxy.datatypes.dataproviders.column.ColumnarDataProvider

Provide two lists: nodes, edges:

'nodes': contains objects of the form:
    { 'id' : <some string id>, 'data': <any extra data> }
'edges': contains objects of the form:
    { 'source' : <an index into nodes>, 'target': <an index into nodes>, 'data': <any extra data> }
settings = {'column_count': 'int', 'column_types': 'list:str', 'comment_char': 'str', 'deliminator': 'str', 'filters': 'list:str', 'indeces': 'list:int', 'invert': 'bool', 'limit': 'int', 'offset': 'int', 'parse_columns': 'bool', 'provide_blank': 'bool', 'regex_list': 'list:escaped', 'strip_lines': 'bool', 'strip_newlines': 'bool'}

galaxy.datatypes.images module

Image classes

class galaxy.datatypes.images.Image(**kwd)[source]

Bases: galaxy.datatypes.data.Data

Class describing an image

edam_data = 'data_2968'
edam_format = 'format_3547'
file_ext = ''
__init__(**kwd)[source]
set_peek(dataset, is_multi_byte=False)[source]
sniff(filename)[source]

Determine if the file is in this format

handle_dataset_as_image(hda)[source]
metadata_spec = {'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f3f59358>}
class galaxy.datatypes.images.Jpg(**kwd)[source]

Bases: galaxy.datatypes.images.Image

edam_format = 'format_3579'
file_ext = 'jpg'
__init__(**kwd)[source]
metadata_spec = {'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f3f59588>}
class galaxy.datatypes.images.Png(**kwd)[source]

Bases: galaxy.datatypes.images.Image

edam_format = 'format_3603'
file_ext = 'png'
metadata_spec = {'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f3f59940>}
class galaxy.datatypes.images.Tiff(**kwd)[source]

Bases: galaxy.datatypes.images.Image

edam_format = 'format_3591'
file_ext = 'tiff'
metadata_spec = {'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f399bac8>}
class galaxy.datatypes.images.Hamamatsu(**kwd)[source]

Bases: galaxy.datatypes.images.Image

file_ext = 'vms'
metadata_spec = {'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f2fb5198>}
class galaxy.datatypes.images.Mirax(**kwd)[source]

Bases: galaxy.datatypes.images.Image

file_ext = 'mrxs'
metadata_spec = {'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f2d01588>}
class galaxy.datatypes.images.Sakura(**kwd)[source]

Bases: galaxy.datatypes.images.Image

file_ext = 'svslide'
metadata_spec = {'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f3994860>}
class galaxy.datatypes.images.Nrrd(**kwd)[source]

Bases: galaxy.datatypes.images.Image

file_ext = 'nrrd'
metadata_spec = {'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f2cb00b8>}
class galaxy.datatypes.images.Bmp(**kwd)[source]

Bases: galaxy.datatypes.images.Image

edam_format = 'format_3592'
file_ext = 'bmp'
metadata_spec = {'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f2cb0908>}
class galaxy.datatypes.images.Gif(**kwd)[source]

Bases: galaxy.datatypes.images.Image

edam_format = 'format_3467'
file_ext = 'gif'
metadata_spec = {'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f2cb0b00>}
class galaxy.datatypes.images.Im(**kwd)[source]

Bases: galaxy.datatypes.images.Image

edam_format = 'format_3593'
file_ext = 'im'
metadata_spec = {'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f2cb0cf8>}
class galaxy.datatypes.images.Pcd(**kwd)[source]

Bases: galaxy.datatypes.images.Image

edam_format = 'format_3594'
file_ext = 'pcd'
metadata_spec = {'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f2cb0ef0>}
class galaxy.datatypes.images.Pcx(**kwd)[source]

Bases: galaxy.datatypes.images.Image

edam_format = 'format_3595'
file_ext = 'pcx'
metadata_spec = {'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f3f60128>}
class galaxy.datatypes.images.Ppm(**kwd)[source]

Bases: galaxy.datatypes.images.Image

edam_format = 'format_3596'
file_ext = 'ppm'
metadata_spec = {'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f3f60320>}
class galaxy.datatypes.images.Psd(**kwd)[source]

Bases: galaxy.datatypes.images.Image

edam_format = 'format_3597'
file_ext = 'psd'
metadata_spec = {'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f3f60518>}
class galaxy.datatypes.images.Xbm(**kwd)[source]

Bases: galaxy.datatypes.images.Image

edam_format = 'format_3598'
file_ext = 'xbm'
metadata_spec = {'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f3f606d8>}
class galaxy.datatypes.images.Xpm(**kwd)[source]

Bases: galaxy.datatypes.images.Image

edam_format = 'format_3599'
file_ext = 'xpm'
metadata_spec = {'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f3f608d0>}
class galaxy.datatypes.images.Rgb(**kwd)[source]

Bases: galaxy.datatypes.images.Image

edam_format = 'format_3600'
file_ext = 'rgb'
metadata_spec = {'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f3f60ac8>}
class galaxy.datatypes.images.Pbm(**kwd)[source]

Bases: galaxy.datatypes.images.Image

edam_format = 'format_3601'
file_ext = 'pbm'
metadata_spec = {'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f3f60c88>}
class galaxy.datatypes.images.Pgm(**kwd)[source]

Bases: galaxy.datatypes.images.Image

edam_format = 'format_3602'
file_ext = 'pgm'
metadata_spec = {'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f3f60e80>}
class galaxy.datatypes.images.Eps(**kwd)[source]

Bases: galaxy.datatypes.images.Image

edam_format = 'format_3466'
file_ext = 'eps'
metadata_spec = {'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f3f610b8>}
class galaxy.datatypes.images.Rast(**kwd)[source]

Bases: galaxy.datatypes.images.Image

edam_format = 'format_3605'
file_ext = 'rast'
metadata_spec = {'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f3f61278>}
class galaxy.datatypes.images.Pdf(**kwd)[source]

Bases: galaxy.datatypes.images.Image

edam_format = 'format_3508'
file_ext = 'pdf'
sniff(filename)[source]

Determine if the file is in pdf format.

metadata_spec = {'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f3f61438>}
galaxy.datatypes.images.create_applet_tag_peek(class_name, archive, params)[source]
class galaxy.datatypes.images.Gmaj(**kwd)[source]

Bases: galaxy.datatypes.data.Data

Class describing a GMAJ Applet

edam_format = 'format_3547'
file_ext = 'gmaj.zip'
copy_safe_peek = False
set_peek(dataset, is_multi_byte=False)[source]
display_peek(dataset)[source]
get_mime()[source]

Returns the mime type of the datatype

sniff(filename)[source]

NOTE: the sniff.convert_newlines() call in the upload utility will keep Gmaj data types from being correctly sniffed, but the files can be uploaded (they’ll be sniffed as ‘txt’). This sniff function is here to provide an example of a sniffer for a zip file.

metadata_spec = {'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f3f61630>}
class galaxy.datatypes.images.Html(**kwd)[source]

Bases: galaxy.datatypes.text.Html

Deprecated class. This class should not be used anymore, but the galaxy.datatypes.text:Html one. This is for backwards compatibilities only.

metadata_spec = {'data_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f3f617f0>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d4a8>}
class galaxy.datatypes.images.Laj(**kwd)[source]

Bases: galaxy.datatypes.data.Text

Class describing a LAJ Applet

file_ext = 'laj'
copy_safe_peek = False
set_peek(dataset, is_multi_byte=False)[source]
display_peek(dataset)[source]
metadata_spec = {'data_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f3f619e8>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d4a8>}

galaxy.datatypes.interval module

Interval datatypes

class galaxy.datatypes.interval.Interval(**kwd)[source]

Bases: galaxy.datatypes.tabular.Tabular

Tab delimited data containing interval information

edam_data = 'data_3002'
edam_format = 'format_3475'
file_ext = 'interval'
line_class = 'region'
track_type = 'FeatureTrack'
data_sources = {'data': 'tabix', 'index': 'bigwig'}

Add metadata elements

__init__(**kwd)[source]

Initialize interval datatype, by adding UCSC display apps

init_meta(dataset, copy_from=None)[source]
set_meta(dataset, overwrite=True, first_line_is_header=False, **kwd)[source]

Tries to guess from the line the location number of the column for the chromosome, region start-end and strand

displayable(dataset)[source]
get_estimated_display_viewport(dataset, chrom_col=None, start_col=None, end_col=None)[source]

Return a chrom, start, stop tuple for viewing a file.

as_ucsc_display_file(dataset, **kwd)[source]

Returns file contents with only the bed data

display_peek(dataset)[source]

Returns formated html of peek

Generate links to UCSC genome browser sites based on the dbkey and content of dataset.

validate(dataset, **kwd)[source]

Validate an interval file using the bx GenomicIntervalReader

repair_methods(dataset)[source]

Return options for removing errors along with a description

sniff_prefix(file_prefix)[source]

Checks for ‘intervalness’

This format is mostly used by galaxy itself. Valid interval files should include a valid header comment, but this seems to be loosely regulated.

>>> from galaxy.datatypes.sniff import get_test_fname
>>> fname = get_test_fname( 'test_space.txt' )
>>> Interval().sniff( fname )
False
>>> fname = get_test_fname( 'interval.interval' )
>>> Interval().sniff( fname )
True
get_track_resolution(dataset, start, end)[source]
genomic_region_dataprovider(dataset, **settings)[source]
genomic_region_dict_dataprovider(dataset, **settings)[source]
interval_dataprovider(dataset, **settings)[source]
interval_dict_dataprovider(dataset, **settings)[source]
dataproviders = {'base': <function Data.base_dataprovider at 0x7fd116622048>, 'chunk': <function Data.chunk_dataprovider at 0x7fd1166221e0>, 'chunk64': <function Data.chunk64_dataprovider at 0x7fd116622378>, 'column': <function TabularData.column_dataprovider at 0x7fd1132ad488>, 'dataset-column': <function TabularData.dataset_column_dataprovider at 0x7fd1132ad620>, 'dataset-dict': <function TabularData.dataset_dict_dataprovider at 0x7fd1132ad950>, 'dict': <function TabularData.dict_dataprovider at 0x7fd1132ad7b8>, 'genomic-region': <function Interval.genomic_region_dataprovider at 0x7fd113276d08>, 'genomic-region-dict': <function Interval.genomic_region_dict_dataprovider at 0x7fd113276ea0>, 'interval': <function Interval.interval_dataprovider at 0x7fd1132780d0>, 'interval-dict': <function Interval.interval_dict_dataprovider at 0x7fd113278268>, 'line': <function Text.line_dataprovider at 0x7fd116622a60>, 'regex-line': <function Text.regex_line_dataprovider at 0x7fd116622bf8>}
metadata_spec = {'chromCol': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd113272898>, 'column_names': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd113204198>, 'column_types': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1131fbeb8>, 'columns': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11327b0f0>, 'comment_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1131fb240>, 'data_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1131fb400>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d4a8>, 'delimiter': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd113204470>, 'endCol': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd113272f60>, 'nameCol': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11327b080>, 'startCol': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd113272ef0>, 'strandCol': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd113272fd0>}
sniff(filename)
class galaxy.datatypes.interval.BedGraph(**kwd)[source]

Bases: galaxy.datatypes.interval.Interval

Tab delimited chrom/start/end/datavalue dataset

edam_format = 'format_3583'
file_ext = 'bedgraph'
track_type = 'LineTrack'
data_sources = {'data': 'bigwig', 'index': 'bigwig'}
as_ucsc_display_file(dataset, **kwd)[source]

Returns file contents as is with no modifications. TODO: this is a functional stub and will need to be enhanced moving forward to provide additional support for bedgraph.

get_estimated_display_viewport(dataset, chrom_col=0, start_col=1, end_col=2)[source]

Set viewport based on dataset’s first 100 lines.

metadata_spec = {'chromCol': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11327b278>, 'column_names': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd113204198>, 'column_types': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1131fbeb8>, 'columns': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11327b518>, 'comment_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1131fb240>, 'data_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1131fb400>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d4a8>, 'delimiter': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd113204470>, 'endCol': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11327b3c8>, 'nameCol': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11327b4a8>, 'startCol': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11327b358>, 'strandCol': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11327b438>}
class galaxy.datatypes.interval.Bed(**kwd)[source]

Bases: galaxy.datatypes.interval.Interval

Tab delimited data in BED format

edam_format = 'format_3003'
file_ext = 'bed'
data_sources = {'data': 'tabix', 'feature_search': 'fli', 'index': 'bigwig'}
track_type = 'FeatureTrack'
column_names = ['Chrom', 'Start', 'End', 'Name', 'Score', 'Strand', 'ThickStart', 'ThickEnd', 'ItemRGB', 'BlockCount', 'BlockSizes', 'BlockStarts']

Add metadata elements

set_meta(dataset, overwrite=True, **kwd)[source]

Sets the metadata information for datasets previously determined to be in bed format.

as_ucsc_display_file(dataset, **kwd)[source]

Returns file contents with only the bed data. If bed 6+, treat as interval.

sniff_prefix(file_prefix)[source]

Checks for ‘bedness’

BED lines have three required fields and nine additional optional fields. The number of fields per line must be consistent throughout any single set of data in an annotation track. The order of the optional fields is binding: lower-numbered fields must always be populated if higher-numbered fields are used. The data type of all 12 columns is: 1-str, 2-int, 3-int, 4-str, 5-int, 6-str, 7-int, 8-int, 9-int or list, 10-int, 11-list, 12-list

For complete details see http://genome.ucsc.edu/FAQ/FAQformat#format1

>>> from galaxy.datatypes.sniff import get_test_fname
>>> fname = get_test_fname( 'test_tab.bed' )
>>> Bed().sniff( fname )
True
>>> fname = get_test_fname( 'interv1.bed' )
>>> Bed().sniff( fname )
True
>>> fname = get_test_fname( 'complete.bed' )
>>> Bed().sniff( fname )
True
metadata_spec = {'chromCol': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11327b6a0>, 'column_names': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd113204198>, 'column_types': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1131fbeb8>, 'columns': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11327b8d0>, 'comment_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1131fb240>, 'data_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1131fb400>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d4a8>, 'delimiter': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd113204470>, 'endCol': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11327b7f0>, 'nameCol': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11327b080>, 'startCol': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11327b780>, 'strandCol': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11327b860>, 'viz_filter_cols': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11327b908>}
class galaxy.datatypes.interval.ProBed(**kwd)[source]

Bases: galaxy.datatypes.interval.Bed

Tab delimited data in proBED format - adaptation of BED for proteomics data.

edam_format = 'format_3827'
file_ext = 'probed'
column_names = ['Chrom', 'Start', 'End', 'Name', 'Score', 'Strand', 'ThickStart', 'ThickEnd', 'ItemRGB', 'BlockCount', 'BlockSizes', 'BlockStarts', 'ProteinAccession', 'PeptideSequence', 'Uniqueness', 'GenomeReferenceVersion', 'PsmScore', 'Fdr', 'Modifications', 'Charge', 'ExpMassToCharge', 'CalcMassToCharge', 'PsmRank', 'DatasetID', 'Uri']
metadata_spec = {'chromCol': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11327bac8>, 'column_names': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd113204198>, 'column_types': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1131fbeb8>, 'columns': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11327bcf8>, 'comment_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1131fb240>, 'data_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1131fb400>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d4a8>, 'delimiter': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd113204470>, 'endCol': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11327bc18>, 'nameCol': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11327b080>, 'startCol': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11327bba8>, 'strandCol': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11327bc88>, 'viz_filter_cols': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11327bd30>}
class galaxy.datatypes.interval.BedStrict(**kwd)[source]

Bases: galaxy.datatypes.interval.Bed

Tab delimited data in strict BED format - no non-standard columns allowed

edam_format = 'format_3584'
file_ext = 'bedstrict'
allow_datatype_change = False
__init__(**kwd)[source]
set_meta(dataset, overwrite=True, **kwd)[source]
sniff(filename)[source]
metadata_spec = {'chromCol': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11327bef0>, 'column_names': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd113204198>, 'column_types': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1131fbeb8>, 'columns': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd113283160>, 'comment_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1131fb240>, 'data_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1131fb400>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d4a8>, 'delimiter': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd113204470>, 'endCol': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11327bfd0>, 'nameCol': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1132830f0>, 'startCol': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11327bf60>, 'strandCol': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd113283080>, 'viz_filter_cols': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11327b908>}
class galaxy.datatypes.interval.Bed6(**kwd)[source]

Bases: galaxy.datatypes.interval.BedStrict

Tab delimited data in strict BED format - no non-standard columns allowed; column count forced to 6

edam_format = 'format_3585'
file_ext = 'bed6'
metadata_spec = {'chromCol': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd113283358>, 'column_names': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd113204198>, 'column_types': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1131fbeb8>, 'columns': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd113283588>, 'comment_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1131fb240>, 'data_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1131fb400>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d4a8>, 'delimiter': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd113204470>, 'endCol': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd113283438>, 'nameCol': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd113283518>, 'startCol': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1132833c8>, 'strandCol': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1132834a8>, 'viz_filter_cols': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11327b908>}
class galaxy.datatypes.interval.Bed12(**kwd)[source]

Bases: galaxy.datatypes.interval.BedStrict

Tab delimited data in strict BED format - no non-standard columns allowed; column count forced to 12

edam_format = 'format_3586'
file_ext = 'bed12'
metadata_spec = {'chromCol': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd113283780>, 'column_names': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd113204198>, 'column_types': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1131fbeb8>, 'columns': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1132839b0>, 'comment_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1131fb240>, 'data_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1131fb400>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d4a8>, 'delimiter': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd113204470>, 'endCol': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd113283860>, 'nameCol': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd113283940>, 'startCol': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1132837f0>, 'strandCol': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1132838d0>, 'viz_filter_cols': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11327b908>}
class galaxy.datatypes.interval.Gff(**kwd)[source]

Bases: galaxy.datatypes.tabular.Tabular, galaxy.datatypes.interval._RemoteCallMixin

Tab delimited data in Gff format

edam_data = 'data_1255'
edam_format = 'format_2305'
file_ext = 'gff'
valid_gff_frame = ['.', '0', '1', '2']
column_names = ['Seqname', 'Source', 'Feature', 'Start', 'End', 'Score', 'Strand', 'Frame', 'Group']
data_sources = {'data': 'interval_index', 'feature_search': 'fli', 'index': 'bigwig'}
track_type = 'FeatureTrack'

Add metadata elements

__init__(**kwd)[source]

Initialize datatype, by adding GBrowse display app

set_attribute_metadata(dataset)[source]

Sets metadata elements for dataset’s attributes.

set_meta(dataset, overwrite=True, **kwd)[source]
display_peek(dataset)[source]

Returns formated html of peek

get_estimated_display_viewport(dataset)[source]

Return a chrom, start, stop tuple for viewing a file. There are slight differences between gff 2 and gff 3 formats. This function should correctly handle both…

sniff_prefix(file_prefix)[source]

Determines whether the file is in gff format

GFF lines have nine required fields that must be tab-separated.

For complete details see http://genome.ucsc.edu/FAQ/FAQformat#format3

>>> from galaxy.datatypes.sniff import get_test_fname
>>> fname = get_test_fname('gff.gff3')
>>> Gff().sniff( fname )
False
>>> fname = get_test_fname('test.gff')
>>> Gff().sniff( fname )
True
genomic_region_dataprovider(dataset, **settings)[source]
genomic_region_dict_dataprovider(dataset, **settings)[source]
interval_dataprovider(dataset, **settings)[source]
interval_dict_dataprovider(dataset, **settings)[source]
dataproviders = {'base': <function Data.base_dataprovider at 0x7fd116622048>, 'chunk': <function Data.chunk_dataprovider at 0x7fd1166221e0>, 'chunk64': <function Data.chunk64_dataprovider at 0x7fd116622378>, 'column': <function TabularData.column_dataprovider at 0x7fd1132ad488>, 'dataset-column': <function TabularData.dataset_column_dataprovider at 0x7fd1132ad620>, 'dataset-dict': <function TabularData.dataset_dict_dataprovider at 0x7fd1132ad950>, 'dict': <function TabularData.dict_dataprovider at 0x7fd1132ad7b8>, 'genomic-region': <function Gff.genomic_region_dataprovider at 0x7fd113282d08>, 'genomic-region-dict': <function Gff.genomic_region_dict_dataprovider at 0x7fd113282ea0>, 'interval': <function Gff.interval_dataprovider at 0x7fd1132880d0>, 'interval-dict': <function Gff.interval_dict_dataprovider at 0x7fd113288268>, 'line': <function Text.line_dataprovider at 0x7fd116622a60>, 'regex-line': <function Text.regex_line_dataprovider at 0x7fd116622bf8>}
metadata_spec = {'attribute_types': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd113283eb8>, 'attributes': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd113283e48>, 'column_names': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd113204198>, 'column_types': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd113283dd8>, 'columns': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd113283d68>, 'comment_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1131fb240>, 'data_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1131fb400>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d4a8>, 'delimiter': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd113204470>}
sniff(filename)
class galaxy.datatypes.interval.Gff3(**kwd)[source]

Bases: galaxy.datatypes.interval.Gff

Tab delimited data in Gff3 format

edam_format = 'format_1975'
file_ext = 'gff3'
valid_gff3_strand = ['+', '-', '.', '?']
valid_gff3_phase = ['.', '0', '1', '2']
column_names = ['Seqid', 'Source', 'Type', 'Start', 'End', 'Score', 'Strand', 'Phase', 'Attributes']
track_type = 'FeatureTrack'

Add metadata elements

__init__(**kwd)[source]

Initialize datatype, by adding GBrowse display app

set_meta(dataset, overwrite=True, **kwd)[source]
sniff_prefix(file_prefix)[source]

Determines whether the file is in GFF version 3 format

GFF 3 format:

  1. adds a mechanism for representing more than one level of hierarchical grouping of features and subfeatures.
  2. separates the ideas of group membership and feature name/id
  3. constrains the feature type field to be taken from a controlled vocabulary.
  4. allows a single feature, such as an exon, to belong to more than one group at a time.
  5. provides an explicit convention for pairwise alignments
  6. provides an explicit convention for features that occupy disjunct regions

The format consists of 9 columns, separated by tabs (NOT spaces).

Undefined fields are replaced with the “.” character, as described in the original GFF spec.

For complete details see http://song.sourceforge.net/gff3.shtml

>>> from galaxy.datatypes.sniff import get_test_fname
>>> fname = get_test_fname( 'test.gff' )
>>> Gff3().sniff( fname )
False
>>> fname = get_test_fname( 'test.gtf' )
>>> Gff3().sniff( fname )
False
>>> fname = get_test_fname('gff.gff3')
>>> Gff3().sniff( fname )
True
metadata_spec = {'attribute_types': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd113283eb8>, 'attributes': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd113283e48>, 'column_names': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd113204198>, 'column_types': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11328d0f0>, 'columns': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd113283d68>, 'comment_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1131fb240>, 'data_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1131fb400>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d4a8>, 'delimiter': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd113204470>}
class galaxy.datatypes.interval.Gtf(**kwd)[source]

Bases: galaxy.datatypes.interval.Gff

Tab delimited data in Gtf format

edam_format = 'format_2306'
file_ext = 'gtf'
column_names = ['Seqname', 'Source', 'Feature', 'Start', 'End', 'Score', 'Strand', 'Frame', 'Attributes']
track_type = 'FeatureTrack'

Add metadata elements

sniff_prefix(file_prefix)[source]

Determines whether the file is in gtf format

GTF lines have nine required fields that must be tab-separated. The first eight GTF fields are the same as GFF. The group field has been expanded into a list of attributes. Each attribute consists of a type/value pair. Attributes must end in a semi-colon, and be separated from any following attribute by exactly one space. The attribute list must begin with the two mandatory attributes:

gene_id value - A globally unique identifier for the genomic source of the sequence. transcript_id value - A globally unique identifier for the predicted transcript.

For complete details see http://genome.ucsc.edu/FAQ/FAQformat#format4

>>> from galaxy.datatypes.sniff import get_test_fname
>>> fname = get_test_fname( '1.bed' )
>>> Gtf().sniff( fname )
False
>>> fname = get_test_fname( 'test.gff' )
>>> Gtf().sniff( fname )
False
>>> fname = get_test_fname( 'test.gtf' )
>>> Gtf().sniff( fname )
True
metadata_spec = {'attribute_types': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd113283eb8>, 'attributes': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd113283e48>, 'column_names': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd113204198>, 'column_types': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11328d358>, 'columns': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11328d2e8>, 'comment_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1131fb240>, 'data_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1131fb400>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d4a8>, 'delimiter': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd113204470>}
class galaxy.datatypes.interval.Wiggle(**kwd)[source]

Bases: galaxy.datatypes.tabular.Tabular, galaxy.datatypes.interval._RemoteCallMixin

Tab delimited data in wiggle format

edam_format = 'format_3005'
file_ext = 'wig'
track_type = 'LineTrack'
data_sources = {'data': 'bigwig', 'index': 'bigwig'}
__init__(**kwd)[source]
get_estimated_display_viewport(dataset)[source]

Return a chrom, start, stop tuple for viewing a file.

display_peek(dataset)[source]

Returns formated html of peek

set_meta(dataset, overwrite=True, **kwd)[source]
sniff_prefix(file_prefix)[source]

Determines wether the file is in wiggle format

The .wig format is line-oriented. Wiggle data is preceeded by a track definition line, which adds a number of options for controlling the default display of this track. Following the track definition line is the track data, which can be entered in several different formats.

The track definition line begins with the word ‘track’ followed by the track type. The track type with version is REQUIRED, and it currently must be wiggle_0. For example, track type=wiggle_0…

For complete details see http://genome.ucsc.edu/goldenPath/help/wiggle.html

>>> from galaxy.datatypes.sniff import get_test_fname
>>> fname = get_test_fname( 'interv1.bed' )
>>> Wiggle().sniff( fname )
False
>>> fname = get_test_fname( 'wiggle.wig' )
>>> Wiggle().sniff( fname )
True
get_track_resolution(dataset, start, end)[source]
wiggle_dataprovider(dataset, **settings)[source]
wiggle_dict_dataprovider(dataset, **settings)[source]
dataproviders = {'base': <function Data.base_dataprovider at 0x7fd116622048>, 'chunk': <function Data.chunk_dataprovider at 0x7fd1166221e0>, 'chunk64': <function Data.chunk64_dataprovider at 0x7fd116622378>, 'column': <function TabularData.column_dataprovider at 0x7fd1132ad488>, 'dataset-column': <function TabularData.dataset_column_dataprovider at 0x7fd1132ad620>, 'dataset-dict': <function TabularData.dataset_dict_dataprovider at 0x7fd1132ad950>, 'dict': <function TabularData.dict_dataprovider at 0x7fd1132ad7b8>, 'line': <function Text.line_dataprovider at 0x7fd116622a60>, 'regex-line': <function Text.regex_line_dataprovider at 0x7fd116622bf8>, 'wiggle': <function Wiggle.wiggle_dataprovider at 0x7fd11328f1e0>, 'wiggle-dict': <function Wiggle.wiggle_dict_dataprovider at 0x7fd11328f378>}
metadata_spec = {'column_names': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd113204198>, 'column_types': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1131fbeb8>, 'columns': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11328d5f8>, 'comment_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1131fb240>, 'data_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1131fb400>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d4a8>, 'delimiter': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd113204470>}
sniff(filename)
class galaxy.datatypes.interval.CustomTrack(**kwd)[source]

Bases: galaxy.datatypes.tabular.Tabular

UCSC CustomTrack

edam_format = 'format_3588'
file_ext = 'customtrack'
__init__(**kwd)[source]

Initialize interval datatype, by adding UCSC display app

set_meta(dataset, overwrite=True, **kwd)[source]
display_peek(dataset)[source]

Returns formated html of peek

get_estimated_display_viewport(dataset, chrom_col=None, start_col=None, end_col=None)[source]

Return a chrom, start, stop tuple for viewing a file.

sniff_prefix(file_prefix)[source]

Determines whether the file is in customtrack format.

CustomTrack files are built within Galaxy and are basically bed or interval files with the first line looking something like this.

track name=”User Track” description=”User Supplied Track (from Galaxy)” color=0,0,0 visibility=1

>>> from galaxy.datatypes.sniff import get_test_fname
>>> fname = get_test_fname( 'complete.bed' )
>>> CustomTrack().sniff( fname )
False
>>> fname = get_test_fname( 'ucsc.customtrack' )
>>> CustomTrack().sniff( fname )
True
metadata_spec = {'column_names': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11328d9b0>, 'column_types': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11328d940>, 'columns': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11328d8d0>, 'comment_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11328d7f0>, 'data_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11328d860>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d4a8>, 'delimiter': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11328da20>}
sniff(filename)
class galaxy.datatypes.interval.ENCODEPeak(**kwd)[source]

Bases: galaxy.datatypes.interval.Interval

Human ENCODE peak format. There are both broad and narrow peak formats. Formats are very similar; narrow peak has an additional column, though.

Broad peak ( http://genome.ucsc.edu/FAQ/FAQformat#format13 ): This format is used to provide called regions of signal enrichment based on pooled, normalized (interpreted) data. It is a BED 6+3 format.

Narrow peak http://genome.ucsc.edu/FAQ/FAQformat#format12 and : This format is used to provide called peaks of signal enrichment based on pooled, normalized (interpreted) data. It is a BED6+4 format.

edam_format = 'format_3612'
file_ext = 'encodepeak'
column_names = ['Chrom', 'Start', 'End', 'Name', 'Score', 'Strand', 'SignalValue', 'pValue', 'qValue', 'Peak']
data_sources = {'data': 'tabix', 'index': 'bigwig'}

Add metadata elements

sniff(filename)[source]
metadata_spec = {'chromCol': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11328dc18>, 'column_names': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd113204198>, 'column_types': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1131fbeb8>, 'columns': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11328de48>, 'comment_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1131fb240>, 'data_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1131fb400>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d4a8>, 'delimiter': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd113204470>, 'endCol': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11328dd68>, 'nameCol': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11327b080>, 'startCol': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11328dcf8>, 'strandCol': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11328ddd8>}
class galaxy.datatypes.interval.ChromatinInteractions(**kwd)[source]

Bases: galaxy.datatypes.interval.Interval

Chromatin interactions obtained from 3C/5C/Hi-C experiments.

file_ext = 'chrint'
track_type = 'DiagonalHeatmapTrack'
data_sources = {'data': 'tabix', 'index': 'bigwig'}
column_names = ['Chrom1', 'Start1', 'End1', 'Chrom2', 'Start2', 'End2', 'Value']

Add metadata elements

metadata_spec = {'chrom1Col': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd113295048>, 'chrom2Col': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd113295208>, 'chromCol': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd113272898>, 'column_names': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd113204198>, 'column_types': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1131fbeb8>, 'columns': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1132953c8>, 'comment_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1131fb240>, 'data_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1131fb400>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d4a8>, 'delimiter': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd113204470>, 'end1Col': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd113295198>, 'end2Col': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1132952e8>, 'endCol': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd113272f60>, 'nameCol': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11327b080>, 'start1Col': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd113295128>, 'start2Col': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd113295278>, 'startCol': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd113272ef0>, 'strandCol': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd113272fd0>, 'valueCol': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd113295358>}
sniff(filename)[source]
class galaxy.datatypes.interval.ScIdx(**kwd)[source]

Bases: galaxy.datatypes.tabular.Tabular

ScIdx files are 1-based and consist of strand-specific coordinate counts. They always have 5 columns, and the first row is the column labels: ‘chrom’, ‘index’, ‘forward’, ‘reverse’, ‘value’. Each line following the first consists of data: chromosome name (type str), peak index (type int), Forward strand peak count (type int), Reverse strand peak count (type int) and value (type int). The value of the 5th ‘value’ column is the sum of the forward and reverse peak count values.

metadata_spec = {'column_names': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd113204198>, 'column_types': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1132955c0>, 'columns': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd113295550>, 'comment_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1131fb240>, 'data_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1131fb400>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d4a8>, 'delimiter': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd113204470>}
sniff(filename)
file_ext = 'scidx'
__init__(**kwd)[source]

Initialize scidx datatype.

sniff_prefix(file_prefix)[source]

Checks for ‘scidx-ness.’

galaxy.datatypes.isa module

ISA datatype

See https://github.com/ISA-tools

galaxy.datatypes.isa.utf8_text_file_open(path)[source]
class galaxy.datatypes.isa.IsaTab(**kwd)[source]

Bases: galaxy.datatypes.isa._Isa

file_ext = 'isa-tab'
__init__(**kwd)[source]
metadata_spec = {'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f71f6fd0>}
class galaxy.datatypes.isa.IsaJson(**kwd)[source]

Bases: galaxy.datatypes.isa._Isa

file_ext = 'isa-json'
__init__(**kwd)[source]
metadata_spec = {'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f71f6390>}

galaxy.datatypes.metadata module

Expose the model metadata module as a datatype module also, allowing it to live in galaxy.model means the model module doesn’t have any dependencies on th datatypes module. This module will need to remain here for datatypes living in the tool shed so we might as well keep and use this interface from the datatypes module.

class galaxy.datatypes.metadata.Statement(target)[source]

Bases: object

This class inserts its target into a list in the surrounding class. the data.Data class has a metaclass which executes these statements. This is how we shove the metadata element spec into the class.

__init__(target)[source]
classmethod process(element)[source]
class galaxy.datatypes.metadata.MetadataCollection(parent)[source]

Bases: object

MetadataCollection is not a collection at all, but rather a proxy to the real metadata which is stored as a Dictionary. This class handles processing the metadata elements when they are set and retrieved, returning default values in cases when metadata is not set.

__init__(parent)[source]
get_parent()[source]
set_parent(parent)[source]
parent
spec
get(key, default=None)[source]
items()[source]
remove_key(name)[source]
element_is_set(name)[source]
get_metadata_parameter(name, **kwd)[source]
make_dict_copy(to_copy)[source]

Makes a deep copy of input iterable to_copy according to self.spec

requires_dataset_id
from_JSON_dict(filename=None, path_rewriter=None, json_dict=None)[source]
to_JSON_dict(filename=None)[source]
class galaxy.datatypes.metadata.MetadataSpecCollection(*args, **kwds)[source]

Bases: collections.OrderedDict

A simple extension of OrderedDict which allows cleaner access to items and allows the values to be iterated over directly as if it were a list. append() is also implemented for simplicity and does not “append”.

__init__(*args, **kwds)[source]
append(item)[source]
class galaxy.datatypes.metadata.MetadataParameter(spec)[source]

Bases: object

__init__(spec)[source]
get_field(value=None, context=None, other_values=None, **kwd)[source]
to_string(value)[source]
to_safe_string(value)[source]
make_copy(value, target_context=None, source_context=None)[source]
classmethod marshal(value)[source]

This method should/can be overridden to convert the incoming value to whatever type it is supposed to be.

validate(value)[source]

Throw an exception if the value is invalid.

unwrap(form_value)[source]

Turns a value into its storable form.

wrap(value, session)[source]

Turns a value into its usable form.

from_external_value(value, parent)[source]

Turns a value read from an external dict into its value to be pushed directly into the metadata dict.

to_external_value(value)[source]

Turns a value read from a metadata into its value to be pushed directly into the external dict.

class galaxy.datatypes.metadata.MetadataElementSpec(datatype, name=None, desc=None, param=<class 'galaxy.model.metadata.MetadataParameter'>, default=None, no_value=None, visible=True, set_in_upload=False, **kwargs)[source]

Bases: object

Defines a metadata element and adds it to the metadata_spec (which is a MetadataSpecCollection) of datatype.

__init__(datatype, name=None, desc=None, param=<class 'galaxy.model.metadata.MetadataParameter'>, default=None, no_value=None, visible=True, set_in_upload=False, **kwargs)[source]
get(name, default=None)[source]
wrap(value, session)[source]

Turns a stored value into its usable form.

unwrap(value)[source]

Turns an incoming value into its storable form.

class galaxy.datatypes.metadata.SelectParameter(spec)[source]

Bases: galaxy.model.metadata.MetadataParameter

__init__(spec)[source]
to_string(value)[source]
get_field(value=None, context=None, other_values=None, values=None, **kwd)[source]
wrap(value, session)[source]
classmethod marshal(value)[source]
class galaxy.datatypes.metadata.DBKeyParameter(spec)[source]

Bases: galaxy.model.metadata.SelectParameter

get_field(value=None, context=None, other_values=None, values=None, **kwd)[source]
class galaxy.datatypes.metadata.RangeParameter(spec)[source]

Bases: galaxy.model.metadata.SelectParameter

__init__(spec)[source]
get_field(value=None, context=None, other_values=None, values=None, **kwd)[source]
classmethod marshal(value)[source]
class galaxy.datatypes.metadata.ColumnParameter(spec)[source]

Bases: galaxy.model.metadata.RangeParameter

get_field(value=None, context=None, other_values=None, values=None, **kwd)[source]
class galaxy.datatypes.metadata.ColumnTypesParameter(spec)[source]

Bases: galaxy.model.metadata.MetadataParameter

to_string(value)[source]
class galaxy.datatypes.metadata.ListParameter(spec)[source]

Bases: galaxy.model.metadata.MetadataParameter

to_string(value)[source]
class galaxy.datatypes.metadata.DictParameter(spec)[source]

Bases: galaxy.model.metadata.MetadataParameter

to_string(value)[source]
to_safe_string(value)[source]
class galaxy.datatypes.metadata.PythonObjectParameter(spec)[source]

Bases: galaxy.model.metadata.MetadataParameter

to_string(value)[source]
get_field(value=None, context=None, other_values=None, **kwd)[source]
classmethod marshal(value)[source]
class galaxy.datatypes.metadata.FileParameter(spec)[source]

Bases: galaxy.model.metadata.MetadataParameter

to_string(value)[source]
to_safe_string(value)[source]
get_field(value=None, context=None, other_values=None, **kwd)[source]
wrap(value, session)[source]
make_copy(value, target_context, source_context)[source]
classmethod marshal(value)[source]
from_external_value(value, parent, path_rewriter=None)[source]

Turns a value read from a external dict into its value to be pushed directly into the metadata dict.

to_external_value(value)[source]

Turns a value read from a metadata into its value to be pushed directly into the external dict.

new_file(dataset=None, **kwds)[source]
class galaxy.datatypes.metadata.MetadataTempFile(**kwds)[source]

Bases: object

tmp_dir = 'database/tmp'
__init__(**kwds)[source]
file_name
to_JSON()[source]
classmethod from_JSON(json_dict)[source]
classmethod is_JSONified_value(value)[source]
classmethod cleanup_from_JSON_dict_filename(filename)[source]

galaxy.datatypes.microarrays module

class galaxy.datatypes.microarrays.GenericMicroarrayFile(**kwd)[source]

Bases: galaxy.datatypes.data.Text

Abstract class for most of the microarray files.

set_peek(dataset, is_multi_byte=False)[source]
get_mime()[source]
metadata_spec = {'block_count': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f2f179b0>, 'block_type': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f2f17a20>, 'data_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d780>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d4a8>, 'file_format': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f68d57b8>, 'file_type': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f2f174a8>, 'number_of_data_columns': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f2f172b0>, 'number_of_optional_header_records': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f68d5c18>, 'version_number': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f68dd5c0>}
class galaxy.datatypes.microarrays.Gal(**kwd)[source]

Bases: galaxy.datatypes.microarrays.GenericMicroarrayFile

Gal File format described at: http://mdc.custhelp.com/app/answers/detail/a_id/18883/#gal

edam_format = 'format_3829'
edam_data = 'data_3110'
file_ext = 'gal'
sniff_prefix(file_prefix)[source]

Try to guess if the file is a Gal file. >>> from galaxy.datatypes.sniff import get_test_fname >>> fname = get_test_fname(‘test.gal’) >>> Gal().sniff(fname) True >>> fname = get_test_fname(‘test.gpr’) >>> Gal().sniff(fname) False

set_meta(dataset, **kwd)[source]

Set metadata for Gal file.

metadata_spec = {'block_count': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f28b3898>, 'block_type': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f28b3828>, 'data_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d780>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d4a8>, 'file_format': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f34cfd30>, 'file_type': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f28b3da0>, 'number_of_data_columns': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f28b3748>, 'number_of_optional_header_records': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f68e2c88>, 'version_number': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f34cf5c0>}
sniff(filename)
class galaxy.datatypes.microarrays.Gpr(**kwd)[source]

Bases: galaxy.datatypes.microarrays.GenericMicroarrayFile

Gpr File format described at: http://mdc.custhelp.com/app/answers/detail/a_id/18883/#gpr

edam_format = 'format_3829'
edam_data = 'data_3110'
file_ext = 'gpr'
sniff_prefix(file_prefix)[source]

Try to guess if the file is a Gpr file. >>> from galaxy.datatypes.sniff import get_test_fname >>> fname = get_test_fname(‘test.gpr’) >>> Gpr().sniff(fname) True >>> fname = get_test_fname(‘test.gal’) >>> Gpr().sniff(fname) False

set_meta(dataset, **kwd)[source]

Set metadata for Gpr file.

metadata_spec = {'block_count': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f34fbac8>, 'block_type': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f34fbe80>, 'data_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d780>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d4a8>, 'file_format': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f34e6860>, 'file_type': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f34fb5f8>, 'number_of_data_columns': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f34e6be0>, 'number_of_optional_header_records': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f34e6908>, 'version_number': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f34e67b8>}
sniff(filename)

galaxy.datatypes.molecules module

galaxy.datatypes.molecules.count_lines(filename, non_empty=False)[source]

counting the number of lines from the ‘filename’ file

class galaxy.datatypes.molecules.GenericMolFile(**kwd)[source]

Bases: galaxy.datatypes.data.Text

Abstract class for most of the molecule files.

set_peek(dataset, is_multi_byte=False)[source]
get_mime()[source]
metadata_spec = {'data_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d780>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d4a8>, 'number_of_molecules': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f1f66b00>}
class galaxy.datatypes.molecules.MOL(**kwd)[source]

Bases: galaxy.datatypes.molecules.GenericMolFile

file_ext = 'mol'
set_meta(dataset, **kwd)[source]

Set the number molecules, in the case of MOL its always one.

metadata_spec = {'data_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d780>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d4a8>, 'number_of_molecules': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f2bcf160>}
class galaxy.datatypes.molecules.SDF(**kwd)[source]

Bases: galaxy.datatypes.molecules.GenericMolFile

file_ext = 'sdf'
sniff_prefix(file_prefix)[source]

Try to guess if the file is a SDF2 file.

An SDfile (structure-data file) can contain multiple compounds.

Each compound starts with a block in V2000 or V3000 molfile format, which ends with a line equal to ‘M END’. This is followed by a non-structural data block, which ends with a line equal to ‘$$$$’.

>>> from galaxy.datatypes.sniff import get_test_fname
>>> fname = get_test_fname('drugbank_drugs.sdf')
>>> SDF().sniff(fname)
True
>>> fname = get_test_fname('github88.v3k.sdf')
>>> SDF().sniff(fname)
True
>>> fname = get_test_fname('chebi_57262.v3k.mol')
>>> SDF().sniff(fname)
False
set_meta(dataset, **kwd)[source]

Set the number of molecules in dataset.

classmethod split(input_datasets, subdir_generator_function, split_params)[source]

Split the input files by molecule records.

metadata_spec = {'data_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d780>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d4a8>, 'number_of_molecules': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f2bcf550>}
sniff(filename)
class galaxy.datatypes.molecules.MOL2(**kwd)[source]

Bases: galaxy.datatypes.molecules.GenericMolFile

file_ext = 'mol2'
sniff_prefix(file_prefix)[source]

Try to guess if the file is a MOL2 file.

>>> from galaxy.datatypes.sniff import get_test_fname
>>> fname = get_test_fname('drugbank_drugs.mol2')
>>> MOL2().sniff(fname)
True
>>> fname = get_test_fname('drugbank_drugs.cml')
>>> MOL2().sniff(fname)
False
set_meta(dataset, **kwd)[source]

Set the number of lines of data in dataset.

classmethod split(input_datasets, subdir_generator_function, split_params)[source]

Split the input files by molecule records.

metadata_spec = {'data_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d780>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d4a8>, 'number_of_molecules': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f2bcfef0>}
sniff(filename)
class galaxy.datatypes.molecules.FPS(**kwd)[source]

Bases: galaxy.datatypes.molecules.GenericMolFile

chemfp fingerprint file: http://code.google.com/p/chem-fingerprints/wiki/FPS

file_ext = 'fps'
sniff_prefix(file_prefix)[source]

Try to guess if the file is a FPS file.

>>> from galaxy.datatypes.sniff import get_test_fname
>>> fname = get_test_fname('q.fps')
>>> FPS().sniff(fname)
True
>>> fname = get_test_fname('drugbank_drugs.cml')
>>> FPS().sniff(fname)
False
set_meta(dataset, **kwd)[source]

Set the number of lines of data in dataset.

classmethod split(input_datasets, subdir_generator_function, split_params)[source]

Split the input files by fingerprint records.

static merge(split_files, output_file)[source]

Merging fps files requires merging the header manually. We take the header from the first file.

metadata_spec = {'data_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d780>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d4a8>, 'number_of_molecules': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f1f5e198>}
sniff(filename)
class galaxy.datatypes.molecules.OBFS(**kwd)[source]

Bases: galaxy.datatypes.binary.Binary

OpenBabel Fastsearch format (fs).

file_ext = 'obfs'
composite_type = 'basic'
allow_datatype_change = False
__init__(**kwd)[source]

A Fastsearch Index consists of a binary file with the fingerprints and a pointer the actual molecule file.

set_peek(dataset, is_multi_byte=False)[source]

Set the peek and blurb text.

display_peek(dataset)[source]

Create HTML content, used for displaying peek.

get_mime()[source]

Returns the mime type of the datatype (pretend it is text for peek)

merge(split_files, output_file, extra_merge_args)[source]

Merging Fastsearch indices is not supported.

split(input_datasets, subdir_generator_function, split_params)[source]

Splitting Fastsearch indices is not supported.

metadata_spec = {'base_name': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f1f5e390>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1132fa278>}
class galaxy.datatypes.molecules.DRF(**kwd)[source]

Bases: galaxy.datatypes.molecules.GenericMolFile

file_ext = 'drf'
set_meta(dataset, **kwd)[source]

Set the number of lines of data in dataset.

metadata_spec = {'data_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d780>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d4a8>, 'number_of_molecules': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f1f5e588>}
class galaxy.datatypes.molecules.PHAR(**kwd)[source]

Bases: galaxy.datatypes.molecules.GenericMolFile

Pharmacophore database format from silicos-it.

file_ext = 'phar'
set_peek(dataset, is_multi_byte=False)[source]
metadata_spec = {'data_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d780>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d4a8>, 'number_of_molecules': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f1f5e748>}
class galaxy.datatypes.molecules.PDB(**kwd)[source]

Bases: galaxy.datatypes.molecules.GenericMolFile

Protein Databank format. http://www.wwpdb.org/documentation/format33/v3.3.html

file_ext = 'pdb'
sniff_prefix(file_prefix)[source]

Try to guess if the file is a PDB file.

>>> from galaxy.datatypes.sniff import get_test_fname
>>> fname = get_test_fname('5e5z.pdb')
>>> PDB().sniff(fname)
True
>>> fname = get_test_fname('drugbank_drugs.cml')
>>> PDB().sniff(fname)
False
set_meta(dataset, **kwd)[source]

Find Chain_IDs for metadata.

set_peek(dataset, is_multi_byte=False)[source]
metadata_spec = {'chain_ids': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f1f5e940>, 'data_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d780>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d4a8>, 'number_of_molecules': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f1f66b00>}
sniff(filename)
class galaxy.datatypes.molecules.PDBQT(**kwd)[source]

Bases: galaxy.datatypes.molecules.GenericMolFile

PDBQT Autodock and Autodock Vina format http://autodock.scripps.edu/faqs-help/faq/what-is-the-format-of-a-pdbqt-file

file_ext = 'pdbqt'
sniff_prefix(file_prefix)[source]

Try to guess if the file is a PDBQT file.

>>> from galaxy.datatypes.sniff import get_test_fname
>>> fname = get_test_fname('NuBBE_1_obabel_3D.pdbqt')
>>> PDBQT().sniff(fname)
True
>>> fname = get_test_fname('drugbank_drugs.cml')
>>> PDBQT().sniff(fname)
False
set_peek(dataset, is_multi_byte=False)[source]
metadata_spec = {'data_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d780>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d4a8>, 'number_of_molecules': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f1f5eb38>}
sniff(filename)
class galaxy.datatypes.molecules.PQR(**kwd)[source]

Bases: galaxy.datatypes.molecules.GenericMolFile

Protein Databank format. https://apbs-pdb2pqr.readthedocs.io/en/latest/formats/pqr.html

file_ext = 'pqr'
get_matcher()[source]
Atom and HETATM line fields are space separated, match group:
0: Field_name
A string which specifies the type of PQR entry: ATOM or HETATM.
1: Atom_number
An integer which provides the atom index.
2: Atom_name
A string which provides the atom name.
3: Residue_name
A string which provides the residue name.
5: Chain_ID (Optional, group 4 is whole field)
An optional string which provides the chain ID of the atom. Note that chain ID support is a new feature of APBS 0.5.0 and later versions.
6: Residue_number
An integer which provides the residue index.
7: X 8: Y 9: Z
3 floats which provide the atomic coordinates (in angstroms)
10: Charge
A float which provides the atomic charge (in electrons).
11: Radius
A float which provides the atomic radius (in angstroms).
sniff_prefix(file_prefix)[source]

Try to guess if the file is a PQR file. >>> from galaxy.datatypes.sniff import get_test_fname >>> fname = get_test_fname(‘5e5z.pqr’) >>> PQR().sniff(fname) True >>> fname = get_test_fname(‘drugbank_drugs.cml’) >>> PQR().sniff(fname) False

set_meta(dataset, **kwd)[source]

Find Optional Chain_IDs for metadata.

set_peek(dataset, is_multi_byte=False)[source]
metadata_spec = {'chain_ids': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f1f5ed30>, 'data_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d780>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d4a8>, 'number_of_molecules': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f1f66b00>}
sniff(filename)
class galaxy.datatypes.molecules.grd(**kwd)[source]

Bases: galaxy.datatypes.data.Text

file_ext = 'grd'
set_peek(dataset, is_multi_byte=False)[source]
metadata_spec = {'data_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f1f5ef28>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d4a8>}
class galaxy.datatypes.molecules.grdtgz(**kwd)[source]

Bases: galaxy.datatypes.binary.Binary

file_ext = 'grd.tgz'
set_peek(dataset, is_multi_byte=False)[source]
metadata_spec = {'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f1f76160>}
class galaxy.datatypes.molecules.InChI(**kwd)[source]

Bases: galaxy.datatypes.tabular.Tabular

file_ext = 'inchi'
column_names = ['InChI']
set_meta(dataset, **kwd)[source]

Set the number of lines of data in dataset.

set_peek(dataset, is_multi_byte=False)[source]
sniff_prefix(file_prefix)[source]

Try to guess if the file is a InChI file.

>>> from galaxy.datatypes.sniff import get_test_fname
>>> fname = get_test_fname('drugbank_drugs.inchi')
>>> InChI().sniff(fname)
True
>>> fname = get_test_fname('drugbank_drugs.cml')
>>> InChI().sniff(fname)
False
metadata_spec = {'column_names': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd113204198>, 'column_types': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f1f763c8>, 'columns': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f1f76358>, 'comment_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1131fb240>, 'data_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1131fb400>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d4a8>, 'delimiter': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd113204470>, 'number_of_molecules': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f1f76438>}
sniff(filename)
class galaxy.datatypes.molecules.SMILES(**kwd)[source]

Bases: galaxy.datatypes.tabular.Tabular

file_ext = 'smi'
column_names = ['SMILES', 'TITLE']
set_meta(dataset, **kwd)[source]

Set the number of lines of data in dataset.

set_peek(dataset, is_multi_byte=False)[source]
metadata_spec = {'column_names': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd113204198>, 'column_types': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f1f766a0>, 'columns': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f1f76630>, 'comment_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1131fb240>, 'data_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1131fb400>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d4a8>, 'delimiter': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd113204470>, 'number_of_molecules': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f1f76710>}
class galaxy.datatypes.molecules.CML(**kwd)[source]

Bases: galaxy.datatypes.xml.GenericXml

Chemical Markup Language http://cml.sourceforge.net/

file_ext = 'cml'
set_meta(dataset, **kwd)[source]

Set the number of lines of data in dataset.

metadata_spec = {'data_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f7d0bf98>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d4a8>, 'number_of_molecules': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f1f76898>}
set_peek(dataset, is_multi_byte=False)[source]
sniff(filename)
sniff_prefix(file_prefix)[source]

Try to guess if the file is a CML file.

>>> from galaxy.datatypes.sniff import get_test_fname
>>> fname = get_test_fname('interval.interval')
>>> CML().sniff(fname)
False
>>> fname = get_test_fname('drugbank_drugs.cml')
>>> CML().sniff(fname)
True
classmethod split(input_datasets, subdir_generator_function, split_params)[source]

Split the input files by molecule records.

static merge(split_files, output_file)[source]

Merging CML files.

galaxy.datatypes.mothur module

Mothur Metagenomics Datatypes

class galaxy.datatypes.mothur.Otu(**kwd)[source]

Bases: galaxy.datatypes.data.Text

file_ext = 'mothur.otu'
__init__(**kwd)[source]
set_meta(dataset, overwrite=True, **kwd)[source]

Set metadata for Otu files.

>>> from galaxy.datatypes.sniff import get_test_fname
>>> from galaxy.util.bunch import Bunch
>>> dataset = Bunch()
>>> dataset.metadata = Bunch
>>> otu = Otu()
>>> dataset.file_name = get_test_fname( 'mothur_datatypetest_true.mothur.otu' )
>>> dataset.has_data = lambda: True
>>> otu.set_meta(dataset)
>>> dataset.metadata.columns
100
>>> len(dataset.metadata.labels) == 37
True
>>> len(dataset.metadata.otulabels) == 98
True
sniff_prefix(file_prefix)[source]

Determines whether the file is otu (operational taxonomic unit) format

>>> from galaxy.datatypes.sniff import get_test_fname
>>> fname = get_test_fname( 'mothur_datatypetest_true.mothur.otu' )
>>> Otu().sniff( fname )
True
>>> fname = get_test_fname( 'mothur_datatypetest_false.mothur.otu' )
>>> Otu().sniff( fname )
False
metadata_spec = {'columns': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f1d21fd0>, 'data_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d780>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d4a8>, 'labels': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f1d214e0>, 'otulabels': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f27a6a58>}
sniff(filename)
class galaxy.datatypes.mothur.Sabund(**kwd)[source]

Bases: galaxy.datatypes.mothur.Otu

file_ext = 'mothur.sabund'
__init__(**kwd)[source]

http://www.mothur.org/wiki/Sabund_file

init_meta(dataset, copy_from=None)[source]
sniff_prefix(file_prefix)[source]

Determines whether the file is otu (operational taxonomic unit) format label<TAB>count[<TAB>value(1..n)]

>>> from galaxy.datatypes.sniff import get_test_fname
>>> fname = get_test_fname( 'mothur_datatypetest_true.mothur.sabund' )
>>> Sabund().sniff( fname )
True
>>> fname = get_test_fname( 'mothur_datatypetest_false.mothur.sabund' )
>>> Sabund().sniff( fname )
False
metadata_spec = {'columns': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f21370f0>, 'data_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d780>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d4a8>, 'labels': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f2137080>, 'otulabels': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f2137780>}
class galaxy.datatypes.mothur.GroupAbund(**kwd)[source]

Bases: galaxy.datatypes.mothur.Otu

file_ext = 'mothur.shared'
__init__(**kwd)[source]
init_meta(dataset, copy_from=None)[source]
set_meta(dataset, overwrite=True, skip=1, **kwd)[source]
sniff_prefix(file_prefix, vals_are_int=False)[source]

Determines whether the file is a otu (operational taxonomic unit) Shared format label<TAB>group<TAB>count[<TAB>value(1..n)] The first line is column headings as of Mothur v 1.2

>>> from galaxy.datatypes.sniff import get_test_fname
>>> fname = get_test_fname( 'mothur_datatypetest_true.mothur.shared' )
>>> GroupAbund().sniff( fname )
True
>>> fname = get_test_fname( 'mothur_datatypetest_false.mothur.shared' )
>>> GroupAbund().sniff( fname )
False
metadata_spec = {'columns': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f1d21fd0>, 'data_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d780>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d4a8>, 'groups': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f2137ba8>, 'labels': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f1d214e0>, 'otulabels': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f27a6a58>}
class galaxy.datatypes.mothur.SecondaryStructureMap(**kwd)[source]

Bases: galaxy.datatypes.tabular.Tabular

file_ext = 'mothur.map'
__init__(**kwd)[source]

Initialize secondary structure map datatype

sniff_prefix(file_prefix)[source]

Determines whether the file is a secondary structure map format A single column with an integer value which indicates the row that this row maps to. Check to make sure if structMap[10] = 380 then structMap[380] = 10 and vice versa.

>>> from galaxy.datatypes.sniff import get_test_fname
>>> fname = get_test_fname( 'mothur_datatypetest_true.mothur.map' )
>>> SecondaryStructureMap().sniff( fname )
True
>>> fname = get_test_fname( 'mothur_datatypetest_false.mothur.map' )
>>> SecondaryStructureMap().sniff( fname )
False
metadata_spec = {'column_names': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f21821d0>, 'column_types': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f2137fd0>, 'columns': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f2137f28>, 'comment_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f2137e48>, 'data_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f2137eb8>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d4a8>, 'delimiter': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f2182b00>}
sniff(filename)
class galaxy.datatypes.mothur.AlignCheck(**kwd)[source]

Bases: galaxy.datatypes.tabular.Tabular

file_ext = 'mothur.align.check'
__init__(**kwd)[source]

Initialize AlignCheck datatype

set_meta(dataset, overwrite=True, **kwd)[source]
metadata_spec = {'column_names': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f2182ef0>, 'column_types': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f2182e80>, 'columns': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f2182e10>, 'comment_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f2182d30>, 'data_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f2182da0>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d4a8>, 'delimiter': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f2182f60>}
class galaxy.datatypes.mothur.AlignReport(**kwd)[source]

Bases: galaxy.datatypes.tabular.Tabular

QueryName QueryLength TemplateName TemplateLength SearchMethod SearchScore AlignmentMethod QueryStart QueryEnd TemplateStart TemplateEnd PairwiseAlignmentLength GapsInQuery GapsInTemplate LongestInsert SimBtwnQuery&Template AY457915 501 82283 1525 kmer 89.07 needleman 5 501 1 499 499 2 0 0 97.6

file_ext = 'mothur.align.report'
__init__(**kwd)[source]

Initialize AlignCheck datatype

metadata_spec = {'column_names': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f274ef60>, 'column_types': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f21172e8>, 'columns': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f2117278>, 'comment_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f2117198>, 'data_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f2117208>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d4a8>, 'delimiter': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f1f007b8>}
class galaxy.datatypes.mothur.DistanceMatrix(**kwd)[source]

Bases: galaxy.datatypes.data.Text

file_ext = 'mothur.dist'

Add metadata elements

init_meta(dataset, copy_from=None)[source]
set_meta(dataset, overwrite=True, skip=0, **kwd)[source]
metadata_spec = {'data_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d780>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d4a8>, 'sequence_count': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f21174e0>}
class galaxy.datatypes.mothur.LowerTriangleDistanceMatrix(**kwd)[source]

Bases: galaxy.datatypes.mothur.DistanceMatrix

file_ext = 'mothur.lower.dist'
__init__(**kwd)[source]

Initialize secondary structure map datatype

init_meta(dataset, copy_from=None)[source]
sniff_prefix(file_prefix)[source]

Determines whether the file is a lower-triangle distance matrix (phylip) format The first line has the number of sequences in the matrix. The remaining lines have the sequence name followed by a list of distances from all preceeding sequences

5 # possibly but not always preceded by a tab :/ U68589 U68590 0.3371 U68591 0.3609 0.3782 U68592 0.4155 0.3197 0.4148 U68593 0.2872 0.1690 0.3361 0.2842
>>> from galaxy.datatypes.sniff import get_test_fname
>>> fname = get_test_fname( 'mothur_datatypetest_true.mothur.lower.dist' )
>>> LowerTriangleDistanceMatrix().sniff( fname )
True
>>> fname = get_test_fname( 'mothur_datatypetest_false.mothur.lower.dist' )
>>> LowerTriangleDistanceMatrix().sniff( fname )
False
metadata_spec = {'data_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d780>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d4a8>, 'sequence_count': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f2117748>}
sniff(filename)
class galaxy.datatypes.mothur.SquareDistanceMatrix(**kwd)[source]

Bases: galaxy.datatypes.mothur.DistanceMatrix

file_ext = 'mothur.square.dist'
__init__(**kwd)[source]
init_meta(dataset, copy_from=None)[source]
sniff_prefix(file_prefix)[source]

Determines whether the file is a square distance matrix (Column-formatted distance matrix) format The first line has the number of sequences in the matrix. The following lines have the sequence name in the first column plus a column for the distance to each sequence in the row order in which they appear in the matrix.

3 U68589 0.0000 0.3371 0.3610 U68590 0.3371 0.0000 0.3783 U68590 0.3371 0.0000 0.3783
>>> from galaxy.datatypes.sniff import get_test_fname
>>> fname = get_test_fname( 'mothur_datatypetest_true.mothur.square.dist' )
>>> SquareDistanceMatrix().sniff( fname )
True
>>> fname = get_test_fname( 'mothur_datatypetest_false.mothur.square.dist' )
>>> SquareDistanceMatrix().sniff( fname )
False
metadata_spec = {'data_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d780>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d4a8>, 'sequence_count': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f2117978>}
sniff(filename)
class galaxy.datatypes.mothur.PairwiseDistanceMatrix(**kwd)[source]

Bases: galaxy.datatypes.mothur.DistanceMatrix, galaxy.datatypes.tabular.Tabular

file_ext = 'mothur.pair.dist'
__init__(**kwd)[source]

Initialize secondary structure map datatype

set_meta(dataset, overwrite=True, skip=None, **kwd)[source]
sniff_prefix(file_prefix)[source]

Determines whether the file is a pairwise distance matrix (Column-formatted distance matrix) format The first and second columns have the sequence names and the third column is the distance between those sequences.

>>> from galaxy.datatypes.sniff import get_test_fname
>>> fname = get_test_fname( 'mothur_datatypetest_true.mothur.pair.dist' )
>>> PairwiseDistanceMatrix().sniff( fname )
True
>>> fname = get_test_fname( 'mothur_datatypetest_false.mothur.pair.dist' )
>>> PairwiseDistanceMatrix().sniff( fname )
False
metadata_spec = {'column_names': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd113204198>, 'column_types': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1131fbeb8>, 'columns': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1131fb5f8>, 'comment_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1131fb240>, 'data_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1131fb400>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d4a8>, 'delimiter': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd113204470>, 'sequence_count': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f2117ba8>}
sniff(filename)
class galaxy.datatypes.mothur.Names(**kwd)[source]

Bases: galaxy.datatypes.tabular.Tabular

file_ext = 'mothur.names'
__init__(**kwd)[source]

http://www.mothur.org/wiki/Name_file Name file shows the relationship between a representative sequence(col 1) and the sequences(comma-separated) it represents(col 2)

metadata_spec = {'column_names': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f2117f98>, 'column_types': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f2117f28>, 'columns': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f2117eb8>, 'comment_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f2117dd8>, 'data_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f2117e48>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d4a8>, 'delimiter': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f211b048>}
class galaxy.datatypes.mothur.Summary(**kwd)[source]

Bases: galaxy.datatypes.tabular.Tabular

file_ext = 'mothur.summary'
__init__(**kwd)[source]

summarizes the quality of sequences in an unaligned or aligned fasta-formatted sequence file

metadata_spec = {'column_names': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f211b438>, 'column_types': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f211b3c8>, 'columns': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f211b358>, 'comment_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f211b278>, 'data_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f211b2e8>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d4a8>, 'delimiter': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f211b4a8>}
class galaxy.datatypes.mothur.Group(**kwd)[source]

Bases: galaxy.datatypes.tabular.Tabular

file_ext = 'mothur.groups'
__init__(**kwd)[source]

http://www.mothur.org/wiki/Groups_file Group file assigns sequence (col 1) to a group (col 2)

set_meta(dataset, overwrite=True, skip=None, max_data_lines=None, **kwd)[source]
metadata_spec = {'column_names': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd113204198>, 'column_types': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1131fbeb8>, 'columns': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1131fb5f8>, 'comment_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1131fb240>, 'data_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1131fb400>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d4a8>, 'delimiter': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd113204470>, 'groups': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f211b710>}
class galaxy.datatypes.mothur.AccNos(**kwd)[source]

Bases: galaxy.datatypes.tabular.Tabular

file_ext = 'mothur.accnos'
__init__(**kwd)[source]

A list of names

metadata_spec = {'column_names': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f211bb00>, 'column_types': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f211ba90>, 'columns': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f211ba20>, 'comment_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f211b940>, 'data_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f211b9b0>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d4a8>, 'delimiter': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f211bb70>}
class galaxy.datatypes.mothur.Oligos(**kwd)[source]

Bases: galaxy.datatypes.data.Text

file_ext = 'mothur.oligos'
sniff_prefix(file_prefix)[source]

http://www.mothur.org/wiki/Oligos_File Determines whether the file is a otu (operational taxonomic unit) format

>>> from galaxy.datatypes.sniff import get_test_fname
>>> fname = get_test_fname( 'mothur_datatypetest_true.mothur.oligos' )
>>> Oligos().sniff( fname )
True
>>> fname = get_test_fname( 'mothur_datatypetest_false.mothur.oligos' )
>>> Oligos().sniff( fname )
False
metadata_spec = {'data_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f211bd68>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d4a8>}
sniff(filename)
class galaxy.datatypes.mothur.Frequency(**kwd)[source]

Bases: galaxy.datatypes.tabular.Tabular

file_ext = 'mothur.freq'
__init__(**kwd)[source]

A list of names

sniff_prefix(file_prefix)[source]

Determines whether the file is a frequency tabular format for chimera analysis #1.14.0 0 0.000 1 0.000 … 155 0.975

>>> from galaxy.datatypes.sniff import get_test_fname
>>> fname = get_test_fname( 'mothur_datatypetest_true.mothur.freq' )
>>> Frequency().sniff( fname )
True
>>> fname = get_test_fname( 'mothur_datatypetest_false.mothur.freq' )
>>> Frequency().sniff( fname )
False
>>> # Expression count matrix (EdgeR wrapper)
>>> fname = get_test_fname( 'mothur_datatypetest_false_2.mothur.freq' )
>>> Frequency().sniff( fname )
False
metadata_spec = {'column_names': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f2114160>, 'column_types': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f21140f0>, 'columns': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f2114080>, 'comment_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f211bf60>, 'data_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f211bfd0>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d4a8>, 'delimiter': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f21141d0>}
sniff(filename)
class galaxy.datatypes.mothur.Quantile(**kwd)[source]

Bases: galaxy.datatypes.tabular.Tabular

file_ext = 'mothur.quan'
__init__(**kwd)[source]

Quantiles for chimera analysis

sniff_prefix(file_prefix)[source]

Determines whether the file is a quantiles tabular format for chimera analysis 1 0 0 0 0 0 0 2 0.309198 0.309198 0.37161 0.37161 0.37161 0.37161 3 0.510982 0.563213 0.693529 0.858939 1.07442 1.20608 …

>>> from galaxy.datatypes.sniff import get_test_fname
>>> fname = get_test_fname( 'mothur_datatypetest_true.mothur.quan' )
>>> Quantile().sniff( fname )
True
>>> fname = get_test_fname( 'mothur_datatypetest_false.mothur.quan' )
>>> Quantile().sniff( fname )
False
metadata_spec = {'column_names': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd113204198>, 'column_types': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1131fbeb8>, 'columns': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1131fb5f8>, 'comment_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1131fb240>, 'data_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1131fb400>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d4a8>, 'delimiter': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd113204470>, 'filtered': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f2114400>, 'masked': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f2114470>}
sniff(filename)
class galaxy.datatypes.mothur.LaneMask(**kwd)[source]

Bases: galaxy.datatypes.data.Text

file_ext = 'mothur.filter'
sniff_prefix(file_prefix)[source]

Determines whether the file is a lane mask filter: 1 line consisting of zeros and ones.

>>> from galaxy.datatypes.sniff import get_test_fname
>>> fname = get_test_fname( 'mothur_datatypetest_true.mothur.filter' )
>>> LaneMask().sniff( fname )
True
>>> fname = get_test_fname( 'mothur_datatypetest_false.mothur.filter' )
>>> LaneMask().sniff( fname )
False
metadata_spec = {'data_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f2114668>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d4a8>}
sniff(filename)
class galaxy.datatypes.mothur.CountTable(**kwd)[source]

Bases: galaxy.datatypes.tabular.Tabular

file_ext = 'mothur.count_table'
__init__(**kwd)[source]

http://www.mothur.org/wiki/Count_File A table with first column names and following columns integer counts # Example 1: Representative_Sequence total U68630 1 U68595 1 U68600 1 # Example 2 (with group columns): Representative_Sequence total forest pasture U68630 1 1 0 U68595 1 1 0 U68600 1 1 0 U68591 1 1 0 U68647 1 0 1

set_meta(dataset, overwrite=True, skip=1, max_data_lines=None, **kwd)[source]
metadata_spec = {'column_names': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd113204198>, 'column_types': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1131fbeb8>, 'columns': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1131fb5f8>, 'comment_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1131fb240>, 'data_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1131fb400>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d4a8>, 'delimiter': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd113204470>, 'groups': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f21148d0>}
class galaxy.datatypes.mothur.RefTaxonomy(**kwd)[source]

Bases: galaxy.datatypes.tabular.Tabular

file_ext = 'mothur.ref.taxonomy'
__init__(**kwd)[source]
sniff_prefix(file_prefix)[source]

Determines whether the file is a Reference Taxonomy

http://www.mothur.org/wiki/Taxonomy_outline A table with 2 or 3 columns: - SequenceName - Taxonomy (semicolon-separated taxonomy in descending order) - integer ? Example: 2-column (http://www.mothur.org/wiki/Taxonomy_outline)

X56533.1 Eukaryota;Alveolata;Ciliophora;Intramacronucleata;Oligohymenophorea;Hymenostomatida;Tetrahymenina;Glaucomidae;Glaucoma; X97975.1 Eukaryota;Parabasalidea;Trichomonada;Trichomonadida;unclassified_Trichomonadida; AF052717.1 Eukaryota;Parabasalidea;
Example: 3-column (http://vamps.mbl.edu/resources/databases.php)
v3_AA008 Bacteria;Firmicutes;Bacilli;Lactobacillales;Streptococcaceae;Streptococcus 5 v3_AA016 Bacteria 120 v3_AA019 Archaea;Crenarchaeota;Marine_Group_I 1
>>> from galaxy.datatypes.sniff import get_test_fname
>>> fname = get_test_fname( 'mothur_datatypetest_true.mothur.ref.taxonomy' )
>>> RefTaxonomy().sniff( fname )
True
>>> fname = get_test_fname( 'mothur_datatypetest_false.mothur.ref.taxonomy' )
>>> RefTaxonomy().sniff( fname )
False
metadata_spec = {'column_names': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f2114cc0>, 'column_types': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f2114c50>, 'columns': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f2114be0>, 'comment_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f2114b00>, 'data_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f2114b70>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d4a8>, 'delimiter': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f2114d30>}
sniff(filename)
class galaxy.datatypes.mothur.ConsensusTaxonomy(**kwd)[source]

Bases: galaxy.datatypes.tabular.Tabular

file_ext = 'mothur.cons.taxonomy'
__init__(**kwd)[source]

A list of names

metadata_spec = {'column_names': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f2150160>, 'column_types': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f21500f0>, 'columns': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f2150080>, 'comment_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f2114f60>, 'data_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f2114fd0>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d4a8>, 'delimiter': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f21501d0>}
class galaxy.datatypes.mothur.TaxonomySummary(**kwd)[source]

Bases: galaxy.datatypes.tabular.Tabular

file_ext = 'mothur.tax.summary'
__init__(**kwd)[source]

A Summary of taxon classification

metadata_spec = {'column_names': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f21505c0>, 'column_types': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f2150550>, 'columns': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f21504e0>, 'comment_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f2150400>, 'data_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f2150470>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d4a8>, 'delimiter': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f2150630>}
class galaxy.datatypes.mothur.Axes(**kwd)[source]

Bases: galaxy.datatypes.tabular.Tabular

file_ext = 'mothur.axes'
__init__(**kwd)[source]

Initialize axes datatype

sniff_prefix(file_prefix)[source]

Determines whether the file is an axes format The first line may have column headings. The following lines have the name in the first column plus float columns for each axis. ==> 98_sq_phylip_amazon.fn.unique.pca.axes <==

group axis1 axis2 forest 0.000000 0.145743 pasture 0.145743 0.000000
==> 98_sq_phylip_amazon.nmds.axes <==
axis1 axis2

U68589 0.262608 -0.077498 U68590 0.027118 0.195197 U68591 0.329854 0.014395

>>> from galaxy.datatypes.sniff import get_test_fname
>>> fname = get_test_fname( 'mothur_datatypetest_true.mothur.axes' )
>>> Axes().sniff( fname )
True
>>> fname = get_test_fname( 'mothur_datatypetest_false.mothur.axes' )
>>> Axes().sniff( fname )
False
metadata_spec = {'column_names': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f2150a20>, 'column_types': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f21509b0>, 'columns': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f2150940>, 'comment_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f2150860>, 'data_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f21508d0>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d4a8>, 'delimiter': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f2150a90>}
sniff(filename)
class galaxy.datatypes.mothur.SffFlow(**kwd)[source]

Bases: galaxy.datatypes.tabular.Tabular

file_ext = 'mothur.sff.flow'

http://www.mothur.org/wiki/Flow_file The first line is the total number of flow values - 800 for Titanium data. For GS FLX it would be 400. Following lines contain: - SequenceName - the number of useable flows as defined by 454’s software - the flow intensity for each base going in the order of TACG. Example:

800 GQY1XT001CQL4K 85 1.04 0.00 1.00 0.02 0.03 1.02 0.05 … GQY1XT001CQIRF 84 1.02 0.06 0.98 0.06 0.09 1.05 0.07 … GQY1XT001CF5YW 88 1.02 0.02 1.01 0.04 0.06 1.02 0.03 …
__init__(**kwd)[source]
metadata_spec = {'column_names': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd113204198>, 'column_types': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1131fbeb8>, 'columns': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1131fb5f8>, 'comment_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1131fb240>, 'data_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1131fb400>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d4a8>, 'delimiter': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd113204470>, 'flow_order': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f2150da0>, 'flow_values': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f2150d30>}
set_meta(dataset, overwrite=True, skip=1, max_data_lines=None, **kwd)[source]
make_html_table(dataset, skipchars=[])[source]

Create HTML table, used for displaying peek

galaxy.datatypes.msa module

class galaxy.datatypes.msa.InfernalCM(**kwd)[source]

Bases: galaxy.datatypes.data.Text

file_ext = 'cm'
set_peek(dataset, is_multi_byte=False)[source]
sniff_prefix(file_prefix)[source]
>>> from galaxy.datatypes.sniff import get_test_fname
>>> fname = get_test_fname( 'infernal_model.cm' )
>>> InfernalCM().sniff( fname )
True
>>> fname = get_test_fname( '2.txt' )
>>> InfernalCM().sniff( fname )
False
set_meta(dataset, **kwd)[source]

Set the number of models and the version of CM file in dataset.

metadata_spec = {'cm_version': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f16c7630>, 'data_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d780>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d4a8>, 'number_of_models': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f1681198>}
sniff(filename)
class galaxy.datatypes.msa.Hmmer(**kwd)[source]

Bases: galaxy.datatypes.data.Text

edam_data = 'data_1364'
edam_format = 'format_1370'
set_peek(dataset, is_multi_byte=False)[source]
display_peek(dataset)[source]
sniff_prefix(filename)[source]
metadata_spec = {'data_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f1647e48>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d4a8>}
sniff(filename)
class galaxy.datatypes.msa.Hmmer2(**kwd)[source]

Bases: galaxy.datatypes.msa.Hmmer

edam_format = 'format_3328'
file_ext = 'hmm2'
sniff_prefix(file_prefix)[source]

HMMER2 files start with HMMER2.0

metadata_spec = {'data_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f1647a90>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d4a8>}
class galaxy.datatypes.msa.Hmmer3(**kwd)[source]

Bases: galaxy.datatypes.msa.Hmmer

edam_format = 'format_3329'
file_ext = 'hmm3'
sniff_prefix(file_prefix)[source]

HMMER3 files start with HMMER3/f

metadata_spec = {'data_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f1647198>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d4a8>}
class galaxy.datatypes.msa.HmmerPress(**kwd)[source]

Bases: galaxy.datatypes.binary.Binary

Class for hmmpress database files.

file_ext = 'hmmpress'
allow_datatype_change = False
composite_type = 'basic'
set_peek(dataset, is_multi_byte=False)[source]

Set the peek and blurb text.

display_peek(dataset)[source]

Create HTML content, used for displaying peek.

__init__(**kwd)[source]
metadata_spec = {'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f1647518>}
class galaxy.datatypes.msa.Stockholm_1_0(**kwd)[source]

Bases: galaxy.datatypes.data.Text

edam_data = 'data_0863'
edam_format = 'format_1961'
file_ext = 'stockholm'
set_peek(dataset, is_multi_byte=False)[source]
sniff_prefix(file_prefix)[source]
set_meta(dataset, **kwd)[source]

Set the number of models in dataset.

classmethod split(input_datasets, subdir_generator_function, split_params)[source]

Split the input files by model records.

metadata_spec = {'data_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d780>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d4a8>, 'number_of_models': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f16476a0>}
sniff(filename)
class galaxy.datatypes.msa.MauveXmfa(**kwd)[source]

Bases: galaxy.datatypes.data.Text

file_ext = 'xmfa'
set_peek(dataset, is_multi_byte=False)[source]
sniff_prefix(file_prefix)[source]
metadata_spec = {'data_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d780>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d4a8>, 'number_of_models': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f1647ef0>}
set_meta(dataset, **kwd)[source]
sniff(filename)

galaxy.datatypes.neo4j module

Neo4j Composite Dataset

class galaxy.datatypes.neo4j.Neo4j(**kwd)[source]

Bases: galaxy.datatypes.images.Html

base class to use for neostore datatypes derived from html - composite datatype elements stored in extra files path

generate_primary_file(dataset=None)[source]

This is called only at upload to write the html file cannot rename the datasets here - they come with the default unfortunately

get_mime()[source]

Returns the mime type of the datatype

set_peek(dataset, is_multi_byte=False)[source]

Set the peek and blurb text

display_peek(dataset)[source]

Create HTML content, used for displaying peek.

metadata_spec = {'data_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f1430550>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d4a8>}
class galaxy.datatypes.neo4j.Neo4jDB(**kwd)[source]

Bases: galaxy.datatypes.neo4j.Neo4j, galaxy.datatypes.data.Data

Class for neo4jDB database files.

file_ext = 'neostore'
composite_type = 'auto_primary_file'
allow_datatype_change = False
__init__(**kwd)[source]
metadata_spec = {'data_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f1430a58>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d4a8>}
class galaxy.datatypes.neo4j.Neo4jDBzip(**kwd)[source]

Bases: galaxy.datatypes.neo4j.Neo4j, galaxy.datatypes.data.Data

Class for neo4jDB database files.

file_ext = 'neostore.zip'
composite_type = 'auto_primary_file'
allow_datatype_change = False
__init__(**kwd)[source]
metadata_spec = {'data_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f1430550>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d4a8>, 'neostore_zip': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f1442dd8>, 'reference_name': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f1430eb8>}

galaxy.datatypes.ngsindex module

NGS indexes

class galaxy.datatypes.ngsindex.BowtieIndex(**kwd)[source]

Bases: galaxy.datatypes.text.Html

base class for BowtieIndex is subclassed by BowtieColorIndex and BowtieBaseIndex

composite_type = 'auto_primary_file'
allow_datatype_change = False
generate_primary_file(dataset=None)[source]

This is called only at upload to write the html file cannot rename the datasets here - they come with the default unfortunately

regenerate_primary_file(dataset)[source]

cannot do this until we are setting metadata

set_peek(dataset, is_multi_byte=False)[source]
display_peek(dataset)[source]
metadata_spec = {'base_name': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f14305c0>, 'data_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f53974e0>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d4a8>, 'sequence_space': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f1442160>}
class galaxy.datatypes.ngsindex.BowtieColorIndex(**kwd)[source]

Bases: galaxy.datatypes.ngsindex.BowtieIndex

Bowtie color space index

file_ext = 'bowtie_color_index'
metadata_spec = {'base_name': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f14305c0>, 'data_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f53974e0>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d4a8>, 'sequence_space': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f14424a8>}
class galaxy.datatypes.ngsindex.BowtieBaseIndex(**kwd)[source]

Bases: galaxy.datatypes.ngsindex.BowtieIndex

Bowtie base space index

file_ext = 'bowtie_base_index'
metadata_spec = {'base_name': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f14305c0>, 'data_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f53974e0>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d4a8>, 'sequence_space': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f135cd30>}

galaxy.datatypes.phylip module

Created on January. 05, 2018

@authors: Kenzo-Hugo Hillion and Fabien Mareuil, Institut Pasteur, Paris @contacts: kehillio@pasteur.fr and fabien.mareuil@pasteur.fr @project: galaxy @githuborganization: C3BI Phylip datatype sniffer

class galaxy.datatypes.phylip.Phylip(**kwd)[source]

Bases: galaxy.datatypes.data.Text

Phylip format stores a multiple sequence alignment

edam_data = 'data_0863'
edam_format = 'format_1997'
file_ext = 'phylip'

Add metadata elements

set_meta(dataset, **kwd)[source]

Set the number of sequences and the number of data lines in dataset.

set_peek(dataset, is_multi_byte=False)[source]
metadata_spec = {'data_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d780>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d4a8>, 'sequences': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f12d3048>}
sniff(filename)
sniff_prefix(file_prefix)[source]

All Phylip files starts with the number of sequences so we can use this to count the following number of sequences in the first ‘stack’

>>> from galaxy.datatypes.sniff import get_test_fname
>>> fname = get_test_fname('test.phylip')
>>> Phylip().sniff(fname)
True

galaxy.datatypes.plant_tribes module

class galaxy.datatypes.plant_tribes.Smat(**kwd)[source]

Bases: galaxy.datatypes.data.Text

file_ext = 'smat'
display_peek(dataset)[source]
set_peek(dataset, is_multi_byte=False)[source]
sniff_prefix(file_prefix)[source]

The use of ESTScan implies the creation of scores matrices which reflect the codons preferences in the studied organisms. The ESTScan package includes scripts for generating these files. The output of these scripts consists of the matrices, one for each isochor, and which look like this:

FORMAT: hse_4is.conf CODING REGION 6 3 1 s C+G: 0 44 -1 0 2 -2 2 1 -8 0

>>> from galaxy.datatypes.sniff import get_test_fname
>>> fname = get_test_fname('test_space.txt')
>>> Smat().sniff(fname)
False
>>> fname = get_test_fname('test_tab.bed')
>>> Smat().sniff(fname)
False
>>> fname = get_test_fname('1.smat')
>>> Smat().sniff(fname)
True
metadata_spec = {'data_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f13bacc0>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d4a8>}
sniff(filename)
class galaxy.datatypes.plant_tribes.PlantTribesKsComponents(**kwd)[source]

Bases: galaxy.datatypes.tabular.Tabular

file_ext = 'ptkscmp'
display_peek(dataset)[source]
set_meta(dataset, **kwd)[source]

Set the number of significant components in the Ks distribution. The dataset will always be on the order of less than 10 lines.

set_peek(dataset, is_multi_byte=False)[source]
sniff(filename)[source]
>>> from galaxy.datatypes.sniff import get_test_fname
>>> fname = get_test_fname('test_tab.bed')
>>> PlantTribesKsComponents().sniff(fname)
False
>>> fname = get_test_fname('1.ptkscmp')
>>> PlantTribesKsComponents().sniff(fname)
True
metadata_spec = {'column_names': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd113204198>, 'column_types': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1131fbeb8>, 'columns': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1131fb5f8>, 'comment_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1131fb240>, 'data_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd1131fb400>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d4a8>, 'delimiter': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd113204470>, 'number_comp': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f13ba518>}

galaxy.datatypes.proteomics module

Proteomics Datatypes

class galaxy.datatypes.proteomics.Wiff(**kwd)[source]

Bases: galaxy.datatypes.binary.Binary

Class for wiff files.

edam_data = 'data_2536'
edam_format = 'format_3710'
file_ext = 'wiff'
allow_datatype_change = False
composite_type = 'auto_primary_file'
__init__(**kwd)[source]
generate_primary_file(dataset=None)[source]
metadata_spec = {'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f123c470>}
class galaxy.datatypes.proteomics.PepXmlReport(**kwd)[source]

Bases: galaxy.datatypes.tabular.Tabular

pepxml converted to tabular report

edam_data = 'data_2536'
file_ext = 'pepxml.tsv'
__init__(**kwd)[source]
display_peek(dataset)[source]

Returns formated html of peek

metadata_spec = {'column_names': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f11adbe0>, 'column_types': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f11adb70>, 'columns': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f11adb00>, 'comment_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f11ad080>, 'data_lines': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f11ada90>, 'dbkey': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd11661d4a8>, 'delimiter': <galaxy.model.metadata.MetadataElementSpec object at 0x7fd0f11adc50>}
class galaxy.datatypes.proteomics.ProtXmlReport(**kwd)[source]

Bases: galaxy.datatypes.tabular.Tabular

protxml converted to tabular report

edam_data = 'data_2536'
file_ext = 'protxml.tsv'
comment_lines = 1
__init__(**kwd)[source]
display_peek(dataset)[source]