This is a test version of Biostars. For the public version, visit https://www.biostars.org.
vg input and output files

Hi all, I want to try vg. However, the extensive documentation does not mention how to put sequences in, or how to get the resulting file (i.e. infile and outfile).

Can anyone please help me?

Best regards to you all, M

vg

vg is a toolkit containing different tools. What are you talking about when you want to use 'input' and 'output' files.

1 answer

The vg toolkit consists of multiple commands, each with specific input and output file handling. Sequences are typically input via command-line options, and outputs are often redirected to files using the '>' symbol, as vg commands frequently operate via standard input and output streams.

To construct a variation graph from a reference sequence (FASTA format) and variants (VCF format), use:

vg construct -r reference.fasta -v variants.vcf.gz > graph.vg

In this command, the input files are 'reference.fasta' (reference sequence) and 'variants.vcf.gz' (variants). The output graph is saved to 'graph.vg'.

To index the graph for mapping:

vg index -x graph.xg -g graph.gcsa graph.vg

Here, the input is 'graph.vg', and outputs are 'graph.xg' and 'graph.gcsa' (with its companion file 'graph.gcsa.lcp').

To map sequencing reads (FASTQ format) to the indexed graph:

vg map -x graph.xg -g graph.gcsa -f reads.fastq > alignments.gam

The input files are 'graph.xg', 'graph.gcsa', and 'reads.fastq' (read sequences). The output alignments are saved to 'alignments.gam'.

For paired-end reads in separate files, modify the mapping command to:

vg map -x graph.xg -g graph.gcsa -f reads1.fastq -f reads2.fastq > alignments.gam

These examples cover basic operations. File types include .fasta (sequences), .vcf.gz (variants), .vg (graphs), .xg and .gcsa (indexes), .fastq (reads), and .gam (alignments). Consult the vg manual pages for command-specific options, as some support '-o' for direct output specification.

Kevin

Log in to answer this question.