bcgsc / NanoSim

Nanopore sequence read simulator
Other
217 stars 51 forks source link

bug #94

Closed Huanle closed 3 years ago

Huanle commented 3 years ago

Hi There, Command and error: `read_analysis.py transcriptome -i 80k.fastq -rt cc.fa -ta sam -o cc.read-analysis --no_intron_retention -t 8 -rg cc.fa

running the code with following parameters:

infile 80k.fastq ref_g cc.fa ref_t cc.fa annot aligner minimap2 g_alnm t_alnm sam prefix cc.read-analysis num_threads 8 model_fit True intron_retention False 2020-07-21 16:29:27: Read pre-process and unaligned reads analysis 2020-07-21 16:29:29: Read the length of reference transcripts 2020-07-21 16:29:29: Alignment with minimap2 to reference genome [M::mm_idx_gen::0.0047.32] collected minimizers [M::mm_idx_gen::0.0087.01] sorted minimizers [M::main::0.0086.94] loaded/built the index for 4 target sequence(s) [M::mm_mapopt_update::0.0096.53] mid_occ = 75 [M::mm_idx_stat] kmer size: 15; skip: 5; is_hpc: 0; #seq: 4 [M::mm_idx_stat::0.0096.22] distinct minimizers: 3403 (98.09% are singletons); average occurrences: 1.052; average spacing: 2.921 [M::worker_pipeline::2.9926.22] mapped 85212 sequences [M::main] Version: 2.14-r886-dirty [M::main] CMD: minimap2 --cs -ax splice -t 8 cc.fa cc.read-analysis_processed.fasta [M::main] Real time: 2.995 sec; CPU: 18.603 sec; Peak RSS: 0.123 GB 2020-07-21 16:29:32: Processing transcriptome alignment file: 2020-07-21 16:29:32: Processing genome alignment file: sam Traceback (most recent call last): File "/nfs/no_backup_isis/enovoa/analysis/hliu/software/nanosim/bin/read_analysis.py", line 552, in main() File "/nfs/no_backup_isis/enovoa/analysis/hliu/software/nanosim/bin/read_analysis.py", line 503, in main align_transcriptome(in_fasta, prefix, aligner, num_threads, t_alnm, ref_t, g_alnm, ref_g) File "/nfs/no_backup_isis/enovoa/analysis/hliu/software/nanosim/bin/read_analysis.py", line 126, in align_transcriptome return t_alnm_ext, unaligned_length, g_alnm, t_alnm, strandness UnboundLocalError: local variable 'unaligned_length' referenced before assignment `

Can you please help me fix it? Thanks a lot.

cheny19 commented 3 years ago

May I ask which version of NanoSim is this? Or this is not a released version but the latest commit on Github?

Huanle commented 3 years ago

Hi @cheny19 , It is NanoSim 2.6.0. Thanks.

SaberHQ commented 3 years ago

Hi @Huanle Thanks for reporting this. Please note that we fixed several bugs and we are going to release a new stable version very soon. For now, would you please try NanoSim by directly downloading from GitHub instead of using v2.6.0? I will keep you updated in the next several days when we publish the new release. Thanks.

cheny19 commented 3 years ago

@Huanle , I figured this out. It seems that you didn't provide a transcriptome alignment file, but provided sam instead. I hope you have already made it run successfully now.