Bedtools Multicov Need A Bam Index File Specification Option
1
1
Entering edit mode
10.9 years ago
ewre ▴ 250

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 coverage bam sort index • 6.9k views
ADD COMMENT
1
Entering edit mode
10.9 years ago
Ido Tamir 5.2k

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 COMMENT
0
Entering edit mode

can not agree more

ADD REPLY
0
Entering edit mode

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 REPLY

Login before adding your answer.

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