Skip to content

Commit fbffdb6

Browse files
committed
Reorg, incl splitting up util and adding ADAM variant conversion
Also moved old code to a temporary DELETE_ME dir
1 parent fb138b2 commit fbffdb6

File tree

12 files changed

+309
-338
lines changed

12 files changed

+309
-338
lines changed
File renamed without changes.
File renamed without changes.
File renamed without changes.

datasets/dbsnp/toast.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,17 @@
1616
# limitations under the License.
1717

1818
import json
19-
import os
2019
import os.path as osp
2120
from os.path import join as pjoin
2221

23-
from eggo.datasets import download_dataset_with_hadoop
22+
from eggo.datasets import download_dataset_with_hadoop, vcf_to_adam_variants
2423

2524

26-
hdfs_path = '/user/ec2-user/dbsnp/raw'
25+
raw_data_path = '/user/ec2-user/dbsnp/raw'
26+
adam_variants_path = '/user/ec2-user/dbsnp/variants/adam/basic'
2727

2828
with open(pjoin(osp.dirname(__file__), 'datapackage.json')) as ip:
2929
datapackage = json.load(ip)
3030

31-
download_dataset_with_hadoop(datapackage, hdfs_path)
31+
download_dataset_with_hadoop(datapackage, raw_data_path)
32+
vcf_to_adam_variants(raw_data_path, adam_variants_path)

eggo/cluster/cli.py

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,18 @@
1414
# See the License for the specific language governing permissions and
1515
# limitations under the License.
1616

17+
import os.path as osp
18+
1719
from click import group, option, Choice
20+
from fabric.api import execute, get
1821

1922
import eggo.cluster.director as director
20-
from eggo.cluster.config import (
21-
DEFAULT_DIRECTOR_CONF_PATH, DEFAULT_CF_TEMPLATE_PATH)
23+
24+
25+
DEFAULT_DIRECTOR_CONF_PATH = osp.join(
26+
osp.dirname(__file__), 'resources', 'aws.conf')
27+
DEFAULT_CF_TEMPLATE_PATH = osp.join(
28+
osp.dirname(__file__), 'resources', 'cloudformation.template')
2229

2330

2431
# reusable options
@@ -93,7 +100,7 @@ def login(region, stack_name, node):
93100
@option_stack_name
94101
def describe(region, stack_name):
95102
"""Describe the EC2 instances in the cluster"""
96-
director.list(region, stack_name)
103+
director.describe(region, stack_name)
97104

98105

99106
@cli.command()
@@ -109,7 +116,6 @@ def web_proxy(region, stack_name):
109116
@option_stack_name
110117
def get_director_log(region, stack_name):
111118
"""DEBUG: get the Director application log from the launcher instance"""
112-
from fabric.api import execute, get
113119
ec2_conn = director.create_ec2_connection(region)
114120
hosts = [director.get_launcher_instance(ec2_conn, stack_name).ip_address]
115121
execute(
@@ -124,7 +130,6 @@ def get_director_log(region, stack_name):
124130
@option('-b', '--branch', default='master', show_default=True)
125131
def reinstall_eggo(region, stack_name, fork, branch):
126132
"""DEBUG: reinstall a specific version of eggo"""
127-
from fabric.api import execute
128133
ec2_conn = director.create_ec2_connection(region)
129134
hosts = [director.get_master_instance(ec2_conn, stack_name).ip_address]
130135
execute(

0 commit comments

Comments
 (0)