Skip to content

Commit

Permalink
Merge pull request #231 from hammerlab/adam-console
Browse files Browse the repository at this point in the history
Helper scripts to run an ADAM Console.
  • Loading branch information
massie committed Apr 29, 2014
2 parents bc7a51e + cac8688 commit 9f268ed
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
8 changes: 8 additions & 0 deletions scripts/adam-console.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
PROJECT_ROOT="$DIR/.."
VERSION=$(grep "<version>" "$PROJECT_ROOT/pom.xml" | head -2 | tail -1 | sed 's/ *<version>//g' | sed 's/<\/version>//g')
ADAM_JAR=$PROJECT_ROOT/adam-cli/target/adam-$VERSION.jar

SPARK_CLASSPATH=$ADAM_JAR spark-shell -i:$DIR/scala-console.scala
15 changes: 15 additions & 0 deletions scripts/scala-console.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import org.bdgenomics.adam.avro.ADAMRecord
import org.bdgenomics.adam.avro.ADAMNucleotideContigFragment
import org.bdgenomics.adam.avro.ADAMPileup
import org.bdgenomics.adam.avro.ADAMNestedPileup
import org.bdgenomics.adam.avro.ADAMContig
import org.bdgenomics.adam.avro.ADAMVariant
import org.bdgenomics.adam.avro.VariantCallingAnnotations
import org.bdgenomics.adam.avro.ADAMGenotype
import org.bdgenomics.adam.avro.VariantEffect
import org.bdgenomics.adam.avro.ADAMDatabaseVariantAnnotation
import org.apache.spark.rdd.RDD
import org.bdgenomics.adam.rdd.ADAMContext
import org.bdgenomics.adam.rdd.ADAMContext._
println("\nYou can call ADAMContext methods on sc")
println("Load a file using: sc.adamLoad(\"<Path to file>\");")

0 comments on commit 9f268ed

Please sign in to comment.