Unconfigured Ad

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kumardeep
    Member
    • Apr 2012
    • 15

    #1

    How to fetch sequence from chromosome coordinates

    Hi all
    I have chromosome coordinates (e.g. 5233922 to 5235189 of chr18). how can I get the sequence corresponding to this region ?
    Like this I have huge file containing chr1 to chr21 and chr X and chrY. Is there any platform where I can give the coordinate file and that give me the desired nucleotide sequences ?
    Is there any difference between using hg18 human reference genome or hg19 for the same purpose. Because the experiment has used hg18 assembly to generate the coordinates (which they have given in supplementary material).

    Thanks in advance.
    KD
  • marloch
    Junior Member
    • Jan 2009
    • 3

    #2
    Originally posted by kumardeep View Post
    Hi all
    I have chromosome coordinates (e.g. 5233922 to 5235189 of chr18). how can I get the sequence corresponding to this region ?
    Like this I have huge file containing chr1 to chr21 and chr X and chrY. Is there any platform where I can give the coordinate file and that give me the desired nucleotide sequences ?
    Is there any difference between using hg18 human reference genome or hg19 for the same purpose. Because the experiment has used hg18 assembly to generate the coordinates (which they have given in supplementary material).

    Thanks in advance.
    KD
    Hello,

    you can use the faidx command of samtools.
    First you need to create an indexed version of your FASTA:

    samtools faidx genome.fa

    Then you can retrieve any region, using the syntax chromosome:start-stop

    samtools faidx genome.fa chr18:5233922-5235189

    Cheers,
    Marco

    Comment

    • kumardeep
      Member
      • Apr 2012
      • 15

      #3
      Thanks Marloch...

      Comment

      • JQL
        Member
        • Apr 2011
        • 83

        #4
        I am also trying to retrieve sequences from chromosome coordinates, but I have 50, not just one. I hope I don't have to run samtools 50 times.

        Anybody has an easy way doing this?

        I tried in R using system(), but there are some problems.
        if I run >system('samtools faidx genome.fa chr2:1000:2000'), it prints out the sequence I wanted in console, but if I put in a variable x<-"chr2:1000:2000", it only prints out "x", but no sequences. So how to get the system() to recognize a varialbe?

        Also, can't seems to get the output to a file.
        >system('samtools faidx genome.fa chr2:1000:2000 >out.txt') doesn't work

        thanks in advance.

        Comment

        • krespim
          Member
          • Jul 2012
          • 49

          #5
          Originally posted by JQL View Post
          I am also trying to retrieve sequences from chromosome coordinates, but I have 50, not just one. I hope I don't have to run samtools 50 times.

          Anybody has an easy way doing this?

          I tried in R using system(), but there are some problems.
          if I run >system('samtools faidx genome.fa chr2:1000:2000'), it prints out the sequence I wanted in console, but if I put in a variable x<-"chr2:1000:2000", it only prints out "x", but no sequences. So how to get the system() to recognize a varialbe?

          Also, can't seems to get the output to a file.
          >system('samtools faidx genome.fa chr2:1000:2000 >out.txt') doesn't work

          thanks in advance.
          You can use the Biostring package I think. Check out this tutorial (end of page).

          Comment

          • crazyhottommy
            Senior Member
            • Apr 2012
            • 187

            #6
            it is an old post, I have an old post addressing this http://crazyhottommy.blogspot.com/20...inates-to.html

            Comment

            • maximilianh
              Member
              • Oct 2009
              • 15

              #7
              UCSC version

              You can use a command like this:

              twoBitToFa http://hgdownload.cse.ucsc.edu/gbdb/hg19/hg19.2bit -bed=input.bed test.fa

              or for a single region:

              twoBitToFa http://hgdownload.cse.ucsc.edu/gbdb/hg19/hg19.2bit test.fa -seq=chr21 -start=1 -end=10000

              Requires the UCSC tool twoBitToFa, available from http://hgdownload.cse.ucsc.edu/admin/exe/

              Comment

              Latest Articles

              Collapse

              • SEQadmin2
                Multiomic Liquid Biopsy: What DNA/RNA Panels Reveal That DNA Alone Can’t
                by SEQadmin2



                Tumors contain complex mixtures of cell populations that evolve in response to treatment and host-specific factors. Tissue biopsies provide only static snapshots of a tumor’s state. But what if we could follow that evolution over time using a minimally invasive technique?

                Liquid biopsies can detect tumor-derived material circulating in the bloodstream, providing a way to study treatment response, detect emerging resistance, and discover new biomarkers. Circulating
                ...
                10-14-2026, 09:55 AM
              • SEQadmin2
                New Genomics Technologies Take Aim at Long-Standing Limits
                by SEQadmin2


                Researchers using sequencing and genomics tools often have to make trade-offs. They can choose between speed or scale, short reads or long-range information, or targeted panels or a view of the whole transcriptome. New technologies that have been released this year are built to address those tough choices.

                We asked six companies the same four questions to learn about their latest products. The new technologies bring a lot to the table, including rethinking sequencing
                ...
                09-28-2026, 10:25 AM

              ad_right_rmr

              Collapse

              News

              Collapse

              Topics Statistics Last Post
              Started by SEQadmin2, 10-22-2026, 11:13 AM
              0 responses
              27 views
              0 reactions
              Last Post SEQadmin2  
              Started by SEQadmin2, 10-22-2026, 10:48 AM
              0 responses
              20 views
              0 reactions
              Last Post SEQadmin2  
              Started by SEQadmin2, 10-15-2026, 10:52 AM
              0 responses
              36 views
              0 reactions
              Last Post SEQadmin2  
              Started by SEQadmin2, 10-14-2026, 05:39 AM
              0 responses
              43 views
              0 reactions
              Last Post SEQadmin2  
              Working...