Question: BEDTools genomecov command and input file isse
0
gravatar for Azhar
5.6 years ago by
Azhar50
China
Azhar50 wrote:

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.5k views
ADD COMMENTlink modified 5.6 years ago • written 5.6 years ago by Azhar50

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 REPLYlink written 5.6 years ago by Azhar50
0
gravatar for PoGibas
5.6 years ago by
PoGibas4.8k
Vilnius
PoGibas4.8k wrote:

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 COMMENTlink modified 5.6 years ago • written 5.6 years ago by PoGibas4.8k
1

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 REPLYlink written 5.6 years ago by Korsocius160

kindally could you explain it more

 

ADD REPLYlink written 5.6 years ago by Azhar50
1

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 REPLYlink written 5.6 years ago by PoGibas4.8k

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

 

ADD REPLYlink written 5.6 years ago by Azhar50
1
samtools sort unsorted.bam sorted.bam
genomecov -ibam sorted.bam -g hg19

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

ADD REPLYlink modified 5.6 years ago • written 5.6 years ago by PoGibas4.8k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1506 users visited in the last hour