SEQanswers

Go Back   SEQanswers > Bioinformatics > Bioinformatics



Similar Threads
Thread Thread Starter Forum Replies Last Post
Genomic coordinates to gene names Layla Bioinformatics 8 04-17-2014 02:23 PM
Conversion of RefSeq coordinates to genomic coordinates ngssupporter Bioinformatics 2 02-15-2014 12:59 PM
Converting contig coordinates to genomic coordinates aurimas Bioinformatics 0 03-06-2013 11:06 AM
Obtaining UCSC Genomic sequence Given Genomic Coordinates modi2020 Bioinformatics 0 12-03-2012 07:45 PM
Genomic coordinates from Gene Names Palgrave Bioinformatics 0 05-09-2012 02:40 AM

Reply
 
Thread Tools
Old 06-26-2014, 12:13 AM   #1
Dessi
Member
 
Location: Sydney

Join Date: May 2013
Posts: 14
Default 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!
Dessi is offline   Reply With Quote
Old 06-27-2014, 10:31 AM   #2
swbarnes2
Senior Member
 
Location: San Diego

Join Date: May 2008
Posts: 912
Default

BEDTools can intersect a .bed file with a .gtf file with the intersectBed command.
swbarnes2 is offline   Reply With Quote
Old 06-29-2014, 12:07 AM   #3
Dessi
Member
 
Location: Sydney

Join Date: May 2013
Posts: 14
Default

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!!!
Dessi is offline   Reply With Quote
Old 06-29-2014, 07:10 AM   #4
GenoMax
Senior Member
 
Location: East Coast USA

Join Date: Feb 2008
Posts: 6,961
Default

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.
GenoMax is offline   Reply With Quote
Old 06-29-2014, 07:20 AM   #5
GenoMax
Senior Member
 
Location: East Coast USA

Join Date: Feb 2008
Posts: 6,961
Default

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/'
GenoMax is offline   Reply With Quote
Reply

Tags
annotation, genomic coordinates, genomic features, rna editing, rna-seq

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off




All times are GMT -8. The time now is 11:36 PM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Single Sign On provided by vBSSO