當前位置: 首頁>>代碼示例>>Python>>正文


Python java.Env類代碼示例

本文整理匯總了Python中hail.java.Env的典型用法代碼示例。如果您正苦於以下問題:Python Env類的具體用法?Python Env怎麽用?Python Env使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了Env類的11個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: _convert_to_j

 def _convert_to_j(self, annotation):
     if annotation is not None:
         return scala_object(Env.hail().annotations, 'Annotation').fromSeq(
             Env.jutils().arrayListToISeq(
                 [f.typ._convert_to_j(annotation.get(f.name)) for f in self.fields]
             )
         )
     else:
         return annotation
開發者ID:Fedja,項目名稱:hail,代碼行數:9,代碼來源:expr.py

示例2: __init__

 def __init__(self, element_type):
     """
     :param :class:`.Type` element_type: Hail type of set element
     """
     jtype = scala_object(Env.hail().expr, 'TSet').apply(element_type._jtype)
     self.element_type = element_type
     super(TSet, self).__init__(jtype)
開發者ID:Fedja,項目名稱:hail,代碼行數:7,代碼來源:expr.py

示例3: parse

    def parse(string):
        """Parses a locus object from a CHR:POS string.

        :rtype: :class:`.Locus`
        """

        return Locus._from_java(scala_object(Env.hail().variant, 'Locus').parse(string))
開發者ID:Fedja,項目名稱:hail,代碼行數:7,代碼來源:variant.py

示例4: __init__

 def __init__(self, contig, position):
     if isinstance(contig, int):
         contig = str(contig)
     jrep = scala_object(Env.hail().variant, 'Locus').apply(contig, position)
     self._init_from_java(jrep)
     self._contig = contig
     self._position = position
開發者ID:jbloom22,項目名稱:hail,代碼行數:7,代碼來源:variant.py

示例5: hadoop_copy

def hadoop_copy(src, dest):
    """Copy a file through the Hadoop filesystem API.
    Supports distributed file systems like hdfs, gs, and s3.
    
    **Examples**
    
    >>> hadoop_copy('gs://hail-common/LCR.interval_list', 'file:///mnt/data/LCR.interval_list') # doctest: +SKIP
    
    **Notes**
    
    The provided source and destination file paths must be URIs
    (uniform resource identifiers).    
    
    :param str src: Source file URI. 
    :param str dest: Destination file URI.
    """
    Env.jutils().copyFile(src, dest, Env.hc()._jhc)
開發者ID:jbloom22,項目名稱:hail,代碼行數:17,代碼來源:utils.py

示例6: _convert_to_py

 def _convert_to_py(self, annotation):
     if annotation:
         lst = Env.jutils().iterableToArrayList(annotation)
         d = dict()
         for x in lst:
             d[self.key_type._convert_to_py(x._1())] = self.value_type._convert_to_py(x._2())
         return d
     else:
         return annotation
開發者ID:Fedja,項目名稱:hail,代碼行數:9,代碼來源:expr.py

示例7: parse

    def parse(cls, string):
        """Parses a locus object from a CHR:POS string.

        **Examples**

        >>> l1 = Locus.parse('1:101230')
        >>> l2 = Locus.parse('X:4201230')

        :rtype: :class:`.Locus`
        """

        return Locus._from_java(scala_object(Env.hail().variant, 'Locus').parse(string))
開發者ID:jbloom22,項目名稱:hail,代碼行數:12,代碼來源:variant.py

示例8: formatted

 def formatted(self):
     now = datetime.datetime.now()
     history = "# {}\n# version: {}\n\n".format(now.isoformat(), Env.hc().version)
     history += "from hail import *\n\n"
     for stmt in self.statements:
         history += (stmt + "\n\n")
     history += ("(" + self.expr + ")")
     try:
         import autopep8
         return autopep8.fix_code(history)
     except ImportError:
         return history
開發者ID:jbloom22,項目名稱:hail,代碼行數:12,代碼來源:history.py

示例9: _init_from_java

    def _init_from_java(self, jtype):

        jfields = Env.jutils().iterableToArrayList(jtype.fields())
        self.fields = [Field(f.name(), Type._from_java(f.typ()), dict(f.attrsJava())) for f in jfields]
開發者ID:Fedja,項目名稱:hail,代碼行數:4,代碼來源:expr.py

示例10: functions_rst

 def functions_rst(self, file_name):
     Env.hail().utils.FunctionDocumentation.makeFunctionsDocs(file_name)
開發者ID:jbloom22,項目名稱:hail,代碼行數:2,代碼來源:utils.py

示例11: _jrep

 def _jrep(self):
     return Env.hail().stats.TruncatedBetaDist.apply(float(self.a), float(self.b), float(self.minVal), float(self.maxVal))
開發者ID:jbloom22,項目名稱:hail,代碼行數:2,代碼來源:stats.py


注:本文中的hail.java.Env類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。