SEQanswers

SEQanswers (http://seqanswers.com/forums/index.php)
-   Bioinformatics (http://seqanswers.com/forums/forumdisplay.php?f=18)
-   -   extract alignment from SAM with a GFF file (http://seqanswers.com/forums/showthread.php?t=13102)

NicoBxl 08-01-2011 01:51 AM

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.

colindaven 08-01-2011 05:03 AM

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

R would also be an option.

NicoBxl 08-01-2011 05:04 AM

how can I do that with R ?

NicoBxl 08-02-2011 01:15 AM

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

pbluescript 08-02-2011 02:45 PM

Quote:

Originally Posted by NicoBxl (Post 47895)
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.


All times are GMT -8. The time now is 02:07 AM.

Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2021, vBulletin Solutions, Inc.