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
              Advancing Precision Medicine for Rare Diseases in Children
              by seqadmin




              Many organizations study rare diseases, but few have a mission as impactful as Rady Children’s Institute for Genomic Medicine (RCIGM). “We are all about changing outcomes for children,” explained Dr. Stephen Kingsmore, President and CEO of the group. The institute’s initial goal was to provide rapid diagnoses for critically ill children and shorten their diagnostic odyssey, a term used to describe the long and arduous process it takes patients to obtain an accurate...
              12-16-2024, 07:57 AM
            • seqadmin
              Recent Advances in Sequencing Technologies
              by seqadmin



              Innovations in next-generation sequencing technologies and techniques are driving more precise and comprehensive exploration of complex biological systems. Current advancements include improved accessibility for long-read sequencing and significant progress in single-cell and 3D genomics. This article explores some of the most impactful developments in the field over the past year.

              Long-Read Sequencing
              Long-read sequencing has seen remarkable advancements,...
              12-02-2024, 01:49 PM

            ad_right_rmr

            Collapse

            News

            Collapse

            Topics Statistics Last Post
            Started by seqadmin, 12-17-2024, 10:28 AM
            0 responses
            23 views
            0 likes
            Last Post seqadmin  
            Started by seqadmin, 12-13-2024, 08:24 AM
            0 responses
            42 views
            0 likes
            Last Post seqadmin  
            Started by seqadmin, 12-12-2024, 07:41 AM
            0 responses
            28 views
            0 likes
            Last Post seqadmin  
            Started by seqadmin, 12-11-2024, 07:45 AM
            0 responses
            42 views
            0 likes
            Last Post seqadmin  
            Working...
            X