PyVCF icon indicating copy to clipboard operation
PyVCF copied to clipboard

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

Open anummunirmughal opened this issue 3 years ago • 0 comments

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'

anummunirmughal avatar Nov 21 '22 16:11 anummunirmughal