Skip to content
New issue

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

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

Already on GitHub? # to your account

Failed to parse genome paths (even though the files are there) #49

Closed
mcmahon-uw opened this issue Dec 8, 2020 · 6 comments
Closed

Comments

@mcmahon-uw
Copy link

I'm not sure if this elevates to an issue, since I'm just starting to use CoverM and am really unsure about the command structure (hard to tell which flags are needed and which not). Sorry if I'm cluttering the issues list!
I'm getting an error that says a genome is not a fasta file because it does not end in .fna (even though it does). Granted, I have other files in the genome directory which are not .fna but I was hoping they would be ignored.

Here is my command:
coverm genome -t 40 --single PATHTOMETAS -d PATHTOMAGS -x .fna -p minimap2-sr --min-read-percent-identity 0.9 --methods relative_abundance --bam-file-cache-directory bam_cache/ --discard-unmapped -v

[2020-12-08T20:55:57Z INFO coverm] CoverM version 0.5.0
[2020-12-08T20:55:57Z INFO coverm] Using min-covered-fraction 10%
[2020-12-08T20:55:57Z INFO coverm] Using min-read-percent-identity 90%
[2020-12-08T20:55:57Z INFO bird_tool_utils::clap_utils] Not using directory entry '/home/GLBRCORG/trina.mcmahon/Cyanos/data/dereplicated_MAGs/3300020571-bin.11.fna' as a genome FASTA file, as it does not end with the extension '.fna'
[2020-12-08T20:55:57Z INFO bird_tool_utils::clap_utils] Not using directory entry '/home/GLBRCORG/trina.mcmahon/Cyanos/data/dereplicated_MAGs/16cyanoMAGs_dreped.tar.gz' as a genome FASTA file, as it does not end with the extension '.fna'
[2020-12-08T20:55:57Z INFO bird_tool_utils::clap_utils] Not using directory entry '/home/GLBRCORG/trina.mcmahon/Cyanos/data/dereplicated_MAGs/2582580591.fna' as a genome FASTA file, as it does not end with the extension '.fna'
[2020-12-08T20:55:57Z INFO bird_tool_utils::clap_utils] Not using directory entry '/home/GLBRCORG/trina.mcmahon/Cyanos/data/dereplicated_MAGs/3300020551-bin.8.fna' as a genome FASTA file, as it does not end with the extension '.fna'
[2020-12-08T20:55:57Z INFO bird_tool_utils::clap_utils] Not using directory entry '/home/GLBRCORG/trina.mcmahon/Cyanos/data/dereplicated_MAGs/3300020573-bin.18.fna' as a genome FASTA file, as it does not end with the extension '.fna'
[2020-12-08T20:55:57Z INFO bird_tool_utils::clap_utils] Not using directory entry '/home/GLBRCORG/trina.mcmahon/Cyanos/data/dereplicated_MAGs/GEODES117-bin.31.fna' as a genome FASTA file, as it does not end with the extension '.fna'
[2020-12-08T20:55:57Z INFO bird_tool_utils::clap_utils] Not using directory entry '/home/GLBRCORG/trina.mcmahon/Cyanos/data/dereplicated_MAGs/3300020501-bin.15.fna' as a genome FASTA file, as it does not end with the extension '.fna'
[2020-12-08T20:55:57Z INFO bird_tool_utils::clap_utils] Not using directory entry '/home/GLBRCORG/trina.mcmahon/Cyanos/data/dereplicated_MAGs/refList.txt' as a genome FASTA file, as it does not end with the extension '.fna'
[2020-12-08T20:55:57Z INFO bird_tool_utils::clap_utils] Not using directory entry '/home/GLBRCORG/trina.mcmahon/Cyanos/data/dereplicated_MAGs/archive_edited_fasta_id' as a genome FASTA file
[2020-12-08T20:55:57Z INFO bird_tool_utils::clap_utils] Not using directory entry '/home/GLBRCORG/trina.mcmahon/Cyanos/data/dereplicated_MAGs/3300020490-bin.6.fna' as a genome FASTA file, as it does not end with the extension '.fna'
[2020-12-08T20:55:57Z INFO bird_tool_utils::clap_utils] Not using directory entry '/home/GLBRCORG/trina.mcmahon/Cyanos/data/dereplicated_MAGs/3300020558-bin.31.fna' as a genome FASTA file, as it does not end with the extension '.fna'
[2020-12-08T20:55:57Z INFO bird_tool_utils::clap_utils] Not using directory entry '/home/GLBRCORG/trina.mcmahon/Cyanos/data/dereplicated_MAGs/3300020542-bin.8.fna' as a genome FASTA file, as it does not end with the extension '.fna'
[2020-12-08T20:55:57Z INFO bird_tool_utils::clap_utils] Not using directory entry '/home/GLBRCORG/trina.mcmahon/Cyanos/data/dereplicated_MAGs/16cyanoMAGs_original_fasta_id' as a genome FASTA file
[2020-12-08T20:55:57Z INFO bird_tool_utils::clap_utils] Not using directory entry '/home/GLBRCORG/trina.mcmahon/Cyanos/data/dereplicated_MAGs/2582580531.fna' as a genome FASTA file, as it does not end with the extension '.fna'
[2020-12-08T20:55:57Z INFO bird_tool_utils::clap_utils] Not using directory entry '/home/GLBRCORG/trina.mcmahon/Cyanos/data/dereplicated_MAGs/3300020517-bin.16.fna' as a genome FASTA file, as it does not end with the extension '.fna'
[2020-12-08T20:55:57Z INFO bird_tool_utils::clap_utils] Not using directory entry '/home/GLBRCORG/trina.mcmahon/Cyanos/data/dereplicated_MAGs/16cyanoMAGs_edited_fasta_id' as a genome FASTA file
[2020-12-08T20:55:57Z INFO bird_tool_utils::clap_utils] Not using directory entry '/home/GLBRCORG/trina.mcmahon/Cyanos/data/dereplicated_MAGs/GEODES118-bin.197.fna' as a genome FASTA file, as it does not end with the extension '.fna'
[2020-12-08T20:55:57Z INFO bird_tool_utils::clap_utils] Not using directory entry '/home/GLBRCORG/trina.mcmahon/Cyanos/data/dereplicated_MAGs/3300020547-bin.20.fna' as a genome FASTA file, as it does not end with the extension '.fna'
[2020-12-08T20:55:57Z INFO bird_tool_utils::clap_utils] Not using directory entry '/home/GLBRCORG/trina.mcmahon/Cyanos/data/dereplicated_MAGs/3300020539-bin.6.fna' as a genome FASTA file, as it does not end with the extension '.fna'
[2020-12-08T20:55:57Z INFO bird_tool_utils::clap_utils] Not using directory entry '/home/GLBRCORG/trina.mcmahon/Cyanos/data/dereplicated_MAGs/3300020509-bin.3.fna' as a genome FASTA file, as it does not end with the extension '.fna'
[2020-12-08T20:55:57Z INFO bird_tool_utils::clap_utils] Not using directory entry '/home/GLBRCORG/trina.mcmahon/Cyanos/data/dereplicated_MAGs/16cyanoMAGs-fastaIDedited.tar.gz' as a genome FASTA file, as it does not end with the extension '.fna'
[2020-12-08T20:55:57Z INFO bird_tool_utils::clap_utils] Not using directory entry '/home/GLBRCORG/trina.mcmahon/Cyanos/data/dereplicated_MAGs/2582580577.fna' as a genome FASTA file, as it does not end with the extension '.fna'
thread 'main' panicked at 'Failed to parse genome paths: "Found 0 genomes from the genome-fasta-directory, cannot continue."', src/bin/coverm.rs:782:18
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace
(coverM) [trina.mcmahon@scarcity-11 coverM_mapping]$ ps
PID TTY TIME CMD
3710272 pts/2 00:00:00 bash
3711189 pts/2 00:00:00 ps
(coverM) [trina.mcmahon@scarcity-11 coverM_mapping]$ coverm genome -t 40 --single /home/GLBRCORG/trina.mcmahon/Cyanos/data/metaGs/ -d /home/GLBRCORG/trina.mcmahon/Cyanos/data/dereplicated_MAGs/ -x .fna -p minimap2-sr --min-read-percent-identity 0.9 --methods relative_abundance --bam-file-cache-directory bam_cache/ --discard-unmapped -v
[2020-12-08T20:57:20Z INFO coverm] CoverM version 0.5.0
[2020-12-08T20:57:20Z INFO coverm] Using min-covered-fraction 10%
[2020-12-08T20:57:20Z DEBUG coverm] Cached regular coverage taker with columns to normlise: [0] and rpkm_column: None
[2020-12-08T20:57:20Z INFO coverm] Using min-read-percent-identity 90%
[2020-12-08T20:57:20Z DEBUG coverm] Filter parameters set as FilterParameters { flag_filters: FlagFilter { include_improper_pairs: true, include_supplementary: true, include_secondary: false }, min_aligned_length_single: 0, min_percent_identity_single: 0.9, min_aligned_percent_single: 0.0, min_aligned_length_pair: 0, min_percent_identity_pair: 0.0, min_aligned_percent_pair: 0.0 }
[2020-12-08T20:57:20Z INFO bird_tool_utils::clap_utils] Not using directory entry '/home/GLBRCORG/trina.mcmahon/Cyanos/data/dereplicated_MAGs/3300020571-bin.11.fna' as a genome FASTA file, as it does not end with the extension '.fna'
[2020-12-08T20:57:20Z INFO bird_tool_utils::clap_utils] Not using directory entry '/home/GLBRCORG/trina.mcmahon/Cyanos/data/dereplicated_MAGs/16cyanoMAGs_dreped.tar.gz' as a genome FASTA file, as it does not end with the extension '.fna'
[2020-12-08T20:57:20Z INFO bird_tool_utils::clap_utils] Not using directory entry '/home/GLBRCORG/trina.mcmahon/Cyanos/data/dereplicated_MAGs/2582580591.fna' as a genome FASTA file, as it does not end with the extension '.fna'
[2020-12-08T20:57:20Z INFO bird_tool_utils::clap_utils] Not using directory entry '/home/GLBRCORG/trina.mcmahon/Cyanos/data/dereplicated_MAGs/3300020551-bin.8.fna' as a genome FASTA file, as it does not end with the extension '.fna'
[2020-12-08T20:57:20Z INFO bird_tool_utils::clap_utils] Not using directory entry '/home/GLBRCORG/trina.mcmahon/Cyanos/data/dereplicated_MAGs/3300020573-bin.18.fna' as a genome FASTA file, as it does not end with the extension '.fna'
[2020-12-08T20:57:20Z INFO bird_tool_utils::clap_utils] Not using directory entry '/home/GLBRCORG/trina.mcmahon/Cyanos/data/dereplicated_MAGs/GEODES117-bin.31.fna' as a genome FASTA file, as it does not end with the extension '.fna'
[2020-12-08T20:57:20Z INFO bird_tool_utils::clap_utils] Not using directory entry '/home/GLBRCORG/trina.mcmahon/Cyanos/data/dereplicated_MAGs/3300020501-bin.15.fna' as a genome FASTA file, as it does not end with the extension '.fna'
[2020-12-08T20:57:20Z INFO bird_tool_utils::clap_utils] Not using directory entry '/home/GLBRCORG/trina.mcmahon/Cyanos/data/dereplicated_MAGs/refList.txt' as a genome FASTA file, as it does not end with the extension '.fna'
[2020-12-08T20:57:20Z INFO bird_tool_utils::clap_utils] Not using directory entry '/home/GLBRCORG/trina.mcmahon/Cyanos/data/dereplicated_MAGs/archive_edited_fasta_id' as a genome FASTA file
[2020-12-08T20:57:20Z INFO bird_tool_utils::clap_utils] Not using directory entry '/home/GLBRCORG/trina.mcmahon/Cyanos/data/dereplicated_MAGs/3300020490-bin.6.fna' as a genome FASTA file, as it does not end with the extension '.fna'
[2020-12-08T20:57:20Z INFO bird_tool_utils::clap_utils] Not using directory entry '/home/GLBRCORG/trina.mcmahon/Cyanos/data/dereplicated_MAGs/3300020558-bin.31.fna' as a genome FASTA file, as it does not end with the extension '.fna'
[2020-12-08T20:57:20Z INFO bird_tool_utils::clap_utils] Not using directory entry '/home/GLBRCORG/trina.mcmahon/Cyanos/data/dereplicated_MAGs/3300020542-bin.8.fna' as a genome FASTA file, as it does not end with the extension '.fna'
[2020-12-08T20:57:20Z INFO bird_tool_utils::clap_utils] Not using directory entry '/home/GLBRCORG/trina.mcmahon/Cyanos/data/dereplicated_MAGs/16cyanoMAGs_original_fasta_id' as a genome FASTA file
[2020-12-08T20:57:20Z INFO bird_tool_utils::clap_utils] Not using directory entry '/home/GLBRCORG/trina.mcmahon/Cyanos/data/dereplicated_MAGs/2582580531.fna' as a genome FASTA file, as it does not end with the extension '.fna'
[2020-12-08T20:57:20Z INFO bird_tool_utils::clap_utils] Not using directory entry '/home/GLBRCORG/trina.mcmahon/Cyanos/data/dereplicated_MAGs/3300020517-bin.16.fna' as a genome FASTA file, as it does not end with the extension '.fna'
[2020-12-08T20:57:20Z INFO bird_tool_utils::clap_utils] Not using directory entry '/home/GLBRCORG/trina.mcmahon/Cyanos/data/dereplicated_MAGs/16cyanoMAGs_edited_fasta_id' as a genome FASTA file
[2020-12-08T20:57:20Z INFO bird_tool_utils::clap_utils] Not using directory entry '/home/GLBRCORG/trina.mcmahon/Cyanos/data/dereplicated_MAGs/GEODES118-bin.197.fna' as a genome FASTA file, as it does not end with the extension '.fna'
[2020-12-08T20:57:20Z INFO bird_tool_utils::clap_utils] Not using directory entry '/home/GLBRCORG/trina.mcmahon/Cyanos/data/dereplicated_MAGs/3300020547-bin.20.fna' as a genome FASTA file, as it does not end with the extension '.fna'
[2020-12-08T20:57:20Z INFO bird_tool_utils::clap_utils] Not using directory entry '/home/GLBRCORG/trina.mcmahon/Cyanos/data/dereplicated_MAGs/3300020539-bin.6.fna' as a genome FASTA file, as it does not end with the extension '.fna'
[2020-12-08T20:57:20Z INFO bird_tool_utils::clap_utils] Not using directory entry '/home/GLBRCORG/trina.mcmahon/Cyanos/data/dereplicated_MAGs/3300020509-bin.3.fna' as a genome FASTA file, as it does not end with the extension '.fna'
[2020-12-08T20:57:20Z INFO bird_tool_utils::clap_utils] Not using directory entry '/home/GLBRCORG/trina.mcmahon/Cyanos/data/dereplicated_MAGs/16cyanoMAGs-fastaIDedited.tar.gz' as a genome FASTA file, as it does not end with the extension '.fna'
[2020-12-08T20:57:20Z INFO bird_tool_utils::clap_utils] Not using directory entry '/home/GLBRCORG/trina.mcmahon/Cyanos/data/dereplicated_MAGs/2582580577.fna' as a genome FASTA file, as it does not end with the extension '.fna'
thread 'main' panicked at 'Failed to parse genome paths: "Found 0 genomes from the genome-fasta-directory, cannot continue."', src/bin/coverm.rs:782:18
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace

@wwood
Copy link
Owner

wwood commented Dec 8, 2020

Hi,

Thanks for your interest. Unfortunately saying which options are required is complicated because the interface is quite flexible so none are required exactly - did you have some specific place/way that you might suggest to improve?

To your issue, that's quite odd. Just to check what does this say?

ls -l /home/GLBRCORG/trina.mcmahon/Cyanos/data/dereplicated_MAGs/3300020571-bin.11.fna

They are not dead symbolic links or something?

@mcmahon-uw
Copy link
Author

mcmahon-uw commented Dec 8, 2020 via email

@wwood
Copy link
Owner

wwood commented Dec 9, 2020

So the issue was that you were specifying -x .fna rather than -x fna, so it was actually looking for files ending in ..fna. Will auto-remove the dot and make the error message include the dot too. Also -x fna is the default so there was no need to specify it at all. Thanks for the suggestion re examples - you mean add examples to https://wwood.github.io/CoverM/coverm-genome.html ? If so, that was on my list already, but added impetus here. You can view the examples by running coverm genome -h by the way (but adding examples to the webpage above also adds them to coverm genome --full-help)

wwood added a commit that referenced this issue Dec 9, 2020
See #49 for discussion.

Suggested by: Katherine (Trina) McMahon.
@wwood
Copy link
Owner

wwood commented Dec 9, 2020

The html won't be updated until the next release but thanks for the tip - fixed now in dev. Any other ideas I'm all ears.

@mcmahon-uw
Copy link
Author

mcmahon-uw commented Dec 9, 2020 via email

@wwood
Copy link
Owner

wwood commented Dec 10, 2020

Not at all, fixing these little things helps others (and since the issue was in a centralised library other tools that use bird_tool_utils e.g. Lorikeet).

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

No branches or pull requests

2 participants