2
$\begingroup$

I frequently make use of RSeQC, I used to use it with my own bed file, generated using gtf2bed, but now I thought I'd use the one provided by RSeQC themselves from here, I got the file hg38_Gencode_V28.bed.gz, when looking at it with IGV it looks similar to my self generated bedfile however, read_distribution.py (a script in RSeQC), does not report any reads in any of the categories (CDS_exons, Introns, etc).

Any idea why?

Edit: I see that my own bed file (from the GTF) had ENST identifiers like this ENST00000466557 whereas the file from RSeQC supplies them like ENST00000611746.1 (with decimals) that seems to be the only difference as far as I can see.

$\endgroup$
2
$\begingroup$

Ok, I figured it out already, it's and old issue I come accross every now and then. The original bed file lists the chromosomes as chr1,chr2,...,chrX whereas my bam files uses 1,2,...,X

I fixed the bed file like this (python3):

import pandas as pd
bedFile = '/hg38_Gencode_V28.bed'
bedFile = pd.read_csv(bedFile, sep='\t', header=None)
bedFile[0] = [value.strip('chr') for value in bedFile[0]]
newBedFile = 'hg38_Gencode_V28_reformatted.bed'
bedFile.to_csv(newBedFile, sep='\t', header=None, index=None)

And now read_distribution.py works.

$\endgroup$
1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.