Skip to content

Example usage

These examples use k = 3 and 4 CPU threads, with a working directory named temp, on the sample files in the repository’s data directory.

Remember that the working directory must exist beforehand:

Terminal window
mkdir -p temp

To construct the maximal unitigs of the example FASTQ file reads.fq with frequency cutoff c = 1:

Terminal window
cuttlefish build -s reads.fq -k 3 -t 4 -o cdbg -w temp/ --read -c 1

To construct the maximal unitigs of the example FASTA file refs1.fa:

Terminal window
cuttlefish build -s refs1.fa -k 3 -t 4 -o cdbg -w temp/ --ref

Each of these produces two output files: cdbg.fa, containing the maximal unitigs, and cdbg.json, a metadata file with structural characteristics of the graph.

Multiple sequence files, lists of them, or directories of them may also be passed — see Usage.

To output the compacted de Bruijn graph in GFA 2.0 for the example FASTA files refs1.fa and refs2.fa:

Terminal window
cuttlefish build -s refs1.fa,refs2.fa -k 3 -t 4 -o cdbg.gfa2 -f 2 -w temp/

Note that no --read or --ref is passed — that is what selects Cuttlefish 1 rather than Cuttlefish 2.

Lists or directories of reference files may be provided as input in the same way, as described in Usage.