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
                Beyond CRISPR/Cas9: Understand, Choose, and Use the Right Genome Editing Tool
                by SEQadmin2



                CRISPR/Cas9 sparked the gene editing revolution for both research and therapeutics.1 But this system still showed severe issues that limited its applications. The most prominent were the heavy reliance on PAM sequences, delivery limitations, double-stranded breaks that prompt unintended edits and cell death, and editing inefficiency (both in targeting and in knock-in reliability).

                Despite this, “CRISPR helped turn genome editing from a specialized technique into
                ...
                Yesterday, 11:01 AM
              • SEQadmin2
                Proteomic Platforms: How to Choose the Right Analytical Strategy to Improve Detection and Clinical Applications
                by SEQadmin2


                Proteomics platforms are evolving rapidly, with advances in mass spectrometry and affinity-based approaches expanding what researchers can detect and at what scale. As the field moves toward deeper proteome coverage and clinical applications, scientists face an increasingly complex landscape of tools. This article will explore how researchers are navigating these choices to find the right platform for their work.

                The systematic characterization of the human proteome has
                ...
                07-20-2026, 11:48 AM
              • SEQadmin2
                Advanced Sequencing Platforms Tackle Neuroscience’s Toughest Genomics Problems
                by SEQadmin2



                Genomics studies in neuroscience face a special challenge due to the brain’s complexity and scarcity of samples. Mapping changes in cell type and state using conventional next-generation sequencing methods remains challenging. Advances in technologies like single-cell sequencing, spatial transcriptomics, and long-read sequencing have opened the door to deeper studies of the brain and diseases like Alzheimer’s, amyotrophic lateral sclerosis (ALS), and schizophrenia.
                ...
                07-09-2026, 11:10 AM

              ad_right_rmr

              Collapse

              News

              Collapse

              Topics Statistics Last Post
              Started by SEQadmin2, Yesterday, 02:55 AM
              0 responses
              9 views
              0 reactions
              Last Post SEQadmin2  
              Started by SEQadmin2, 07-24-2026, 12:17 PM
              0 responses
              12 views
              0 reactions
              Last Post SEQadmin2  
              Started by SEQadmin2, 07-23-2026, 11:41 AM
              0 responses
              13 views
              0 reactions
              Last Post SEQadmin2  
              Started by SEQadmin2, 07-20-2026, 11:10 AM
              0 responses
              24 views
              0 reactions
              Last Post SEQadmin2  
              Working...