MCPcopy Index your code
hub / github.com/RealTimeGenomics/rtg-tools

github.com/RealTimeGenomics/rtg-tools @3.13

Chat with this repo
repository ↗ · DeepWiki ↗ · release 3.13 ↗ · + Follow
12,543 symbols 56,482 edges 1,491 files 4,373 documented · 35%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

RTG Tools

Copyright (c) 2018 Real Time Genomics Ltd

This software is provided under the Simplified BSD License. See LICENSE.txt

Introduction

RTG Tools is a subset of RTG Core that includes several useful utilities for dealing with VCF files and sequence data. Probably the most interesting is the vcfeval command which performs sophisticated comparison of VCF files.

Conventional tools attempt comparison by directly comparing variant positions, alleles, and genotypes, however they are inherently unable to deal with differences in representation that commonly arise, particularly when dealing with complex variants or when comparing variants produced by different callers. More details are in this presentation on slideshare and this manuscript on bioRxiv. Comparison approaches based on normalization or decomposition can alleviate these problem but often fail to deal with more complex situations.

RTG vcfeval performs variant comparison at the haplotype level, that is, it determines whether the genotypes asserted in the VCFs under comparison result in the same genomic sequence when applied to the reference genome. This in itself is a non-trivial problem and naive approaches face a combinatorial explosion to determine the most accurate analysis. To date, no other tool is capable of performing this analysis as accurately and as fast as RTG vcfeval. RTG developed vcfeval for in-house use in 2010, and through our collaborations we found this tool to be highly useful outside of RTG. RTG vcfeval outputs VCF files containing the results of comparison, summary metrics, and ROC curve data files.

In conjunction with vcfeval, the rocplot command provides an easy way to interactively examine the ROC curves from one or more vcfeval runs as an aid to selecting appropriate scoring attributes and filtering thresholds. A quick screen capture is shown below:

rocplot-screencap

In order to encourage wider adoption of best-practise methods for variant comparison and benchmarking, Real Time Genomics made RTG Tools freely available, and now this includes the source code under an OSI approved open source licence. RTG Tools are mature, well tested, and under ongoing development.

RTG Tools is available pre-packaged directly from our website, or follow the instructions below to build from this repository.

If you have a need for variant calling or metagenomics analysis, please consider our full analysis suite RTG Core.

Support

A user manual is included within the installation in both PDF and HTML versions. These may also be viewed online (HTML, PDF).

You can use the commands in RTG Tools to format your own reference datasets, or download common pre-formatted references from our website.

An rtg-users discussion group is now available for general questions, tips, and other discussions.

To be informed of new software releases, subscribe to the low-traffic rtg-announce group.


Prerequisites for building from source

  • Java 11 or later
  • apache ant 1.9 or later

Check out source code for RTG Tools

$ git clone https://github.com/RealTimeGenomics/rtg-tools.git
$ cd rtg-tools

Compile / run unit tests

$ ant runalltests

Build RTG Tools package

To build the RTG Tools package which can be locally installed and run:

$ ant zip-nojre

This will create an installation zip file under dist.

Installation

Uncompress the installation zip:

$ cd /my/install/dir/
$ unzip /path/to/rtg-tools/dist/rtg-tools-VERSION-nojre.zip

Follow the instructions contained in the README.txt. This build will use the system Java by default, so ensure that it is Java 11 or later.

For a quick demonstration of the features of RTG Tools for simulation and VCF processing on data generated from scratch, run the demo-tools.sh script contained in the scripts subdirectory of the installation directory:

$ cd /my/install/dir/rtg-tools-VERSION/
$ ./scripts/demo-tools.sh $PWD/rtg

Extension points exported contracts — how you extend this code

Frame (Interface)
The possible framing for sequences. [8 implementers]
src/main/java/com/rtg/mode/Frame.java
OutputChecker (Interface)
(no doc) [52 implementers]
src/test/java/com/rtg/launcher/AbstractEndToEndTest.java
MonStats (Interface)
Interface for objects adding monitor stats to output. [9 implementers]
src/main/java/com/rtg/jmx/MonStats.java
Handler (Interface)
Interface to implement for handling pages. [1 implementers]
src/test/java/com/rtg/util/test/HttpServer.java
VcfIterator (Interface)
Provides access to the VCF header when iterating a VCF source [25 implementers]
src/main/java/com/rtg/vcf/VcfIterator.java
VcfAnnotator (Interface)
An interface for objects that annotate a VCF file. General runtime contract is updateHeader is called first [29 implementers]
src/main/java/com/rtg/vcf/VcfAnnotator.java
VcfWriter (Interface)
Methods for writing VCF records. [18 implementers]
src/main/java/com/rtg/vcf/VcfWriter.java

Core symbols most depended-on inside this repo

assertTrue
called by 2333
src/main/java/com/rtg/util/integrity/Exam.java
append
called by 1907
src/main/java/com/rtg/util/array/ExtensibleIndex.java
get
called by 976
src/main/java/com/rtg/util/array/CommonIndex.java
toString
called by 967
src/main/java/com/rtg/mode/Residue.java
getPath
called by 900
src/main/java/com/rtg/graph/RocLinePanel.java
add
called by 813
src/main/java/com/rtg/util/arithcode/ArithModelBuilder.java
assertFalse
called by 765
src/main/java/com/rtg/util/integrity/Exam.java
length
called by 733
src/main/java/com/rtg/util/QuickSort.java

Shape

Method 10,609
Class 1,679
Function 104
Interface 98
Enum 53

Languages

Java99%
TypeScript1%

Modules by API surface

src/main/java/com/rtg/util/cli/CFlags.java78 symbols
src/main/java/com/rtg/reader/IndexFile.java74 symbols
src/test/java/com/rtg/alignment/GotohEditDistanceTest.java71 symbols
src/main/java/com/rtg/tabix/TabixIndexer.java71 symbols
src/main/java/com/rtg/vcf/header/VcfHeader.java63 symbols
src/main/java/com/rtg/vcf/eval/VcfEvalParams.java55 symbols
src/main/java/com/rtg/vcf/VcfRecord.java55 symbols
src/main/java/com/rtg/util/io/FileUtils.java53 symbols
src/main/java/com/rtg/graph/RocPlot.java52 symbols
src/main/java/com/rtg/sam/SamFilterParams.java51 symbols
src/main/java/com/rtg/relation/GenomeRelationships.java49 symbols
src/test/java/com/rtg/vcf/VcfFilterCliTest.java48 symbols

For agents

$ claude mcp add rtg-tools \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact