Skip to content

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

@florenmartino

Description

@florenmartino

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions