Seqanswers Leaderboard Ad

Collapse

Announcement

Collapse
No announcement yet.
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • convert hg18 mapping into hg19

    Hi,

    I have set of (huge) data being mapped against to hg18 build. Now I want the mapping to be done against hg19.
    Do I have to remap the data against hg19 build? Or do I convert the coordinates using UCSC liftover? Please let me know the details. Thx.
    Last edited by seq_GA; 07-29-2010, 12:04 AM.

  • #2
    It depends. The easy way is of course using UCSC liftover (you'll need the .chain file and liftOver to run it locally on a linux system), but you might learn something from remapping - perhaps some data that had not been mappable previously now is.

    Here's a python function that takes a list like [(chr, start, stop)], runs liftover using a given chain file and get's you another list with the new coordinates.

    Code:
        def do_liftover(listOfChromosomeIntervals, chain_file):
            """perform a lift over. Error messages are silently swallowed!"""
            tmp_input = tempfile.NamedTemporaryFile()
            tmp_output = tempfile.NamedTemporaryFile()
            tmp_error = tempfile.NamedTemporaryFile()
            max_len = 0
            for row in listOfChromosomeIntervals:
                tmp_input.write(" ".join(str(x) for x in row))
                tmp_input.write("\n")
                max_len = max(len(row), max_len)
            tmp_input.write("\n")
            tmp_input.flush()#it's magic ;)
            cmd = [os.path.join(os.path.dirname(__file__), 'chains','liftOver'), tmp_input.name, chain_file, 
                   tmp_output.name, tmp_error.name]
            p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr = subprocess.PIPE)
            p.communicate()
            tmp_output.seek(0, os.SEEK_SET)
            res = []
            for row in tmp_output:
                row = row.strip().split("\t")
                row[1] = int(row[1])
                row[2] = int(row[2])
                res.append(tuple(row))
            tmp_error.seek(0, os.SEEK_SET)
            d = tmp_error.read()
            tmp_input.close()
            tmp_output.close()
            tmp_error.close()
            return res

    Comment


    • #3
      Ok ffinkernagel. Thx for your response.

      Comment


      • #4
        I think the best way is to remap against hg19. It will take the similar time when you use liftover to transfer hg18 to hg19. Good lucky!

        Comment


        • #5
          Originally posted by lmf_bill View Post
          I think the best way is to remap against hg19. It will take the similar time when you use liftover to transfer hg18 to hg19. Good lucky!
          That's not been our experience. It may be worth remapping against the newer assembly to get the most from your data, but running liftOver is a much quicker option. LiftOver is ridiculously fast!

          Comment


          • #6
            yes, If you only want to get the location transfer, liftover is faster. In the mean time, many novel cases need to be consider, just as you said you can get more info from the newer assembly. Besides, some additional assemble regions will also make it difficult. So, the easy way is remapping. By the way, how huge are your data? several terabyte?

            Comment

            Latest Articles

            Collapse

            • seqadmin
              Strategies for Sequencing Challenging Samples
              by seqadmin


              Despite advancements in sequencing platforms and related sample preparation technologies, certain sample types continue to present significant challenges that can compromise sequencing results. Pedro Echave, Senior Manager of the Global Business Segment at Revvity, explained that the success of a sequencing experiment ultimately depends on the amount and integrity of the nucleic acid template (RNA or DNA) obtained from a sample. “The better the quality of the nucleic acid isolated...
              03-22-2024, 06:39 AM
            • seqadmin
              Techniques and Challenges in Conservation Genomics
              by seqadmin



              The field of conservation genomics centers on applying genomics technologies in support of conservation efforts and the preservation of biodiversity. This article features interviews with two researchers who showcase their innovative work and highlight the current state and future of conservation genomics.

              Avian Conservation
              Matthew DeSaix, a recent doctoral graduate from Kristen Ruegg’s lab at The University of Colorado, shared that most of his research...
              03-08-2024, 10:41 AM

            ad_right_rmr

            Collapse

            News

            Collapse

            Topics Statistics Last Post
            Started by seqadmin, Yesterday, 06:37 PM
            0 responses
            10 views
            0 likes
            Last Post seqadmin  
            Started by seqadmin, Yesterday, 06:07 PM
            0 responses
            9 views
            0 likes
            Last Post seqadmin  
            Started by seqadmin, 03-22-2024, 10:03 AM
            0 responses
            50 views
            0 likes
            Last Post seqadmin  
            Started by seqadmin, 03-21-2024, 07:32 AM
            0 responses
            67 views
            0 likes
            Last Post seqadmin  
            Working...
            X