tyjo / coptr

Accurate and robust inference of microbial growth dynamics from metagenomic sequencing
GNU General Public License v3.0
15 stars 5 forks source link

cm.pkl not found in extract step #17

Open Sanrrone opened 4 months ago

Sanrrone commented 4 months ago

Dears, I am running the software using my own database. It was succefully created and mapped using the coptr index and coptr map steps. however, the extract step is asking for a pkl which I don't know where I can get it.

error log:

[INFO] [Mar 13, 2024 12:33:45] [coptr.bam_processor] Processing HeP-1003_6_months_bams/HeP-1003-4.bam.
[INFO] [Mar 13, 2024 12:52:02] [coptr.bam_processor] Determining reference genomes.
[INFO] [Mar 13, 2024 12:54:28] [coptr.bam_processor] Collecting multi-mapped reads.
[INFO] [Mar 13, 2024 13:00:58] [coptr.bam_processor] Grouping reads by reference genome.
Traceback (most recent call last):
  File "/scratch/project_2007362/software/mambaforge/envs/coptr/bin/coptr", line 8, in <module>
    sys.exit(cli())
  File "/scratch/project_2007362/software/mambaforge/envs/coptr/lib/python3.7/site-packages/coptr/cli.py", line 576, in cli
    ProgramOptions()
  File "/scratch/project_2007362/software/mambaforge/envs/coptr/lib/python3.7/site-packages/coptr/cli.py", line 70, in __init__
    getattr(self, args.command)()
  File "/scratch/project_2007362/software/mambaforge/envs/coptr/lib/python3.7/site-packages/coptr/cli.py", line 242, in extract
    os.path.join(args.out_folder, get_fastq_name(f) + ".cm.pkl"), "wb"
FileNotFoundError: [Errno 2] No such file or directory: 'HeP-1003_6_months_coverage-maps/HeP-1003-4.cm.pkl'

How can I generate the file for the extract step?.

thanks in advance!

tyjo commented 4 months ago

It looks like you are trying to write to a folder that doesn’t exist.Can you check the path to the folder HeP-1003_6_months_coverage-maps and try again?On Mar 13, 2024, at 7:18 AM, Sandro Valenzuela @.***> wrote: Dears, I am running the software using my own database. It was succefully created and mapped using the coptr index and coptr map steps. however, the extract step is asking for a pkl which I don't know where I can get it. error log: [INFO] [Mar 13, 2024 12:33:45] [coptr.bam_processor] Processing HeP-1003_6_months_bams/HeP-1003-4.bam. [INFO] [Mar 13, 2024 12:52:02] [coptr.bam_processor] Determining reference genomes. [INFO] [Mar 13, 2024 12:54:28] [coptr.bam_processor] Collecting multi-mapped reads. [INFO] [Mar 13, 2024 13:00:58] [coptr.bam_processor] Grouping reads by reference genome. Traceback (most recent call last): File "/scratch/project_2007362/software/mambaforge/envs/coptr/bin/coptr", line 8, in sys.exit(cli()) File "/scratch/project_2007362/software/mambaforge/envs/coptr/lib/python3.7/site-packages/coptr/cli.py", line 576, in cli ProgramOptions() File "/scratch/project_2007362/software/mambaforge/envs/coptr/lib/python3.7/site-packages/coptr/cli.py", line 70, in init getattr(self, args.command)() File "/scratch/project_2007362/software/mambaforge/envs/coptr/lib/python3.7/site-packages/coptr/cli.py", line 242, in extract os.path.join(args.out_folder, get_fastq_name(f) + ".cm.pkl"), "wb" FileNotFoundError: [Errno 2] No such file or directory: 'HeP-1003_6_months_coverage-maps/HeP-1003-4.cm.pkl'

How can I generate the file for the extract step?. thanks in advance!

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: @.***>

Sanrrone commented 4 months ago

Hi, it was that, I solved it by creating the folder first. However, my output file is empty (only headers) which doesn't make sense. According to the log the software ended correctly. log:

[INFO] [Mar 15, 2024 13:55:10] [coptr.cli] Grouping reads by reference genome.
[INFO] [Mar 15, 2024 13:55:10] [coptr.cli] Saving to HeP-1003_6_months_coverage-maps/coverage-maps-genome:
[INFO] [Mar 15, 2024 13:55:10] [coptr.cli]  HeP-1003-4.cm.pkl
[INFO] [Mar 15, 2024 13:55:10] [coptr.cli]  HeP-1003-5.cm.pkl
[INFO] [Mar 15, 2024 13:55:11] [coptr.cli]  HeP-1003-6.cm.pkl
[INFO] [Mar 15, 2024 13:55:11] [coptr.cli]  HeP-1003-7.cm.pkl
[INFO] [Mar 15, 2024 13:55:12] [coptr.cli] Grouping by reference genome: Complete.
[INFO] [Mar 15, 2024 13:55:12] [coptr.cli] The --restart flag can be used to start from here.
[INFO] [Mar 15, 2024 13:55:12] [coptr.coptr_ref] Checking reference genomes.
[INFO] [Mar 15, 2024 13:55:12] [coptr.coptr_contig] Checking reference genomes.
[INFO] [Mar 15, 2024 13:55:13] [coptr.cli] Writing HeP-1003_6_months_out.csv.
[INFO] [Mar 15, 2024 13:55:13] [coptr.cli] Done.
[INFO] [Mar 15, 2024 13:55:13] [coptr.cli] You may now remove the folder HeP-1003_6_months_coverage-maps/coverage-maps-genome.

csv output:

log2(PTR):genome_id/sample_id,HeP-1003-4,HeP-1003-5,HeP-1003-6,HeP-1003-7

what could led to an empty file?

thanks in advance!