Skip to content

Samplesheet formats

Applies to GraffiTE v1.1

Verified against v1.1.0.0 at commit bf51777. The 2024 paper describes v1.0, which differs in places; see v1.0 vs v1.1.

Every samplesheet is a CSV read by main.nf. With one exception (--pav) the file has a header row and columns are picked by name, so their order does not matter and extra columns are ignored. The column names below are the ones the code reads; with a misspelled header the value is empty and the run stops when it tries to open the file.

Use absolute paths

Nextflow resolves a relative path against the directory you launched from, whatever directory the CSV sits in.


--assemblies

Columns sample, path. One row per haploid assembly; a diploid sample gets two rows with two names. main.nf:105-106

assemblies.csv
sample,path
HG002_mat,/data/HG002.mat.fa.gz
HG002_pat,/data/HG002.pat.fa.gz

The sample name becomes the sample column of the svim-asm VCF and, after the merge, the haplotype name in pangenome.vcf. module/main.nf:187-188

--longreads

Columns sample, path, type. Unaligned reads in FASTQ or FASTA, plain or gzipped. type picks the minimap2 (or winnowmap) preset: it becomes map-<type>, except lr:hq which is passed as is. So ont, hifi and pb are the usual values. main.nf:87-88, module/main.nf:75-78

longreads.csv
sample,path,type
HG002,/data/HG002.hifi.fastq.gz,hifi
HG005,/data/HG005.ont.fastq.gz,ont

--bams

Columns sample, path. Long reads already aligned to --reference, coordinate-sorted; the process indexes the BAM before calling. main.nf:93-94, module/main.nf:107

bams.csv
sample,path
HG002,/data/HG002.hifi.sorted.bam

--pav

No header names are read. The first line is skipped as a header, the first column is the sample name, and every further column is one haplotype FASTA of that sample. All haplotypes of a sample share one row. main.nf:115-116, module/main.nf:154-166

pav.csv
sample,hap1,hap2
HG002,/data/HG002.mat.fa.gz,/data/HG002.pat.fa.gz

--svs

Columns sample, path. Per-sample SV VCFs from your own caller, bgzip-compressed and named *.vcf.gz: the merge indexes each file with tabix and then loops over *.vcf.gz. sample is read but not used. main.nf:120-123, module/main.nf:215-228

svs.csv
sample,path
HG002,/data/HG002.sv.vcf.gz

Nothing on this path filters by SVTYPE, so anything other than insertions and deletions reaches Stage 2. Of the other discovery backends, Sniffles2 and svim-asm keep INS and DEL only; pav_asm filters on |SVLEN| > 50 alone, so PAV records of any other type above that size reach the merge as well. module/main.nf:132,170,187

--genotype_with

Columns sample, path, type. One read set per row, FASTQ (plain or gzipped) or BAM. type maps to a read preset and anything else, including an empty value, means short reads:

type Preset Effect
pb, hifi hifi vg giraffe --parameter-preset hifi
ont r10 vg giraffe --parameter-preset r10
anything else default vg giraffe with -i, interleaved paired-end short reads

main.nf:189-191, module/main.nf:837-844

pangenie and graphaligner ignore the preset. A .bam path is converted to FASTQ first by bam_to_fastq; with --epigenomes, GraffiTE also reads modification tags from it. main.nf:192-197,244

reads.csv
sample,path,type
HG002,/data/HG002.illumina.interleaved.fastq.gz,
HG005,/data/HG005.hifi.bam,hifi

--vcfs

Columns sample, path. Per-sample vg call VCFs from an earlier run, bgzipped with the .vcf.gz suffix, because merge_VCFs collects every *vcf.gz it is given. path has to be a glob such as HG002.vcf.gz*: the code sorts the files it matches, and a plain path is taken apart into its directory components instead (checked with Nextflow 26.04.6). The glob also matches the .tbi index. main.nf:218-220, module/main.nf:893

vcfs.csv
sample,path
HG002,/data/earlier_run/HG002.vcf.gz*

--graph_alignments

Columns sample, gaf, pack. The two files graph_align_reads publishes to GraffiTE_alignments/ for each sample. Needs --graph pointing at the index they were made against. main.nf:223-225, module/main.nf:827-833

graph_alignments.csv
sample,gaf,pack
HG002,/data/earlier_run/GraffiTE_alignments/HG002.gaf.gz,/data/earlier_run/GraffiTE_alignments/HG002.pack

--lifted

Columns sample, path. Modification tables already lifted onto the graph, as lift_epigenome writes them. Skips bamtags_to_BED and lift_epigenome. main.nf:239-241

lifted.csv
sample,path
HG002,/data/earlier_run/lifted/HG002.csv.gz