aitgon / vtam

MIT License
3 stars 3 forks source link

Issue with FilterRenkonen #35

Closed BanaIbrahim closed 7 months ago

BanaIbrahim commented 7 months ago

I ran filter variant step as described in the documentation. vtam filter --params params.yml --db db.sqlite --sortedinfo sorted/sortedinfo.tsv --sorteddir sorted/ --asvtable asvtable_default.tsv -v --log vtam.log

However, I keep getting the following error:

2024-03-25 19:43:58,381 :: INFO :: wopmars :: ToolWrapper: FilterRenkonen -> FilterRenkonen started.
2024-03-25 19:43:58,500 :: ERROR :: wopmars :: Error while executing rule FilterRenkonen (ToolWrapper vtam.wrapper.FilterRenkonen)
                Full stack trace:
                Traceback (most recent call last):
                  File "/mnt/.conda/envs/vtam/lib/python3.11/site-packages/wopmars/ToolWrapperThread.py", line 103, in run
                    self.__tool_wrapper.run()
                  File "/mnt/.conda/envs/vtam/lib/python3.11/site-packages/vtam/wrapper/FilterRenkonen.py", line 112, in run
                    filter_output_i_df = filter_renkonen_runner_obj.get_variant_read_count_delete_df(
                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                  File "/mnt/.conda/envs/vtam/lib/python3.11/site-packages/vtam/utils/RunnerFilterRenkonen.py", line 29, in get_variant_read_count_delete_df
                    renkonen_distance_cutoff = renkonen_distance_df.renkonen_distance.quantile(
                                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                  File "/mnt/.conda/envs/vtam/lib/python3.11/site-packages/pandas/core/generic.py", line 6296, in __getattr__
                    return object.__getattribute__(self, name)
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                AttributeError: 'DataFrame' object has no attribute 'renkonen_distance'

2024-03-25 19:43:58,502 :: ERROR :: wopmars :: The workflow has encountered an error at: 2024-03-25 19:43:58.502017

I don't know how feasible is this, but it would be easier to customize and troubleshoot if I can skip any step in filter, as currently, it's only implemented for filter_indel and filter_codon_stop. I even tried with --until and --since to skip the FilterRenkonen step, but it seems they are connected.

2024-03-25 18:11:50,641 :: ERROR :: wopmars :: An unknown error has occurred:
list index out of range
BanaIbrahim commented 7 months ago

After looking into the source code, it seemed that renkonen_distance_df is not being filled within the for loop of replicates. Eventually, there were some issues with my sortedinfo.tsv, now it's working. Thank you

I'll close this issue.