Created
March 5, 2015 23:19
-
-
Save nikhilRP/aa0bea5398e6aa029acd to your computer and use it in GitHub Desktop.
Shell script to download and transfrom ENCODE files to ADAM format
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Files.txt contains URLs for the files | |
# Make sure you set SPARK_HOME | |
while read line; do | |
url=$line | |
filename=$(basename "$url") | |
wget "$url" | |
hadoop fs -put $filename /user/mapr/encoded/ | |
./../adam/bin/adam-submit transform /user/mapr/encoded/$filename /user/mapr/encoded/"${filename/.bam/.adam}" | |
hadoop fs -rm /user/mapr/encoded/$filename | |
rm $filename | |
done < files.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment