-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sh
executable file
·61 lines (52 loc) · 2.6 KB
/
build.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#!/usr/bin/env bash
# https://github.com/maize-genetics/phg_v2/blob/main/docs/build_and_load.md
# Initialize TileDB
phg initdb \
--db-path tiledb \
--gvcf-anchor-gap 1000000 \
--hvcf-anchor-gap 1000
# Create BED file from GFF for reference range coordinates
phg create-ranges \
--reference-file data/reference/GCF_002114115.1_ASM211411v1_genomic.fna \
--gff data/reference/genomic.gff \
--boundary gene \
--pad 500 \
--range-min-size 500 \
-o apple.bed
# Update FASTA headers with sample information
mkdir -p data/fastas
phg prepare-assemblies \
--keyfile prepare_assemblies_keyfile.txt \
--output-dir data/fastas \
--threads 10
# Align assemblies
mkdir -p data/align
phg align-assemblies \
--gff data/reference/genomic.gff \
--reference-file data/reference/GCF_002114115.1_ASM211411v1_genomic.fna \
--assemblies assemblies.txt \
-o data/align
# Compress FASTA files
phg agc-compress \
--db-path tiledb \
--reference-file data/reference/GCF_002114115.1_ASM211411v1_genomic.fna \
--fasta-list assemblies.txt
mkdir -p data/vcf
# Create HVCF data from ref
phg create-ref-vcf \
--db-path tiledb \
--bed apple.bed \
--reference-file data/reference/GCF_002114115.1_ASM211411v1_genomic.fna \
--reference-name DomesticaGoldenDelicious
# Create HVCF and GVCF data from assembly alignments against ref
phg create-maf-vcf \
--db-path tiledb \
--bed apple.bed \
--reference-file data/reference/GCF_002114115.1_ASM211411v1_genomic.fna \
--maf-dir data/align \
-o data/vcf
# Load VCFs into TileDB
phg load-vcf \
--vcf data/vcf \
--db-path tiledb \
--threads 10