Heads up:
We’re moving the GATK website, docs and forum to a new platform. Read the full story and breakdown of key changes on this blog.
If you happen to see a question you know the answer to, please do chime in and help your fellow community members. We encourage our fourm members to be more involved, jump in and help out your fellow researchers with their questions. GATK forum is a community forum and helping each other with using GATK tools and research is the cornerstone of our success as a genomics research community.We appreciate your help!

Test-drive the GATK tools and Best Practices pipelines on Terra

Check out this blog post to learn how you can get started with GATK and try out the pipelines in preconfigured workspaces (with a user-friendly interface!) without having to install anything.
We will be out of the office for a Broad Institute event from Dec 10th to Dec 11th 2019. We will be back to monitor the GATK forum on Dec 12th 2019. In the meantime we encourage you to help out other community members with their queries.
Thank you for your patience!

GATK4 Plot segmented coverage

I am using GATK4 for detecting CNV in 143 genes. Everything works great except for the plots, i found no errors in the command line but i dont know why all the plots appear empty. i checked all the .tn and .ptn files and they seem fine. I am using CENTOS and installed all de R dependencies needed for this step. Can someone help me? Or does somebody had the same issue?

Thank you!


Best Answer


  • sleeslee Member, Broadie, Dev ✭✭✭

    Hi @RosieQuezada,

    The CNV/ACNV plotting tools are only compatible with GRCh37/hg19 (although the latter may require manually removing "chr" from contig names). Can you confirm whether or not this is the issue?

  • RosieQuezadaRosieQuezada MexicoMember

    I am currently using the GRCh37/hg19. Not the issue.
    Thank you.

  • RosieQuezadaRosieQuezada MexicoMember

    Hi @shlee it is the same issue, i removed the chr from my data (only in the.ptn and .tn files) but still got the empty graphs. The analysis had no errors. What should i do? Is there any other way i can plot this results with the same files generated by this analysis?
    Thank you

    Issue · Github
    by Sheila

    Issue Number
    Last Updated
    Closed By
  • RosieQuezadaRosieQuezada MexicoMember

    @shlee i forgot, i also removed the chr from the seg file

  • shleeshlee CambridgeMember, Broadie ✭✭✭✭✭
    edited January 2017

    Hi @RosieQuezada,

    I'm sorry you are experiencing this issue. I hear that our developers are making the plotting tool compatible with references other than b37.

    In the meanwhile, do you see the numbers below the empty plots on the x-axis? This is the order the data must be in for each of the three input files. In addition, you need to remove any data from contigs that are not represented by the x-axis, e.g. mitochondria, sex chromosomes, patches etc.

    I can only think of UNIX commands to help with this, e.g.

    cat filename.txt | sort -n > sortedfile.txt

    and you'll have to account for the header in the file if there is one.

    Remember that this plotting step is optional and you will still get CNV calls with the CallSegments step. I think I make some recommendations to amjad about plotting using RStudio or making heatmaps with IGV. I can only explain further the latter option if you are interested.

    I hope this is helpful.

  • RosieQuezadaRosieQuezada MexicoMember

    Thank you so much @shlee i ask amjad the way he resolved the issue and he was kind enough to give me the complete R script for that. So now i do have something in my plot! but i did those changes from the begining, i think i did something wrong now, because all i can see is Chr 1 in the plot. Cheked the rest of the data in the .ptn files and is not there only chr1, but in the coverage file the data is complete, at least i can see data from chr 22. Any ideas?

    Really appreciate your help.
    Thank you

  • shleeshlee CambridgeMember, Broadie ✭✭✭✭✭


    I'm glad to hear our community helps each other.

    For this plotting of only chromosome 1 data, am I understanding correctly that the data represented in each of the files has different genomic coverage? That doesn't sound right.

  • RosieQuezadaRosieQuezada MexicoMember

    HI @shlee I am glad to tell you that i finally did it. i did the sorting and the removal of the chr in the .ptn, .tn and seg files.
    Thank you so much for your help. Although im also interested in the heat map and the r studio options, what package would you recommend? And can i use the same output of this analysis?

    Thank you

  • shleeshlee CambridgeMember, Broadie ✭✭✭✭✭

    Hi @RosieQuezada,

    You can display heatmaps in IGV. You will have to change IGV's coloring scheme to center around the value that is neutral. I'm not familiar with R packages, so I've asked our developers what they would recommend. I hope they get back to you soon.

  • shleeshlee CambridgeMember, Broadie ✭✭✭✭✭

    Hi @RosieQuezada,

    Heard from the developers. Check out the R scripts in https://github.com/broadinstitute/gatk-protected/tree/master/src/main/resources/org/broadinstitute/hellbender/utils/plotter. You can freely take these and augment them to suit your analysis needs. I hope they are helpful!

Sign In or Register to comment.