SEQanswers

Go Back   SEQanswers > Applications Forums > RNA Sequencing



Similar Threads
Thread Thread Starter Forum Replies Last Post
Is it possible to convert a SNP.txt to a bed file or get a SNP.bed from samtools? Ling Bioinformatics 7 04-02-2015 06:17 AM
To convert BAM file to BED file Anjali Bioinformatics 10 04-28-2014 04:43 AM
help - convert .bed to .bam adurasiwam3 Bioinformatics 5 05-29-2012 07:04 PM
Perl script to convert BAM to BED? rebrendi Bioinformatics 3 03-22-2012 10:34 PM
How to convert BED format to SAM/BAM? seq_newbie Bioinformatics 1 06-23-2011 08:11 AM

Reply
 
Thread Tools
Old 09-13-2012, 08:18 PM   #1
camelbbs
Member
 
Location: United States

Join Date: Jun 2011
Posts: 49
Default writing script to convert bam to bed

Hi,
I want to ask if anyone write a script to convert bam to bed.

I tried bamtools bamtobed but while i import the result bed files to IGV, i see it is very different to the bam files.

So I want to ask if anyone know this.

Thanks!!
camelbbs is offline   Reply With Quote
Old 09-13-2012, 10:11 PM   #2
ETHANol
Senior Member
 
Location: Western Australia

Join Date: Feb 2010
Posts: 308
Default

See bedtools. Is your data RNA-seq data? If so you have to bed12 format to accommodate for gaps.
__________________
--------------
Ethan
ETHANol is offline   Reply With Quote
Old 09-15-2012, 10:16 AM   #3
camelbbs
Member
 
Location: United States

Join Date: Jun 2011
Posts: 49
Default

Quote:
Originally Posted by ETHANol View Post
See bedtools. Is your data RNA-seq data? If so you have to bed12 format to accommodate for gaps.
Thanks, and how to view bed12 files in IGV?
camelbbs is offline   Reply With Quote
Old 09-17-2012, 05:18 AM   #4
GenoMax
Senior Member
 
Location: East Coast USA

Join Date: Feb 2008
Posts: 7,049
Default

If you only want to view BAM files is there is reason you are converting them to bed12?

Quote:
Originally Posted by camelbbs View Post
Thanks, and how to view bed12 files in IGV?
GenoMax is offline   Reply With Quote
Old 09-17-2012, 11:25 AM   #5
camelbbs
Member
 
Location: United States

Join Date: Jun 2011
Posts: 49
Default

Quote:
Originally Posted by GenoMax View Post
If you only want to view BAM files is there is reason you are converting them to bed12?
Thanks. I just curious while I view bed and bam files in IGV, they show difference. bed file have coverage in intron region, but not in bam.
camelbbs is offline   Reply With Quote
Old 09-17-2012, 11:31 AM   #6
camelbbs
Member
 
Location: United States

Join Date: Jun 2011
Posts: 49
Default

Quote:
Originally Posted by ETHANol View Post
See bedtools. Is your data RNA-seq data? If so you have to bed12 format to accommodate for gaps.
I think bed12 file show the right thing. thanks. Can you explain what is the change in bed12 file comparing to bed.

bed file:
Code:
chr1    14396   14517   DJG84KN1:219:D0R66ACXX:7:1213:7112:52613/2      1       +
chr1    14407   14528   DJG84KN1:219:D0R66ACXX:7:1303:12836:72771/2     1       +
chr1    14407   14528   DJG84KN1:219:D0R66ACXX:7:1110:13035:15193/2     1       -
chr1    14407   14528   DJG84KN1:219:D0R66ACXX:7:1213:3980:31932/2      1       -
chr1    14411   14532   DJG84KN1:219:D0R66ACXX:7:1102:19850:62093/2     1       +
chr1    14421   14542   DJG84KN1:219:D0R66ACXX:7:1308:18446:95141/2     1       +
chr1    14452   14553   DJG84KN1:219:D0R66ACXX:7:1303:12836:72771/1     1       -
chr1    14453   14554   DJG84KN1:219:D0R66ACXX:7:1213:7112:52613/1      1       -
chr1    14460   14561   DJG84KN1:219:D0R66ACXX:7:1102:19850:62093/1     1       -
chr1    14472   14593   DJG84KN1:219:D0R66ACXX:7:1202:6747:36105/2      3       +
bed12 file:
Code:
chr1    14396   14517   DJG84KN1:219:D0R66ACXX:7:1213:7112:52613/2      1       +       14396   14517   255,0,0 1       121     0
chr1    14407   14528   DJG84KN1:219:D0R66ACXX:7:1303:12836:72771/2     1       +       14407   14528   255,0,0 1       121     0
chr1    14407   14528   DJG84KN1:219:D0R66ACXX:7:1110:13035:15193/2     1       -       14407   14528   255,0,0 1       121     0
chr1    14407   14528   DJG84KN1:219:D0R66ACXX:7:1213:3980:31932/2      1       -       14407   14528   255,0,0 1       121     0
chr1    14411   14532   DJG84KN1:219:D0R66ACXX:7:1102:19850:62093/2     1       +       14411   14532   255,0,0 1       121     0
chr1    14421   14542   DJG84KN1:219:D0R66ACXX:7:1308:18446:95141/2     1       +       14421   14542   255,0,0 1       121     0
chr1    14452   14553   DJG84KN1:219:D0R66ACXX:7:1303:12836:72771/1     1       -       14452   14553   255,0,0 1       101     0
chr1    14453   14554   DJG84KN1:219:D0R66ACXX:7:1213:7112:52613/1      1       -       14453   14554   255,0,0 1       101     0
chr1    14460   14561   DJG84KN1:219:D0R66ACXX:7:1102:19850:62093/1     1       -       14460   14561   255,0,0 1       101     0
chr1    14472   14593   DJG84KN1:219:D0R66ACXX:7:1202:6747:36105/2      3       +       14472   14593   255,0,0 1       121     0

Last edited by camelbbs; 09-17-2012 at 11:50 AM.
camelbbs 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 02:37 PM.


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