Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

cutadapt improvements #5577

Merged

Conversation

bernt-matthias
Copy link
Contributor

@bernt-matthias bernt-matthias commented Nov 3, 2023

fixes #5099

While working on this I have noted some more room for improvement. special attention is needed here IMO:

  • the internal parameter has been dropped. while the implementation was probably not good anyway (the set value applied to all adapters which was likely not intended), the current implementation does not allow adding the X for builtin adapters.

Maybe I find the time to add some missing parameters ...

FOR CONTRIBUTOR:

  • - I have read the CONTRIBUTING.md document and this tool is appropriate for the tools-iuc repo.
  • - License permits unrestricted use (educational + commercial)
  • - This PR adds a new tool or tool collection
  • - This PR updates an existing tool or tool collection
  • - This PR does something else (explain below)

@bernt-matthias bernt-matthias marked this pull request as draft November 3, 2023 22:19
test 4 was failing due to galaxyproject/galaxy#15085

here the size assertion makes no sense given that we compare for exact
equality anyway.
- makes no sense to apply the `internal` property (which just appends
  an X to the adapter sequence) to all adapters
- also came in handy for unifying the cli generation for the adapter
  options using a single token
instead of value

and use lowe case boolean attribute values
if we would want to consider fastqillumina/solexa then we would need
to set `--quality-base 33`. while this would be easy, we would also
need to set the output type equal to the input type (which seems
not worth the effort) .. alternatively we could call some converter
on the output to make it fastqsanger.
- fasta output could not be detected due to `out[12].fq*`
- polyA trimming tests required bump
- requires `--quality-base=64` set
- also allow .bz2 types (which were already covered by the code)
tools/cutadapt/macros.xml Outdated Show resolved Hide resolved
@bernt-matthias
Copy link
Contributor Author

Do you want to have another look on this @mvdbeek ?

@mvdbeek mvdbeek merged commit c37e2ae into galaxyproject:main Dec 17, 2023
11 checks passed
@mvdbeek
Copy link
Member

mvdbeek commented Dec 17, 2023

thanks a lot @bernt-matthias!

@bernt-matthias bernt-matthias deleted the topic/cutadapt-length-paired branch April 16, 2024 15:54
@lldelisle
Copy link
Contributor

Hi guys,
I've run this tool on my old instance (22.01) and it failed because the cut argument has moved from the section library.r1 to the section read_mod_options but the command line uses str($cut) so my instance says:

Traceback (most recent call last):
  File "/data/galaxy/galaxy/server/lib/galaxy/jobs/runners/__init__.py", line 248, in prepare_job
    job_wrapper.prepare()
  File "/data/galaxy/galaxy/server/lib/galaxy/jobs/__init__.py", line 1202, in prepare
    self.command_line, self.version_command_line, self.extra_filenames, self.environment_variables = tool_evaluator.build()
  File "/data/galaxy/galaxy/server/lib/galaxy/tools/evaluation.py", line 448, in build
    global_tool_logs(self._build_command_line, config_file, "Building Command Line")
  File "/data/galaxy/galaxy/server/lib/galaxy/tools/evaluation.py", line 77, in global_tool_logs
    raise e
  File "/data/galaxy/galaxy/server/lib/galaxy/tools/evaluation.py", line 73, in global_tool_logs
    return func()
  File "/data/galaxy/galaxy/server/lib/galaxy/tools/evaluation.py", line 465, in _build_command_line
    command_line = fill_template(command, context=param_dict, python_template_version=self.tool.python_template_version)
  File "/data/galaxy/galaxy/server/lib/galaxy/util/template.py", line 107, in fill_template
    raise first_exception or e
  File "/data/galaxy/galaxy/server/lib/galaxy/util/template.py", line 80, in fill_template
    return unicodify(t, log_exception=False)
  File "/data/galaxy/galaxy/server/lib/galaxy/util/__init__.py", line 1080, in unicodify
    value = str(value)
  File "/data/galaxy/galaxy/venv/lib/python3.8/site-packages/Cheetah/Template.py", line 1053, in __unicode__
    return getattr(self, mainMethName)()
  File "cheetah_DynamicallyCompiledCheetahTemplate_1716409893_2057257_87444.py", line 608, in respond
NameMapper.NotFound: cannot find 'cut'

Would you mind to fix this or change the profile version?
Thanks.

@mvdbeek
Copy link
Member

mvdbeek commented May 23, 2024

It's a bug one way or another, the parameter should be fully qualified (i.e str($read_mod_options.cut))

@mvdbeek
Copy link
Member

mvdbeek commented May 23, 2024

Which version is that happening on @lldelisle ? This seems to be fixed in the latest version at least ?

@lldelisle
Copy link
Contributor

Maybe I just ran an iwc rna-seq workflow and it was version 4.4+galaxy1

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

Successfully merging this pull request may close these issues.

cutadapt: paired parameter inconsistency
4 participants