Unconfigured Ad

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • EulnayM
    Junior Member
    • Oct 2014
    • 9

    #1

    Mapping annotation to genome positions

    Hi all,

    I am looking for a faster method to map annotation I obtained from RAST to a range of target genome positions.

    The method I am currently using is by filtering the start and end position in the excel file to my target range (for example if I am finding annotated CDS that locates between 49050 and 54500 bp, I filter the genome location of the annotation file to "larger or equal to 49050" and "less than or equal to 54500" and copy the related result from there.

    This method is extremely time-consuming and now I have a set of data with about 500 ranges so I am looking for suggestions on any method that I can use to speed up this process? I know very limited awk and R but is familiar with usage of Linux OS.

    Thank you in advance for any help
  • SylvainL
    Senior Member
    • Feb 2012
    • 180

    #2
    Hi,
    the easiest (and fastest) would be to go either using the packages Rsamtools (including GRanges) and rtracklayer on R, or bedtools...

    Comment

    • WhatsOEver
      Senior Member
      • Apr 2012
      • 215

      #3
      Although I agree with SylvainL that R should be faster than awk in this case you should not underestimate the power of linux tools for tasks like this. A simple script using awk how this could look like is the following (it expects bed format in its current version):

      #!/bin/sh

      #example call: thisScriptName.sh coordinatesFile dataFile outputFile

      #$1 (coordinatesFile) to be the file with your coordinates you want to select for
      #$2 (dataFile) to contain your data
      #$3 (outputFile) is the file you want to save your results to

      IFS='
      ' #use line break as end of line separator
      #loop through lines of your coordinatesFile and for each line look in your data file
      for line in $(cat $1)
      do
      lowLimit=$(echo $line | awk -F'\t' '{print $2}')
      highLimit=$(echo $line | awk -F'\t' '{print $3}')
      awk '{OFS="\t"; if(($2>'$lowLimit' && $2<'$highLimit') || ($3>'$lowLimit' && $3<'$highLimit')) print $0}' $2 >> $3
      done

      Comment

      • AlexReynolds
        Member
        • Feb 2013
        • 45

        #4
        BEDOPS offers bedmap, for mapping features from one BED file to another. It is fast and efficient, and supported on Linux. Operations are offered that work with numerical and categorical features.

        More information is available here:



        Be careful when converting Excel output to BED, in that Microsoft adds special endline characters that interfere with the functionality of bedmap and other Unix tools. The "dos2unix" application is useful here for cleaning Excel-sourced text files:

        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
        24 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
        42 views
        0 reactions
        Last Post SEQadmin2  
        Working...