bcgsc / NanoSim

Nanopore sequence read simulator
Other
217 stars 51 forks source link

Error occur during read_analysis genome command #123

Closed aman21392 closed 3 years ago

aman21392 commented 3 years ago

I ran the genome command and it seems to error, can you please tell me why I getting this error and how to solve this: I use the command as below: nohup /home/aclab/apps/NanoSim/src/read_analysis.py genome -i /Drive7/2nd_nanopore_experiment_data/control_T.fastq -c -rg /Drive4/nanopore_2nd_experiment/human_genome/Homo_sapiens.GRCh38.dna.primary_assembly.fa -t 70 -o /Drive7/characterize/genome/cntrl_genome

Running the code with following parameters:

infile /Drive7/2nd_nanopore_experiment_data/control_25march/20200316_1633_MN33429_FAM96501_e0563569/fastq_pass/control_T.fastq ref_g /Drive4/nanopore_2nd_experiment/human_genome/Homo_sapiens.GRCh38.dna.primary_assembly.fa aligner minimap2 g_alnm prefix /Drive7/2nd_nanopore_experiment_data/control_25march/nanosim/characterize/genome/cntrl_geno num_threads 70 model_fit True chimeric True 2021-05-31 22:55:34: Read pre-process 2021-05-31 22:55:42: Alignment with minimap2 [M::mm_idx_gen::54.1081.75] collected minimizers [M::mm_idx_gen::62.2694.18] sorted minimizers [M::main::62.2694.18] loaded/built the index for 194 target sequence(s) [M::mm_mapopt_update::64.0394.09] mid_occ = 705 [M::mm_idx_stat] kmer size: 15; skip: 10; is_hpc: 0; #seq: 194 [M::mm_idx_stat::65.1234.04] distinct minimizers: 100159079 (38.79% are singletons); average occurrences: 5.540; average spacing: 5.586; total length: 3099750718 [M::worker_pipeline::124.2326.60] mapped 834111 sequences [M::worker_pipeline::312.038*3.23] mapped 258720 sequences [M::main] Version: 2.17-r974-dirty [M::main] CMD: minimap2 --cs -ax map-ont -t 70 /Drive4/nanopore_2nd_experiment/human_genome/Homo_sapiens.GRCh38.dna.primary_assembly.fa /Drive7/2nd_nanopore_experiment_data/control_25march/nanosim/characterize/genome/cntrl_geno_processed.fasta [M::main] Real time: 312.349 sec; CPU: 1007.806 sec; Peak RSS: 12.066 GB 2021-05-31 23:00:55: Processing alignment file: sam Traceback (most recent call last): File "/home/aclab/apps/NanoSim/src/read_analysis.py", line 713, in main() File "/home/aclab/apps/NanoSim/src/read_analysis.py", line 514, in main chimeric) File "/home/aclab/apps/NanoSim/src/read_analysis.py", line 169, in align_genome quantification, q_mode) File "/home/aclab/apps/NanoSim/src/get_primary_sam.py", line 365, in primary_and_unaligned_chimeric original_prob = metagenome_list[species]["real"] TypeError: 'NoneType' object is not subscriptable

Thanks in advance

cheny19 commented 3 years ago

Hi @aman21392,

Thanks for reporting this. It turns out to be a bug with the genome mode. I just got it fixed. Please give the latest commit a shot!

Thanks, Chen