build-genome-var-graph

Build a genome variation graph and write its sequences. The variant sequences come first: between them they carry every variant allele, and a site with several alternative alleles gives one sequence per allele rather than one per combination of alleles. With –graph-type individual, adjacent variants are joined into one haplotype; with population they are not. Unless –only-variant-sequences yes, the reference sequence of every contig follows, so each variant’s reference allele is written too. Records are named _ in that order.

Usage

Template:

exacto build-genome-var-graph \
    --variants-tsv-file <variants_tsv_file> \
    --fasta-file <fasta_file> \
    --output-fasta-file <output_fasta_file> \
    --sequence-prefix <sequence_prefix> \
    [--remove-unknown-bases REMOVE_UNKNOWN_BASES] \
    [--only-variant-sequences ONLY_VARIANT_SEQUENCES] \
    [--graph-type GRAPH_TYPE] \
    [--num-threads NUM_THREADS]

Example:

exacto build-genome-var-graph \
    --variants-tsv-file tumor_somatic_dna_variants.tsv \
    --fasta-file reference_genome.fasta \
    --output-fasta-file tumor_genome_var_graph.fasta \
    --sequence-prefix tumor

Description

Build a genome variation graph and write its sequences. The variant sequences come first: between them they carry every variant allele, and a site with several alternative alleles gives one sequence per allele rather than one per combination of alleles. With –graph-type individual, adjacent variants are joined into one haplotype; with population they are not. Unless –only-variant-sequences yes, the reference sequence of every contig follows, so each variant’s reference allele is written too. Records are named _ in that order.

NoteAt a glance

Inputs: *.tsv (DNA variants from call-germline-dna-vars or call-somatic-dna-vars), *.fasta (reference genome)

Outputs: *.fasta (genome variation graph sequences)

Typical next step: Endpoint — feeds downstream graph-aware analyses

Required arguments

Flag Type Description
--variants-tsv-file str Variants TSV file, as call-germline-dna-vars or call-somatic-dna-vars write it. Required columns: ‘variant_id’, ‘chromosome_1’, ‘position_1’, ‘operation_1’, ‘strand_1’, ‘chromosome_2’, ‘position_2’, ‘operation_2’, ‘strand_2’, ‘sequence’ (genome-forward, whatever the strand). Optional: ‘num_cycles’, the number of copies of a duplicated span; a duplication without it is taken as 2 copies.
--fasta-file str Reference genome FASTA file (variation graph backbone).
--output-fasta-file str Output FASTA file.
--sequence-prefix str Sequence prefix.

Optional arguments

Flag Type Default Description
--remove-unknown-bases str2bool yes If ‘yes’, then unknown nucleotides (‘N’ or ‘n’) are removed.
--only-variant-sequences str2bool no If ‘yes’, then only variant sequences will be output; otherwise the reference sequence of every contig follows them.
--graph-type str individual Variation graph type. Either ‘individual’ or ‘population’.
--num-threads int 4 Number of threads.