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

FileNotFoundError: No such file or directory when using pre-trained model #243

Open
florenmartino opened this issue Mar 6, 2025 · 0 comments

Comments

@florenmartino
Copy link

Hi NanoSim team,

I'm encountering an issue when trying to run NanoSim with a pre-trained model. I'm using the human_giab_hg002_sub1M_kitv14_dorado pre-trained model, but I keep getting the following error:

FileNotFoundError: [Errno 2] No such file or directory: '/home/fmartino/NanoSim/pre-trained_models/human_giab_hg002_sub1M_kitv14_dorado_strandness_rate'

Steps I've taken:

I downloaded the pre-trained model human_giab_hg002_sub1M_kitv14_dorado.tar.gz from the repository.
I extracted the files using tar -xzvf human_giab_hg002_sub1M_kitv14_dorado.tar.gz.
I verified that the files are present in the folder:

(nanosim):~/NanoSim/pre-trained_models/human_giab_hg002_sub1M_kitv14_dorado$ ls
hg002_nanosim_sub1M_aligned_region.pkl hg002_nanosim_sub1M_gap_length.pkl hg002_nanosim_sub1M_model_profile human_giab_hg002_sub1M_kitv14_dorado_error_rate.tsv
hg002_nanosim_sub1M_chimeric_info hg002_nanosim_sub1M_ht_length.pkl hg002_nanosim_sub1M_reads_alignment_rate human_giab_hg002_sub1M_kitv14_dorado_strandness_rate
hg002_nanosim_sub1M_error_markov_model hg002_nanosim_sub1M_ht_ratio.pkl hg002_nanosim_sub1M_unaligned_length.pkl
hg002_nanosim_sub1M_first_match.hist hg002_nanosim_sub1M_match_markov_model human_giab_hg002_sub1M_kitv14_dorado_aligned_reads.pkl

I renamed the files to match what NanoSim expects and same error.

I ran the simulation command:

simulator.py genome \
    -rg /home/fmartino/Ref_seq/Simulation_DC0135_anellos/Annelovirus_AllRefs.part_AB303554_circular.fasta \
    -o /home/fmartino/Ref_seq/Simulation_DC0135_anellos/simulation_Annelovirus_AllRefs.part_AB303554 \
    -n 55 \
    -dna_type circular \
    -c /home/fmartino/NanoSim/pre-trained_models/human_giab_hg002_sub1M_kitv14_dorado/ \
    -med 1000 \
    -sd 0.2 \
    --fastq \
    -t 22

Despite these steps, I still get the FileNotFoundError. Could you please help me understand what I might be doing wrong?

Additional information:

NanoSim version: Installed via conda install -c bioconda nanosim.
Environment: Python 3.7, Conda environment.
Pre-trained model: human_giab_hg002_sub1M_kitv14_dorado.tar.gz. (I also tried with the v3.2.1)

Thank you for your help!

Best regards,

Flor

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

No branches or pull requests

1 participant