Skip to content

Commit

Permalink
Moved org.broadinstitute.hail to is.hail. (hail-is#1265)
Browse files Browse the repository at this point in the history
  • Loading branch information
cseed authored Jan 17, 2017
1 parent ff7ba73 commit 967e053
Show file tree
Hide file tree
Showing 313 changed files with 1,148 additions and 1,145 deletions.
12 changes: 6 additions & 6 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ buildScan {
licenseAgree = 'yes'
}

mainClassName = "org.broadinstitute.hail.driver.Main"
mainClassName = "is.hail.driver.Main"

String sparkVersion = System.getProperty("spark.version","2.0.2")

Expand Down Expand Up @@ -231,15 +231,15 @@ tasks.withType(ShadowJar) {
manifest {
attributes 'Implementation-Title': 'Hail',
'Implementation-Version': '0.0.1-SNAPSHOT',
'Main-Class': 'org.broadinstitute.hail.driver.Main'
'Main-Class': 'is.hail.driver.Main'
}
baseName = project.name + '-all'
mergeServiceFiles()
zip64 true
// conflict with version in default Hadoop/Spark install
relocate 'org.apache.http', 'org.broadinstitute.hail.relocated.org.apache.http'
relocate 'com.google.common', 'org.broadinstitute.hail.relocated.com.google.common'
relocate 'org.objectweb', 'org.broadinstitute.hail.relocated.org.objectweb'
relocate 'org.apache.http', 'is.hail.relocated.org.apache.http'
relocate 'com.google.common', 'is.hail.relocated.com.google.common'
relocate 'org.objectweb', 'is.hail.relocated.org.objectweb'
}

shadowJar {
Expand Down Expand Up @@ -413,7 +413,7 @@ task makeTutorial(type: Exec, dependsOn: setupDocsDirs) {
}

task runCommandsJson(type: JavaExec, dependsOn: ['setupDocsDirs', 'classes']) {
main 'org.broadinstitute.hail.driver.Main'
main 'is.hail.driver.Main'
args ('commandmeta', '-o', 'build/tmp/docs/commandOptions.json')
classpath sourceSets.main.runtimeClasspath
}
Expand Down
13 changes: 8 additions & 5 deletions python/hail/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,10 @@ def __init__(self, sc=None, appName="Hail", master=None, local='local[*]',
self.gateway = SparkContext._gateway
self.jvm = SparkContext._jvm

driver = scala_package_object(self.jvm.org.broadinstitute.hail.driver)
# hail package
self.hail = getattr(self.jvm, 'is').hail

driver = scala_package_object(self.hail.driver)

if not sc:
self.jsc = driver.configureAndCreateSparkContext(
Expand All @@ -67,16 +70,16 @@ def __init__(self, sc=None, appName="Hail", master=None, local='local[*]',
self.sql_context = SQLContext(self.sc, self.jsql_context)

def _jstate(self, jvds):
return self.jvm.org.broadinstitute.hail.driver.State(
return self.hail.driver.State(
self.jsc, self.jsql_context, jvds, scala_object(self.jvm.scala.collection.immutable, 'Map').empty())

def _raise_py4j_exception(self, e):
msg = scala_package_object(self.jvm.org.broadinstitute.hail.utils).getMinimalMessage(e.java_exception)
msg = scala_package_object(self.hail.utils).getMinimalMessage(e.java_exception)
raise FatalError(msg, e.java_exception)

def run_command(self, vds, pargs):
jargs = jarray(self.gateway, self.jvm.java.lang.String, pargs)
t = self.jvm.org.broadinstitute.hail.driver.ToplevelCommands.lookup(jargs)
t = self.hail.driver.ToplevelCommands.lookup(jargs)
cmd = t._1()
cmd_args = t._2()
jstate = self._jstate(vds.jvds if vds != None else None)
Expand Down Expand Up @@ -337,7 +340,7 @@ def import_keytable(self, path, key_names, npartitions=None, config=None):
if not config:
config = TextTableConfig()

return KeyTable(self, self.jvm.org.broadinstitute.hail.keytable.KeyTable.importTextTable(
return KeyTable(self, self.hail.keytable.KeyTable.importTextTable(
self.jsc, jarray(self.gateway, self.jvm.java.lang.String, path_args), key_names, npartitions, config.to_java(self)))

def import_plink(self, bed, bim, fam, npartitions=None, delimiter='\\\\s+', missing='NA', quantpheno=False):
Expand Down
12 changes: 6 additions & 6 deletions python/hail/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -650,7 +650,7 @@ def annotate_samples_vds(self, right, root=None, code=None):

return VariantDataset(
self.hc,
self.hc.jvm.org.broadinstitute.hail.driver.AnnotateSamplesVDS.annotate(
self.hc.hail.driver.AnnotateSamplesVDS.annotate(
self.jvds, right.jvds, code, root))

def annotate_variants_bed(self, input, root, all=False):
Expand Down Expand Up @@ -968,7 +968,7 @@ def annotate_variants_vds(self, other, code=None, root=None):

return VariantDataset(
self.hc,
self.hc.jvm.org.broadinstitute.hail.driver.AnnotateVariantsVDS.annotate(
self.hc.hail.driver.AnnotateVariantsVDS.annotate(
self.jvds, other.jvds, code, root))

def cache(self):
Expand All @@ -994,7 +994,7 @@ def concordance(self, right):
"""

result = self.hc.jvm.org.broadinstitute.hail.driver.Concordance.calculate(
result = self.hc.hail.driver.Concordance.calculate(
self.jvds, right.jvds)
return (VariantDataset(self.hc, result._1()),
VariantDataset(self.hc, result._2()))
Expand All @@ -1008,7 +1008,7 @@ def count(self, genotypes=False):
"""

try:
return (scala_package_object(self.hc.jvm.org.broadinstitute.hail.driver)
return (scala_package_object(self.hc.hail.driver)
.count(self.jvds, genotypes)
.toJavaMap())
except Py4JJavaError as e:
Expand Down Expand Up @@ -1956,7 +1956,7 @@ def join(self, right):
"""
try:
return VariantDataset(self.hc, self.hc.jvm.org.broadinstitute.hail.driver.Join.join(self.jvds, right.jvds))
return VariantDataset(self.hc, self.hc.hail.driver.Join.join(self.jvds, right.jvds))
except Py4JJavaError as e:
self._raise_py4j_exception(e)

Expand Down Expand Up @@ -3176,7 +3176,7 @@ def make_keytable(self, variant_condition, genotype_condition, key_names):
if isinstance(genotype_condition, list):
genotype_condition = ','.join(genotype_condition)

jkt = (scala_package_object(self.hc.jvm.org.broadinstitute.hail.driver)
jkt = (scala_package_object(self.hc.hail.driver)
.makeKT(self.jvds, variant_condition, genotype_condition,
jarray(self.hc.gateway, self.hc.jvm.java.lang.String, key_names)))
return KeyTable(self.hc, jkt)
2 changes: 1 addition & 1 deletion python/hail/keytable.py
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,7 @@ def to_dataframe(self, expand=True, flatten=True):
self._raise_py4j_exception(e)

def export_mongodb(self, mode='append'):
(scala_package_object(self.hc.jvm.org.broadinstitute.hail.driver)
(scala_package_object(self.hc.hail.driver)
.exportMongoDB(self.hc.jsql_context, self.jkt, mode))

def explode(self, column_names):
Expand Down
6 changes: 3 additions & 3 deletions python/hail/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ def to_java(self, hc):
:param :class:`.HailContext` The Hail context.
"""
try:
return hc.jvm.org.broadinstitute.hail.utils.TextTableConfiguration.apply(self.types, self.comment,
self.delimiter, self.missing,
self.noheader, self.impute)
return hc.hail.utils.TextTableConfiguration.apply(self.types, self.comment,
self.delimiter, self.missing,
self.noheader, self.impute)
except Py4JJavaError as e:
self._raise_py4j_exception(e)
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.broadinstitute.hail.io.compress;
package is.hail.io.compress;

import org.apache.hadoop.io.compress.*;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.broadinstitute.hail.io.compress;
package is.hail.io.compress;

public class BGzipCodecGZ extends BGzipCodec {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.broadinstitute.hail.io.compress;
package is.hail.io.compress;

import org.apache.hadoop.fs.Seekable;
import org.apache.hadoop.io.compress.SplitCompressionInputStream;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package org.broadinstitute.hail.annotations
package is.hail.annotations

import org.apache.spark.sql.Row
import org.broadinstitute.hail.expr._
import org.broadinstitute.hail.utils.Interval
import org.broadinstitute.hail.variant._
import is.hail.expr._
import is.hail.utils.Interval
import is.hail.variant._

object Annotation {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.broadinstitute.hail
package is.hail

package object annotations {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.broadinstitute.hail.asm4s
package is.hail.asm4s

import java.lang.reflect.{Constructor, Field, Method, Modifier}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.broadinstitute.hail.asm4s
package is.hail.asm4s

import java.io.PrintWriter

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.broadinstitute.hail
package is.hail

import java.lang.reflect.Method

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.broadinstitute.hail.check
package is.hail.check

import scala.collection.generic.CanBuildFrom
import scala.math.Numeric.Implicits._
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.broadinstitute.hail.check
package is.hail.check

import breeze.linalg.DenseMatrix
import breeze.storage.Zero
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package org.broadinstitute.hail.check
package is.hail.check

import org.broadinstitute.hail.utils._
import is.hail.utils._
import org.apache.commons.math3.random.RandomDataGenerator

import scala.collection.mutable.ArrayBuffer
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package org.broadinstitute.hail.driver

import org.broadinstitute.hail.utils._
import org.broadinstitute.hail.annotations.Annotation
import org.broadinstitute.hail.expr._
import org.broadinstitute.hail.io.annotators.IntervalListAnnotator
import org.broadinstitute.hail.methods._
import org.broadinstitute.hail.utils.Interval
import org.broadinstitute.hail.variant._
package is.hail.driver

import is.hail.utils._
import is.hail.annotations.Annotation
import is.hail.expr._
import is.hail.io.annotators.IntervalListAnnotator
import is.hail.methods._
import is.hail.utils.Interval
import is.hail.variant._
import org.kohsuke.args4j.{Option => Args4jOption}

import scala.collection.mutable
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.broadinstitute.hail.driver
package is.hail.driver

object AnnotateAlleles extends SuperCommand {
def name = "annotatealleles"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package org.broadinstitute.hail.driver
package is.hail.driver

import org.broadinstitute.hail.utils._
import org.broadinstitute.hail.annotations._
import org.broadinstitute.hail.expr._
import org.broadinstitute.hail.methods.Aggregators
import is.hail.utils._
import is.hail.annotations._
import is.hail.expr._
import is.hail.methods.Aggregators
import org.kohsuke.args4j.{Option => Args4jOption}

import scala.collection.mutable
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.broadinstitute.hail.driver
package is.hail.driver

object AnnotateGlobal extends SuperCommand {
def name = "annotateglobal"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package org.broadinstitute.hail.driver
package is.hail.driver

import org.broadinstitute.hail.annotations._
import org.broadinstitute.hail.expr._
import org.broadinstitute.hail.methods.Aggregators
import org.broadinstitute.hail.variant.Variant
import is.hail.annotations._
import is.hail.expr._
import is.hail.methods.Aggregators
import is.hail.variant.Variant
import org.kohsuke.args4j.{Option => Args4jOption}

import scala.collection.mutable
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package org.broadinstitute.hail.driver
package is.hail.driver

import org.broadinstitute.hail.utils._
import org.broadinstitute.hail.annotations._
import org.broadinstitute.hail.expr
import org.broadinstitute.hail.expr._
import org.broadinstitute.hail.methods.Aggregators
import is.hail.utils._
import is.hail.annotations._
import is.hail.expr
import is.hail.expr._
import is.hail.methods.Aggregators
import org.kohsuke.args4j.{Option => Args4jOption}

import scala.collection.mutable
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package org.broadinstitute.hail.driver
package is.hail.driver

import org.broadinstitute.hail.annotations._
import org.broadinstitute.hail.expr._
import org.broadinstitute.hail.utils.{TextTableOptions, TextTableReader}
import is.hail.annotations._
import is.hail.expr._
import is.hail.utils.{TextTableOptions, TextTableReader}
import org.kohsuke.args4j.{Option => Args4jOption}

object AnnotateGlobalTable extends Command with JoinAnnotator {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.broadinstitute.hail.driver
package is.hail.driver

object AnnotateSamples extends SuperCommand {
def name = "annotatesamples"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package org.broadinstitute.hail.driver
package is.hail.driver

import org.broadinstitute.hail.utils._
import org.broadinstitute.hail.annotations.{Annotation, Inserter}
import org.broadinstitute.hail.expr._
import org.broadinstitute.hail.methods.Aggregators
import is.hail.utils._
import is.hail.annotations.{Annotation, Inserter}
import is.hail.expr._
import is.hail.methods.Aggregators
import org.kohsuke.args4j.{Option => Args4jOption}

import scala.collection.mutable
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package org.broadinstitute.hail.driver
package is.hail.driver

import org.broadinstitute.hail.utils._
import org.broadinstitute.hail.annotations.Annotation
import org.broadinstitute.hail.expr.Parser
import org.broadinstitute.hail.io.plink.{FamFileConfig, PlinkLoader}
import is.hail.utils._
import is.hail.annotations.Annotation
import is.hail.expr.Parser
import is.hail.io.plink.{FamFileConfig, PlinkLoader}
import org.kohsuke.args4j.{Option => Args4jOption}

object AnnotateSamplesFam extends Command {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package org.broadinstitute.hail.driver
package is.hail.driver

import org.broadinstitute.hail.utils._
import org.broadinstitute.hail.annotations.Annotation
import org.broadinstitute.hail.expr._
import is.hail.utils._
import is.hail.annotations.Annotation
import is.hail.expr._
import org.kohsuke.args4j.{Option => Args4jOption}

object AnnotateSamplesList extends Command {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package org.broadinstitute.hail.driver
package is.hail.driver

import org.apache.spark.sql.Row
import org.broadinstitute.hail.utils._
import org.broadinstitute.hail.annotations._
import org.broadinstitute.hail.expr._
import org.broadinstitute.hail.utils._
import is.hail.utils._
import is.hail.annotations._
import is.hail.expr._
import is.hail.utils._
import org.kohsuke.args4j.{Option => Args4jOption}

object AnnotateSamplesTable extends Command with JoinAnnotator {
Expand Down
Loading

0 comments on commit 967e053

Please sign in to comment.