shohei-kojima / MEGAnE

MEGAnE
MIT License
24 stars 2 forks source link

UnboundLocalError: local variable 'line' referenced before assignment #23

Open jayramr opened 3 months ago

jayramr commented 3 months ago

Hi,

Please advise below error.

singularity exec MEGAnE_v1-0-1.sif call_genotype -i bamfiles/X2-10_S8_aligned_sorted.bam -fa XENLA_genome/XENLA_9.2_genome.fa -mk megane_kmer_set/reference_xenla_genome.mk -outdir MEGAnE_result_test -sample_name test_sample_X2-10_S8 -p 36 -fadb XENLA_genome/XENLA_9.2_genome_blastdb -rep custom/Dfam_custom.rep -repout XENLA_genome/XENLA_9.2_genome.fa.out -repremove custom/non_ME_rep.txt -pA_ME custom/ME_with_pA.txt -mainchr 
custom/main_chrs.txt -no_sex_chr

2024-03-26 13:33:07,237:INFO:Initial check started.
2024-03-26 13:33:10,670:INFO:estimated read lenth = 144
2024-03-26 13:33:10,821:INFO:All 18 main chromosome(s) were found in bamfiles/X2-10_S8_aligned_sorted.bam.
2024-03-26 13:33:10,821:INFO:"-no_sex_chr" option was specified. All chromosomes will be treated as autosomes.
2024-03-26 13:33:10,858:INFO:Preprocessing started.
2024-03-26 13:33:31,855:INFO:N=17 repeats found in custom/Dfam_custom.rep. N=17 will be analyzed. N=0 will be excluded due to non-ME repeats.
2024-03-26 13:33:43,379:INFO:Discordant read search started.
2024-03-26 14:49:45,323:INFO:Screening results:nonXY_reads=288123944,X_reads=0,Y_reads=0,chimeric_reads=37639363,hybrid_reads=9245086,pA_reads=68724,absent_reads=2408247
2024-03-26 14:49:45,502:INFO:estimated autosome depth = 15
2024-03-26 14:49:45,502:INFO:"-no_sex_chr" option was specified. All chromosomes will be treated as autosomes.
2024-03-26 14:49:52,970:INFO:Clipped read processing started.

2024-03-26 15:06:12,331:INFO:Unmapped read processing started.
2024-03-26 15:07:34,269:INFO:Hybrid read processing started.
2024-03-26 15:16:59,547:INFO:Integration junction search (outside of TEs) started.
2024-03-26 15:17:18,579:INFO:Integration junction search (nested in TEs) started.
2024-03-26 15:19:23,265:INFO:Filtering started.
2024-03-26 15:19:27,337:WARNING:Not enough data found. Cannot automatically determine thresholds for MEI filtering. Please check if your data contains discordant reads enough for auto-filtering. Proceed anyway.
2024-03-26 15:19:30,334:INFO:[0] ME insertion candidates found.
2024-03-26 15:19:30,334:INFO:ME insertion search finished!
2024-03-26 15:19:30,338:INFO:Absent ME search started.
2024-03-26 15:20:41,710:INFO:0 absent ME candidates found.
2024-03-26 15:20:41,710:INFO:Absent ME search finished!
2024-03-26 15:20:41,782:INFO:pME search finished!
2024-03-26 15:20:41,812:INFO:Limit BAM/CRAM started.
2024-03-26 15:20:43,544:ERROR:
Traceback (most recent call last):
  File "/usr/local/bin/MEGAnE/scripts/allele_count_ins.py", line 166, in limit
    if not 'MD:Z' in line:
UnboundLocalError: local variable 'line' referenced before assignment

Thanks jay