This site is now read-only. You can find our new documentation site and support forum for posting questions here.
Be sure to read our welcome blog!
Documentation for IntensityRankSum annotator
This post provides some documentation on using the IntensityRankSum annotator with Genome STRiP. This is part of the SVAnnotator framework.
SVAnnotator is a general framework for generating annotations of different kinds on VCF files containing structural variant records.
SVAnnotator is conceptually similar to the GATK VariantAnnotator walker, but works somewhat differently and is tailored for use with structural variations.
Each annotator is like a plug-in and you can run one or more annotators over the same file in one invocation.
Each annotator can either add annotations (typically INFO fields) to the input VCF file, or it can generate a textual report (e.g. tab delimited)
for additional processing, or it can generate one or more summary reports (also text files) or all of the above. Different annotators may or may
not support all modes of operation.
The following common arguments are handled by the SVAnnotator framework and are common to all annotators:
The name of the annotator(s) you want to run (the annotations you want to generate).
The input VCF file you want to annotate.
The input VCF file must be sorted in coordinate order based on the reference sequence.
Indexed fasta file containing the reference sequence.
Flag indicating that the annotator should print a report file (default false).
Typically, this will contain one line per VCF record and will contain the same information as the annotations that would be stored in the VCF file, but may be easier to parse.
Flag indicating that the annotator should write a summary file (default false).
Depending on the annotator, the summary file produces information organized in different ways.
For example, the VariantsPerSample annotator produces a summary file containing a row for each sample and the count of variants in that sample.
The directory to write report files and summary files (default is the current directory).
The directory to use store temporary files.
The destination for the output VCF file.
If you do not specify -O, then the annotator will not produce VCF annotations (but may produce reports or summaries).
The path and file name for the report file. This overrides -reportDirectory.
If not supplied, the report file is based on the name of the annotator (and will be in the report directory).
The path and file name for the summary file. This overrides -reportDirectory.
If not supplied, each annotator generates a default summary file name (if the annotator supports writing summary files).
The IntensityRankSum annotator is invoked through the SVAnnotator framework, which defines arguments common to all annotators.
The IntensityRankSum annotator uses SNP array intensity data to do a form of "in silico" validation of copy number variants.
The general approach is to use a Wilcoxon rank sum test using the intensity data and to calculate a p-value as follows:
For each array probe underlying the variant, each sample is assigned an integral rank for that probe.
Then the set of ranks (across all probes) is combined and treated as a set of observations for the Wilcoxon rank sum test.
If there is more than one probe, there will certainly be ties (i.e. some sample will be rank 1 with respect to each probe).
Ties are broken randomly to assign the final ranking. The random seed is based on the input data, so identical inputs will
always produce identical results. The Wilcoxon rank sum test is applied to the final combined ranking to test whether the
event-carrying samples (see below) are shifted with respect to the non-event-carrying samples. This is a one-tailed test
of a negative shift (for deletions) or a positive shift (for duplications).
For CNVs, two tests are performed (and two p-values generated). A negative-shift test is made for samples with copy number
less than two (compared to the copy number two samples) and a positive-shift test is made for samples with copy number
greater than two (compared to the copy number two samples).
This annotator can be run in one of several modes, depending on whether you have genotypes for each sample or simply a list
of samples believed to carry the variant (either as homozygotes or heterozygotes). The -irsUseGenotypes flag indicates which
mode to use.
If you do not use genotypes (i.e. you are evaluating a set of discovered sites without genotypes), then the annotator will
expect an INFO tag on each variant to indicate the set of samples that are thought to carry the variant (either as homozygotes or heterozygotes).
The variants must be either deletions (SVTYPE=DEL) or duplications (SVTYPE=DUP).
In addition, you must supply a list of samples that were evaluated during discovery (using -sample) so that the list of non-carrier samples can be determined for each variant.
If you use genotypes, then the annotator will process any kind of CNV (SVTYPE=DEL, SVTYPE=DUP or SVTYPE=CNV).
Genotypes will be taken from the GT/GQ fields (if present) or from the CN/CNQ fields and the genotypes will be used to determine carrier and non-carrier samples.
Only DEL or DUP variants support the use of GT/GQ.
The array intensity file must be supplied as a tab-delimited matrix of array intensity values.
The file consists of four fixed columns (ID, CHROM, START, END) and a variable number of additional columns, one per sample that has array data.
The file consists of a header line specifying these four columns and the name of each sample.
After the header line, the file contains one line per array-probe location and must be sorted in reference-sequence order.
Each array-probe location should have a single intensity value. For SNP probes, this is usually the sum of the A and B normalized probe intensities.
The START and END coordinates are generally the same, corresponding to the SNP position.
-sample sample(s) or .list file
For discovery variants, the list of samples used in discovery (which may be a subset of the samples in the array intensity file).
-irsUseGenotypes true/false (default false)
Whether to use genotypes or INFO tags to determine carrier samples.
When not using genotypes, the INFO tag on each variant that lists the carrier samples (default IRSSAMPLES).
If true, perform a random permutation on rankings before performing the Wilcoxon rank-sum test to generate a null distribution.
-filterGenotypes true/false (default true)
If false, do not use the GT:FT field in the input VCF file to filter genotypes.
Use this quality threshold to determine whether to filter genotypes based on GQ or CNQ.
This argument does not automatically disable genotype filters (GT:FT), so is often used in conjunction with -filterGenotypes false.
This annotator produces the following INFO field annotations for each VCF record (or the corresponding columns in a report file):
The number of array probes used for this variant.
The number of affected samples.
The number of carrier samples for the deletion p-value.
The p-value based on testing deleted samples (carrier samples with copy number less than two).
The number of carrier samples for the duplication p-value.
The p-value based on testing duplicated samples (carrier samples with copy number greater than two).
The lesser of IRS_LOWERPVALUE and IRS_UPPERPVALUE.
You should not use this minimum p-value for FDR estimation unless you compute and apply a suitable null expectation.
Instead, you should stratify your variants based on type (deletion, duplication, mixed) and estimate FDR separately using IRS_LOWERPVALUE and IRS_UPPERPVALUE.
The IntensityRankSum annotator uses R as well as Genome STRiP.
export SV_DIR=/path/to/SVToolkit/root/directory # Discovery example (using INFO tags) java -Xmx4g -cp SVToolkit.jar:GenomeAnalysisTK.jar \ org.broadinstitute.sv.main.SVAnnotator \ -A IntensityRankSum \ -R human_g1k_v37.fasta \ -vcf input.vcf \ -O output.vcf \ -arrayIntensityFile ALL.genome.Omni25_probe_intensity_matrix.20110425.dat \ -sample discovery_samples.list \ -irsSampleTag IRSSAMPLES \ -writeReport \ -reportFile irs_output.report.dat # Genotyped example java -Xmx4g -cp SVToolkit.jar:GenomeAnalysisTK.jar \ org.broadinstitute.sv.main.SVAnnotator \ -A IntensityRankSum \ -R human_g1k_v37.fasta \ -vcf input.vcf \ -O output.vcf \ -arrayIntensityFile ALL.genome.Omni25_probe_intensity_matrix.20110425.dat \ -irsUseGenotypes true \ -writeReport \ -reportFile irs_output.report.dat