BEDTools genomecov command and input file isse
1
0
Entering edit mode
6.0 years ago
Azhar ▴ 50

I am using Homer and going to build data visulization graph using bedtools, I have two input files one is outputPrefix.bam and second is outputPrefix.bam.bai

when I run bedtools genomecov -i (means bam input file but sorted, but sorted file .bam.bai extension) and secondally when i run this command bedtools genomecov outputPrefix.bam.bai -g hg19 it says that yourfile first line is less then 3 columnis this tabdeliminated?

and when i run bedtools genomecov outputPrefix.bam -g hg19 it runs some process in bash

can any body explain me this problem

ChIP-Seq • 2.7k views
ADD COMMENT
0
Entering edit mode

My question is I have bam file which is not sorted one is bam.bai which is sorted but bedtools -Ibam takes file with .bam sufffix so how to input sorted file in genomecov -ibam filename.bam -g hg19

ADD REPLY
0
Entering edit mode
6.0 years ago
PoGibas 4.9k

Bedtools documentationhttp://bedtools.readthedocs.org/en/latest/content/tools/genomecov.html 

 If using BED/GFF/VCF, the input (-i)

If the input is in BAM (-ibam)

When you run -i with your bam bedtools expects bed file as input.

ADD COMMENT
1
Entering edit mode

Pgibas has a true, better for you will be validation of your bam file : http://broadinstitute.github.io/picard/command-line-overview.html#ValidateSamFile

ADD REPLY
0
Entering edit mode

kindally could you explain it more

 

ADD REPLY
1
Entering edit mode

If your input into bedtools genomecov is bam file, then you have to use -ibam. And if your input is bed file, then you have to use only -i.

ADD REPLY
0
Entering edit mode

but I have unsorted bam and sorted bam.bai  file which is to use

 

ADD REPLY
1
Entering edit mode
samtools sort unsorted.bam sorted.bam
genomecov -ibam sorted.bam -g hg19

bam.bai isn't bam file (Bam And Indexed Bam Files)

ADD REPLY

Login before adding your answer.

Traffic: 1569 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