Seqanswers Leaderboard Ad

Collapse

Announcement

Collapse
No announcement yet.
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • assigning function to genomic coordinates

    Hi All,

    I have analysed RNA-seq data and I have a bed file with genomic coordinates of mismatches to the genome (potential RNA-editing sites). I would like to know if each mismatch position is in an intron, exon, lncRNA, UTR, etc.. What is the best way to intersect my bed file with a file with genomic features (would that be a gtf file?) Thank you!

  • #2
    BEDTools can intersect a .bed file with a .gtf file with the intersectBed command.

    Comment


    • #3
      Thank you so much swbarnes2,

      It worked quite well. I intersected my bed file containing the snp positions with the Gencode mouse gtf file.
      However, for each genomic position the intersection output contains lines for the gene, the transcript and the exon.
      I have been looking how I can use awk to leave only the lines for the most detailed feature ( for example the exon) and delete the lines for gene and transcript. I want to do that in order to estimate if my potential editing sites are predominantly in exons, introns, intergenic regions, lncRNAs, Belements, etc.. Is there a way to achieve that?

      For example for the position chr1 4687943-4687944 the intersection contains:

      chr1 HAVANA gene 4687934 4689403
      chr1 HAVANA transcript 4687934 4689403
      chr1 HAVANA exon 4687934 4689403

      How can I leave only the lines containing the exon feature? And so on for every position in the entire file? Note sometimes exon would not be present and the feature for a given genomic position will be UTR or CDS.

      Thank you!!!

      Comment


      • #4
        You could do this simply with creative use of "grep" and its exclude option.

        For example:

        Code:
        $ cat your_file | grep -v "gene" | grep "exon"
        First grep would exclude all lines that have word "gene" and then keep only ones that have the word "exon" eliminating the rest in the second grep.


        Code:
        $ cat your_file | grep "exon"
        Would only keep lines that have word "exon". Redirect the output to a file to capture the results in a new file.

        Comment


        • #5
          Awk versions:

          To keep lines containing word "exon"

          Code:
          $ cat your_file | awk '/exon/'
          "grep -v" equivalent to exclude lines with word "exon":

          Code:
          $ cat your_file | awk '!/exon/'

          Comment

          Latest Articles

          Collapse

          • seqadmin
            Recent Advances in Sequencing Analysis Tools
            by seqadmin


            The sequencing world is rapidly changing due to declining costs, enhanced accuracies, and the advent of newer, cutting-edge instruments. Equally important to these developments are improvements in sequencing analysis, a process that converts vast amounts of raw data into a comprehensible and meaningful form. This complex task requires expertise and the right analysis tools. In this article, we highlight the progress and innovation in sequencing analysis by reviewing several of the...
            05-06-2024, 07:48 AM
          • seqadmin
            Essential Discoveries and Tools in Epitranscriptomics
            by seqadmin




            The field of epigenetics has traditionally concentrated more on DNA and how changes like methylation and phosphorylation of histones impact gene expression and regulation. However, our increased understanding of RNA modifications and their importance in cellular processes has led to a rise in epitranscriptomics research. “Epitranscriptomics brings together the concepts of epigenetics and gene expression,” explained Adrien Leger, PhD, Principal Research Scientist...
            04-22-2024, 07:01 AM

          ad_right_rmr

          Collapse

          News

          Collapse

          Topics Statistics Last Post
          Started by seqadmin, Yesterday, 06:57 AM
          0 responses
          12 views
          0 likes
          Last Post seqadmin  
          Started by seqadmin, 05-06-2024, 07:17 AM
          0 responses
          16 views
          0 likes
          Last Post seqadmin  
          Started by seqadmin, 05-02-2024, 08:06 AM
          0 responses
          19 views
          0 likes
          Last Post seqadmin  
          Started by seqadmin, 04-30-2024, 12:17 PM
          0 responses
          24 views
          0 likes
          Last Post seqadmin  
          Working...
          X