From fe18549661c594c87fa094087f8aa6b4e1921b53 Mon Sep 17 00:00:00 2001 From: Alyssa Morrow Date: Tue, 19 Sep 2017 09:48:05 -0700 Subject: [PATCH 1/2] updated example to run locally with hdfs --- README.md | 2 +- example-files/run-example.sh | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 2e7ab6f67..c40973623 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ $ mvn clean package -DskipTests ## Running mango mango is packaged via [appassembler](http://mojo.codehaus.org/appassembler/appassembler-maven-plugin/) and includes all necessary dependencies. -Running an example script: +Running an example script locally: ``` From the main folder of mango, run ./example-files/run-example.sh to see a demonstration of chromosome 17, region 7500000-7515000. ``` diff --git a/example-files/run-example.sh b/example-files/run-example.sh index a6640fc6f..c1c68bc70 100755 --- a/example-files/run-example.sh +++ b/example-files/run-example.sh @@ -1,7 +1,12 @@ -bin/mango-submit ./example-files/hg19.17.2bit \ +# get current local directory +DIR=$( cd $( dirname ${BASH_SOURCE[0]} ) && pwd ) + +# reference 2 bit does not need 'file:' because it is only read from the master +bin/mango-submit ${DIR}/hg19.17.2bit \ -genes http://www.biodalliance.org/datasets/ensGene.bb \ -reads ./example-files/chr17.7500000-7515000.sam.adam \ -variants ./example-files/ALL.chr17.7500000-7515000.phase3_shapeit2_mvncall_integrated_v5a.20130502.genotypes.vcf \ -show_genotypes \ --discover +-discover \ +-port 8080 From 832416db7bcaa9d02bced04a864a7ab6aaa3ce3c Mon Sep 17 00:00:00 2001 From: Alyssa Morrow Date: Tue, 19 Sep 2017 09:53:46 -0700 Subject: [PATCH 2/2] added hdfs example 3 added hdfs files --- README.md | 8 +++++++- example-files/run-hdfs.sh | 11 +++++++++++ example-files/{run-example.sh => run-local.sh} | 0 3 files changed, 18 insertions(+), 1 deletion(-) create mode 100755 example-files/run-hdfs.sh rename example-files/{run-example.sh => run-local.sh} (100%) diff --git a/README.md b/README.md index c40973623..366da9ad9 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ mango is packaged via [appassembler](http://mojo.codehaus.org/appassembler/appas Running an example script locally: ``` -From the main folder of mango, run ./example-files/run-example.sh to see a demonstration of chromosome 17, region 7500000-7515000. +From the main folder of mango, run ./example-files/run-local.sh to see a demonstration of chromosome 17, region 7500000-7515000. ``` For help launching the script, run `bin/mango-submit -h` ```` @@ -63,4 +63,10 @@ Using SPARK_SUBMIT=/Applications/spark-1.6.1-bin-hadoop2.4/bin/spark-submit View the visualization at: 8080 Quit at: /quit ``` + +Running an example script on hdfs: +``` +From the main folder of mango, run ./example-files/run-hdfs.sh to see a demonstration of chromosome 17, region 7500000-7515000. +``` + Note that for logging, you must use the /quit url for the log to be produced. diff --git a/example-files/run-hdfs.sh b/example-files/run-hdfs.sh new file mode 100755 index 000000000..84791d748 --- /dev/null +++ b/example-files/run-hdfs.sh @@ -0,0 +1,11 @@ +# get current local directory +DIR=$( cd $( dirname ${BASH_SOURCE[0]} ) && pwd ) +hdfs dfs -put ${DIR} + +bin/mango-submit ${DIR}/hg19.17.2bit \ +-genes http://www.biodalliance.org/datasets/ensGene.bb \ +-reads example-files/chr17.7500000-7515000.bam.adam \ +-variants example-files/ALL.chr17.7500000-7515000.phase3_shapeit2_mvncall_integrated_v5a.20130502.genotypes.vcf \ +-show_genotypes \ +-discover \ +-port 8080 diff --git a/example-files/run-example.sh b/example-files/run-local.sh similarity index 100% rename from example-files/run-example.sh rename to example-files/run-local.sh