Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
seppinho committed Jul 31, 2019
2 parents f6a3dd8 + a4e1ef6 commit 157da51
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 8 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ It has been integrated in [mtDNA-Server](https://mtdna-server.uibk.ac.at). For s
You can run mutserve as a standalone tool starting with CRAM/BAM files and detecting heteroplasmic and homoplasmic sites. By default BAQ is set (``--noBaq`` otherwise).

```
wget https://github.com/seppinho/mutserve/releases/download/v1.2.1/mutserve-1.2.1.jar
wget https://github.com/seppinho/mutserve/releases/download/v1.2.2/mutserve-1.2.2.jar
java -jar mutserve-1.2.1.jar analyse-local --input <file/folder> --output <filename.vcf / filename.txt> --reference <fasta> --level 0.01
java -jar mutserve-1.2.2.jar analyse-local --input <file/folder> --output <filename.vcf / filename.txt> --reference <fasta> --level 0.01
```
To create a VCF file as an output simple specify `--output filename.vcf.gz`. Please use [this reference file](https://raw.githubusercontent.com/seppinho/mutserve/master/files/rCRS.fasta) when using BAQ.

Expand Down Expand Up @@ -49,9 +49,9 @@ If you want a **VCF** file as an output, please specify `--output filename.vcf.g

## Performance - Sensitivity and Specificity

If you have a mixture model generated, you can use mutserve for checking precision, specificity and sensitivity. The expected mutations (homoplasmic and heteroplasmic) need to be provided as gold standard in form of a text file, with one column, containing the positions expected. The variant from *analyse-local* are used as input file and length needs to be specified (usually 16,569, but as there are different reference sequence, this can vary as well).
If you have a mixture model generated, you can use mutserve for checking precision, specificity and sensitivity. The expected mutations (homoplasmic and heteroplasmic) need to be provided as gold standard in form of a text file, with one column, containing the positions expected. The variant from *analyse-local* are used as input file and length needs to be specified (usually 16,569 for human mitochondrial genomes, but as there are different reference sequence, this can vary as well). The value provided in *level* indicates the threshold for heteroplasmic levels to be considered in the analysis.
```
java -jar mutserve-1.2.1.jar performance --in <variantfile> --gold <expectedmutations> --length <size of reference>
java -jar mutserve-1.2.2.jar performance --in <variantfile> --gold <expectedmutations> --length <size of reference> --level <threshold for heteroplasmic levels>
```

## Citation
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>genepi</groupId>
<artifactId>mutserve</artifactId>
<version>1.2.1</version>
<version>1.2.2</version>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/genepi/mut/pileup/PileupToolLocal.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

public class PileupToolLocal extends Tool {

String version = "v1.2.1";
String version = "v1.2.2";
String mode = "mtdna";
String command;

Expand Down
12 changes: 10 additions & 2 deletions src/main/java/genepi/mut/tools/CalcPrecision.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ public void createParameters() {
addParameter("gold", "expected positions");
addParameter("in", "input csv file");
addParameter("length", "length of genome/locus", INTEGER);
addParameter("level", "heteroplasmy level applied", DOUBLE);

}

Expand All @@ -37,7 +38,8 @@ public void init() {
public int run() {

final String pos = "Pos";
final String sampleId= "SampleID";
final String sampleId= "ID";
final String variantlevel ="VariantLevel";

Set<Integer> allPos = new TreeSet<Integer>();
Set<Integer> goldPos = new TreeSet<Integer>();
Expand All @@ -48,6 +50,7 @@ public int run() {

String gold = (String) getValue("gold");
int length= (int)getValue("length");
double level = (double) getValue("level");

CsvTableReader idReader = new CsvTableReader(in, '\t');

Expand Down Expand Up @@ -90,10 +93,14 @@ public int run() {

int posSample = variantReader.getInteger(pos);

double variantlevSample = variantReader.getDouble(variantlevel);

if (id.equals(idSample)) {

int position = posSample;

if (variantlevSample>level) {

if (goldPos.contains(position)) {
goldPos.remove(position);
truePositiveCount++;
Expand All @@ -105,6 +112,7 @@ public int run() {
}

}
}
}

for (int j = 1; j <= length; j++) {
Expand Down Expand Up @@ -138,7 +146,7 @@ public int run() {
String spec = df.format(spec2);
String prec = df.format(prec2);

System.out.println(id+"\t"+truePositiveCount+"/"+ (truePositiveCount + falseNegativeCount)+"\t"+falsePositiveCount+"\t"+prec+"\t"+sens+"\t"+spec);
System.out.println(id+"\t"+truePositiveCount+" / "+ (truePositiveCount + falseNegativeCount)+"\t"+falsePositiveCount+"\t"+prec+"\t"+sens+"\t"+spec);

}
return 0;
Expand Down

0 comments on commit 157da51

Please sign in to comment.