Genome Analysis Toolkit

Variant Discovery in High-Throughput Sequencing Data

GATK process banner

Need Help?

Search our documentation

Community Forum

Hi, How can we help?

Developed in the Data Sciences Platform at the Broad Institute, the toolkit offers a wide variety of tools with a primary focus on variant discovery and genotyping. Its powerful processing engine and high-performance computing features make it capable of taking on projects of any size. Learn more

Error remove 0x1 from alternate contigs tutorial

Answered
0

5 comments

  • Avatar
    Genevieve Brandt (she/her)

    Hi Linda Do, which samtools version are you using? It looks like the version used for this tutorial is v1.3.1.

    0
    Comment actions Permalink
  • Avatar
    Linda Do

    I am currently using v1.11. Do I need to downgrade to v1.3.1 for this tutorial?

    0
    Comment actions Permalink
  • Avatar
    Genevieve Brandt (she/her)

    Hi Linda Do,

    Since this is a documentation question, I am going to move it to the Documentation Questions topic.

    We don't support samtools so I don't have any insight into getting around the error, and also that tutorial has not been updated so the commands are out of date. 

    To get it to work though, it probably would be good to try the older version of samtools. Other community members might have insight as well.

    Best,

    Genevieve

    0
    Comment actions Permalink
  • Avatar
    Linda Do

    Hi Genevieve Brandt. Unfortunately, after downgrading samtools to v1.3.1, the code using the tutorial ( https://gatk.broadinstitute.org/hc/en-us/articles/360037498992--How-to-Map-reads-to-a-reference-with-alternate-contigs-like-GRCH38 ) still did not work.

    samtools view -h /families/bam/CS6.bam | gawk '{printf "%s\t", $1; if(and($2,0x1)){t=$2-0x1}else{t=$2}; printf "%s\t" , t; for (i=3; iprintf "%s\n",$NF}'| samtools view -Sb - > /vipbg-data/home/shianglab/20180828_NG/VariantFiltration/families/bam/CS6.rm0x1.bam

    The error I recieved:

    gawk: {printf "%s\t", $1; if(and($2,0x1)){t=$2-0x1}else{t=$2}; printf "%s\t" , t; for (i=3; iprintf "%s\n",$NF}
    gawk: ^ syntax error

    But when I run (from the GitHub GATK3 tutorial)

    samtools view -h /families/bam/CS6.bam | gawk '{printf "%s\t", $1; if(and($2,0x1)){t=$2-0x1}else{t=$2}; printf "%s\t" , t; for (i=3; i<NF; i++){printf "%s\t", $i} ; printf "%s\n",$NF}'| samtools view -Sb - > /vipbg-data/home/shianglab/20180828_NG/VariantFiltration/families/bam/CS6.rm0x1.bam

    It does output a file but I am still unsure if that file will work with the rest of the workflow (I will update this post later if it works or not) since it is from the GitHub GATK3 tutorial and not the same as in the tutorial on the this (GATK4) website. The only difference between the two tutorials in the gawk part so does this mean that the code in the tutorial is wrong and that the gawk code from the GATK3 GitHub is correct?

    Thank you in advance!

     

    0
    Comment actions Permalink
  • Avatar
    Genevieve Brandt (she/her)

    Linda Do It looks like that might be a copy-paste typo, thank you for finding that! I'll try to get the GATK4 website version fixed.

    0
    Comment actions Permalink

Please sign in to leave a comment.

Powered by Zendesk