↓ Skip to main content

2. Data preparation

A successful otter create needs a discoverable FASTQ pair for each sample. The pdata file is optional; when you pass --pdata, its sampleid values must match the FASTQ sample names.

FASTQ naming
#

The default pair suffixes are:

sample1_R1.fastq.gz
sample1_R2.fastq.gz

Other suffixes can be supplied explicitly:

otter create \
  --fastq ./fastq \
  --mode RRBS \
  --suffix1 _1.fq.gz \
  --suffix2 _2.fq.gz

Sample matching is sensitive to the scanner’s suffixes and the resulting sample name. Keep sample IDs consistent in filenames and pdata, including case.

pdata
#

--pdata accepts an Excel or CSV file. The required column is sampleid. For grouping and downstream comparisons, use sample_group or condition.

Supported aliases include:

Canonical fieldCommon aliases
sampleid样本编号, 样本ID, sample_id
sample_group样本分组, 分组, group
condition条件, treatment

Example CSV:

sampleid,sample_group,condition
sample1,control,control
sample2,control,control
sample3,treated,treated
sample4,treated,treated

create validates paired samples and, when supplied, validates the pdata relationship. Duplicate IDs and empty grouping values should be fixed before running.

Project layout
#

A recommended input layout is:

my_analysis/
├── fastq/
│   ├── sample1_R1.fastq.gz
│   ├── sample1_R2.fastq.gz
│   └── ...
└── samples.xlsx

otter init my_project creates the workflow asset layout. Keep raw data outside the project when possible and use absolute paths in controlled production environments.

Preflight checklist
#

ls fastq/*_R1.fastq.gz
ls fastq/*_R2.fastq.gz
otter create \
  --output my_project \
  --fastq ./fastq \
  --mode RRBS \
  --pdata ./samples.xlsx \
  --reference-root "$OTTER_REFERENCE_ROOT" \
  --reference-primary hg38@GRCh38.p14

The canonical track always names a reference release, so the preflight needs a registry with that release published (see the quick start).

If pairing fails, first compare the actual suffixes, the sample-name case, and the pdata sampleid values. If another pipeline depends on the current filenames, pass matching --suffix1 and --suffix2 values to otter create instead of renaming the files.

Back to the manual · Next: quick start