Пример #1
0
 def set_default_values( self ):
     # Default values.
     if not self.datatypes_by_extension:
         self.datatypes_by_extension = {
             'ab1'         : binary.Ab1(),
             'axt'         : sequence.Axt(),
             'bam'         : binary.Bam(),
             'bed'         : interval.Bed(),
             'coverage'    : coverage.LastzCoverage(),
             'customtrack' : interval.CustomTrack(),
             'csfasta'     : sequence.csFasta(),
             'fasta'       : sequence.Fasta(),
             'eland'       : tabular.Eland(),
             'fastq'       : sequence.Fastq(),
             'fastqsanger' : sequence.FastqSanger(),
             'gtf'         : interval.Gtf(),
             'gff'         : interval.Gff(),
             'gff3'        : interval.Gff3(),
             'genetrack'   : tracks.GeneTrack(),
             'interval'    : interval.Interval(),
             'laj'         : images.Laj(),
             'lav'         : sequence.Lav(),
             'maf'         : sequence.Maf(),
             'pileup'      : tabular.Pileup(),
             'qualsolid'   : qualityscore.QualityScoreSOLiD(),
             'qualsolexa'  : qualityscore.QualityScoreSolexa(),
             'qual454'     : qualityscore.QualityScore454(),
             'sam'         : tabular.Sam(),
             'scf'         : binary.Scf(),
             'sff'         : binary.Sff(),
             'tabular'     : tabular.Tabular(),
             'taxonomy'    : tabular.Taxonomy(),
             'txt'         : data.Text(),
             'wig'         : interval.Wiggle(),
             'xml'         : xml.GenericXml(),
         }
         self.mimetypes_by_extension = {
             'ab1'         : 'application/octet-stream',
             'axt'         : 'text/plain',
             'bam'         : 'application/octet-stream',
             'bed'         : 'text/plain',
             'customtrack' : 'text/plain',
             'csfasta'     : 'text/plain',
             'eland'       : 'application/octet-stream',
             'fasta'       : 'text/plain',
             'fastq'       : 'text/plain',
             'fastqsanger' : 'text/plain',
             'gtf'         : 'text/plain',
             'gff'         : 'text/plain',
             'gff3'        : 'text/plain',
             'interval'    : 'text/plain',
             'laj'         : 'text/plain',
             'lav'         : 'text/plain',
             'maf'         : 'text/plain',
             'memexml'     : 'application/xml',
             'pileup'      : 'text/plain',
             'qualsolid'   : 'text/plain',
             'qualsolexa'  : 'text/plain',
             'qual454'     : 'text/plain',
             'sam'         : 'text/plain',
             'scf'         : 'application/octet-stream',
             'sff'         : 'application/octet-stream',
             'tabular'     : 'text/plain',
             'taxonomy'    : 'text/plain',
             'txt'         : 'text/plain',
             'wig'         : 'text/plain',
             'xml'         : 'application/xml',
         }
     # super supertype fix for input steps in workflows.
     if 'data' not in self.datatypes_by_extension:
         self.datatypes_by_extension[ 'data' ] = data.Data()
         self.mimetypes_by_extension[ 'data' ] = 'application/octet-stream'
     # Default values - the order in which we attempt to determine data types is critical
     # because some formats are much more flexibly defined than others.
     if len( self.sniff_order ) < 1:
         self.sniff_order = [
             binary.Bam(),
             binary.Sff(),
             xml.GenericXml(),
             sequence.Maf(),
             sequence.Lav(),
             sequence.csFasta(),
             qualityscore.QualityScoreSOLiD(),
             qualityscore.QualityScore454(),
             sequence.Fasta(),
             sequence.Fastq(),
             interval.Wiggle(),
             images.Html(),
             sequence.Axt(),
             interval.Bed(),
             interval.CustomTrack(),
             interval.Gtf(),
             interval.Gff(),
             interval.Gff3(),
             tabular.Pileup(),
             interval.Interval(),
             tabular.Sam(),
             tabular.Eland()
         ]
Пример #2
0
                     else:
                         self.log.warning( "Error appending sniffer for datatype '%s' to sniff_order: %s" % ( dtype, str( exc ) ) )
     self.upload_file_formats.sort()
     # Persist the xml form of the registry into a temporary file so that it
     # can be loaded from the command line by tools and set_metadata processing.
     self.to_xml_file()
 # Default values.
 if not self.datatypes_by_extension:
     self.datatypes_by_extension = { 
         'ab1'         : binary.Ab1(),
         'axt'         : sequence.Axt(),
         'bam'         : binary.Bam(),
         'bed'         : interval.Bed(), 
         'coverage'    : coverage.LastzCoverage(),
         'customtrack' : interval.CustomTrack(),
         'csfasta'     : sequence.csFasta(),
         'fasta'       : sequence.Fasta(),
         'eland'       : tabular.Eland(),
         'fastq'       : sequence.Fastq(),
         'fastqsanger' : sequence.FastqSanger(),
         'gtf'         : interval.Gtf(),
         'gff'         : interval.Gff(),
         'gff3'        : interval.Gff3(),
         'genetrack'   : tracks.GeneTrack(),
         'interval'    : interval.Interval(), 
         'laj'         : images.Laj(),
         'lav'         : sequence.Lav(),
         'maf'         : sequence.Maf(),
         'pileup'      : tabular.Pileup(),
         'qualsolid'   : qualityscore.QualityScoreSOLiD(),
         'qualsolexa'  : qualityscore.QualityScoreSolexa(),
Пример #3
0
                             "Error appending sniffer for datatype '%s' to sniff_order: %s" % (dtype, str(exc))
                         )
     self.upload_file_formats.sort()
     # Persist the xml form of the registry into a temporary file so that it
     # can be loaded from the command line by tools and set_metadata processing.
     self.to_xml_file()
 # Default values.
 if not self.datatypes_by_extension:
     self.datatypes_by_extension = {
         "ab1": binary.Ab1(),
         "axt": sequence.Axt(),
         "bam": binary.Bam(),
         "bed": interval.Bed(),
         "coverage": coverage.LastzCoverage(),
         "customtrack": interval.CustomTrack(),
         "csfasta": sequence.csFasta(),
         "fasta": sequence.Fasta(),
         "eland": tabular.Eland(),
         "fastq": sequence.Fastq(),
         "fastqsanger": sequence.FastqSanger(),
         "gtf": interval.Gtf(),
         "gff": interval.Gff(),
         "gff3": interval.Gff3(),
         "genetrack": tracks.GeneTrack(),
         "interval": interval.Interval(),
         "laj": images.Laj(),
         "lav": sequence.Lav(),
         "maf": sequence.Maf(),
         "pileup": tabular.Pileup(),
         "qualsolid": qualityscore.QualityScoreSOLiD(),
         "qualsolexa": qualityscore.QualityScoreSolexa(),