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 ${ref37_fa}) ; echo ref37_lib=${ref37_lib}
23 # ref37_lib=su92l-4zz18-vnhlv3g6yp1azls/library.gob
26 ref38_lib=$(lightning import -project ${project} -priority ${priority} -tag-library ${tagset} -skip-ooo=true -output-tiles=true -save-incomplete-tiles ${ref_fa}) ; echo ref38_lib=${ref38_lib}
27 # ref38_lib=su92l-4zz18-swebknshfwsvys6/library.gob
29 unfiltered=$(lightning import -project ${project} -priority ${priority} -tag-library ${tagset} -skip-ooo=true -output-tiles=true ${fasta}) ; echo unfiltered=${unfiltered}
30 # unfiltered=su92l-4zz18-mz3546bib6oj1gg/library.gob
31 # unfiltered=su92l-4zz18-72ovi5qrderxudv/library.gob
32 # 24674s @ pre-38e6e7c
33 # unfiltered=su92l-4zz18-ywhkc1hgdzxwp5u/library.gob
34 # 18497s @ 64vcpu bf0968a
35 # _____s @ 32vcpu 83983ad
38 merged=$(lightning merge -project ${project} -priority ${priority} ${unfiltered} ${ref37_lib}) ; echo merged=${merged}
39 # merged=su92l-4zz18-svw5xqe5g0ct2v1/library.gob
42 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}
43 # exportvcf=su92l-4zz18-gz4svr6zyvipueu/export.csv
46 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}
50 stats=$(lightning stats -project ${project} -priority ${priority} -i ${merged}) ; echo stats=${stats}
52 filtered=$(lightning filter -project ${project} -priority ${priority} -i ${merged} -min-coverage "0.9" -max-variants "30") ; echo filtered=${filtered}
54 annotations=$(lightning annotate -project ${project} -priority ${priority} -i ${merged}) ; echo annotations=${annotations}
56 pca=$(lightning pca-go -project ${project} -priority ${priority} -i ${filtered} -one-hot) ; echo pca=${pca}
57 plot=$(lightning plot -project ${project} -priority ${priority} -i ${pca} -labels-csv ${info}/sample_info.csv -sample-fasta-dir ${fasta})
58 echo >&2 "https://workbench2.${plot%%-*}.arvadosapi.com/collections/${plot}"
62 merged38=$(lightning merge -project ${project} -priority ${priority} ${unfiltered} ${ref38_lib}) ; echo merged38=${merged38}
63 # merged38=su92l-4zz18-xq17gtaltjxbm3n/library.gob
65 # merged38=su92l-4zz18-5kcaci3hqzukjv2/library.gob
68 numpy=$(lightning export-numpy -project ${project} -priority ${priority} -i ${merged38}) ; echo numpy=${numpy}
69 # numpy=su92l-4zz18-w3dx5k79mtbz6qt/matrix.npy
71 # pcapy=$(lightning pca -project ${project} -priority ${priority} -i ${numpy}) ; echo pcapy=${pcapy}
72 comvar=$(lightning numpy-comvar -project ${project} -priority ${priority} -i ${numpy} -annotations ${numpy%/matrix.npy}/annotations.tsv) ; echo comvar=${comvar}
73 # comvar=su92l-4zz18-s1yhngobdvcoc2e/commonvariants.csv