The current GATK version is 3.4-46

#### Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

# Suppressing the legend on the tranches plot of the variantrecallibration step

Posts: 15Member

Hello GATK team,

Thank you for the excellent tool kit and continuous development.
I know this might be easy but I wanted to suppress the legend in the tranches plot of the Variantrecallibration step. I looked up the R code that generated the plot in the GATK directory and couldn't find it. Is there possibly a way to remove that legend or place it on top of the plot instead of in the left bottom corner.

Thank you

Tagged:

I looked up the R code that generated the plot in the GATK directory and couldn't find it

Do you mean you couldn't find the R script or you did but couldn't find the relevant part within the script?

Geraldine Van der Auwera, PhD

• Posts: 15Member

Hi Geraldine,

I didn't actually find the R script to plot the tranches plot. I thought it was possibly in the GATK resources folder?!
I know that GATK uses R to generate that plot but I don't know how to modify it. Now, that I searched further I guess I found a version of the R script online but I am not sure I can supply all the Args for it?

Thank you

@Geraldine_VdAuwera said:
Do you mean you couldn't find the R script or you did but couldn't find the relevant part within the script?

Ah yes, that's the script you need. You can run it independently after running the recalibrator a first time. These are the arguments you need to give it:

1. the tranches file produced by VariantRecalibrator
2. the target TITV: this will depend on what kind of data you are analyzing (basically WGS or exome); you can look up the default value in the recalibrator documentation
3. the target sensitivity is the tranche you specify as cutoff in the basic command line for recalibration
4. this is what allows you to suppress the legend; pass any value you like and the legend will be suppressed (if the field is empty then the legend is produced)

Geraldine Van der Auwera, PhD

• Posts: 15Member

Thank you Geraldine,

I have used the R code and asked it to suppress the legend (using suppress legend =1). I also used the default TITV and target sensitivity values.
It did suppress the legend, however, it also omitted the Tranch−specific FPs and Cumulative FPs from the plot.
I have attached the resulting plots from original Variantrecallibration run and the one using the tranches file from the run (using the R code). I have also attached the actual tranches file. Upon looking at the R code, there didn't seem to me like there was something missing (unless of course if it was beyond my R scope of knowledge).

Also, clarity here are the args I passed:
tranchesFile = "output.snp.tranches"
targetTITV = 1
targetSensitivity = c(90.0, 99.0, 99.9, 100)
suppressLegend = 1

Thank you

@Geraldine_VdAuwera said:
Ah yes, that's the script you need. You can run it independently after running the recalibrator a first time. These are the arguments you need to give it:

1. the tranches file produced by VariantRecalibrator
2. the target TITV: this will depend on what kind of data you are analyzing (basically WGS or exome); you can look up the default value in the recalibrator documentation
3. the target sensitivity is the tranche you specify as cutoff in the basic command line for recalibration
4. this is what allows you to suppress the legend; pass any value you like and the legend will be suppressed (if the field is empty then the legend is produced)
• GermanyPosts: 47Member

Where can I find the R script to generate the tranche plot?

The R script is autogenerated by the java code when the program runs, but you can use the --rscript_file argument to save a copy.

Geraldine Van der Auwera, PhD

• GermanyPosts: 47Member

It didn;t for me. Only for the Gaussian mixture model plots...