mehrdadbakhtiari / adVNTR

A tool for genotyping Variable Number Tandem Repeats (VNTR) from sequence data
http://advntr.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
41 stars 15 forks source link

Genotype error #44

Closed ghzhaole closed 3 years ago

ghzhaole commented 3 years ago

Hi Mehrdad,

I've installed adVNTR-1.4.1 on Linux, when I running samples in batch, some of them produce the fllowing error:

  File "/home/sjzhang/anaconda2/envs/SV_ENV/bin/advntr", line 11, in <module>
    sys.exit(main())
  File "/home/sjzhang/anaconda2/envs/SV_ENV/lib/python2.7/site-packages/advntr/__main__.py", line 134, in main
    genotype(args, genotype_parser)
  File "/home/sjzhang/anaconda2/envs/SV_ENV/lib/python2.7/site-packages/advntr/advntr_commands.py", line 124, in genotype
    genome_analyzier.find_repeat_counts_from_alignment_file(input_file, average_coverage, args.update)
  File "/home/sjzhang/anaconda2/envs/SV_ENV/lib/python2.7/site-packages/advntr/genome_analyzer.py", line 241, in find_repeat_counts_from_alignment_file
    average_coverage, update)
  File "/home/sjzhang/anaconda2/envs/SV_ENV/lib/python2.7/site-packages/advntr/profiler.py", line 8, in wrapper
    retval = func(*args, **kwargs)
  File "/home/sjzhang/anaconda2/envs/SV_ENV/lib/python2.7/site-packages/advntr/vntr_finder.py", line 707, in find_repeat_count_from_alignment_file
    selected_reads = self.select_illumina_reads(alignment_file, unmapped_filtered_reads, update)
  File "/home/sjzhang/anaconda2/envs/SV_ENV/lib/python2.7/site-packages/advntr/profiler.py", line 8, in wrapper
    retval = func(*args, **kwargs)
  File "/home/sjzhang/anaconda2/envs/SV_ENV/lib/python2.7/site-packages/advntr/vntr_finder.py", line 658, in select_illumina_reads
    hmm = self.get_vntr_matcher_hmm(read_length=read_length)
  File "/home/sjzhang/anaconda2/envs/SV_ENV/lib/python2.7/site-packages/advntr/vntr_finder.py", line 119, in get_vntr_matcher_hmm
    vntr_matcher = self.build_vntr_matcher_hmm(copies, flanking_region_size)
  File "/home/sjzhang/anaconda2/envs/SV_ENV/lib/python2.7/site-packages/advntr/profiler.py", line 8, in wrapper
    retval = func(*args, **kwargs)
  File "/home/sjzhang/anaconda2/envs/SV_ENV/lib/python2.7/site-packages/advntr/vntr_finder.py", line 101, in build_vntr_matcher_hmm
    vntr_matcher = get_read_matcher_model(left_flanking_region, right_flanking_region, patterns, copies)
  File "/home/sjzhang/anaconda2/envs/SV_ENV/lib/python2.7/site-packages/advntr/profiler.py", line 8, in wrapper
    retval = func(*args, **kwargs)
  File "/home/sjzhang/anaconda2/envs/SV_ENV/lib/python2.7/site-packages/advntr/hmm_utils.py", line 529, in get_read_matcher_model
    repeats_matcher = get_variable_number_of_repeats_matcher_hmm(patterns, copies, vpaths)
  File "/home/sjzhang/anaconda2/envs/SV_ENV/lib/python2.7/site-packages/advntr/profiler.py", line 8, in wrapper
    retval = func(*args, **kwargs)
  File "/home/sjzhang/anaconda2/envs/SV_ENV/lib/python2.7/site-packages/advntr/hmm_utils.py", line 476, in get_variable_number_of_repeats_matcher_hmm
    model = get_constant_number_of_repeats_matcher_hmm(patterns, copies, vpaths)
  File "/home/sjzhang/anaconda2/envs/SV_ENV/lib/python2.7/site-packages/advntr/profiler.py", line 8, in wrapper
    retval = func(*args, **kwargs)
  File "/home/sjzhang/anaconda2/envs/SV_ENV/lib/python2.7/site-packages/advntr/hmm_utils.py", line 405, in get_constant_number_of_repeats_matcher_hmm
    transitions, emissions = build_profile_hmm_for_repeats(patterns, settings.MAX_ERROR_RATE)
  File "/home/sjzhang/anaconda2/envs/SV_ENV/lib/python2.7/site-packages/advntr/profiler.py", line 8, in wrapper
    retval = func(*args, **kwargs)
  File "/home/sjzhang/anaconda2/envs/SV_ENV/lib/python2.7/site-packages/advntr/profile_hmm.py", line 170, in build_profile_hmm_for_repeats
    alignment = AlignIO.read(StringIO(stdout), "clustal")
  File "/home/sjzhang/anaconda2/envs/SV_ENV/lib/python2.7/site-packages/Bio/AlignIO/__init__.py", line 428, in read
    raise ValueError("No records found in handle")
ValueError: No records found in handle

Here is my command: advntr genotype -t 2 --alignment_file 6814D.marked.realigned.recal.bam --working_directory 6814D -m hg38_selected_VNTRs_Illumina.db -of vcf -o 6814D_vntr.vcf

Could you please help me figure out what the issue is? Any help is greatly appreciated!

Jong-hun-Park commented 3 years ago

Hi,

I am not sure exactly what caused the issue given the log, but as a first step, can you double-check if the reference VNTR file (hg38_selected_VNTRs_Illumina.db) is correct?

ghzhaole commented 3 years ago

Hi,

I am not sure exactly what caused the issue given the log, but as a first step, can you double-check if the reference VNTR file (hg38_selected_VNTRs_Illumina.db) is correct?

Thank you for the reply! The reference VNTR file was downloaded from vntr_data_recommended_loci_hg38.zip file. And most of samples can run successfully with the reference VNTR file. Only several of them failed. And if it's convenient, I can provide the failed results to you.

Jong-hun-Park commented 3 years ago

Oh, I missed the part that only several of them failed. Yes, can you please send me the failed results to jonghunpark@ucsd.edu? If possible, one of the bam files that failed would be best for me to figure out the issue as I can reproduce the issue.

Jong-hun-Park commented 3 years ago

Resolved. (Running again fixed the issue)