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 :)
I was able to figure it out.... thank you :).
Ooh, the suspense is killing me! Was it chrM?
Yes it was! :)