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

optionally break maf in pieces before Rnacode call #697

Merged
merged 11 commits into from
Apr 13, 2018

Conversation

bernt-matthias
Copy link
Collaborator

@bernt-matthias bernt-matthias commented Mar 9, 2018

Uses breakMAF.pl (from RNAcode package) to break the alignment into pieces. Unfortunately the perl script seems to be missing in the conda package.

Of course we could also have a separate tool (but I don't see if splitting is interesting somewhere else).

Copy link
Owner

@bgruening bgruening left a comment

Choose a reason for hiding this comment

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

@bernt-matthias please also increase the tool version to 0.3.1. I guess we should add the perl script to the conda package.

@@ -10,6 +10,15 @@
<version_command>RNAcode --version</version_command>
<command>
Copy link
Owner

Choose a reason for hiding this comment

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

Can we use detect_errors here and remove the stdio?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

should be fine

breakMAF.pl
--maxlength $cond_breakmaf.maxlength
--desiredLength $cond_breakmaf.desiredLength
< $alignment > aln &&
Copy link
Owner

Choose a reason for hiding this comment

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

alignment should be single quoted

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

sure

- single quotes for alignment file
- version increased
- stdio -> detect_errors="exit_code"
@bernt-matthias
Copy link
Collaborator Author

bernt-matthias commented Mar 9, 2018

could you update the conda package?

@bgruening
Copy link
Owner

Yes I can, but this take some time :(

@bernt-matthias
Copy link
Collaborator Author

bernt-matthias commented Mar 23, 2018

Since breakMAF.pl did not help with the RNAcode bug (ViennaRNA/RNAcode#8) I wrote a shell script that processes each part of split maf separately (which could also open some possibilities for parallel processing). I left this option optional. I added the breakMAF.pl since it seems not to be included in the latest release of RNAcode, but is only available from github.

@bernt-matthias
Copy link
Collaborator Author

bernt-matthias commented Mar 23, 2018

I'm not so happy with creating a copy of the maf in the beginning of the script .. any thoughts on this?

Also replacing '.' by '-' (ViennaRNA/RNAcode#7) could be implemented easily .. but this could also be handled by a separate tool.

RNAcode

#if $cond_breakmaf.select_breakmaf == 'breakmaf'
$__tool_directory__/breakMAF.pl
Copy link
Owner

Choose a reason for hiding this comment

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

This one should be quoted.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@bgruening if I quote $cond_breakmaf.select_breakmaf then it does not work (i.e. the else path is used all the time). I guess you meant to quote something else?

Copy link
Collaborator

Choose a reason for hiding this comment

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

@bernt-matthias You need to quote $__tool_directory__/breakMAF.pl, i.e. '$__tool_directory__/breakMAF.pl' , since $__tool_directory__ may contain spaces.

#end if

#if $cond_breakmaf.select_breakmaf == 'breakmaf' and $cond_breakmaf.processseparately == 'yes'
$__tool_directory__/processMAF.sh
Copy link
Owner

Choose a reason for hiding this comment

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

quoted

@bgruening
Copy link
Owner

Which copy? Does a symlink work?

@bernt-matthias
Copy link
Collaborator Author

I meant the 'copy' created by breakMAF.pl. I was thinking about using a named pipe. But I'm unsure how this needs to be used. I guess breakMAF would need to run in the background. I also don't know if RNAcode takes input from stdin...

@bernt-matthias
Copy link
Collaborator Author

@bgruening another question calling the perl and bash scripts directly caused an error because execute rights are needed for others (our galaxy runs jobs as real user). should I always use bash SCRIPT or perl SCRIPT for the calls?

@bgruening
Copy link
Owner

@bgruening another question calling the perl and bash scripts directly caused an error because execute rights are needed for others

This smells like chmod +x on the conda side?
Don't worry about the copying right now. The files are not that big isn't it.

@bernt-matthias
Copy link
Collaborator Author

@bgruening we will apply it on the hg38 alignments with 20 or 99 other mammals .. quite large :)

@bgruening
Copy link
Owner

Seriously? Crazy :)
But I don't have a better option at hand.

@bgruening
Copy link
Owner

You call. Merge?

@bernt-matthias
Copy link
Collaborator Author

Hoping that this is a good idea: galaxyproject/galaxy#5884 I switched to pipes. I'm fine to merge. If you think its not a good idea we can revert the last commit.

@bgruening bgruening merged commit b6d3800 into bgruening:master Apr 13, 2018
@bgruening
Copy link
Owner

Available from the toolshed and usegalaxy.eu.
Thanks!

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.

3 participants