This is a test version of Biostars. For the public version, visit https://www.biostars.org.
BEDTools genomecov command and input file isse

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

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

Delete this as this is not answer.

1 answer

Bedtools documentation: http://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.

Kindly could you explain it more

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

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

Log in to answer this question.