Unconfigured Ad

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • HGENETIC
    still a novice
    • Jul 2010
    • 34

    GATK realignment

    Hi there,
    I'm trying to produce a list of possible indels using the GATK Realigner Target Creator. I have the latest version of hg19.fasta as my reference and db135.vcf file as my known indels file. I have removed all the chr tags so my chromosomes are intergers (1 - 2 - 3...) but for some reason my reference fatsa file after being indexed is sorted 1 2 3 4 5 6 7 X 8 9 10 11 12 13 14 15 16 17 18 20 Y 19 22 21 M. I cant find any way of getting GATK to run with the data in this format and I have no idea how to change the file, using 'sort' doesn't work?

    Any help would be much appreciated - Thanks H
  • shawpa
    Member
    • Aug 2011
    • 73

    #2
    I don't know the answer to your question but I am interested in how you renamed your contigs. Right now I have a ref with chr1, chr2 etc and the dbSNP file is 1,2 etc. I am also a novice so help would be appreciated.

    Comment

    • HGENETIC
      still a novice
      • Jul 2010
      • 34

      #3
      Originally posted by shawpa View Post
      I don't know the answer to your question but I am interested in how you renamed your contigs. Right now I have a ref with chr1, chr2 etc and the dbSNP file is 1,2 etc. I am also a novice so help would be appreciated.
      I just used the UNIX command:

      $ sed "s/chr//g" file_to.change > new.file

      try that it worked for me.

      Comment

      • Heisman
        Senior Member
        • Dec 2010
        • 534

        #4
        Why don't you just change the name back to having the "chr"?

        Comment

        • HGENETIC
          still a novice
          • Jul 2010
          • 34

          #5
          Originally posted by Heisman View Post
          Why don't you just change the name back to having the "chr"?
          I'm relatively new to UNIX and so for me the easiest way to overcome the problem was to make everything into an interger, how would you convert chromosomal intergers in a .vcf or .fasta file back into the chr1 format?

          Comment

          • shawpa
            Member
            • Aug 2011
            • 73

            #6
            Well I don't know how to get it to work either way. Working on Countcovariates step and I did what HGENETIC suggests (thanks by the way) and I stopped having the issue with my known sites file and reference. Now it is giving error because my bam input still has chr 1 chr2 etc. Tried the "fix" from above and it didn't seem to work on the bam file.

            Comment

            • Heisman
              Senior Member
              • Dec 2010
              • 534

              #7
              Wait, I'm being dumb. Why did you remove the "chr" tags in the first place?

              Anyways, if you wanted to go back, your headers in the fasta file are like ">1" and ">2", and nothing else is, correct? Then you can type sed 's/>/>chr/' input_file > output_file

              Comment

              • Heisman
                Senior Member
                • Dec 2010
                • 534

                #8
                Originally posted by shawpa View Post
                Well I don't know how to get it to work either way. Working on Countcovariates step and I did what HGENETIC suggests (thanks by the way) and I stopped having the issue with my known sites file and reference. Now it is giving error because my bam input still has chr 1 chr2 etc. Tried the "fix" from above and it didn't seem to work on the bam file.
                Yeah, bam files are compressed so that wouldn't work.

                There is no need to rename your reference sequence for this purpose.

                Comment

                • shawpa
                  Member
                  • Aug 2011
                  • 73

                  #9
                  I removed the chr from the file because GATK gave me an error saying "known site and reference have incompatible contigs: No overlapping contigs found" So I took out the chr from my reference file to match the other. Now I run it and it says "Input files reads and reference have incompatible contigs: No overlapping contigs found." I think it is talking about my bam file and since I aligned my bam file with a reference that still had chr in it I am having an issue. Atleast I think this is what the error meant.

                  Comment

                  • Heisman
                    Senior Member
                    • Dec 2010
                    • 534

                    #10
                    That makes sens. I guess my question is, why don't you have "chr" in every file?

                    Comment

                    • HGENETIC
                      still a novice
                      • Jul 2010
                      • 34

                      #11
                      Originally posted by Heisman View Post
                      Wait, I'm being dumb. Why did you remove the "chr" tags in the first place?

                      Anyways, if you wanted to go back, your headers in the fasta file are like ">1" and ">2", and nothing else is, correct? Then you can type sed 's/>/>chr/' input_file > output_file
                      Thanks for that I think that would work nicely, the reason I removed the chr tags was because i was trying to use the dbSNP135 known variant file which only had intergers whereas my fasta file had the chr tags - I think? To make things easier I'm just going to download and use the data from the GATK bundle as that should all be compatible.

                      Comment

                      • Heisman
                        Senior Member
                        • Dec 2010
                        • 534

                        #12
                        Yes, just use the stuff in their data bundle. There are a lot of errors in dbSNP 135 anyway. I emailed the NCBI about this awhile ago and to my knowledge they are still working on it.

                        Comment

                        • HGENETIC
                          still a novice
                          • Jul 2010
                          • 34

                          #13
                          Originally posted by Heisman View Post
                          Yes, just use the stuff in their data bundle. There are a lot of errors in dbSNP 135 anyway. I emailed the NCBI about this awhile ago and to my knowledge they are still working on it.
                          Out of curiosity do you know the difference between the data in the GATK bundle for b37 and hg19, all the file names are the same except for this?

                          Comment

                          • shawpa
                            Member
                            • Aug 2011
                            • 73

                            #14
                            Originally posted by HGENETIC View Post
                            Out of curiosity do you know the difference between the data in the GATK bundle for b37 and hg19, all the file names are the same except for this?
                            I am curious about this too. If I did alignment using hg19 but now I switch to b37 for the countcovariates step will everything be screwed up?

                            Comment

                            • Heisman
                              Senior Member
                              • Dec 2010
                              • 534

                              #15
                              This is one of those things I tend to ignore although I shouldn't. I think the vast majority of it is the same, but I could be completely wrong.

                              Comment

                              Latest Articles

                              Collapse

                              • GATTACAT
                                Reply to Nine Things a Sample Prep Scientist Thinks About Before Sequencing
                                by GATTACAT
                                Love this - good data definitely starts from good input, and poor input can only give relatively poor data. I particularly like the mention of Nanodrop/absorbance based methods for quantification. It's such a toss up if you'll get an accurate reading or what amounts to a randomly generated number, and a lot of library/sequencing related issues can be traced back to poor quant.
                                07-01-2026, 11:43 AM
                              • SEQadmin2
                                Nine Things a Sample Prep Scientist Thinks About Before Sequencing
                                by SEQadmin2


                                I’m not a sequencing expert. I’m a purification scientist who uses NGS to evaluate workflows my group develops. With this perspective, we think about the sample first and the NGS workflow second. The sequencer is an exceptionally honest reporter, but it can only report on what you give it, so whether you get clean, interpretable data from an NGS workflow is largely determined before you begin.

                                Here are nine questions we think about, in roughly the order they matter, before...
                                06-18-2026, 07:11 AM

                              ad_right_rmr

                              Collapse

                              News

                              Collapse

                              Topics Statistics Last Post
                              Started by SEQadmin2, 07-02-2026, 11:08 AM
                              0 responses
                              22 views
                              0 reactions
                              Last Post SEQadmin2  
                              Started by SEQadmin2, 06-30-2026, 05:37 AM
                              0 responses
                              23 views
                              0 reactions
                              Last Post SEQadmin2  
                              Started by SEQadmin2, 06-26-2026, 11:10 AM
                              0 responses
                              22 views
                              0 reactions
                              Last Post SEQadmin2  
                              Started by SEQadmin2, 06-17-2026, 06:09 AM
                              0 responses
                              55 views
                              0 reactions
                              Last Post SEQadmin2  
                              Working...