Install bedtools.
[lightning.git] / example-su92l-1kg.sh
1 #!/bin/bash
2
3 set -ex
4
5 PATH="${GOPATH:-${HOME}/go}/bin:${PATH}"
6 go install
7 lightning build-docker-image
8 arv keep docker lightning-runtime
9
10 project=su92l-j7d0g-jzei0m9yvgauhjf
11 gvcf=su92l-4zz18-ykpcoea5nisz74f
12 fasta=su92l-4zz18-s3e6as6uzsoocsb
13 tags=su92l-4zz18-92bx4zjg5hgs3yc
14
15 unfiltered=$(
16     lightning import       -project ${project} \
17        -tag-library ${tags}/tagset.fa.gz \
18        ${fasta})
19 filtered=$(
20     lightning filter       -project ${project} \
21        -i ${unfiltered} \
22        -min-coverage 0.9 -max-variants 30)
23 numpy=$(
24     lightning export-numpy -project ${project} \
25        -i ${filtered})
26 pca=$(
27     lightning pca          -project ${project} \
28        -i ${numpy})
29 plot=$(
30     lightning plot         -project ${project} \
31        -i ${pca} \
32        -labels-csv ${gvcf}/sample_info.csv \
33        -sample-fasta-dir ${fasta})
34 echo >&2 "https://workbench2.${plot%%-*}.arvadosapi.com/collections/${plot}"
35 echo ${plot%%/*}