Skip to content
This repository has been archived by the owner on Jul 17, 2023. It is now read-only.

Problem finding .bed.gz.tbi index file with --callRegions #305

Open
lunalvan opened this issue Mar 6, 2023 · 0 comments
Open

Problem finding .bed.gz.tbi index file with --callRegions #305

lunalvan opened this issue Mar 6, 2023 · 0 comments

Comments

@lunalvan
Copy link

lunalvan commented Mar 6, 2023

I am running a CNV calling pipeline including manta.

When using the --callRegions option and providing a .bed file, manta looks for an indexed .bed.tbi file in the same directory. However, it should be looking for a .bed.gz.tbi file, as it first needs to be compressed.

Therefore, I get the following error:


configManta.py: error: Can't find expected call-regions bed index file: '/home/lalvaradoanon/thesis/reference/hg38/hg38_standard.bed.gz.tbi'

I looked into

from configureUtil import assertOptionExists, checkFixTabixIndexedFileOption, joinFile, OptParseException, \
to see how the software was checking for the files:


165        # check for bed file of call regions and its index file
166        options.callRegionsBed = checkFixTabixIndexedFileOption(options.callRegionsBed, "call-regions bed")

which then lead me to the configureUtil.py script where checkFixTabixIndexedFileOption is defined:


    199 def checkTabixIndexedFile(iname,label) :
    200     assert(iname is not None)
    201     if not os.path.isfile(iname) :
    202         raise OptParseException("Can't find expected %s file: '%s'" % (label,iname))
    203     tabixIndexFile = iname + ".tbi"
    204     if not os.path.isfile(tabixIndexFile) :
    205         raise OptParseException("Can't find expected %s index file: '%s'" % (label,tabixIndexFile))


    214 def checkFixTabixIndexedFileOption(tabixFile,label):
    215     """
    216     Check that the file's tabix index exists, and convert input path to an absolute path.
    217
    218     If tabixFile is None, return None, else return the absolute file path.
    219     """
    220     checkOptionalTabixIndexedFile(tabixFile,label)
    221     if tabixFile is None : return None
    222     return os.path.abspath(tabixFile)

Here, when defining tabixIndexFile, iname is the name of the file that was provided (hg38_standard.bed), and it automatically looks for that same file + ".tbi". Therefore, it does not recognize the compressed indexed file (.bed.gz.tbi), giving the error stated above.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant