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
            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 on Modified Bases...
            Today, 07:01 AM
          • seqadmin
            Current Approaches to Protein Sequencing
            by seqadmin


            Proteins are often described as the workhorses of the cell, and identifying their sequences is key to understanding their role in biological processes and disease. Currently, the most common technique used to determine protein sequences is mass spectrometry. While still a valuable tool, mass spectrometry faces several limitations and requires a highly experienced scientist familiar with the equipment to operate it. Additionally, other proteomic methods, like affinity assays, are constrained...
            04-04-2024, 04:25 PM

          ad_right_rmr

          Collapse

          News

          Collapse

          Topics Statistics Last Post
          Started by seqadmin, 04-11-2024, 12:08 PM
          0 responses
          37 views
          0 likes
          Last Post seqadmin  
          Started by seqadmin, 04-10-2024, 10:19 PM
          0 responses
          41 views
          0 likes
          Last Post seqadmin  
          Started by seqadmin, 04-10-2024, 09:21 AM
          0 responses
          35 views
          0 likes
          Last Post seqadmin  
          Started by seqadmin, 04-04-2024, 09:00 AM
          0 responses
          54 views
          0 likes
          Last Post seqadmin  
          Working...
          X