Bedtools genomecov - Bam to bedgraph conversion
2
0
Entering edit mode
2.4 years ago
onur • 0

Dear all,

I would like to convert sorted and indexed bam file (~20GB) to an bedgraph file and used the following command:

bedtools genomecov -bg -split -strand - -ibam sorted.bam

It's been 3 days since I executed the command, still I couldn't get any result.

Here is the initial part of the bam file:

A00661:64:H5:1:2179:14687:29434 355 chr1    3206713 255 50M =   3206856 192 ATTCCAATATAAGATGCACACACCTGAGAATCTGAATCTCACTCTGTCCC FFFFFFFFF:FF,:F:FF:FF:F:FFFFF::FFF:,FFF:FF:FF::F,F   ZW:f:0.481137
A00661:64:H5:1:1466:24316:29418 355 chr1    3206713 255 50M =   3206856 192 ATTCCAATATAAGATGCACACACCTGAGAATCTGAATCTCACTCTGTCCC FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF   ZW:f:0.481137
A00661:64:H5:1:1276:8196:6637   355 chr1    3206713 255 50M =   3206856 192 ATTCCAATATAAGATGCACACACCTGAGAATCTGAATCTCACTCTGTCCC FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:FFFFFFFFFFFFFFF   ZW:f:0.481137

Any idea what could be the reason of taking so long? I would appreciate any input about it. Thanks!

bedgraph genomecov Bedtools bam • 1.7k views
ADD COMMENT
0
Entering edit mode

try -strand "-" instead of -strand -?

ADD REPLY
1
Entering edit mode
2.4 years ago
onur • 0

I updated Bedtools version (2.27.1 to 2.30.0), now it is working. Thanks.

ADD COMMENT
0
Entering edit mode
2.4 years ago

the -i parameter is missing so your command is waiting for an input on STDIN. May be you want ... -ibam -i sorted.bam

ADD COMMENT
0
Entering edit mode

Thanks for your input. I tested same command with other bam files, it is working as expected. -i is required for BED/GFF/VCF files, for bam, -ibam is used.

ADD REPLY

Login before adding your answer.

Traffic: 2553 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6