Illumina / GTCtoVCF

Script to convert GTC/BPM files to VCF
Apache License 2.0
42 stars 30 forks source link

ERROR - Reference is missing entry for chromosome 3 #72

Closed HoneeeyBee closed 2 years ago

HoneeeyBee commented 2 years ago

Hello, I met an error with GTCtoVCF running.

I ran GTCtoVCF in my Ubuntu VM on Windows 10 (Anaconda, python v2.7) and it gave me an error like this:

"GTC converter - ERROR - Reference is missing entry for chromosome 3"

I tried three times to run the GTCtoVCF tool with the same error, and in the error message, the chromosome number changed at each try.

And the last log file said:

2021-11-29 12:09:20,695 - GTC converter - WARNING - Skipping indel X:2836035 2021-11-29 12:09:20,695 - GTC converter - WARNING - Skipping indel X:77387141 2021-11-29 12:09:22,464 - GTC converter - ERROR - Reference is missing entry for chromosome 3 2021-11-29 12:09:22,465 - GTC converter - DEBUG - Traceback (most recent call last): File "/home/moirai/Tools/GTCtoVCF-develop/gtc_to_vcf.py", line 309, in main driver(gtc_paths, manifest_reader, genome_reader, output_vcf_files, args.expand_identifiers, args.unsquash_duplicates, auxiliary_records, args.include_attributes, logger) File "/home/moirai/Tools/GTCtoVCF-develop/gtc_to_vcf.py", line 141, in driver locus_entries = LocusEntryFactory(vcf_record_factory, genome_reader.get_contig_order(), unsquash_duplicates, logger).create_locus_entries(manifest_reader) File "/home/moirai/Tools/GTCtoVCF-develop/LocusEntryFactory.py", line 38, in create_locus_entries result.append(self._generate_locus_entry(record_group)) File "/home/moirai/Tools/GTCtoVCF-develop/LocusEntryFactory.py", line 81, in _generate_locus_entry return LocusEntry(bpm_record_group, self._vcf_record_factory.create_vcf_record(bpm_record_group)) File "/home/moirai/Tools/GTCtoVCF-develop/VcfRecordFactory.py", line 78, in create_vcf_record return self._get_record_for_snv(bpm_record_group) File "/home/moirai/Tools/GTCtoVCF-develop/VcfRecordFactory.py", line 179, in _get_record_for_snv chrom, start_index, start_index + 1) File "/home/moirai/Tools/GTCtoVCF-develop/ReferenceGenome.py", line 178, in get_reference_bases "Reference is missing entry for chromosome " + str(chrom)) ValueError: Reference is missing entry for chromosome 3

My command was:

/home/MyUserID/Tools/GTCtoVCF-develop/gtc_to_vcf.py --gtc-paths /MyGTCFilePath/ --manifest-file /IlluminaBPMFile --genome-fasta-file /MyRefGenomeFile(GrCh38) --output-vcf-path /home/MyUserID/VCF --skip-indels --log-file /home/MyUserID/VCF/log.txt

Can you help me with this issue?

Thanks.

HoneeeyBee commented 2 years ago

I solved the problem with a change of my reference .fasta file headers, like '>chr1 1' into '>1'.

I re-made an index file (.fai) of the changed fasta file using "samtools faidx", and ran GTCtoVCF, and it worked!

jjzieve commented 2 years ago

Yes the fasta headers cannot have 'chr' if you use the download script it should remove them. Glad you fixed the issue.