Question: Bedtools Multicov Need A Bam Index File Specification Option
gravatar for ewre
6.5 years ago by
United States
ewre220 wrote:

bedtools version 2.16.2 multicov used to compute the multiple sample coverage given a feature file(gtf bed).

format: bedtools multicov -bams alin1.bam aln2.bam .. -bed capturRegion.bed >out.coverage

official doc has mentioned that input bam files should be sorted and indexed, but it does not mention the details. suppose the bam file name is: sample1.bam, then the index file should be named: sample1.bam.bai(not sample1.bai) ,otherwise multicov will report an error: indexes not found.

I think it would be better to add an option which will allow the user to specify the bam index files or the suffix used for these index files.

bedtools bam sort coverage index • 5.1k views
ADD COMMENTlink modified 6.5 years ago by Alex Reynolds29k • written 6.5 years ago by ewre220
gravatar for Ido Tamir
6.5 years ago by
Ido Tamir5.0k
Ido Tamir5.0k wrote:

Like many things in bioinformatics this comes from a convention.

  • This is the default name that is generated from samtools index
  • many tools follow this convention (bedtools, IGV, IGB, UCSC etc...)
  • if you follow this convention like everybody, life will be easier
  • if at all this should be a feature request in bedtools not a "Tip"
ADD COMMENTlink modified 6.5 years ago • written 6.5 years ago by Ido Tamir5.0k

can not agree more

ADD REPLYlink written 6.5 years ago by Tky990

thanks for the reply and the "feature request but tip" suggestion. well, i can not agree more with that life would be easier when we follow some convention. but there are always exceptions, picard output bam index file with the default form sample1.bai. and probably this is much better when the sample file name is long(LHX?_mix?_index?.recal.reduce.xxxx). I just mention it here to avoid someone who is newer like me in sequence file handling spending time googling the "indexes file not found" error.

ADD REPLYlink written 6.5 years ago by ewre220
Please log in to add an answer.


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