5 PATH="${GOPATH:-${HOME}/go}/bin:${PATH}"
7 lightning build-docker-image
8 arv keep docker lightning-runtime
11 project=su92l-j7d0g-jzei0m9yvgauhjf
12 ref_fa=su92l-4zz18-u77iyyy7cb05xqv/hg38.fa.gz
13 ref37_fa=su92l-4zz18-caw3g2ji89jxix8/human_g1k_v37.fasta.gz
14 gvcf=${HOME}/keep/by_id/su92l-4zz18-bgyq36m6gctk63q
15 info=su92l-4zz18-ykpcoea5nisz74f
16 tagset=su92l-4zz18-92bx4zjg5hgs3yc/tagset.fa.gz
18 genome=$(lightning ref2genome -project ${project} -priority ${priority} -ref ${ref_fa}) ; echo genome=${genome}
19 fasta=$(lightning vcf2fasta -project ${project} -priority ${priority} -ref ${ref_fa} -genome ${genome} -mask=true ${gvcf}) ; echo fasta=${fasta}
20 # fasta=su92l-4zz18-9nq05jifgz7iult
22 ref37_lib=$(lightning import -project ${project} -priority ${priority} -tag-library ${tagset} -skip-ooo=true -output-tiles=true -save-incomplete-tiles=true ${ref37_fa}) ; echo ref37_lib=${ref37_lib}
23 # ref37_lib=su92l-4zz18-vnhlv3g6yp1azls/library.gob
25 # ref37_lib=su92l-4zz18-v0xfm2o1tu3u1w3/library.gob.gz
28 ref38_lib=$(lightning import -project ${project} -priority ${priority} -tag-library ${tagset} -skip-ooo=true -output-tiles=true -save-incomplete-tiles=true ${ref_fa}) ; echo ref38_lib=${ref38_lib}
29 # ref38_lib=su92l-4zz18-swebknshfwsvys6/library.gob
31 bed37=$(lightning export -project ${project} -priority ${priority} -i ${ref37_lib} -output-format hgvs -ref /mnt/$ref37_fa -output-bed hg37.bed) ; echo bed37=${bed37}
32 # bed37=su92l-4zz18-gb3hihiiaz0xaz9/export.csv
34 bed38=$(lightning export -project ${project} -priority ${priority} -i ${ref38_lib} -output-format hgvs -ref /mnt/$ref_fa -output-bed hg38.bed) ; echo bed38=${bed38}
36 unfiltered=$(lightning import -project ${project} -priority ${priority} -tag-library ${tagset} -skip-ooo=true -output-tiles=true ${fasta}) ; echo unfiltered=${unfiltered}
37 # unfiltered=su92l-4zz18-mz3546bib6oj1gg/library.gob
38 # unfiltered=su92l-4zz18-72ovi5qrderxudv/library.gob
39 # 24674s @ pre-38e6e7c
40 # unfiltered=su92l-4zz18-ywhkc1hgdzxwp5u/library.gob
41 # 18497s @ 64vcpu bf0968a
42 # _____s @ 32vcpu 83983ad
45 merged=$(lightning merge -project ${project} -priority ${priority} ${unfiltered} ${ref37_lib}) ; echo merged=${merged}
46 # merged=su92l-4zz18-svw5xqe5g0ct2v1/library.gob
49 exportvcf=$(lightning export -project ${project} -priority ${priority} -i ${merged} -output-format vcf -ref /mnt/su92l-4zz18-caw3g2ji89jxix8/human_g1k_v37.fasta.gz -output-bed export.bed) ; echo exportvcf=${exportvcf}
50 # exportvcf=su92l-4zz18-gz4svr6zyvipueu/export.csv
53 exporthgvs=$(lightning export -project ${project} -priority ${priority} -i ${merged38} -output-format hgvs -ref /mnt/su92l-4zz18-u77iyyy7cb05xqv/hg38.fa.gz -output-bed hg38.bed) ; echo exporthgvs=${exporthgvs}
57 stats=$(lightning stats -project ${project} -priority ${priority} -i ${merged}) ; echo stats=${stats}
59 filtered=$(lightning filter -project ${project} -priority ${priority} -i ${merged} -min-coverage "0.9" -max-variants "30") ; echo filtered=${filtered}
61 annotations=$(lightning annotate -project ${project} -priority ${priority} -i ${merged}) ; echo annotations=${annotations}
63 pca=$(lightning pca-go -project ${project} -priority ${priority} -i ${unfiltered} -min-coverage "0.9" -max-variants "30") ; echo pca=${pca}
64 # pca=su92l-4zz18-e3xhi2mzp8rqevd/pca.npy
66 plot=$(lightning plot -project ${project} -priority ${priority} -i ${pca} -labels-csv ${info}/sample_info.csv -sample-fasta-dir ${fasta})
67 echo >&2 "https://workbench2.${plot%%-*}.arvadosapi.com/collections/${plot}"
69 # plot=su92l-4zz18-xyei3lnyxmgo7lh/plot.png
72 merged38=$(lightning merge -project ${project} -priority ${priority} ${unfiltered} ${ref38_lib}) ; echo merged38=${merged38}
73 # merged38=su92l-4zz18-xq17gtaltjxbm3n/library.gob
75 # merged38=su92l-4zz18-5kcaci3hqzukjv2/library.gob
77 # merged38=su92l-4zz18-nq8dmtng68ozovu/library.gob.gz
80 numpy=$(lightning export-numpy -project ${project} -priority ${priority} -i ${merged38}) ; echo numpy=${numpy}
81 # numpy=su92l-4zz18-w3dx5k79mtbz6qt/matrix.npy
83 # numpy=su92l-4zz18-g1y2eg9qvngvkkq/matrix.npy
85 # numpy=su92l-4zz18-cpw0i3z7wery77o/matrix.npy
87 # numpy=su92l-4zz18-hljgbqs6c87wles/matrix.npy
89 # numpy=su92l-4zz18-vw31l0qzenyb44l/matrix.npy
91 # pcapy=$(lightning pca -project ${project} -priority ${priority} -i ${numpy}) ; echo pcapy=${pcapy}
92 comvar=$(lightning numpy-comvar -project ${project} -priority ${priority} -i ${numpy} -annotations ${numpy%/matrix.npy}/annotations.tsv) ; echo comvar=${comvar}
93 # comvar=su92l-4zz18-s1yhngobdvcoc2e/commonvariants.csv