Skip to content

AttributeError: 'MyReader' object has no attribute 'info' for vcf file #341

@anummunirmughal

Description

@anummunirmughal

Hi
I have a code which is being called by another main code when I try to run it gives the error, following are the details

def createDatabaseFiles(vcfFile, varFile, annFile, freq = None, cosmicMutations = None, cosmicThreshold = None,
tcgaMutations = None, tcgaThreshold = None, dstFile = None, outputDir = None):

vcfReader = MyReader(open(vcfFile, "r"))
headersVar = ["VAR_ID", "CHROM", "POS", "REF", "ALT", "QUAL", "FILTER", "DP", "DP4", "INDEL"] + vcfReader.samples
headersAnn = ["ANN_ID"] + vcfReader.info['CSQ'].desc.split()[-1].split("|") + ["VAR_ID"]

Traceback (most recent call last):

File "/shared/teams/hpc-wasslab/updated_pipeline/variant_filtering/createDatabaseFiles.py", line 42, in createDatabaseFiles
headersAnn = ["ANN_ID"] + vcfReader.info['CSQ'].desc.split()[-1].split("|") + ["VAR_ID"]
AttributeError: 'MyReader' object has no attribute 'info'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions