Repository navigation
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Problem
Several inputs make fastoma-check-input or fastoma-infer-roothogs crash or stop with an error that does not point at the cause. Grouped here because the fixes are small and independent.
Input folders
- Hidden files are taken as proteomes or hogmaps:
._AQUAE.fa(AppleDouble files that macOStar/zipadd to archives) or.DS_Store. check-input then stops with "These species are not in the species tree: ._AQUAE" (check_input.py:39,91,_utils_roothog.py:165-170). This broke the archive-input nf-test on Linux CI. - A file without an extension (e.g.
README) in the proteome folder crashesparse_proteomes(file.rsplit,_utils_roothog.py:166); check-input only warns about it. - Dots are dropped from species names derived from hogmap file names (
"".join(i.split(".")[:-2]),check_input.py:91), soHomo.sapiens.fa.hogmapnever matches the proteomeHomo.sapiens.fa. - An empty proteome raises
ZeroDivisionError(check_input.py:65) instead of being reported as invalid.
Species tree
- Duplicate internal node names are never reported: the name list is reset inside the loop (
check_input.py:100). - A tree without internal nodes raises
UnboundLocalError(check_input.py:106). - An internal node name made only of special characters becomes empty (
check_input.py:168). - An internal node named like a leaf makes ete3's prune fail with "Ambiguous node name" (
check_input.py:180). Such names would also clash later, because per-level pickle files are named after nodes. read_species_treecallssys.exit()(exit status 0) when the tree can't be read (_utils_subhog.py:78,81), so Nextflow sees the task as successful.
Splice files
- A species whose splice file has a single line is ignored (
len(isoforms) > 1,check_input.py:195).
Tests (strict xfail on PR #112)
tests/test_check_input.py::TestCheckProteomeFiles::test_hidden_files_ignoredtests/test_check_input.py::TestCheckHogmapFiles::test_hidden_files_ignoredtests/test_roothog_io.py::TestParseProteomes::test_hidden_files_ignoredtests/test_roothog_io.py::TestParseProteomes::test_non_fasta_files_ignoredtests/test_check_input.py::TestCheckHogmapFiles::test_dotted_species_nametests/test_check_input.py::TestCheckProteome::test_empty_proteome_rejectedtests/test_check_input.py::TestSpeciesTreeChecks::test_internalnode_duplicates_reportedtests/test_check_input.py::TestSpeciesTreeChecks::test_internalnode_single_leaftests/test_check_input.py::TestAddInternalNodePrune::test_special_char_only_nametests/test_check_input.py::TestAddInternalNodePrune::test_internal_node_named_like_leaftests/test_check_input.py::TestCheckSplice::test_single_gene_with_isoforms- (no test yet for the
sys.exit()exit status)
Proposed fix
One shared helper that lists input files (skip names starting with ., accept known extensions only) used by check-input and infer-roothogs, so both agree on what a proteome is; then fix the remaining cases individually. Bare except: around tree parsing should become specific exceptions with a non-zero exit.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
Activity
fix: skip hidden files in the Nextflow proteomes channel
fix: renaming internal nodes must not move supplied labels to other c…