Unconfigured Ad

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • anibhax
    Member
    • Jan 2013
    • 24

    #1

    How does one find upstream regions of a gene from BED files

    Hi,

    I obtained a list of refseq genes from UCSC genome in the bed file format. For my analysis I would like to see if a particular region falls within a few bp (say 1000bp) upstream to the gene as well.

    Is it as simple as just adding 1000bp to the gene starting position (e.g., below) -> 8378298 + 1000 = 8379298? I'm assuming there is a catch here. Can anyone tell me the right way to do it?
    e.g: chrI 8378298 8390022 NM_001129046 0 - 8378298 8390022 0 8 123,103,110,116,65,69,124,113, 0,832,1401,2025,9723,9836,10481,11611,
    Last edited by anibhax; 06-03-2013, 11:53 AM. Reason: Proper formatting
  • AlexReynolds
    Member
    • Feb 2013
    • 45

    #2
    You could use the bedops program, part of the BEDOPS suite. It has an asymmetric --range operand that you can use to search for set overlaps with adjusted coordinate ranges:



    For example:

    $ bedops --range -1000:0 --element-of -1 genes.bed regions.bed > answer.bed

    The file answer.bed will contain elements of genes.bed which overlap the coordinates of elements of regions.bed. In this example, overlap is defined as any base from 1000 bases upstream of the start position of the gene element to the stop position of the gene element.

    The main requirement for input to BEDOPS tools is that it is sorted. Use BEDOPS sort-bed for this purpose, e.g.:

    $ sort-bed unsorted-genes.bed > genes.bed
    $ sort-bed unsorted-regions.bed > regions.bed


    Sorting is quick and allows BEDOPS tools to work fast and with a low memory profile. You only have to sort inputs once. Any output from BEDOPS tools is sorted, in case you want to do further downstream processing of it.

    For more details, see: http://code.google.com/p/bedops/wiki/sortBed
    Last edited by AlexReynolds; 06-03-2013, 02:42 PM.

    Comment

    • anibhax
      Member
      • Jan 2013
      • 24

      #3
      Originally posted by AlexReynolds View Post
      You could use the bedops program, part of the BEDOPS suite. It has an asymmetric --range operand that you can use to search for set overlaps with adjusted coordinates:



      For example:

      $ bedops --range -1000:0 --element-of -1 genes.bed regions.bed > answer.bed

      The file answer.bed will contain elements of genes.bed which overlap the coordinates of elements of regions.bed. In this example, overlap is defined as any base from 1000 bases upstream of the start position of the gene element to the stop position of the gene element.

      The main requirement for input to BEDOPS tools is that it is sorted. Use BEDOPS sort-bed for this purpose, e.g.:

      $ sort-bed unsorted-genes.bed > genes.bed
      $ sort-bed unsorted-regions.bed > regions.bed


      Sorting is quick and allows BEDOPS tools to work fast and with a low memory profile. You only have to sort inputs once. Any output from BEDOPS tools is sorted, in case you want to do further downstream processing of it.

      For more details, see: http://code.google.com/p/bedops/wiki/sortBed
      Hi Alex,

      Thanks for the reply. I have used bedops and I really find it good for this kind of analysis. But I'm not sure if I'm right conceptually to do that.

      Comment

      • AlexReynolds
        Member
        • Feb 2013
        • 45

        #4
        It depends on your experiment. If you're looking to investigate genes that are proximal to a set of regions, for example (where proximal elements are defined as 1000 bases upstream of the gene) then this is one way to quickly generate that set result.

        Comment

        • anibhax
          Member
          • Jan 2013
          • 24

          #5
          I'm looking for regulatory regions like promoters or TF binding sites. Does this still hold?

          Comment

          • AlexReynolds
            Member
            • Feb 2013
            • 45

            #6
            If you're looking for promoters or TF binding sites that are proximal to your gene, where you define proximal as some sensible value (say, between 1000-2500 bases; this depends on your work) then this would work fine.

            Unique distal elements — elements further away — could be located with three bedops set operations, one to locate the proximal elements and a second to locate distal elements with a wider upstream range.

            As this second set includes the first set's proximal elements, a third operation calculates the set difference between the proximal and distal elements to get elements unique to the distal set, perhaps using the --not-element-of operand between the first two sets. Make sense?

            If you need information about which promoters and TF binding sites associate with a specific gene, then another way to approach this is with the bedmap tool, which does things a little differently:

            $ bedops --range -1000:0 --everything genes.bed \
            | bedmap --echo --echo-map-id-uniq --delim '\t' - promoters.bed \
            | bedops --range 1000:0 --everything - \
            > answer.bed


            (Note that we first adjust the ranges of gene elements before doing the mapping step against promoters, before passing that result again to bedops to reverse the range adjustment and get back the gene's original coordinates.)

            This file answer.bed contains both the gene and a list of unique IDs for overlapping proximal promoters that associate with that gene. This could also be used to return a list of IDs of motif binding sites. And if you want the entire mapped element, not just the ID, use --echo-map in place of --echo-map-id-uniq.

            This result is different from what comes out of bedops, which just does set calculations. The bedmap tool will show associations between a reference element (here, a gene) and anything it can be mapped to (here, one or more proximal promoters).
            Last edited by AlexReynolds; 06-03-2013, 03:02 PM.

            Comment

            • anibhax
              Member
              • Jan 2013
              • 24

              #7
              I think it does. Thanks for the help!

              Comment

              Latest Articles

              Collapse

              • SEQadmin2
                16S/ITS Profiling vs. Shotgun Metagenomics: What Changes in Your Workflow?
                by SEQadmin2




                NGS has revolutionized clinical microbiology by offering new ways to identify and surveil pathogens without prior knowledge of the target. One popular approach is 16S rRNA and ITS amplicon sequencing, which targets specific microbial markers. But studies are increasingly incorporating shotgun metagenomics, a technique that sequences all DNA from a sample without targeting specific microbial markers. This approach allows more detailed taxonomic classification, detection...
                Today, 06:46 AM
              • 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

              ad_right_rmr

              Collapse

              News

              Collapse

              Topics Statistics Last Post
              Started by SEQadmin2, 10-28-2026, 09:57 AM
              0 responses
              22 views
              0 reactions
              Last Post SEQadmin2  
              Started by SEQadmin2, 10-28-2026, 09:51 AM
              0 responses
              14 views
              0 reactions
              Last Post SEQadmin2  
              Started by SEQadmin2, 10-22-2026, 11:13 AM
              0 responses
              67 views
              0 reactions
              Last Post SEQadmin2  
              Started by SEQadmin2, 10-22-2026, 10:48 AM
              0 responses
              47 views
              0 reactions
              Last Post SEQadmin2  
              Working...