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
              Recent Developments in Metagenomics
              by seqadmin





              Metagenomics has improved the way researchers study microorganisms across diverse environments. Historically, studying microorganisms relied on culturing them in the lab, a method that limits the investigation of many species since most are unculturable1. Metagenomics overcomes these issues by allowing the study of microorganisms regardless of their ability to be cultured or the environments they inhabit. Over time, the field has evolved, especially with the advent...
              09-23-2024, 06:35 AM
            • seqadmin
              Understanding Genetic Influence on Infectious Disease
              by seqadmin




              During the COVID-19 pandemic, scientists observed that while some individuals experienced severe illness when infected with SARS-CoV-2, others were barely affected. These disparities left researchers and clinicians wondering what causes the wide variations in response to viral infections and what role genetics plays.

              Jean-Laurent Casanova, M.D., Ph.D., Professor at Rockefeller University, is a leading expert in this crossover between genetics and infectious...
              09-09-2024, 10:59 AM

            ad_right_rmr

            Collapse

            News

            Collapse

            Topics Statistics Last Post
            Started by seqadmin, 10-02-2024, 04:51 AM
            0 responses
            13 views
            0 likes
            Last Post seqadmin  
            Started by seqadmin, 10-01-2024, 07:10 AM
            0 responses
            21 views
            0 likes
            Last Post seqadmin  
            Started by seqadmin, 09-30-2024, 08:33 AM
            0 responses
            26 views
            0 likes
            Last Post seqadmin  
            Started by seqadmin, 09-26-2024, 12:57 PM
            0 responses
            18 views
            0 likes
            Last Post seqadmin  
            Working...
            X