megSAP - DNA long-read analysis (single sample)

August 26, 2026 ยท View on GitHub

Basics

Single sample long-read DNA analysis is performed using the analyze_longread.php script.
Please have a look at the help using:

> php megSAP/src/Pipelines/analyze_longread.php --help

The main parameters that you have to provide are:

  • folder - The sample folder, which contains the raw reads including methylation information in unmapped BAM format.
  • name - The sample name, which must be the basename of the BAM file.
  • steps - Analysis steps to perform. For example ma,vc,sv,ph,an to perform mapping, small variant calling and structural variant calling (with annotation).
  • system - The processing system INI file.

Running an analysis

The analysis pipeline assumes that that the raw read data in unmapped BAM format is in the sample folder. If that is the case, the whole analysis is performed with one command, for example like this:

php megSAP/src/Pipelines/analyze_longread.php -folder Sample_NA12878_01 -name NA12878_01 -system SQK-114.ini -steps ma,vc,cn,sv,re,an

In the example above, the configuration of the pipeline is done using the SQK-114.ini file, which contains all necessary information (see processing system INI file).

Tools used in this analysis pipeline

The following tools are used for mapping, methylation analysis and small variant calling/annotation (steps ma,vc,me,an):

steptoolcomments
mappingminimap2
mapping - extract methylation infomodkit
variant calling - calling of SNVs and InDelsDeepVariant
variant calling - decompose complex variantsvcfallelicprimitives
variant calling - break multi-allelic variantsVcfBreakMulti
variant calling - left-normalization of InDelsVcfLeftNormalize
annotation - generalVcfAnnotateFrom*

CNV calling/annotation (steps cn,an) is performed using these tools:

steptoolcomments
CNV callingClinCNV
annotation - generalBedAnnotateFromBedSeveral data sources are annotated using this tool.
annotation - gene informationCnvGeneAnnotation
annotation - overlapping pathogenic CNVs from NGSDNGSDAnnotateCNV

SV calling/annotation (steps sv,an) is performed using these tools:

steptoolcomments
SV callingSniffles
annotation - gene informationBedpeGeneAnnotation
annotation - matching SVs from NGSDBedpeAnnotateCounts
annotation - breakpoint density from NGSDBedpeAnnotateBreakpointDensity

RE calling (step re) is performed using these tools:

steptoolcomments
RE callingStraglr

Phasing (step ph) is performed using these tools:

steptoolcomments
phasinglongphase

A complete list of all tools and databases used in megSAP including version and when they were last updated can be found here.

Performance

Performance benchmarks of the the megSAP pipeline can be found here.

Output

After the analysis with the steps ma,vc,sv,an,me, these files are created in the output folder:

  1. mapped reads in CRAM format
  2. small variant list in VCF format
  3. small variant list in GSvar format
  4. structural variant list in VCF format
  5. methylation information in TSV/VCF format
  6. QC data in qcML format, which can be opened with with GSvar or Firefox