SEQanswers

Go Back   SEQanswers > Bioinformatics > Bioinformatics



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to extract unique hits from a sam file gfmgfm Bioinformatics 8 01-27-2014 01:49 AM
How to extract mapped and unmapped raw reads from bwa's sam file ? vaibhavvsk Bioinformatics 11 02-07-2013 10:01 AM
Fastest way to extract differing positions from each alignment in a BAM file CHRYSES Bioinformatics 5 12-14-2011 12:28 PM
Extract perfectly mapped reads from SAM/BAM file Graham Etherington Bioinformatics 2 07-21-2011 08:27 AM
Drag-and-drop alignment of sequences to form SAM file Alex8 Bioinformatics 0 05-05-2011 01:10 AM

Reply
 
Thread Tools
Old 08-01-2011, 01:51 AM   #1
NicoBxl
not just another member
 
Location: Belgium

Join Date: Aug 2010
Posts: 263
Default extract alignment from SAM with a GFF file

Hi,

All is in the title. I aligned small reads (~25nt) with bowtie on my reference genome and I've a GFF file with annotations.

Is it possible to extract only the alignment that are in the gff file ?

Thanks,

N.
NicoBxl is offline   Reply With Quote
Old 08-01-2011, 05:03 AM   #2
colindaven
Senior Member
 
Location: Germany

Join Date: Oct 2008
Posts: 402
Default

Bedtools or Galaxy should do it! Extract the SAM alignments according to the GFF coordinates.

R would also be an option.
colindaven is offline   Reply With Quote
Old 08-01-2011, 05:04 AM   #3
NicoBxl
not just another member
 
Location: Belgium

Join Date: Aug 2010
Posts: 263
Default

how can I do that with R ?
NicoBxl is offline   Reply With Quote
Old 08-02-2011, 01:15 AM   #4
NicoBxl
not just another member
 
Location: Belgium

Join Date: Aug 2010
Posts: 263
Default

is this bedtools command correct ?


intersectBed -abam alignment.bam -b coordinates.gff > alignment_filtered.bam

Thanks,

N.

EDIT > I found it : intersectBed -abam alignment.bam -b coordinates.gff -wa > alignment_filtered.bam

Last edited by NicoBxl; 08-02-2011 at 05:47 AM.
NicoBxl is offline   Reply With Quote
Old 08-02-2011, 02:45 PM   #5
pbluescript
Senior Member
 
Location: Boston

Join Date: Nov 2009
Posts: 224
Default

Quote:
Originally Posted by NicoBxl View Post
is this bedtools command correct ?


intersectBed -abam alignment.bam -b coordinates.gff > alignment_filtered.bam

Thanks,

N.

EDIT > I found it : intersectBed -abam alignment.bam -b coordinates.gff -wa > alignment_filtered.bam
The GFF format and bed format have the genomic coordinates in different columns, so you will have to fix that first.
pbluescript is offline   Reply With Quote
Reply

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 06:42 AM.


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