mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
@@ -320,6 +320,7 @@ lib/galaxy/web/base/controllers/__init__.py
|
||||
lib/galaxy/web/base/__init__.py
|
||||
lib/galaxy/web/buildapp.py
|
||||
lib/galaxy/web/formatting.py
|
||||
lib/galaxy/web/framework/base.py
|
||||
lib/galaxy/web/framework/decorators.py
|
||||
lib/galaxy/web/framework/helpers/grids.py
|
||||
lib/galaxy/web/framework/__init__.py
|
||||
|
||||
@@ -27,6 +27,7 @@ def parse_css_color( color ):
|
||||
raise Exception( "Color should be 3 hex numbers" )
|
||||
return r / 256, g / 256, b / 256
|
||||
|
||||
|
||||
size = int( sys.argv[1] )
|
||||
|
||||
surface = cairo.ImageSurface( cairo.FORMAT_ARGB32, size, size )
|
||||
|
||||
@@ -87,5 +87,6 @@ def main():
|
||||
|
||||
logging.info("read Galaxy galaxy.ini.sample for detailed information.")
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
||||
@@ -61,6 +61,7 @@ tools = {
|
||||
def usage():
|
||||
sys.exit("usage: check_galaxy.py <server> <username> <password>")
|
||||
|
||||
|
||||
try:
|
||||
opts, args = getopt.getopt( sys.argv[1:], 'n' )
|
||||
except getopt.GetoptError as e:
|
||||
@@ -347,7 +348,7 @@ def dprint(str):
|
||||
if debug:
|
||||
print(str)
|
||||
|
||||
# do stuff here
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
dprint("checking %s" % server)
|
||||
|
||||
@@ -43,6 +43,7 @@ def add_manual_builds(input_file, build_file, chr_dir):
|
||||
continue
|
||||
build_file_out.close()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
if len(sys.argv) < 4:
|
||||
sys.exit("USAGE: python add_manual_builds.py input_file builds.txt chrom_length_dir")
|
||||
|
||||
@@ -47,6 +47,7 @@ def getchrominfo(url, db):
|
||||
else:
|
||||
raise Exception("Problem parsing line '%s'" % line)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
if len(sys.argv) == 1:
|
||||
sys.exit("Path to place chromInfo tables must be specified.")
|
||||
|
||||
@@ -44,6 +44,7 @@ def getbuilds(url):
|
||||
description = " ".join(fields)
|
||||
yield [build, description]
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
if len(sys.argv) > 1:
|
||||
URL = sys.argv[1]
|
||||
|
||||
@@ -41,6 +41,7 @@ def main():
|
||||
builds = list(build_dict.keys())
|
||||
yield [names[i], trackurl, builds]
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
for site in main():
|
||||
print(site[0] + "\t" + site[1] + "\t" + ",".join(site[2]))
|
||||
|
||||
@@ -166,5 +166,6 @@ def _doc_or_none(tag):
|
||||
else:
|
||||
return doc_el.text
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
||||
@@ -58,6 +58,7 @@ class NullHandler(logging.Handler):
|
||||
def createLock(self):
|
||||
self.lock = None
|
||||
|
||||
|
||||
logger.addHandler(NullHandler())
|
||||
|
||||
# -----------------------------------------------
|
||||
|
||||
@@ -156,6 +156,7 @@ class AuthManager(object):
|
||||
log.exception( "Active Authenticators Failure" )
|
||||
raise
|
||||
|
||||
|
||||
Authenticator = namedtuple('Authenticator', ['plugin', 'filter_template', 'options'])
|
||||
|
||||
|
||||
|
||||
@@ -198,4 +198,5 @@ class ActiveDirectory(LDAP):
|
||||
logic in the future. """
|
||||
plugin_type = 'activedirectory'
|
||||
|
||||
|
||||
__all__ = ('LDAP', 'ActiveDirectory')
|
||||
|
||||
@@ -148,4 +148,5 @@ class PAM(AuthProvider):
|
||||
def authenticate_user(self, user, password, options):
|
||||
return self.authenticate(user.email, user.username, password, options)[0]
|
||||
|
||||
|
||||
__all__ = ('PAM', )
|
||||
|
||||
@@ -229,6 +229,7 @@ class Velvet( Html ):
|
||||
Html.set_meta( self, dataset, **kwd )
|
||||
self.regenerate_primary_file(dataset)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
import doctest
|
||||
doctest.testmod(sys.modules[__name__])
|
||||
|
||||
@@ -103,6 +103,7 @@ class Ab1( Binary ):
|
||||
except:
|
||||
return "Binary ab1 sequence file (%s)" % ( nice_size( dataset.get_size() ) )
|
||||
|
||||
|
||||
Binary.register_unsniffable_binary_ext("ab1")
|
||||
|
||||
|
||||
@@ -121,6 +122,7 @@ class Idat( Binary ):
|
||||
except:
|
||||
return False
|
||||
|
||||
|
||||
Binary.register_sniffable_binary_format("idat", "idat", Idat)
|
||||
|
||||
|
||||
@@ -152,6 +154,7 @@ class Cel( Binary ):
|
||||
except:
|
||||
return False
|
||||
|
||||
|
||||
Binary.register_sniffable_binary_format("cel", "cel", Cel)
|
||||
|
||||
|
||||
@@ -177,6 +180,7 @@ class CompressedArchive( Binary ):
|
||||
except:
|
||||
return "Compressed binary file (%s)" % ( nice_size( dataset.get_size() ) )
|
||||
|
||||
|
||||
Binary.register_unsniffable_binary_ext("compressed_archive")
|
||||
|
||||
|
||||
@@ -211,6 +215,7 @@ class GenericAsn1Binary( Binary ):
|
||||
edam_format = "format_1966"
|
||||
edam_data = "data_0849"
|
||||
|
||||
|
||||
Binary.register_unsniffable_binary_ext("asn1-binary")
|
||||
|
||||
|
||||
@@ -530,6 +535,7 @@ class Bam( Binary ):
|
||||
dataset_source = dataproviders.dataset.DatasetDataProvider( dataset )
|
||||
return dataproviders.dataset.SamtoolsDataProvider( dataset_source, **settings )
|
||||
|
||||
|
||||
Binary.register_sniffable_binary_format("bam", "bam", Bam)
|
||||
|
||||
|
||||
@@ -601,6 +607,7 @@ class CRAM( Binary ):
|
||||
except:
|
||||
return False
|
||||
|
||||
|
||||
Binary.register_sniffable_binary_format('cram', 'cram', CRAM)
|
||||
|
||||
|
||||
@@ -651,6 +658,7 @@ class Bcf( Binary):
|
||||
os.remove( dataset_symlink )
|
||||
dataset.metadata.bcf_index = index_file
|
||||
|
||||
|
||||
Binary.register_sniffable_binary_format("bcf", "bcf", Bcf)
|
||||
|
||||
|
||||
@@ -697,6 +705,7 @@ class H5( Binary ):
|
||||
except:
|
||||
return "Binary HDF5 file (%s)" % ( nice_size( dataset.get_size() ) )
|
||||
|
||||
|
||||
Binary.register_sniffable_binary_format("h5", "h5", H5)
|
||||
|
||||
|
||||
@@ -720,6 +729,7 @@ class Scf( Binary ):
|
||||
except:
|
||||
return "Binary scf sequence file (%s)" % ( nice_size( dataset.get_size() ) )
|
||||
|
||||
|
||||
Binary.register_unsniffable_binary_ext("scf")
|
||||
|
||||
|
||||
@@ -754,6 +764,7 @@ class Sff( Binary ):
|
||||
except:
|
||||
return "Binary sff file (%s)" % ( nice_size( dataset.get_size() ) )
|
||||
|
||||
|
||||
Binary.register_sniffable_binary_format("sff", "sff", Sff)
|
||||
|
||||
|
||||
@@ -797,6 +808,7 @@ class BigWig(Binary):
|
||||
except:
|
||||
return "Binary UCSC %s file (%s)" % ( self._name, nice_size( dataset.get_size() ) )
|
||||
|
||||
|
||||
Binary.register_sniffable_binary_format("bigwig", "bigwig", BigWig)
|
||||
|
||||
|
||||
@@ -811,6 +823,7 @@ class BigBed(BigWig):
|
||||
self._magic = 0x8789F2EB
|
||||
self._name = "BigBed"
|
||||
|
||||
|
||||
Binary.register_sniffable_binary_format("bigbed", "bigbed", BigBed)
|
||||
|
||||
|
||||
@@ -845,6 +858,7 @@ class TwoBit (Binary):
|
||||
except:
|
||||
return "Binary TwoBit format nucleotide file (%s)" % (nice_size(dataset.get_size()))
|
||||
|
||||
|
||||
Binary.register_sniffable_binary_format("twobit", "twobit", TwoBit)
|
||||
|
||||
|
||||
@@ -1069,6 +1083,7 @@ class IdpDB( SQlite ):
|
||||
except:
|
||||
return "IDPickerDB SQLite file (%s)" % ( nice_size( dataset.get_size() ) )
|
||||
|
||||
|
||||
Binary.register_sniffable_binary_format( "gemini.sqlite", "gemini.sqlite", GeminiSQLite )
|
||||
Binary.register_sniffable_binary_format( "idpdb", "idpdb", IdpDB )
|
||||
Binary.register_sniffable_binary_format( "mz.sqlite", "mz.sqlite", MzSQlite )
|
||||
@@ -1092,6 +1107,7 @@ class Xlsx(Binary):
|
||||
except:
|
||||
return False
|
||||
|
||||
|
||||
Binary.register_sniffable_binary_format("xlsx", "xlsx", Xlsx)
|
||||
|
||||
|
||||
@@ -1126,6 +1142,7 @@ class Sra( Binary ):
|
||||
except:
|
||||
return 'Binary sra file (%s)' % (nice_size(dataset.get_size()))
|
||||
|
||||
|
||||
Binary.register_sniffable_binary_format('sra', 'sra', Sra)
|
||||
|
||||
|
||||
@@ -1146,6 +1163,7 @@ class RData( Binary ):
|
||||
except:
|
||||
return False
|
||||
|
||||
|
||||
Binary.register_sniffable_binary_format('RData', 'RData', RData)
|
||||
|
||||
|
||||
@@ -1189,6 +1207,7 @@ class OxliCountGraph(OxliBinary):
|
||||
def sniff(self, filename):
|
||||
return OxliBinary._sniff(filename, b"01")
|
||||
|
||||
|
||||
Binary.register_sniffable_binary_format("oxli.countgraph", "oxlicg",
|
||||
OxliCountGraph)
|
||||
|
||||
@@ -1216,6 +1235,7 @@ class OxliNodeGraph(OxliBinary):
|
||||
def sniff(self, filename):
|
||||
return OxliBinary._sniff(filename, b"02")
|
||||
|
||||
|
||||
Binary.register_sniffable_binary_format("oxli.nodegraph", "oxling",
|
||||
OxliNodeGraph)
|
||||
|
||||
@@ -1244,6 +1264,7 @@ class OxliTagSet(OxliBinary):
|
||||
def sniff(self, filename):
|
||||
return OxliBinary._sniff(filename, b"03")
|
||||
|
||||
|
||||
Binary.register_sniffable_binary_format("oxli.tagset", "oxlits", OxliTagSet)
|
||||
|
||||
|
||||
@@ -1266,6 +1287,7 @@ class OxliStopTags(OxliBinary):
|
||||
def sniff(self, filename):
|
||||
return OxliBinary._sniff(filename, b"04")
|
||||
|
||||
|
||||
Binary.register_sniffable_binary_format("oxli.stoptags", "oxlist",
|
||||
OxliStopTags)
|
||||
|
||||
@@ -1294,6 +1316,7 @@ class OxliSubset(OxliBinary):
|
||||
def sniff(self, filename):
|
||||
return OxliBinary._sniff(filename, b"05")
|
||||
|
||||
|
||||
Binary.register_sniffable_binary_format("oxli.subset", "oxliss", OxliSubset)
|
||||
|
||||
|
||||
@@ -1322,6 +1345,7 @@ class OxliGraphLabels(OxliBinary):
|
||||
def sniff(self, filename):
|
||||
return OxliBinary._sniff(filename, b"06")
|
||||
|
||||
|
||||
Binary.register_sniffable_binary_format("oxli.graphlabels", "oxligl",
|
||||
OxliGraphLabels)
|
||||
|
||||
@@ -1376,6 +1400,7 @@ class SearchGuiArchive ( CompressedArchive ):
|
||||
except:
|
||||
return "SearchGUI Archive, version %s" % ( dataset.metadata.searchgui_version or 'unknown' )
|
||||
|
||||
|
||||
Binary.register_sniffable_binary_format("searchgui_archive", "searchgui_archive", SearchGuiArchive)
|
||||
|
||||
|
||||
@@ -1409,4 +1434,5 @@ class NetCDF( Binary ):
|
||||
except:
|
||||
return False
|
||||
|
||||
|
||||
Binary.register_sniffable_binary_format("netcdf", "netcdf", NetCDF)
|
||||
|
||||
@@ -130,6 +130,7 @@ class PlyBinary(Ply, Binary):
|
||||
def __init__(self, **kwd):
|
||||
Binary.__init__(self, **kwd)
|
||||
|
||||
|
||||
Binary.register_sniffable_binary_format("plybinary", "plybinary", PlyBinary)
|
||||
|
||||
|
||||
@@ -456,6 +457,7 @@ class VtkBinary(Vtk, Binary):
|
||||
def __init__(self, **kwd):
|
||||
Binary.__init__(self, **kwd)
|
||||
|
||||
|
||||
Binary.register_sniffable_binary_format("vtkbinary", "vtkbinary", VtkBinary)
|
||||
|
||||
|
||||
|
||||
@@ -73,5 +73,6 @@ def __main__():
|
||||
info_msg += "Skipped %d blank/comment/invalid lines starting with line #%d." % ( skipped_lines, first_skipped_line )
|
||||
print(info_msg)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
__main__()
|
||||
|
||||
@@ -38,7 +38,6 @@ class BedGraphReader:
|
||||
|
||||
|
||||
def main():
|
||||
|
||||
input_fname = sys.argv[1]
|
||||
out_fname = sys.argv[2]
|
||||
|
||||
@@ -52,5 +51,6 @@ def main():
|
||||
|
||||
FileArrayTreeDict.dict_to_file( d, open( out_fname, "w" ) )
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
||||
@@ -46,5 +46,6 @@ def main():
|
||||
|
||||
ctabix.tabix_compress(tmpfile.name, output_fname, force=True)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
||||
@@ -4,8 +4,8 @@ Input: fasta, int
|
||||
Output: tabular
|
||||
Return titles with lengths of corresponding seq
|
||||
"""
|
||||
|
||||
import sys
|
||||
|
||||
assert sys.version_info[:2] >= ( 2, 4 )
|
||||
|
||||
|
||||
@@ -48,5 +48,6 @@ def compute_fasta_length( fasta_file, out_file, keep_first_char, keep_first_word
|
||||
out.write( "%s\t%d\n" % ( fasta_title[ 1:keep_first_char ], seq_len ) )
|
||||
out.close()
|
||||
|
||||
|
||||
if __name__ == "__main__" :
|
||||
compute_fasta_length( sys.argv[1], sys.argv[2], sys.argv[3], True )
|
||||
|
||||
@@ -13,8 +13,8 @@ the order should be:
|
||||
Usage:
|
||||
%python fastqsolexa_to_fasta_converter.py <your_fastqsolexa_filename> <output_seq_filename> <output_score_filename>
|
||||
"""
|
||||
|
||||
import sys
|
||||
|
||||
assert sys.version_info[:2] >= ( 2, 4 )
|
||||
|
||||
|
||||
@@ -50,5 +50,6 @@ def __main__():
|
||||
|
||||
outfile.close()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
__main__()
|
||||
|
||||
@@ -93,5 +93,6 @@ def __main__():
|
||||
|
||||
outfile_score.close()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
__main__()
|
||||
|
||||
@@ -42,5 +42,6 @@ def __main__():
|
||||
info_msg += "Skipped %d blank/comment/invalid lines starting with line #%d." % ( skipped_lines, first_skipped_line )
|
||||
print(info_msg)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
__main__()
|
||||
|
||||
@@ -36,5 +36,6 @@ def main():
|
||||
|
||||
index.write( open(out_fname, "w") )
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
||||
@@ -61,5 +61,6 @@ def __main__():
|
||||
if skipped_lines > 0:
|
||||
print("Skipped %d blank or invalid lines starting with line # %d." % ( skipped_lines, first_skipped_line ))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
__main__()
|
||||
|
||||
@@ -153,5 +153,6 @@ def __main__():
|
||||
if skipped_lines > 0:
|
||||
print("Skipped %d blank or invalid lines starting with line # %d." % ( skipped_lines, first_skipped_line ))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
__main__()
|
||||
|
||||
@@ -120,6 +120,7 @@ class CoverageWriter( object ):
|
||||
self.out_stream.flush()
|
||||
self.out_stream.close()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
options, args = doc_optparse.parse( __doc__ )
|
||||
try:
|
||||
|
||||
@@ -102,5 +102,6 @@ def main():
|
||||
out.write( entry.ljust( max_len ) + '\n' )
|
||||
out.close()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
||||
@@ -8,10 +8,10 @@ usage: %prog <options> in_file out_file
|
||||
-s, --start-col: start column, default=2
|
||||
-e, --end-col: end column, default=3
|
||||
"""
|
||||
|
||||
from __future__ import division
|
||||
|
||||
import optparse
|
||||
|
||||
from bx.interval_index_file import Indexes
|
||||
|
||||
|
||||
@@ -46,5 +46,6 @@ def main():
|
||||
|
||||
index.write( open(output_fname, "w") )
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
||||
@@ -36,5 +36,6 @@ def main():
|
||||
if os.path.getsize(index_fname) == 0:
|
||||
sys.stderr.write("The converted tabix index file is empty, meaning the input data is invalid.")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
||||
@@ -40,5 +40,6 @@ def __main__():
|
||||
info_msg += "Skipped %d blank/comment/invalid lines starting with line #%d." % ( skipped_lines, first_skipped_line )
|
||||
print(info_msg)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
__main__()
|
||||
|
||||
@@ -5,10 +5,10 @@ Convert from pileup file to interval index file.
|
||||
|
||||
usage: %prog <options> in_file out_file
|
||||
"""
|
||||
|
||||
from __future__ import division
|
||||
|
||||
import optparse
|
||||
|
||||
from bx.interval_index_file import Indexes
|
||||
|
||||
|
||||
@@ -31,5 +31,6 @@ def main():
|
||||
|
||||
index.write( open(output_fname, "w") )
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
||||
@@ -23,5 +23,6 @@ def __main__():
|
||||
|
||||
outfile.close()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
__main__()
|
||||
|
||||
@@ -71,5 +71,6 @@ def __main__():
|
||||
|
||||
cleanup_before_exit( tmp_dir )
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
__main__()
|
||||
|
||||
@@ -30,5 +30,6 @@ def main():
|
||||
# Column indices are 0-based.
|
||||
ctabix.tabix_index(output_fname, seq_col=options.chrom_col, start_col=options.start_col, end_col=options.end_col)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
||||
@@ -30,5 +30,6 @@ def main():
|
||||
|
||||
index.write( open( out_file, "w" ) )
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
||||
@@ -20,5 +20,6 @@ def main():
|
||||
|
||||
ctabix.tabix_compress(input_fname, output_fname, force=True)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
||||
@@ -25,5 +25,6 @@ def main():
|
||||
|
||||
FileArrayTreeDict.dict_to_file( d, open( out_fname, "w" ) )
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
||||
@@ -44,5 +44,6 @@ def main():
|
||||
in_file.close()
|
||||
out_file.close()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
||||
@@ -152,6 +152,7 @@ class DisplayApplicationTemplateParameter( DisplayApplicationParameter ):
|
||||
value = value.strip()
|
||||
return DisplayParameterValueWrapper( value, self, other_values, dataset_hash, user_hash, trans )
|
||||
|
||||
|
||||
parameter_type_to_class = { DisplayApplicationDataParameter.type: DisplayApplicationDataParameter,
|
||||
DisplayApplicationTemplateParameter.type: DisplayApplicationTemplateParameter }
|
||||
|
||||
|
||||
@@ -152,6 +152,7 @@ class Pdf( Image ):
|
||||
except IndexError:
|
||||
return False
|
||||
|
||||
|
||||
Binary.register_sniffable_binary_format("pdf", "pdf", Pdf)
|
||||
|
||||
|
||||
|
||||
@@ -91,6 +91,7 @@ class HmmerPress( Binary ):
|
||||
# Profiles (remained)
|
||||
self.add_composite_file('model.hmm.h3p', is_binary=True)
|
||||
|
||||
|
||||
Binary.register_unsniffable_binary_ext("hmmpress")
|
||||
|
||||
|
||||
|
||||
@@ -128,6 +128,7 @@ class Neo4jDB(Neo4j, Data):
|
||||
self.add_composite_file('neostore.schemastore.db.id', is_binary=True)
|
||||
self.add_composite_file('neostore.transaction.db.0', is_binary=True)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
import doctest
|
||||
doctest.testmod(sys.modules[__name__])
|
||||
|
||||
@@ -51,6 +51,7 @@ class Wiff(Binary):
|
||||
rval.append('</ul></div></html>')
|
||||
return "\n".join(rval)
|
||||
|
||||
|
||||
Binary.register_sniffable_binary_format("wiff", "wiff", Wiff )
|
||||
|
||||
|
||||
@@ -293,6 +294,7 @@ class ThermoRAW(Binary):
|
||||
except:
|
||||
return "Thermo Finnigan RAW file (%s)" % (nice_size(dataset.get_size()))
|
||||
|
||||
|
||||
Binary.register_sniffable_binary_format("thermo.raw", "raw", ThermoRAW )
|
||||
|
||||
|
||||
|
||||
@@ -465,6 +465,7 @@ def handle_uploaded_dataset_file( filename, datatypes_registry, ext='auto', is_m
|
||||
raise InappropriateDatasetContentError( 'The uploaded file contains inappropriate HTML content.' )
|
||||
return ext
|
||||
|
||||
|
||||
AUTO_DETECT_EXTENSIONS = [ 'auto' ] # should 'data' also cause auto detect?
|
||||
DECOMPRESSION_FUNCTIONS = dict( gzip=gzip.GzipFile )
|
||||
COMPRESSION_CHECK_FUNCTIONS = [ ( 'gzip', is_gzip ) ]
|
||||
@@ -477,6 +478,7 @@ for exts in COMPRESSION_DATATYPES.values():
|
||||
class InappropriateDatasetContentError( Exception ):
|
||||
pass
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
import doctest
|
||||
doctest.testmod(sys.modules[__name__])
|
||||
|
||||
@@ -184,4 +184,5 @@ class HDT( binary.Binary, Triples ):
|
||||
dataset.peek = 'file does not exist'
|
||||
dataset.blurb = 'file purged from disk'
|
||||
|
||||
|
||||
binary.Binary.register_sniffable_binary_format('HDT', 'HDT', HDT)
|
||||
|
||||
@@ -175,6 +175,7 @@ class ExternalServiceTemplateAction( ExternalServiceAction ):
|
||||
def perform_action( self, param_dict ):
|
||||
return ExternalServiceValueResult( self.name, param_dict, self.template.build_template( param_dict ) )
|
||||
|
||||
|
||||
action_type_to_class = {
|
||||
ExternalServiceWebAction.type: ExternalServiceWebAction,
|
||||
ExternalServiceWebAPIAction.type: ExternalServiceWebAPIAction,
|
||||
|
||||
@@ -40,4 +40,5 @@ class ExternalServiceTemplateParameter( ExternalServiceParameter ):
|
||||
value = value.strip()
|
||||
return value
|
||||
|
||||
|
||||
parameter_type_to_class = { ExternalServiceTemplateParameter.type: ExternalServiceTemplateParameter }
|
||||
|
||||
@@ -62,6 +62,7 @@ class ExternalServiceActionJQueryGridResultHandler( ExternalServiceActionResultH
|
||||
rval = loads( result.content )
|
||||
return trans.fill_template( '/external_services/generic_jquery_grid.mako', result=rval, param_dict=param_dict, action=self.parent )
|
||||
|
||||
|
||||
result_type_to_class = {}
|
||||
for handler_class in [ ExternalServiceActionResultHandler, ExternalServiceActionURLRedirectResultHandler, ExternalServiceActionJQueryGridResultHandler, ExternalServiceActionJSONResultHandler ]:
|
||||
result_type_to_class[handler_class.type] = handler_class
|
||||
|
||||
@@ -148,6 +148,7 @@ class ItemIsInstanceExternalServiceActionsGroupWhen( ExternalServiceActionsGroup
|
||||
ref = self.get_ref( param_dict )
|
||||
return ref.__class__.__name__.lower() in map( lambda x: x.lower(), self.value.split( '.' ) ) # HACK!
|
||||
|
||||
|
||||
when_type_to_class = {}
|
||||
for class_type in [ ValueExternalServiceActionsGroupWhen, BooleanExternalServiceActionsGroupWhen, ItemIsInstanceExternalServiceActionsGroupWhen]:
|
||||
when_type_to_class[ class_type.type ] = class_type
|
||||
|
||||
@@ -311,6 +311,7 @@ class FormDefinitionSelectFieldFactory( FormDefinitionFieldFactory ):
|
||||
rval['selectlist'].append( value )
|
||||
return rval
|
||||
|
||||
|
||||
field_type_factories = dict( [ ( field.type, field() ) for field in ( FormDefinitionTextFieldFactory,
|
||||
FormDefinitionPasswordFieldFactory,
|
||||
FormDefinitionAddressFieldFactory,
|
||||
|
||||
@@ -242,4 +242,5 @@ class CommandsBuilder(object):
|
||||
self.append_command(YIELD_CAPTURED_CODE)
|
||||
return self.commands
|
||||
|
||||
|
||||
__all__ = ( "build_command", )
|
||||
|
||||
@@ -1371,6 +1371,7 @@ def map_tool_to_destination(
|
||||
|
||||
return destination
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
"""
|
||||
This function is responsible for running the app if directly run through the
|
||||
|
||||
@@ -94,4 +94,5 @@ def dictify_element( element ):
|
||||
dictified[ "object" ] = object_detials
|
||||
return dictified
|
||||
|
||||
|
||||
__all__ = ( 'api_payload_to_create_params', 'dictify_dataset_collection_instance' )
|
||||
|
||||
@@ -2445,6 +2445,7 @@ simple_mapping( model.Tag,
|
||||
def tag_mapping( tag_association_class, backref_name ):
|
||||
simple_mapping( tag_association_class, tag=relation( model.Tag, backref=backref_name), user=relation( model.User ) )
|
||||
|
||||
|
||||
tag_mapping( model.HistoryTagAssociation, "tagged_histories" )
|
||||
tag_mapping( model.DatasetTagAssociation, "tagged_datasets" )
|
||||
tag_mapping( model.HistoryDatasetAssociationTagAssociation, "tagged_history_dataset_associations" )
|
||||
@@ -2462,6 +2463,7 @@ def annotation_mapping( annotation_class, **kwds ):
|
||||
kwds = dict( (key, relation( value ) ) for key, value in kwds.items() )
|
||||
simple_mapping( annotation_class, **dict(user=relation( model.User ), **kwds ) )
|
||||
|
||||
|
||||
annotation_mapping( model.HistoryAnnotationAssociation, history=model.History )
|
||||
annotation_mapping( model.HistoryDatasetAssociationAnnotationAssociation, hda=model.HistoryDatasetAssociation )
|
||||
annotation_mapping( model.StoredWorkflowAnnotationAssociation, stored_workflow=model.StoredWorkflow )
|
||||
@@ -2479,6 +2481,7 @@ def rating_mapping( rating_class, **kwds ):
|
||||
kwds = dict( (key, relation( value ) ) for key, value in kwds.items() )
|
||||
simple_mapping( rating_class, **dict(user=relation( model.User ), **kwds ) )
|
||||
|
||||
|
||||
rating_mapping( model.HistoryRatingAssociation, history=model.History )
|
||||
rating_mapping( model.HistoryDatasetAssociationRatingAssociation, hda=model.HistoryDatasetAssociation )
|
||||
rating_mapping( model.StoredWorkflowRatingAssociation, stored_workflow=model.StoredWorkflow )
|
||||
@@ -2546,6 +2549,7 @@ def db_next_hid( self, n=1 ):
|
||||
trans.rollback()
|
||||
raise
|
||||
|
||||
|
||||
model.History._next_hid = db_next_hid
|
||||
|
||||
|
||||
@@ -2556,6 +2560,7 @@ def _workflow_invocation_update( self ):
|
||||
stmt = table.update().values(update_time=now_val).where(and_(table.c.id == self.id, table.c.update_time < now_val))
|
||||
conn.execute(stmt)
|
||||
|
||||
|
||||
model.WorkflowInvocation.update = _workflow_invocation_update
|
||||
|
||||
|
||||
|
||||
@@ -340,6 +340,7 @@ class MetadataElementSpec( object ):
|
||||
spec_dict.update( self.__dict__ )
|
||||
return ( "{name} ({param_class}): {desc}, defaults to '{default}'".format( **spec_dict ) )
|
||||
|
||||
|
||||
# create a statement class that, when called,
|
||||
# will add a new MetadataElementSpec to a class's metadata_spec
|
||||
MetadataElement = Statement( MetadataElementSpec )
|
||||
@@ -872,6 +873,7 @@ class JobExternalOutputMetadataWrapper( object ):
|
||||
sa_session.add( metadata_files )
|
||||
sa_session.flush()
|
||||
|
||||
|
||||
__all__ = (
|
||||
"Statement",
|
||||
"MetadataElement",
|
||||
|
||||
@@ -29,6 +29,7 @@ def display_migration_details():
|
||||
print("histories in the same way that workflows are shared.")
|
||||
print("========================================")
|
||||
|
||||
|
||||
HistoryUserShareAssociation_table = Table( "history_user_share_association", metadata,
|
||||
Column( "id", Integer, primary_key=True ),
|
||||
Column( "history_id", Integer, ForeignKey( "history.id" ), index=True ),
|
||||
|
||||
@@ -45,6 +45,7 @@ def display_migration_details():
|
||||
print("8) sample_event")
|
||||
print("========================================")
|
||||
|
||||
|
||||
FormDefinitionCurrent_table = Table('form_definition_current', metadata,
|
||||
Column( "id", Integer, primary_key=True),
|
||||
Column( "create_time", DateTime, default=now ),
|
||||
|
||||
@@ -41,6 +41,7 @@ def display_migration_details():
|
||||
print("is too long.")
|
||||
print("========================================")
|
||||
|
||||
|
||||
HistoryDatasetAssociationDisplayAtAuthorization_table = Table( "history_dataset_association_display_at_authorization", metadata,
|
||||
Column( "id", Integer, primary_key=True ),
|
||||
Column( "create_time", DateTime, default=now ),
|
||||
|
||||
@@ -32,6 +32,7 @@ def display_migration_details():
|
||||
print("to be manually created.")
|
||||
print("========================================")
|
||||
|
||||
|
||||
HistoryDatasetAssociationDisplayAtAuthorization_table = Table( "history_dataset_association_display_at_authorization", metadata,
|
||||
Column( "id", Integer, primary_key=True ),
|
||||
Column( "create_time", DateTime, default=now ),
|
||||
|
||||
@@ -35,6 +35,7 @@ def display_migration_details():
|
||||
print("which is a string, allowing for more flexibility with request states.")
|
||||
print("========================================")
|
||||
|
||||
|
||||
UserAddress_table = Table( "user_address", metadata,
|
||||
Column( "id", Integer, primary_key=True),
|
||||
Column( "create_time", DateTime, default=now ),
|
||||
|
||||
@@ -51,6 +51,7 @@ def display_migration_details():
|
||||
print("an index with a shortened name.")
|
||||
print("========================================")
|
||||
|
||||
|
||||
LibraryInfoAssociation_table = Table( 'library_info_association', metadata,
|
||||
Column( "id", Integer, primary_key=True),
|
||||
Column( "library_id", Integer, ForeignKey( "library.id" ), index=True ),
|
||||
|
||||
@@ -24,6 +24,7 @@ def display_migration_details():
|
||||
print("name length limit and thus the index 'ix_hda_ta_history_dataset_association_id'")
|
||||
print("has to be manually created.")
|
||||
|
||||
|
||||
HistoryDatasetAssociationTagAssociation_table = Table( "history_dataset_association_tag_association", metadata,
|
||||
Column( "history_dataset_association_id", Integer, ForeignKey( "history_dataset_association.id" ), index=True ),
|
||||
Column( "tag_id", Integer, ForeignKey( "tag.id" ), index=True ),
|
||||
|
||||
@@ -23,6 +23,7 @@ def display_migration_details():
|
||||
print("This migration script provides support for (a) ordering tags by recency and")
|
||||
print("(b) tagging pages. This script deletes all existing tags.")
|
||||
|
||||
|
||||
HistoryTagAssociation_table = Table( "history_tag_association", metadata,
|
||||
Column( "id", Integer, primary_key=True ),
|
||||
Column( "history_id", Integer, ForeignKey( "history.id" ), index=True ),
|
||||
|
||||
@@ -30,6 +30,7 @@ are added to the Job object. An index is also added to the dataset.state
|
||||
column.""")
|
||||
print("========================================")
|
||||
|
||||
|
||||
JobToOutputLibraryDatasetAssociation_table = Table( "job_to_output_library_dataset", metadata,
|
||||
Column( "id", Integer, primary_key=True ),
|
||||
Column( "job_id", Integer, ForeignKey( "job.id" ), index=True ),
|
||||
|
||||
@@ -16,6 +16,7 @@ def display_migration_details():
|
||||
print("This script adds tables needed for Galaxy cloud functionality.")
|
||||
print("========================================")
|
||||
|
||||
|
||||
CloudImage_table = Table( "cloud_image", metadata,
|
||||
Column( "id", Integer, primary_key=True ),
|
||||
Column( "create_time", DateTime, default=now ),
|
||||
|
||||
@@ -16,6 +16,7 @@ def display_migration_details():
|
||||
print("This script drops tables that were associated with the old Galaxy Cloud functionality.")
|
||||
print("========================================")
|
||||
|
||||
|
||||
CloudImage_table = Table( "cloud_image", metadata,
|
||||
Column( "id", Integer, primary_key=True ),
|
||||
Column( "create_time", DateTime, default=now ),
|
||||
|
||||
@@ -35,6 +35,7 @@ def localtimestamp(migrate_engine):
|
||||
else:
|
||||
raise Exception( 'Unable to convert data for unknown database type: %s' % migrate_engine.name )
|
||||
|
||||
|
||||
SampleDataset_table = Table('sample_dataset', metadata,
|
||||
Column( "id", Integer, primary_key=True ),
|
||||
Column( "create_time", DateTime, default=now ),
|
||||
|
||||
@@ -42,6 +42,7 @@ def localtimestamp(migrate_engine):
|
||||
else:
|
||||
raise Exception( 'Unable to convert data for unknown database type: %s' % migrate_engine.name )
|
||||
|
||||
|
||||
ToolVersion_table = Table( "tool_version", metadata,
|
||||
Column( "id", Integer, primary_key=True ),
|
||||
Column( "create_time", DateTime, default=now ),
|
||||
|
||||
@@ -126,6 +126,7 @@ def admin_job_lock(app, **kwargs):
|
||||
log.info("Administrative Job Lock is now set to %s. Jobs will %s dispatch."
|
||||
% (job_lock, "not" if job_lock else "now"))
|
||||
|
||||
|
||||
control_message_to_task = { 'create_panel_section': create_panel_section,
|
||||
'reload_tool': reload_tool,
|
||||
'reload_toolbox': reload_toolbox,
|
||||
|
||||
@@ -54,4 +54,5 @@ class FtpDataTransferFactory( DataTransferFactory ):
|
||||
def parse( self, elem ):
|
||||
pass
|
||||
|
||||
|
||||
data_transfer_factories = dict( [ ( data_transfer.type, data_transfer() ) for data_transfer in [ ScpDataTransferFactory, HttpDataTransferFactory, FtpDataTransferFactory ] ] )
|
||||
|
||||
@@ -29,4 +29,5 @@ class RequestTypeFactory( object ):
|
||||
self.sample_state_factory.from_elem( rval, sample_state_elem ) # should this be the return value??
|
||||
return rval
|
||||
|
||||
|
||||
request_type_factory = RequestTypeFactory( sample_state_factory, RENAME_DATASET_OPTIONS )
|
||||
|
||||
@@ -22,4 +22,5 @@ class SampleStateFactory( object ):
|
||||
description = elem.get( 'description', None )
|
||||
return self.new( request_type, name, description=description )
|
||||
|
||||
|
||||
sample_state_factory = SampleStateFactory()
|
||||
|
||||
@@ -53,9 +53,9 @@ def check_password_PBKDF2( guess, hashed ):
|
||||
encoded_guess = b64encode( hashed_guess )
|
||||
return safe_str_cmp( encoded_original, encoded_guess )
|
||||
|
||||
|
||||
# Taken from https://github.com/mitsuhiko/python-pbkdf2/blob/master/pbkdf2.py
|
||||
# (c) Copyright 2011 by Armin Ronacher, BSD LICENSE
|
||||
|
||||
_pack_int = Struct('>I').pack
|
||||
|
||||
|
||||
|
||||
@@ -203,4 +203,5 @@ class ToolExecutionTracker( object ):
|
||||
trans.sa_session.flush()
|
||||
self.implicit_collections = collections
|
||||
|
||||
|
||||
__all__ = ( 'execute', )
|
||||
|
||||
@@ -107,5 +107,6 @@ def main():
|
||||
status = create_archive( history_attrs, dataset_attrs, job_attrs, out_file, gzip )
|
||||
print status
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
||||
@@ -2061,6 +2061,7 @@ class LibraryDatasetToolParameter( ToolParameter ):
|
||||
d['multiple'] = self.multiple
|
||||
return d
|
||||
|
||||
|
||||
parameter_types = dict(
|
||||
text=TextToolParameter,
|
||||
integer=IntegerToolParameter,
|
||||
|
||||
@@ -180,4 +180,5 @@ class DatasetCollectionMatcher( object ):
|
||||
break
|
||||
return valid
|
||||
|
||||
|
||||
__all__ = ( 'DatasetMatcher', 'DatasetCollectionMatcher' )
|
||||
|
||||
@@ -494,6 +494,7 @@ class CollectedDatasetMatch( object ):
|
||||
except IndexError:
|
||||
return self.collector.default_visible
|
||||
|
||||
|
||||
UNSET = object()
|
||||
|
||||
|
||||
|
||||
@@ -426,6 +426,7 @@ class MetadataInDataTableColumnValidator( Validator ):
|
||||
return
|
||||
raise ValueError( self.message )
|
||||
|
||||
|
||||
validator_types = dict( expression=ExpressionValidator,
|
||||
regex=RegexValidator,
|
||||
in_range=InRangeValidator,
|
||||
|
||||
@@ -13,6 +13,7 @@ def fail( msg ):
|
||||
print >> sys.stderr, msg
|
||||
sys.exit( 1 )
|
||||
|
||||
|
||||
# Default chrom, start, end, strand cols for a bed file
|
||||
BED_DEFAULT_COLS = 0, 1, 2, 5
|
||||
|
||||
|
||||
@@ -31,6 +31,7 @@ def print_(template, *args, **kwargs):
|
||||
template = template % kwargs
|
||||
sys.stdout.writelines(template)
|
||||
|
||||
|
||||
if sys.version_info < (3, 0):
|
||||
def reraise(t, e, tb):
|
||||
exec('raise t, e, tb', dict(t=t, e=e, tb=tb))
|
||||
@@ -188,6 +189,7 @@ class _App(_ObjectType):
|
||||
else:
|
||||
assert 0, "Protocol %r unknown" % context.protocol
|
||||
|
||||
|
||||
APP = _App()
|
||||
|
||||
|
||||
@@ -210,6 +212,7 @@ class _Filter(_ObjectType):
|
||||
else:
|
||||
assert 0, "Protocol %r unknown" % context.protocol
|
||||
|
||||
|
||||
FILTER = _Filter()
|
||||
|
||||
|
||||
@@ -232,6 +235,7 @@ class _Server(_ObjectType):
|
||||
else:
|
||||
assert 0, "Protocol %r unknown" % context.protocol
|
||||
|
||||
|
||||
SERVER = _Server()
|
||||
|
||||
|
||||
@@ -248,6 +252,7 @@ class _PipeLine(_ObjectType):
|
||||
app = filter_(app)
|
||||
return app
|
||||
|
||||
|
||||
PIPELINE = _PipeLine()
|
||||
|
||||
|
||||
@@ -259,6 +264,7 @@ class _FilterApp(_ObjectType):
|
||||
filter_ = context.filter_context.create()
|
||||
return filter_(next_app)
|
||||
|
||||
|
||||
FILTER_APP = _FilterApp()
|
||||
|
||||
|
||||
@@ -276,8 +282,8 @@ class _FilterWith(_App):
|
||||
return filter_(filtered(app))
|
||||
return composed
|
||||
|
||||
FILTER_WITH = _FilterWith()
|
||||
|
||||
FILTER_WITH = _FilterWith()
|
||||
|
||||
############################################################
|
||||
# Loaders
|
||||
@@ -302,6 +308,7 @@ def appconfig(uri, name=None, relative_to=None, global_conf=None):
|
||||
global_conf=global_conf)
|
||||
return context.config()
|
||||
|
||||
|
||||
_loaders = {}
|
||||
|
||||
|
||||
@@ -360,6 +367,7 @@ def _loadconfig(object_type, uri, path, name, relative_to,
|
||||
loader.update_defaults(global_conf, overwrite=False)
|
||||
return loader.get_context(object_type, name, global_conf)
|
||||
|
||||
|
||||
_loaders['config'] = _loadconfig
|
||||
|
||||
|
||||
@@ -368,6 +376,7 @@ def _loadegg(object_type, uri, spec, name, relative_to,
|
||||
loader = EggLoader(spec)
|
||||
return loader.get_context(object_type, name, global_conf)
|
||||
|
||||
|
||||
_loaders['egg'] = _loadegg
|
||||
|
||||
|
||||
@@ -377,6 +386,7 @@ def _loadfunc(object_type, uri, spec, name, relative_to,
|
||||
loader = FuncLoader(spec)
|
||||
return loader.get_context(object_type, name, global_conf)
|
||||
|
||||
|
||||
_loaders['call'] = _loadfunc
|
||||
|
||||
############################################################
|
||||
|
||||
@@ -1015,8 +1015,8 @@ def _turn_sigterm_into_systemexit():
|
||||
raise SystemExit
|
||||
signal.signal(signal.SIGTERM, handle_term)
|
||||
|
||||
# ---- from paste.script.command --------------------------------------
|
||||
|
||||
# ---- from paste.script.command --------------------------------------
|
||||
python_version = sys.version.splitlines()[0].strip()
|
||||
|
||||
parser = optparse.OptionParser(add_help_option=False,
|
||||
|
||||
@@ -1,24 +1,21 @@
|
||||
"""
|
||||
A simple WSGI application/framework.
|
||||
"""
|
||||
|
||||
import cgi # For FieldStorage
|
||||
import logging
|
||||
import os.path
|
||||
import socket
|
||||
import tarfile
|
||||
import tempfile
|
||||
import types
|
||||
import time
|
||||
import types
|
||||
from Cookie import SimpleCookie
|
||||
|
||||
import routes
|
||||
import webob
|
||||
|
||||
from Cookie import SimpleCookie
|
||||
|
||||
# We will use some very basic HTTP/wsgi utilities from the paste library
|
||||
from paste.request import get_cookies
|
||||
from paste import httpexceptions
|
||||
from paste.request import get_cookies
|
||||
from paste.response import HeaderDict
|
||||
|
||||
from galaxy.util import smart_str
|
||||
@@ -42,6 +39,8 @@ def __resource_with_deleted( self, member_name, collection_name, **kwargs ):
|
||||
self.connect( 'undelete_deleted_' + member_name, member_path + '/undelete', controller=collection_name, action='undelete',
|
||||
conditions=dict( method=['POST'] ) )
|
||||
self.resource( member_name, collection_name, **kwargs )
|
||||
|
||||
|
||||
routes.Mapper.resource_with_deleted = __resource_with_deleted
|
||||
|
||||
|
||||
@@ -267,6 +266,8 @@ class LazyProperty( object ):
|
||||
value = self.func( obj )
|
||||
setattr( obj, self.func.func_name, value )
|
||||
return value
|
||||
|
||||
|
||||
lazy_property = LazyProperty
|
||||
|
||||
|
||||
@@ -312,6 +313,8 @@ class FieldStorage( cgi.FieldStorage ):
|
||||
self.read_lines_to_outerboundary()
|
||||
else:
|
||||
self.read_lines_to_eof()
|
||||
|
||||
|
||||
cgi.FieldStorage = FieldStorage
|
||||
|
||||
|
||||
@@ -427,6 +430,7 @@ class Response( object ):
|
||||
else:
|
||||
return self.status
|
||||
|
||||
|
||||
# ---- Utilities ------------------------------------------------------------
|
||||
|
||||
CHUNK_SIZE = 2 ** 16
|
||||
|
||||
@@ -27,6 +27,8 @@ __all__ = ('ErrorMiddleware', 'handle_exception')
|
||||
class _NoDefault(object):
|
||||
def __repr__(self):
|
||||
return '<NoDefault>'
|
||||
|
||||
|
||||
NoDefault = _NoDefault()
|
||||
|
||||
|
||||
@@ -487,6 +489,7 @@ def error_template(head_html, exception, extra):
|
||||
def make_error_middleware(app, global_conf, **kw):
|
||||
return ErrorMiddleware(app, global_conf=global_conf, **kw)
|
||||
|
||||
|
||||
doc_lines = ErrorMiddleware.__doc__.splitlines(True)
|
||||
for i in range(len(doc_lines)):
|
||||
if doc_lines[i].strip().startswith('Settings'):
|
||||
|
||||
@@ -3,10 +3,10 @@
|
||||
"""
|
||||
Middleware for logging requests, using Apache combined log format
|
||||
"""
|
||||
|
||||
import logging
|
||||
import time
|
||||
import urllib
|
||||
|
||||
from six import string_types
|
||||
|
||||
|
||||
@@ -117,4 +117,5 @@ def make_filter(
|
||||
setup_console_handler=asbool(setup_console_handler),
|
||||
set_logger_level=set_logger_level)
|
||||
|
||||
|
||||
make_filter.__doc__ = TransLogger.__doc__
|
||||
|
||||
@@ -28,6 +28,8 @@ log = logging.getLogger( __name__ )
|
||||
|
||||
def oidlog( message, level=0 ):
|
||||
log.debug( message )
|
||||
|
||||
|
||||
if oidutil is not None:
|
||||
oidutil.log = oidlog
|
||||
|
||||
|
||||
@@ -52,6 +52,7 @@ def boolean_false(migrate_engine):
|
||||
else:
|
||||
raise Exception( 'Unable to convert data for unknown database type: %s' % migrate_engine.name )
|
||||
|
||||
|
||||
RepositoryReview_table = Table( "repository_review", metadata,
|
||||
Column( "id", Integer, primary_key=True ),
|
||||
Column( "create_time", DateTime, default=NOW ),
|
||||
|
||||
@@ -371,4 +371,5 @@ def __cleanup_param_values( inputs, values ):
|
||||
cleanup( "", inputs, values )
|
||||
return associations
|
||||
|
||||
|
||||
__all__ = ( 'summarize', 'extract_workflow' )
|
||||
|
||||
@@ -228,6 +228,7 @@ class WorkflowInvoker( object ):
|
||||
jobs = step.module.execute( self.trans, self.progress, self.workflow_invocation, step )
|
||||
return jobs
|
||||
|
||||
|
||||
STEP_OUTPUT_DELAYED = object()
|
||||
|
||||
|
||||
@@ -397,4 +398,5 @@ class WorkflowProgress( object ):
|
||||
except modules.DelayedWorkflowEvaluation:
|
||||
self.mark_step_outputs_delayed( step )
|
||||
|
||||
|
||||
__all__ = ( 'invoke', 'WorkflowRunConfig' )
|
||||
|
||||
@@ -42,4 +42,5 @@ class CoreWorkflowSchedulingPlugin( ActiveWorkflowSchedulingPlugin ):
|
||||
workflow_invocation=workflow_invocation,
|
||||
)
|
||||
|
||||
|
||||
__all__ = ( 'CoreWorkflowSchedulingPlugin', )
|
||||
|
||||
@@ -364,6 +364,7 @@ class fastqCSSangerRead( fastqSequencingRead ):
|
||||
else:
|
||||
self.quality = " ".join( map( str, self.get_decimal_quality_scores()[1:] ) )
|
||||
|
||||
|
||||
FASTQ_FORMATS = {}
|
||||
for format in [ fastqIlluminaRead, fastqSolexaRead, fastqSangerRead, fastqCSSangerRead ]:
|
||||
FASTQ_FORMATS[ format.format ] = format
|
||||
|
||||
@@ -63,6 +63,7 @@ class VariantCall40( VariantCall33 ):
|
||||
class VariantCall41( VariantCall40 ):
|
||||
version = 'VCFv4.1'
|
||||
|
||||
|
||||
# VCF Format version lookup dict
|
||||
VCF_FORMATS = {}
|
||||
for format in [ VariantCall33, VariantCall40, VariantCall41 ]:
|
||||
|
||||
@@ -131,6 +131,7 @@ def best_match(supported, header):
|
||||
weighted_matches.sort()
|
||||
return weighted_matches[-1][0][1] and weighted_matches[-1][1] or ''
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
import unittest
|
||||
|
||||
|
||||
@@ -146,6 +146,7 @@ class RepoWorkflowModuleFactory( WorkflowModuleFactory ):
|
||||
module_method_kwds[ 'tools_metadata' ] = tools_metadata
|
||||
return self.module_types[ type ].from_workflow_step( trans, step, **module_method_kwds )
|
||||
|
||||
|
||||
tool_shed_module_types = module_types.copy()
|
||||
tool_shed_module_types[ 'tool' ] = RepoToolModule
|
||||
module_factory = RepoWorkflowModuleFactory( tool_shed_module_types )
|
||||
|
||||
@@ -51,6 +51,7 @@ def dataset_is_terminal( hda_id, api_key, galaxy_url ):
|
||||
dataset_state = get_dataset_state( hda_id, api_key, galaxy_url )
|
||||
return dataset_state in [ 'ok', 'error' ]
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
parser = optparse.OptionParser()
|
||||
parser.add_option( '-k', '--key', dest='api_key', action='store', type="string", default=None, help='API Key.' )
|
||||
|
||||
@@ -75,6 +75,7 @@ def main(api_key, api_url, in_folder, out_folder, data_library, workflow):
|
||||
shutil.move(fullpath, os.path.join(out_folder, fname))
|
||||
time.sleep(10)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
try:
|
||||
api_key = sys.argv[1]
|
||||
|
||||
@@ -51,6 +51,7 @@ def main( options ):
|
||||
else:
|
||||
print("Invalid tool_shed / name / owner / changeset_revision.")
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
parser = argparse.ArgumentParser( description='Import workflows contained in an installed tool shed repository via the Galaxy API.' )
|
||||
parser.add_argument( "-a", "--api", dest="api", required=True, help="API Key" )
|
||||
|
||||
@@ -51,6 +51,7 @@ def main( options ):
|
||||
data[ 'install_tool_dependencies' ] = options.install_tool_dependencies
|
||||
submit( options.api, '%s%s' % ( options.local_url.rstrip( '/' ), '/api/tool_shed_repositories/new/install_repository_revision' ), data )
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
parser = argparse.ArgumentParser( description='Installation of tool shed repositories via the Galaxy API.' )
|
||||
parser.add_argument( "-u", "--url", dest="tool_shed_url", required=True, help="Tool Shed URL" )
|
||||
|
||||
@@ -71,6 +71,7 @@ def main(api_key, api_url, in_folder, data_library, uuid_field=None):
|
||||
print("Loading", fullpath)
|
||||
load_file(fullpath, api_key, api_url, library_id, library_folder_id, uuid_field)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument("api_key", help="API KEY")
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user