Entering edit mode
5.8 years ago
Lila M
★
1.3k
Hi everybody,
I'm stuck in the middle of something. I have a selected gene list (bed file
) like this:
chr start end strand gene geneLength
chr1 185217 195411 - ENSG00000279457 10194
chr1 725885 778626 - ENSG00000228327 52741
chr1 725885 778626 - ENSG00000228327 52741
chr1 916865 921016 - ENSG00000223764 4151
chr1 916865 921016 - ENSG00000223764 4151
chr1 916865 921016 - ENSG00000223764 4151
chr1 944204 959309 - ENSG00000188976 15105
I get them after different downstream analysis, and I need to calculate the read depth for them (only for those). So far, I've tried this:
genomeCoverageBed -ibam bam -g gene.list > coverage
But the output doesn't show the coverage for the specific gene.
and I also tried this:
bedtools coverage -a gene.list -b bam > coverage
but it gave me this error
***** WARNING: bam has inconsistent naming convention for record:
GL000008.2 12857 12916 SRR6497147.21984058 0 -
Killed
Any help? Thanks!!!
What are the chromosome identifiers in your bam?
Hi, the chromosomes appeared as "chr1"
however, there are additional chr that not start with "chr", as the one reported in the error. Is there any way in which I can remove those chr that are not the "typical"? Thanks!
Hey Lila, for the first command,
genomeCoverageBed
, you don't have the correct input data. The file passed with-g
needs to be of this format:This is merely the first 2 columns of the output produced by
samtools faidx
.What exactly are you aiming to do? Note that, in my pipeline (here https://github.com/kevinblighe/ClinicalGradeDNAseq ), I output various coverage statistics via:
number of reads off target
output depth of coverage for all regions in the BAM file
[Sequential positions at the same read depth are merged into a single region]
output the per base read depth for each region in the BED file
output the mean depth of coverage for each region in the BED file
Hi Kevin, Thank you for such an extensive response! What I basically did , was to transform my bam file into a bed one, so then I was able to get the coverage by running