This is documentation for the GemCode System.  Click here for Chromium System documentation.
HOME  ›   pipelines
If your question is not answered here, please email us at:  ${email.software}

10x Genomics
GemCode Genome & Exome

Phasing and SV Calling of Whole Genomes

Long Ranger's Whole Genome Mode analyzes sequencing data from a GemCode-prepared library. This involves the following steps:

  1. Run longranger demux on the Illumina BCL output folder to generate FASTQ files.

  2. Run longranger run for each sample that was demultiplexed by longranger demux.

For the following example, assume that the Illumina BCL output is in a folder named /sequencing/140101_D00123_0111_AHAWT7ADXX.

Run longranger demux

First, follow the instructions on running longranger demux to generate FASTQ files. For example, if the flowcell serial number was HAWT7ADXX, then longranger demux will output FASTQ files in HAWT7ADXX/outs/fastq_path.

Run Long Ranger in Whole Genome Mode with longranger run

To run Long Ranger in whole genome mode, you use the longranger run command, with the following parameters:

ArgumentDescription
--idA unique run ID string: e.g. sample345
--sexSex of the sample: male or female
--fastqsPath of the FASTQ folder generated by longranger demux
e.g. /home/jdoe/runs/HAWT7ADXX/outs/fastq_path
--referencePath to a 10x compatible reference, e.g. /opt/refdata-hg19-1.2.0.
See Installation for how to download and install the default reference.
--indices(optional) Sample indices associated with this sample. Comma-separated list of:
  1. index set tube names: SI-001,SI-002
  2. index set plate wells: SI-P01-A1,SI-P01-H12
  3. index set tube part numbers: 220027,220028
  4. index sequences: TCGCCATA,GTATACAC
--fastqprefix(optional) Sample name as specified in the sample sheet supplied to bcl2fastq. See Demultiplexing with bcl2fastq for more information.
--lanes(optional) Lanes associated with this sample
--precalled(optional) Path to a "pre-called" VCF file. Variants in this file will be phased.
--vcmode(optional) freebayes, gatk:/path/to/GenomeAnalysisTK.jar, or disable
 The path for the pre-called VCF file must be an absolute path and the file must contain a single sample. The Long Ranger environment includes a tool called longranger mkvcf to extract samples and standardize your VCF files. Run longranger mkvcf --help for details.

After determining these input arguments, call longranger run:

$ cd /home/jdoe/runs
$ longranger run --id=sample345 \
                 --sex=female \
                 --fastqs=/home/jdoe/runs/HAWT7ADXX/outs/fastq_path \
                 --reference=/opt/refdata-hg19-1.2.0 \
                 --indices=SI-001 \

Following a set of preflight checks to validate input arguments, Long Ranger pipeline stages will begin to run:

#############################################################################
longranger run 1.3.1
Copyright (c) 2016 10x Genomics, Inc.  All rights reserved.
#############################################################################
Martian Runtime - 1.3.1
 
Running preflight checks (please wait)...
2012-01-01 12:00:00 [runtime] (ready)           ID.sample345.PHASER_SVCALLER_CS.PHASER_SVCALLER._ALIGNER.SETUP_CHUNKS
2012-01-01 12:00:00 [runtime] (run:local)       ID.sample345.PHASER_SVCALLER_CS.PHASER_SVCALLER._SNPINDEL_PHASER.SORT_GROUND_TRUTH
2012-01-01 12:00:00 [runtime] (run:local)       ID.sample345.PHASER_SVCALLER_CS.PHASER_SVCALLER._SNPINDEL_PHASER.SORT_GROUND_TRUTH.fork0.chnk0.main
...

By default, longranger run will use all of the cores available on your system to execute pipeline stages. You can specify a different number of cores to use with the --localcores option; for example, --localcores=16 will limit the pipeline to using up to sixteen cores at once. Similarly, --localmem will restrict the amount of memory (in GB) used by longranger run.

The pipeline will create a new folder named with the sample ID you specified (e.g. /home/jdoe/runs/sample345) for its output. If this folder already exists, Long Ranger will assume it is an existing pipestance and attempt to resume running it.

Variant Calling

By default, longranger run calls SNPs and indels with Freebayes, phases those variants, and adds structural variant calls. GATK may also be used.

Alternatively, you may provide an existing VCF file as an input to the pipeline. In this "pre-called VCF" mode, longranger run does not call SNPs and indels itself, but phases the variants in the supplied VCF file, and also outputs structural variant calls.

In "pre-called VCF" mode, if you specify --vcmode="freebayes" or --vcmode="gatk:/path/to/GenomeAnalysisTK.jar", then the pipeline will also call SNPs and indels with the help of Lariat barcode-assisted alignments, and add those new variants to the supplied VCF file. It also outputs structural variant calls.

Output Files

A successful longranger run execution should conclude with a message similar to this:

2015-01-02 15:46:41 [runtime] (run:local)       ID.sample345.PHASER_SVCALLER_CS.PHASER_SVCALLER.LOUPE_PREPROCESS.fork0.join
2015-01-02 15:46:44 [runtime] (join_complete)   ID.sample345.PHASER_SVCALLER_CS.PHASER_SVCALLER.LOUPE_PREPROCESS
2015-01-02 15:46:55 [runtime] VDR killed 4738 files, 223GB.
 
Outputs:
- Run summary: /home/jdoe/runs/sample345/outs/summary.csv
- BAM barcoded: /home/jdoe/runs/sample345/outs/phased_possorted_bam.bam
- BAM index: /home/jdoe/runs/sample345/outs/phased_possorted_bam_index.bam.bai
- VCF phased: /home/jdoe/runs/sample345/outs/phased_variants.vcf.gz
- VCF index: /home/jdoe/runs/sample345/outs/phased_variants_index.vcf.gz.tbi
- SV calls: /home/jdoe/runs/sample345/outs/sv_calls.bedpe
- SV candidates: /home/jdoe/runs/sample345/outs/sv_candidates.bedpe
- SV phasing: /home/jdoe/runs/sample345/outs/sv_phasing.tsv
- Loupe file: /home/jdoe/runs/sample345/outs/loupe.loupe
 
Pipestance completed successfully!

The output of the pipeline will be contained in a folder named with the sample ID you specified (e.g. sample345). The subfolder named outs will contain the main pipeline output files:

File NameDescription
summary.csvRun summary metrics in CSV format
phased_possorted_bam.bamAligned reads annotated with barcode information
phased_possorted_bam_index.bam.baiIndex for phased_possorted_bam.bam
phased_variants.vcf.gzVCF annotated with barcode and phasing information
phased_variants_index.vcf.gz.tbiIndex for phased_variants.vcf.gz
sv_calls.bedpeConfidently called structural variants
sv_candidates.bedpeStructural variant candidates failing one or more filters
sv_phasing.tsvStructural variant phasing information
loupe.loupeFile that can be opened in the Loupe genome browser

Once longranger run has successfully completed, you can browse the resulting .loupe file in the Loupe genome browser, or refer to the Understanding Output section to explore the data by hand.