Go Back   SEQanswers > Bioinformatics > Bioinformatics

Similar Threads
Thread Thread Starter Forum Replies Last Post
BEDTOOLS bedtobam question LacquerHead Bioinformatics 2 12-22-2016 11:30 PM
Empty output of cufflinks gwh120104 RNA Sequencing 4 05-22-2015 09:06 AM
breakdancer - empty output? caswater Bioinformatics 6 07-16-2012 12:41 PM
Breakdancer_max output is empty inou13 Bioinformatics 4 04-25-2012 03:54 PM
Bfast output and "Empty Sequence Dictionary" in .sam output aiden Bioinformatics 1 05-28-2010 06:50 PM

Thread Tools
Old 03-25-2018, 12:25 PM   #1
Junior Member
Location: germany

Join Date: Mar 2018
Posts: 4
Cool bedToBam gives empty output

Hi all,

I am trying to convert a .bed file which I made from data from an ancient genome tiling microarray into a .bam file. I am running into this annoying error which I do not seem able to resolve.

Running the following command:

bedtools bedtobam -i ~$/etc/file.bed -g ~$/etc/arabidopsis.txt > file.bam

I get a bam output file which is only 1 Kb. (For a point of reference my bed file is 108mb). The .bed file is a self-made BED5 format which looks like this:

Chr1 25 50 id-1 0.005
Chr1 60 85 id-2 0.001
Chr1 113 138 id-3 0.001
Chr1 154 179 id-4 0.359
Chr1 185 210 id-5 0.001
etc, etc etc

The genome file looks like this
Chr1 30427671
Chr2 19698289
Chr3 23459830
Chr4 18585056
Chr5 26975502
(Chrmt and chrCl are not necessary since these are not in the bed either)

When I head the 1kb file from the output this follows:
~/some_directory$ samtools view -H file.bam
@HD VN:1.0 SO:unsorted
@PG ID:BEDTools_bedToBam VN:Vv2.16.2
@SQ SN:Chr1 AS:/directories/arabidopsis.txt LN:30427671
@SQ SN:Chr2 AS:/directories/arabidopsis.txt LN:19698289
@SQ SN:Chr3 AS:/directories/arabidopsis.txt LN:23459830
@SQ SN:Chr4 AS:/directories/arabidopsis.txt LN:18585056
@SQ SN:Chr5 AS:/directories/arabidopsis.txt LN:26975502

It seems like the SQ and SN lines are generated and then it stops. Any ideas? All help will be greatly appreciated!


Last edited by rivered; 03-25-2018 at 12:28 PM. Reason: adjustments
rivered is offline   Reply With Quote
Old 03-26-2018, 11:09 AM   #2
Junior Member
Location: germany

Join Date: Mar 2018
Posts: 4

Solved the problem!

Somehow R converted the generated .BED files into Macintosh(CR) dataformat. Checked eol conversion in notepad ++ and saw it was not UNIX format.

Then converted the files with the following command:
perl -p -e 's/\r/\n/g' < macfile.txt > unixfile.txt

Hope it helps someone,
rivered is offline   Reply With Quote

bedtobam, bedtools, bioinformatics, microarray, samtools

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 07:03 PM.

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