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

Add agat sp merge annotations #106

Merged
merged 24 commits into from
Oct 26, 2024
Merged

Add agat sp merge annotations #106

merged 24 commits into from
Oct 26, 2024

Conversation

Leila011
Copy link
Contributor

@Leila011 Leila011 commented Jul 31, 2024

Description

  • add agat_sp_merge_annotations
  • handle multiple inputs

Issue ticket number

Closes #xxxx

Checklist before requesting a review

  • I have performed a self-review of my code

  • Conforms to the Contributing guidelines

  • Proposed changes are described in the CHANGELOG.md

  • I have tested my code with viash ns test --parallel -q <name or namespace>

  • Check the correct box. Does this PR contain:

    • Breaking changes
    • New functionality
    • Major changes
    • Minor changes
    • Documentation
    • Bug fixes

@Leila011 Leila011 marked this pull request as ready for review July 31, 2024 13:35
@Leila011 Leila011 requested a review from rcannood July 31, 2024 13:35
@Leila011 Leila011 requested review from DriesSchaumont and removed request for rcannood August 8, 2024 07:10
src/agat/agat_sp_merge_annotations/config.vsh.yaml Outdated Show resolved Hide resolved
src/agat/agat_sp_merge_annotations/config.vsh.yaml Outdated Show resolved Hide resolved
src/agat/agat_sp_merge_annotations/config.vsh.yaml Outdated Show resolved Hide resolved
Comment on lines 7 to 18
input_files=""
IFS=";" read -ra file_names <<< "$par_gff"
for file in "${file_names[@]}"; do
input_files+="--gff $file "
done
unset IFS

# run agat_sp_merge_annotations
agat_sp_merge_annotations.pl \
$input_files \
-o "$par_output" \
${par_config:+--config "${par_config}"}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you test if the following works?
A couple of things here:

  1. If you set an environment variable as part of a composite command instead of on a separate line, it is only applied for the commands on that line (here IFS is only used by read, so no need to use unset afterwards)
  2. The ${array[@]} syntax can be used to output an array which is seprated by spaces (space is the default separator, this can be adjusted)
Suggested change
input_files=""
IFS=";" read -ra file_names <<< "$par_gff"
for file in "${file_names[@]}"; do
input_files+="--gff $file "
done
unset IFS
# run agat_sp_merge_annotations
agat_sp_merge_annotations.pl \
$input_files \
-o "$par_output" \
${par_config:+--config "${par_config}"}
IFS=";" read -ra file_names <<< "$par_gff"
# run agat_sp_merge_annotations
agat_sp_merge_annotations.pl \
$input_files \
-o "$par_output" \
${file_names[@]} \
${par_config:+--config "${par_config}"}

Copy link
Contributor Author

@Leila011 Leila011 Aug 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it does not, the input should be in this format: --gff input1.gff --gff input2.gff

src/agat/agat_sp_merge_annotations/test.sh Outdated Show resolved Hide resolved
@emmarousseau emmarousseau self-requested a review October 26, 2024 10:10
Copy link
Collaborator

@emmarousseau emmarousseau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Made some minor formatting changes to config

@rcannood rcannood merged commit 11118fb into main Oct 26, 2024
@rcannood rcannood deleted the add-agat_sp_merge_annotations branch October 26, 2024 18:28
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.

4 participants