coverageBed with -g option ?
0
0
Entering edit mode
9.2 years ago
bioguy24 ▴ 230

I am running a coverageBed and getting the below error.

cmccabe@DTV-A5211QLM:~/Desktop/NGS$ coverageBed -d -sorted -a /home/cmccabe/Desktop/NGS/bed/bedtools/xgen_targets_sorted.bed -b /home/cmccabe/Desktop/NGS/pool_I_090215/IonXpress_008_150902_newheader.bam > /home/cmccabe/Desktop/NGS/pool_I_090215/IonXpress_008_150902_output.txt
ERROR: Database file /home/cmccabe/Desktop/NGS/pool_I_090215/IonXpress_008_150902_newheader.bam contains chromosome , but the query file does not.
       Please re-reun with the -g option for a genome file.

The newheader.bam is sorted like so:

cmccabe@DTV-A5211QLM:~/Desktop/NGS/pool_I_090215$ samtools view -H IonXpress_008_150902_newheader.bam | grep SQ | cut -f 2 | awk '{ sub(/^SN:/, ""); print;}'
chr1
chr2
chr3
chr4
chr5
chr6
chr7
chr8
chr9
chr10
chr11
chr12
chr13
chr14
chr15
chr16
chr17
chr18
chr19
chr20
chr21
chr22
chrX
chrY
chrM

Since the bam file is uses "human ordering, I sorted the bed file in the same way using the -faidx option in bedtools.

cmccabe@DTV-A5211QLM:~/Desktop/NGS/bed/bedtools$ awk '!_[$1]++' | cut -f1 xgen_targets_sorted.bed | uniq
chr1
chr2
chr3
chr4
chr5
chr6
chr7
chr8
chr9
chr10
chr11
chr12
chr13
chr14
chr15
chr16
chr17
chr18
chr19
chr20
chr21
chr22
chrX
chrY

I am not familiar with the -g option or how to use it. Is the hg19 file in the /genomes different? Thank you :)

bedtools • 2.8k views
ADD COMMENT
0
Entering edit mode

I was able to figure it out.... thank you :).

ADD REPLY
0
Entering edit mode

Ooh, the suspense is killing me! Was it chrM?

ADD REPLY
0
Entering edit mode

Yes it was! :)

ADD REPLY

Login before adding your answer.

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