This pipeline now supports starting from BAM or CRAM files in addition to FASTQ files. This is useful when you already have aligned data and want to skip the alignment steps.
The pipeline supports three input types controlled by the input_type parameter:
fastq: Start from paired-end FASTQ files (default behavior)bam: Start from a BAM filecram: Start from a CRAM file
{
"input_type": "fastq",
"fastq_r1": "path/to/sample_R1.fastq.gz",
"fastq_r2": "path/to/sample_R2.fastq.gz",
"sample_name": "sample_name",
...
}{
"input_type": "bam",
"bam_input": "path/to/sample.bam",
"bam_index": "path/to/sample.bam.bai",
"sample_name": "sample_name",
...
}{
"input_type": "cram",
"cram_input": "path/to/sample.cram",
"cram_index": "path/to/sample.cram.crai",
"sample_name": "sample_name",
...
}- FASTP (quality control and trimming)
- BWA-MEM2 (alignment)
- SAMTOOLS_SORT (sorting)
- PICARD_MARKDUPLICATES (duplicate marking)
- Continue with downstream analysis...
- SAMTOOLS_SORT (re-sorting, assumes input may not be properly sorted)
- PICARD_MARKDUPLICATES (duplicate marking)
- Continue with downstream analysis...
- SAMTOOLS_CRAM2BAM (convert CRAM to BAM)
- PICARD_MARKDUPLICATES (duplicate marking)
- Continue with downstream analysis...
-
Reference Genome: When using BAM/CRAM input, you still need to provide the reference genome files (
fastaandfai) as they are required for downstream processes. -
Index Files:
- BAM index files (
.bai) and CRAM index files (.crai) are optional but recommended for better performance - If not provided, the pipeline will create index files as needed
- Providing index files can speed up processing and reduce computational overhead
- BAM index files (
-
Duplicate Marking: The pipeline assumes that BAM/CRAM inputs may not have duplicates marked, so it runs PICARD_MARKDUPLICATES on all input types.
-
Sorting: BAM inputs are re-sorted to ensure proper coordinate sorting. CRAM inputs are converted to BAM format first.
-
MultiQC Reports:
- When starting from BAM/CRAM, FASTP metrics will not be included in the MultiQC report since read trimming is skipped
- DeepVariant visual reports are automatically included in MultiQC for all input types
-
CRAM to CRAM: If you start with CRAM input, the pipeline will not convert the final BAM back to CRAM to avoid redundancy.
See the example parameter files:
run_parameters_bam_example.json- Example for BAM inputrun_parameters_cram_example.json- Example for CRAM input
input_type: "fastq"fastq_r1fastq_r2sample_namefastafai
input_type: "bam"bam_inputbam_index(optional)sample_namefastafai
input_type: "cram"cram_inputcram_index(optional)sample_namefastafai