Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

simulator.py genome FileNotFoundError: [Errno 2] No such file or directory: 'training_model_profile' #194

Open
MAXINELSX opened this issue Aug 14, 2023 · 1 comment
Labels

Comments

@MAXINELSX
Copy link

#11 (comment) This bug happened again:
(nanosim_env) lishuxian@tong1:/mnt/md0/LSX/lishuxian/lishuxian/mag/LSX-isolates/Kleb-for-lsx/bin-file$ cat list.fasta.txt | while read line; do /mnt/md0/LSX/lishuxian/lishuxian/mag/LSX-isolates/Kleb-for-lsx/bin-file/NanoSim/src/simulator.py genome --fastq -rg filtered_${line}.fasta -b guppy -n 100000 -t 40 -s 1 ; done

running the code with following parameters:

ref_g filtered_manhole-barcode47-bin.fasta
model_prefix training
out simulated
number [100000]
perfect False
kmer_bias None
basecaller guppy
dna_type linear
strandness 1.0
sd_len None
median_len None
max_len inf
min_len 50
fastq True
chimeric False
num_threads 40
2023-08-14 23:17:28: /mnt/md0/LSX/lishuxian/lishuxian/mag/LSX-isolates/Kleb-for-lsx/bin-file/NanoSim/src/simulator.py genome --fastq -rg filtered_manhole-barcode47-bin.fasta -b guppy -n 100000 -t 40 -s 1
2023-08-14 23:17:28: Read in reference
2023-08-14 23:17:28: Read error profile
Traceback (most recent call last):
File "/mnt/md0/LSX/lishuxian/lishuxian/mag/LSX-isolates/Kleb-for-lsx/bin-file/NanoSim/src/simulator.py", line 2433, in
main()
File "/mnt/md0/LSX/lishuxian/lishuxian/mag/LSX-isolates/Kleb-for-lsx/bin-file/NanoSim/src/simulator.py", line 2194, in main
read_profile(ref_g, number, model_prefix, perfect, args.mode, strandness, dna_type=dna_type, chimeric=chimeric)
File "/mnt/md0/LSX/lishuxian/lishuxian/mag/LSX-isolates/Kleb-for-lsx/bin-file/NanoSim/src/simulator.py", line 474, in read_profile
with open(model_profile, 'r') as mod_profile:
FileNotFoundError: [Errno 2] No such file or directory: 'training_model_profile'

@SaberHQ
Copy link
Member

SaberHQ commented Feb 22, 2024

Hey @MAXINELSX

I am so sorry for this late reply. I have no idea why I missed your comment/issue.

First, make sure you are using the latest committed version. The error you posted is a FileNotFoundError meaning that NanoSim couldn't find the location of the model profiles. Are you using the pre-trained models? If so, clearly state the directory of the pre-trained models to be used in the simulation stage. You could also train your own model using the read_analysis.py script. Refer to the readme file for comprehensive information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants